equal
deleted
inserted
replaced
64 #endif |
64 #endif |
65 |
65 |
66 foreach (QString theme, themes) |
66 foreach (QString theme, themes) |
67 { |
67 { |
68 // themes without icon are supposed to be hidden |
68 // themes without icon are supposed to be hidden |
69 QString iconpath = |
69 QString iconpath = QString("physfs://Themes/%1/icon.png").arg(theme); |
70 datamgr.findFileForRead(QString("Themes/%1/icon.png").arg(theme)); |
|
71 |
70 |
72 if (!QFile::exists(iconpath)) |
71 if (!QFile::exists(iconpath)) |
73 continue; |
72 continue; |
74 |
73 |
75 QMap<int, QVariant> dataset; |
74 QMap<int, QVariant> dataset; |
81 QIcon icon(iconpath); |
80 QIcon icon(iconpath); |
82 |
81 |
83 dataset.insert(Qt::DecorationRole, icon); |
82 dataset.insert(Qt::DecorationRole, icon); |
84 |
83 |
85 // load and set preview icon |
84 // load and set preview icon |
86 QIcon preview(datamgr.findFileForRead(QString("Themes/%1/icon@2x.png").arg(theme))); |
85 QIcon preview(QString("physfs://Themes/%1/icon@2x.png").arg(theme)); |
87 dataset.insert(Qt::UserRole, preview); |
86 dataset.insert(Qt::UserRole, preview); |
88 |
87 |
89 m_data.append(dataset); |
88 m_data.append(dataset); |
90 } |
89 } |
91 |
90 |