summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoatheme.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-03-31 19:23:18 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-06-04 10:39:53 +0200
commit1cee9cc5870b475b141dfa6ad84de2038a28d5b8 (patch)
tree999dfe9b3cb2743271d5475a808cd1c59fd095c1 /src/plugins/platforms/cocoa/qcocoatheme.mm
parent9dd8e655cdd26eeaae30645b7fe013d9a696547f (diff)
macOS: Remove QtWidget dependency from platform plugin
The dialog helpers don't depend on widgets themselves, and should be built regardless of whether the widget dialogs are enabled, as these helpers can (and should) be used by other layers, such as Qt Quick. Change-Id: I1c66b474ab2f29748f1256aea90229c51c12a16f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoatheme.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index 1b82b35795..838a7cbbf1 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -63,18 +63,9 @@
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformnativeinterface.h>
-#ifdef QT_WIDGETS_LIB
-#include <QtWidgets/qtwidgetsglobal.h>
-#if QT_CONFIG(colordialog)
#include "qcocoacolordialoghelper.h"
-#endif
-#if QT_CONFIG(filedialog)
#include "qcocoafiledialoghelper.h"
-#endif
-#if QT_CONFIG(fontdialog)
#include "qcocoafontdialoghelper.h"
-#endif
-#endif
#include <CoreServices/CoreServices.h>
@@ -329,32 +320,22 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const
{
if (dialogType == QPlatformTheme::FileDialog)
return true;
-#if defined(QT_WIDGETS_LIB) && QT_CONFIG(colordialog)
if (dialogType == QPlatformTheme::ColorDialog)
return true;
-#endif
-#if defined(QT_WIDGETS_LIB) && QT_CONFIG(fontdialog)
if (dialogType == QPlatformTheme::FontDialog)
return true;
-#endif
return false;
}
QPlatformDialogHelper *QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const
{
switch (dialogType) {
-#if defined(QT_WIDGETS_LIB) && QT_CONFIG(filedialog)
case QPlatformTheme::FileDialog:
return new QCocoaFileDialogHelper();
-#endif
-#if defined(QT_WIDGETS_LIB) && QT_CONFIG(colordialog)
case QPlatformTheme::ColorDialog:
return new QCocoaColorDialogHelper();
-#endif
-#if defined(QT_WIDGETS_LIB) && QT_CONFIG(fontdialog)
case QPlatformTheme::FontDialog:
return new QCocoaFontDialogHelper();
-#endif
default:
return nullptr;
}