From ee383b89f16a9a75a934076255bddbef5a075fa3 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 19 Aug 2009 15:50:45 +0200 Subject: Integrate the GuiPlatformPlugin interface This is an internal interface for plugins that can be provided by the platform to give platform-specific features by platforms built on top of Qt. We can easlily integrate Qt on Windows, Mac, Gnome, ... without any plugin because we can link to their respective library (dynamically if we don't want to depend on it). On Gnome, we can dynamically resolve Gtk+ symbols. This is however not possible for KDE or other platform built on top of Qt: we can't link against their library because they depend on us and we can't dynamically resolve the symbols because they are mangled (C++) So this plugin provides hooks inside Qt to be able to do things like native File or Color dialog, native icons, accurate reading of the config file, and so on. This is currently private API. Task-number: QT-406 Reviewed-by: Jens Bache-Wiig Reviewed-by: Oswald Buddenhagen --- src/gui/image/qicon.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/gui/image/qicon.cpp') diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index fce4508a95..3448459f78 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -54,6 +54,7 @@ #include "qvariant.h" #include "qcache.h" #include "qdebug.h" +#include "private/qguiplatformplugin_p.h" #ifdef Q_WS_MAC #include @@ -966,13 +967,9 @@ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback) QIcon icon; -#ifdef Q_WS_X11 - if (X11->desktopEnvironment == DE_KDE) { - icon = QKde::kdeIcon(name); - if (!icon.isNull()) - return icon; - } -#endif + icon = qt_guiPlatformPlugin()->loadIcon(name); + if (!icon.isNull()) + return icon; if (iconCache.contains(name)) { icon = *iconCache.object(name); -- cgit v1.2.1