From 788cd98b357fdc9dd8b0f0b1baf1033f0efa1f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 31 Mar 2020 16:07:55 +0200 Subject: [PATCH] Move QAbstractFileIconEngine into QtGui Task-number: QTBUG-83255 Change-Id: Iab502c51600b96f315113b08fa473ed28a5457fc Reviewed-by: Volker Hilsheimer --- src/gui/CMakeLists.txt | 1 + src/gui/image/image.pri | 2 ++ .../themes => gui/image}/qabstractfileiconengine.cpp | 0 .../themes => gui/image}/qabstractfileiconengine_p.h | 2 +- src/platformsupport/CMakeLists.txt | 4 +++- src/platformsupport/platformsupport.pro | 6 ++++-- src/platformsupport/themes/CMakeLists.txt | 2 -- src/platformsupport/themes/themes.pro | 6 ------ src/plugins/platforms/cocoa/CMakeLists.txt | 1 - src/plugins/platforms/cocoa/cocoa.pro | 4 +--- src/plugins/platforms/cocoa/qcocoatheme.mm | 2 +- src/plugins/platforms/direct2d/direct2d.pro | 2 +- src/plugins/platforms/vnc/CMakeLists.txt | 1 - src/plugins/platforms/vnc/vnc.pro | 2 +- src/plugins/platforms/windows/CMakeLists.txt | 1 - src/plugins/platforms/windows/qwindowstheme.cpp | 2 +- src/plugins/platforms/windows/windows.pro | 2 +- src/plugins/platformthemes/CMakeLists.txt | 2 +- src/plugins/platformthemes/platformthemes.pro | 2 +- 19 files changed, 19 insertions(+), 25 deletions(-) rename src/{platformsupport/themes => gui/image}/qabstractfileiconengine.cpp (100%) rename src/{platformsupport/themes => gui/image}/qabstractfileiconengine_p.h (98%) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 80acf0b754..af144a2e24 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -65,6 +65,7 @@ qt_add_module(Gui image/qicon.cpp image/qicon.h image/qicon_p.h image/qiconengine.cpp image/qiconengine.h image/qiconengineplugin.cpp image/qiconengineplugin.h + image/qabstractfileiconengine.cpp image/qabstractfileiconengine_p.h image/qiconloader.cpp image/qiconloader_p.h image/qimage.cpp image/qimage.h image/qimage_p.h image/qimage_conversions.cpp diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index 0c033609c4..c1cd798490 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -26,6 +26,7 @@ HEADERS += \ image/qiconloader_p.h \ image/qiconengine.h \ image/qiconengineplugin.h \ + image/qabstractfileiconengine_p.h SOURCES += \ image/qbitmap.cpp \ @@ -47,6 +48,7 @@ SOURCES += \ image/qiconloader.cpp \ image/qiconengine.cpp \ image/qiconengineplugin.cpp \ + image/qabstractfileiconengine.cpp qtConfig(movie) { HEADERS += image/qmovie.h diff --git a/src/platformsupport/themes/qabstractfileiconengine.cpp b/src/gui/image/qabstractfileiconengine.cpp similarity index 100% rename from src/platformsupport/themes/qabstractfileiconengine.cpp rename to src/gui/image/qabstractfileiconengine.cpp diff --git a/src/platformsupport/themes/qabstractfileiconengine_p.h b/src/gui/image/qabstractfileiconengine_p.h similarity index 98% rename from src/platformsupport/themes/qabstractfileiconengine_p.h rename to src/gui/image/qabstractfileiconengine_p.h index ce38cf262e..865da58f15 100644 --- a/src/platformsupport/themes/qabstractfileiconengine_p.h +++ b/src/gui/image/qabstractfileiconengine_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE -class QAbstractFileIconEngine : public QPixmapIconEngine +class Q_GUI_EXPORT QAbstractFileIconEngine : public QPixmapIconEngine { public: explicit QAbstractFileIconEngine(const QFileInfo &info, QPlatformTheme::IconOptions opts) diff --git a/src/platformsupport/CMakeLists.txt b/src/platformsupport/CMakeLists.txt index 6132d305f4..f6857a077f 100644 --- a/src/platformsupport/CMakeLists.txt +++ b/src/platformsupport/CMakeLists.txt @@ -4,8 +4,10 @@ add_subdirectory(edid) add_subdirectory(eventdispatchers) add_subdirectory(devicediscovery) add_subdirectory(fbconvenience) -add_subdirectory(themes) # special case begin +if(QT_FEATURE_xcb OR (UNIX AND NOT APPLE)) + add_subdirectory(themes) +endif() if (QT_FEATURE_dbus) add_subdirectory(linuxofono) endif() diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index 439685bfd8..082880654b 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -5,8 +5,10 @@ SUBDIRS = \ edid \ eventdispatchers \ devicediscovery \ - fbconvenience \ - themes + fbconvenience + +if(unix:!uikit:!macos)|qtConfig(xcb): \ + SUBDIRS += themes if(qtConfig(freetype):!darwin)|win32: \ SUBDIRS += fontdatabases diff --git a/src/platformsupport/themes/CMakeLists.txt b/src/platformsupport/themes/CMakeLists.txt index 3b1ad022b8..87b40732da 100644 --- a/src/platformsupport/themes/CMakeLists.txt +++ b/src/platformsupport/themes/CMakeLists.txt @@ -7,8 +7,6 @@ qt_add_module(ThemeSupport STATIC INTERNAL_MODULE - SOURCES - qabstractfileiconengine.cpp qabstractfileiconengine_p.h DEFINES QT_NO_CAST_FROM_ASCII PUBLIC_LIBRARIES diff --git a/src/platformsupport/themes/themes.pro b/src/platformsupport/themes/themes.pro index 668a843473..c524ded875 100644 --- a/src/platformsupport/themes/themes.pro +++ b/src/platformsupport/themes/themes.pro @@ -9,10 +9,4 @@ DEFINES += QT_NO_CAST_FROM_ASCII if(unix:!uikit)|qtConfig(xcb): \ include($$PWD/genericunix/genericunix.pri) -HEADERS += \ - qabstractfileiconengine_p.h - -SOURCES += \ - qabstractfileiconengine.cpp - load(qt_module) diff --git a/src/plugins/platforms/cocoa/CMakeLists.txt b/src/plugins/platforms/cocoa/CMakeLists.txt index 4921ee1ef3..9d578e7eed 100644 --- a/src/plugins/platforms/cocoa/CMakeLists.txt +++ b/src/plugins/platforms/cocoa/CMakeLists.txt @@ -60,7 +60,6 @@ qt_internal_add_plugin(QCocoaIntegrationPlugin Qt::CorePrivate Qt::Gui Qt::GuiPrivate - Qt::ThemeSupportPrivate ) # special case begin diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index c4d0750b2a..c0a7b4e6cf 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -93,9 +93,7 @@ LIBS += -framework AppKit -framework CoreServices -framework Carbon -framework I DEFINES += QT_NO_FOREACH -QT += \ - core-private gui-private \ - theme_support-private +QT += core-private gui-private CONFIG += no_app_extension_api_only diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index 543348c7b6..1b82b35795 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro index 09dce90291..fc21c6f843 100644 --- a/src/plugins/platforms/direct2d/direct2d.pro +++ b/src/plugins/platforms/direct2d/direct2d.pro @@ -3,7 +3,7 @@ TARGET = qdirect2d QT += \ core-private gui-private \ eventdispatcher_support-private \ - fontdatabase_support-private theme_support-private + fontdatabase_support-private LIBS += -ldwmapi -lversion -ld3d11 -ldxgi -ldxguid QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 diff --git a/src/plugins/platforms/vnc/CMakeLists.txt b/src/plugins/platforms/vnc/CMakeLists.txt index b6ac43794a..e33e5c603f 100644 --- a/src/plugins/platforms/vnc/CMakeLists.txt +++ b/src/plugins/platforms/vnc/CMakeLists.txt @@ -26,7 +26,6 @@ qt_internal_add_plugin(QVncIntegrationPlugin Qt::GuiPrivate Qt::Network Qt::ServiceSupportPrivate - Qt::ThemeSupportPrivate ) #### Keys ignored in scope 1:.:.:vnc.pro:: diff --git a/src/plugins/platforms/vnc/vnc.pro b/src/plugins/platforms/vnc/vnc.pro index 1fa682303f..7b50143fd7 100644 --- a/src/plugins/platforms/vnc/vnc.pro +++ b/src/plugins/platforms/vnc/vnc.pro @@ -2,7 +2,7 @@ TARGET = qvnc QT += \ core-private network gui-private \ - service_support-private theme_support-private fb_support-private \ + service_support-private fb_support-private \ eventdispatcher_support-private fontdatabase_support-private qtHaveModule(input_support-private): \ diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt index f27f24ee73..1c5e2eb309 100644 --- a/src/plugins/platforms/windows/CMakeLists.txt +++ b/src/plugins/platforms/windows/CMakeLists.txt @@ -55,7 +55,6 @@ qt_internal_add_plugin(QWindowsIntegrationPlugin Qt::FontDatabaseSupportPrivate Qt::Gui Qt::GuiPrivate - Qt::ThemeSupportPrivate dwmapi imm32 oleaut32 diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index 25e083fd5c..36831bdd81 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -76,7 +76,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index 484954c7b2..c9549f0eaf 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -3,7 +3,7 @@ TARGET = qwindows QT += \ core-private gui-private \ eventdispatcher_support-private \ - fontdatabase_support-private theme_support-private + fontdatabase_support-private qtConfig(opengl): QT += opengl-private diff --git a/src/plugins/platformthemes/CMakeLists.txt b/src/plugins/platformthemes/CMakeLists.txt index 6aa17c234c..a0e8383ba2 100644 --- a/src/plugins/platformthemes/CMakeLists.txt +++ b/src/plugins/platformthemes/CMakeLists.txt @@ -1,6 +1,6 @@ # Generated from platformthemes.pro. -if(QT_FEATURE_dbus AND QT_FEATURE_mimetype AND QT_FEATURE_regularexpression) +if(QT_FEATURE_dbus AND QT_FEATURE_mimetype AND QT_FEATURE_regularexpression AND NOT APPLE AND NOT WIN32) add_subdirectory(xdgdesktopportal) endif() if(QT_FEATURE_gtk3 AND TARGET Qt::Widgets) diff --git a/src/plugins/platformthemes/platformthemes.pro b/src/plugins/platformthemes/platformthemes.pro index 3bcc659199..07deff036d 100644 --- a/src/plugins/platformthemes/platformthemes.pro +++ b/src/plugins/platformthemes/platformthemes.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs QT_FOR_CONFIG += widgets-private -qtConfig(dbus):qtConfig(regularexpression):qtConfig(mimetype): SUBDIRS += xdgdesktopportal +qtConfig(dbus):qtConfig(regularexpression):qtConfig(mimetype):!darwin:!win32: SUBDIRS += xdgdesktopportal qtHaveModule(widgets):qtConfig(gtk3): SUBDIRS += gtk3