Enable Gtk file icons
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>
Thu, 15 Mar 2012 14:05:59 +0000 (15:05 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 15 May 2012 02:57:15 +0000 (04:57 +0200)
This needs some build system fixes to let widgets depend on
the platform support library (and be built after it).

Change-Id: I6f5b878971d1002a18e2fd66db4f34ffd0ac939a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
src/src.pro
src/widgets/itemviews/qfileiconprovider.cpp
src/widgets/widgets.pro

index 4684156..6ecdc10 100644 (file)
@@ -5,7 +5,7 @@ unset(SRC_SUBDIRS)
 win32:SRC_SUBDIRS += src_winmain
 !wince*:include(tools/tools.pro)
 SRC_SUBDIRS += src_corelib
-SRC_SUBDIRS += src_network src_sql src_gui src_xml src_widgets src_testlib src_platformsupport
+SRC_SUBDIRS += src_network src_sql src_gui src_xml src_testlib src_platformsupport src_widgets
 !wince*:SRC_SUBDIRS += src_printsupport
 nacl: SRC_SUBDIRS -= src_network src_testlib
 contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
@@ -54,7 +54,7 @@ src_concurrent.target = sub-concurrent
    src_gui.depends = src_corelib
    src_printsupport.depends = src_corelib src_gui src_widgets
    src_platformsupport.depends = src_corelib src_gui src_network
-   src_widgets.depends = src_corelib src_gui src_tools_uic
+   src_widgets.depends = src_corelib src_gui src_tools_uic src_platformsupport
    src_xml.depends = src_corelib
    src_concurrent.depends = src_corelib
    src_dbus.depends = src_corelib
index 5356b67..b7d317a 100644 (file)
@@ -58,9 +58,9 @@
 #  include <private/qt_cocoa_helpers_mac_p.h>
 #endif
 
-#if defined(Q_WS_X11) && !defined(Q_NO_STYLE_GTK)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_STYLE_GTK)
 #  include <private/qgtkstyle_p.h>
-#  include <private/qt_x11_p.h>
+#  include <QtPlatformSupport/private/qgenericunixservices_p.h>
 #endif
 
 #ifndef SHGFI_ADDOVERLAYS
@@ -399,8 +399,8 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const
 {
     Q_D(const QFileIconProvider);
 
-#if defined(Q_WS_X11) && !defined(QT_NO_STYLE_GTK)
-    if (X11->desktopEnvironment == DE_GNOME) {
+#if defined(Q_OS_UNIX) && !defined(QT_NO_STYLE_GTK)
+    if (QGenericUnixServices::desktopEnvironment() == QGenericUnixServices::DE_GNOME) {
         QIcon gtkIcon = QGtkStylePrivate::getFilesystemIcon(info);
         if (!gtkIcon.isNull())
             return gtkIcon;
index ad1f292..4e46ffc 100644 (file)
@@ -2,7 +2,7 @@ load(qt_module)
 
 TARGET     = QtWidgets
 QPRO_PWD   = $$PWD
-QT = core core-private gui gui-private
+QT = core core-private gui gui-private platformsupport-private
 
 CONFIG += module
 MODULE_PRI = ../modules/qt_widgets.pri