# HG changeset patch # User unc0rr # Date 1350765254 -14400 # Node ID e78eff243e25d6b2ebb99c113ff0adaaf0a64ffa # Parent 27f9b9362f475e4e2db2995748a931563cce6477 Workaround over QIcon failing to load from physfs diff -r 27f9b9362f47 -r e78eff243e25 QTfrontend/model/ThemeModel.cpp --- a/QTfrontend/model/ThemeModel.cpp Sun Oct 21 00:33:38 2012 +0400 +++ b/QTfrontend/model/ThemeModel.cpp Sun Oct 21 00:34:14 2012 +0400 @@ -78,11 +78,15 @@ dataset.insert(Qt::DisplayRole, theme); // load and set icon - QIcon icon(iconpath); + + QPixmap pix(iconpath); // workaround, as QIcon(iconpath) and even QIcon(QPixmap(iconpath)) don't work + QIcon icon(pix); + dataset.insert(Qt::DecorationRole, icon); // load and set preview icon - QIcon preview(datamgr.findFileForRead(QString("Themes/%1/icon@2x.png").arg(theme))); + pix.load(datamgr.findFileForRead(QString("Themes/%1/icon@2x.png").arg(theme))); + QIcon preview(pix); dataset.insert(Qt::UserRole, preview); m_data.append(dataset);