summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <[email protected]>2017-03-12 18:38:13 +0100
committerLuigi Toscano <[email protected]>2017-03-12 18:38:13 +0100
commitb1aba4ff563e8cefa462d456f0be1a0c285f8927 (patch)
tree8731e7a9aafa5b497bd51f2f4f842c84ed78a9c5
parent753365bbf39bc27ff81e746df4e40cf2e3d1dfd8 (diff)
Port from KIcon to QIcon
-rw-r--r--src/gui/gamevariants.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/gamevariants.cpp b/src/gui/gamevariants.cpp
index 59474c7..ac37612 100644
--- a/src/gui/gamevariants.cpp
+++ b/src/gui/gamevariants.cpp
@@ -26,8 +26,7 @@
#include <KMessageBox>
#include <KLocalizedString>
#include <QPainter>
-#include <KIconLoader>
-#include <KIcon>
+#include <QIcon>
#include <QEvent>
@@ -184,13 +183,13 @@ void GameVariantDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o
// Show icon
- QPixmap iconPixmap = KIcon(icon(index), KIconLoader::global()).pixmap(m_iconWidth, m_iconHeight);
+ QPixmap iconPixmap = QIcon::fromTheme(icon(index)).pixmap(m_iconWidth, m_iconHeight);
painter->drawPixmap(contentRect.left(), (contentRect.height() - iconPixmap.height()) / 2 + contentRect.top(), iconPixmap);
contentRect.adjust(iconPixmap.width() + m_separatorPixels*2, 0, 0, 0);
// // Show configuration icon
// if(configurable(index)) {
-// QPixmap configPixmap = KIcon( QLatin1String( "configure" ), KIconLoader::global()).pixmap(32, 32);
+// QPixmap configPixmap = QIcon::fromTheme( QLatin1String( "configure" ) ).pixmap(32, 32);
// painter->drawPixmap(contentRect.right() - configPixmap.width(), (contentRect.height() - configPixmap.height()) / 2 + contentRect.top(), configPixmap);
// contentRect.adjust(0, 0, -(configPixmap.width() + separatorPixels), 0);
// }