equal
deleted
inserted
replaced
76 |
76 |
77 // set name |
77 // set name |
78 dataset.insert(Qt::DisplayRole, theme); |
78 dataset.insert(Qt::DisplayRole, theme); |
79 |
79 |
80 // load and set icon |
80 // load and set icon |
81 QIcon icon(iconpath); |
81 |
|
82 QPixmap pix(iconpath); // workaround, as QIcon(iconpath) and even QIcon(QPixmap(iconpath)) don't work |
|
83 QIcon icon(pix); |
|
84 |
82 dataset.insert(Qt::DecorationRole, icon); |
85 dataset.insert(Qt::DecorationRole, icon); |
83 |
86 |
84 // load and set preview icon |
87 // load and set preview icon |
85 QIcon preview(datamgr.findFileForRead(QString("Themes/%1/icon@2x.png").arg(theme))); |
88 pix.load(datamgr.findFileForRead(QString("Themes/%1/icon@2x.png").arg(theme))); |
|
89 QIcon preview(pix); |
86 dataset.insert(Qt::UserRole, preview); |
90 dataset.insert(Qt::UserRole, preview); |
87 |
91 |
88 m_data.append(dataset); |
92 m_data.append(dataset); |
89 } |
93 } |
90 |
94 |