summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-05-31 21:00:22 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-07-02 10:38:40 +0000
commit3ab0ba7bf2b27f73b38a6f60181426c05f1d3af0 (patch)
tree885c96afdecfa45b87f73a60fe970c076859754e /src/plugins/platforms
parent7a1b7c74209cdd26510edd440651b259897b8769 (diff)
Convert features.colordialog to QT_[REQUIRE_]CONFIG
Change-Id: If2ac57a10f38002db5a49be3882dfc507a84a3df Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro7
-rw-r--r--src/plugins/platforms/cocoa/qcocoacolordialoghelper.h4
-rw-r--r--src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm4
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm4
4 files changed, 11 insertions, 8 deletions
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index 0f478a79f3..23a049bebc 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -20,7 +20,6 @@ OBJECTIVE_SOURCES += main.mm \
qmultitouch_mac.mm \
qcocoaaccessibilityelement.mm \
qcocoaaccessibility.mm \
- qcocoacolordialoghelper.mm \
qcocoafontdialoghelper.mm \
qcocoacursor.mm \
qcocoaclipboard.mm \
@@ -54,7 +53,6 @@ HEADERS += qcocoaintegration.h \
qmultitouch_mac_p.h \
qcocoaaccessibilityelement.h \
qcocoaaccessibility.h \
- qcocoacolordialoghelper.h \
qcocoafontdialoghelper.h \
qcocoacursor.h \
qcocoaclipboard.h \
@@ -101,6 +99,11 @@ qtHaveModule(widgets) {
qcocoaprintersupport.h \
qcocoaprintdevice.h \
+ qtConfig(colordialog) {
+ SOURCES += qcocoacolordialoghelper.mm
+ HEADERS += qcocoacolordialoghelper.h
+ }
+
qtConfig(filedialog) {
SOURCES += qcocoafiledialoghelper.mm
HEADERS += qcocoafiledialoghelper.h
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h
index 55017668d1..133efd6db8 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h
@@ -40,9 +40,13 @@
#ifndef QCOCOACOLORDIALOGHELPER_H
#define QCOCOACOLORDIALOGHELPER_H
+#include <QtWidgets/qtwidgetsglobal.h>
+
#include <QObject>
#include <qpa/qplatformdialoghelper.h>
+QT_REQUIRE_CONFIG(colordialog);
+
QT_BEGIN_NAMESPACE
class QCocoaColorDialogHelper : public QPlatformColorDialogHelper
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
index a8974c4de5..5d331c0e96 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
@@ -37,8 +37,6 @@
**
****************************************************************************/
-#ifndef QT_NO_COLORDIALOG
-
#include <QtCore/qdebug.h>
#include <QtCore/qtimer.h>
#include <qpa/qplatformtheme.h>
@@ -424,5 +422,3 @@ QColor QCocoaColorDialogHelper::currentColor() const
}
QT_END_NAMESPACE
-
-#endif // QT_NO_COLORDIALOG
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index 53ccf68c0c..faa3df39a0 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -130,7 +130,7 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const
{
if (dialogType == QPlatformTheme::FileDialog)
return true;
-#ifndef QT_NO_COLORDIALOG
+#if QT_CONFIG(colordialog)
if (dialogType == QPlatformTheme::ColorDialog)
return true;
#endif
@@ -148,7 +148,7 @@ QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialo
case QPlatformTheme::FileDialog:
return new QCocoaFileDialogHelper();
#endif
-#ifndef QT_NO_COLORDIALOG
+#if QT_CONFIG(colordialog)
case QPlatformTheme::ColorDialog:
return new QCocoaColorDialogHelper();
#endif