]> git.sur5r.net Git - minitube/commitdiff
Use QIcon::fromTheme() with Qt >= 4.6
authorFlavio Tordini <flavio.tordini@gmail.com>
Tue, 6 Apr 2010 17:35:19 +0000 (19:35 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Tue, 6 Apr 2010 17:35:19 +0000 (19:35 +0200)
src/iconloader/qticonloader.cpp

index 2e607836890f11d3a9852f887c5f08402da0676a..551e1acb75d715b0b170631906ac687122d20654 100644 (file)
@@ -102,6 +102,9 @@ Q_GLOBAL_STATIC(QtIconLoaderImplementation, iconLoaderInstance)
 QIcon QtIconLoader::icon(const QString &name, const QIcon &fallback)
 {
     QIcon icon;
+
+#if QT_VERSION < 0x040600
+
 #ifdef Q_WS_X11
     QString pngExtension(QLatin1String(".png"));
     QList<int> iconSizes;
@@ -110,6 +113,11 @@ QIcon QtIconLoader::icon(const QString &name, const QIcon &fallback)
         icon.addPixmap(iconLoaderInstance()->findIcon(size, name + pngExtension));
     }
 #endif
+
+#else
+    icon = QIcon::fromTheme(name, fallback);
+#endif
+
     if (icon.isNull())
         icon = fallback;
     Q_UNUSED(name);