summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-05-30 20:25:50 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-06-29 02:22:48 +0000
commit1ebe68b01f6ab7e32f4f383d979588842b050dfb (patch)
tree2058977fd56d6fb2f6a4fd33687341c2c4446e31 /src/plugins/platforms
parent150ee7f4f1fb6280aa7fd8c15b6d72d806c0f68c (diff)
Convert features.filedialog to QT_[REQUIRE_]CONFIG
Change-Id: I9bc229b0d1430b81eeb2cfca2b24474736d5d561 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro9
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.h3
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm8
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm10
5 files changed, 25 insertions, 9 deletions
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index 62935210be..0f478a79f3 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -21,7 +21,6 @@ OBJECTIVE_SOURCES += main.mm \
qcocoaaccessibilityelement.mm \
qcocoaaccessibility.mm \
qcocoacolordialoghelper.mm \
- qcocoafiledialoghelper.mm \
qcocoafontdialoghelper.mm \
qcocoacursor.mm \
qcocoaclipboard.mm \
@@ -56,7 +55,6 @@ HEADERS += qcocoaintegration.h \
qcocoaaccessibilityelement.h \
qcocoaaccessibility.h \
qcocoacolordialoghelper.h \
- qcocoafiledialoghelper.h \
qcocoafontdialoghelper.h \
qcocoacursor.h \
qcocoaclipboard.h \
@@ -89,6 +87,8 @@ QT += \
CONFIG += no_app_extension_api_only
qtHaveModule(widgets) {
+ QT_FOR_CONFIG += widgets
+
OBJECTIVE_SOURCES += \
qpaintengine_mac.mm \
qprintengine_mac.mm \
@@ -101,6 +101,11 @@ qtHaveModule(widgets) {
qcocoaprintersupport.h \
qcocoaprintdevice.h \
+ qtConfig(filedialog) {
+ SOURCES += qcocoafiledialoghelper.mm
+ HEADERS += qcocoafiledialoghelper.h
+ }
+
QT += widgets-private printsupport-private
}
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
index 1cff6f97ba..f5ba1dc22e 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
@@ -41,8 +41,11 @@
#define QCOCOAFILEDIALOGHELPER_H
#include <QObject>
+#include <QtWidgets/qtwidgetsglobal.h>
#include <qpa/qplatformdialoghelper.h>
+QT_REQUIRE_CONFIG(filedialog);
+
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate));
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 4ba3dcb9a6..74148b7cbf 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -41,8 +41,6 @@
#include "qcocoafiledialoghelper.h"
-#ifndef QT_NO_FILEDIALOG
-
/*****************************************************************************
QFileDialog debug facilities
*****************************************************************************/
@@ -775,5 +773,3 @@ bool QCocoaFileDialogHelper::defaultNameFilterDisables() const
}
QT_END_NAMESPACE
-
-#endif // QT_NO_FILEDIALOG
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index d48ec8c6f7..bac49cfad9 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -47,7 +47,6 @@
#include "qcocoahelpers.h"
#include "qcocoaapplication.h"
#include "qcocoaapplicationdelegate.h"
-#include "qcocoafiledialoghelper.h"
#include "qcocoatheme.h"
#include "qcocoainputcontext.h"
#include "qcocoamimetypes.h"
@@ -60,6 +59,13 @@
#include <QtGui/private/qcoregraphics_p.h>
+#ifdef QT_WIDGETS_LIB
+#include <QtWidgets/qtwidgetsglobal.h>
+#if QT_CONFIG(filedialog)
+#include "qcocoafiledialoghelper.h"
+#endif
+#endif
+
#include <IOKit/graphics/IOGraphicsLib.h>
static void initResources()
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index d2345f9abc..53ccf68c0c 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -45,7 +45,6 @@
#include <QtCore/QVariant>
#include "qcocoacolordialoghelper.h"
-#include "qcocoafiledialoghelper.h"
#include "qcocoafontdialoghelper.h"
#include "qcocoasystemsettings.h"
#include "qcocoasystemtrayicon.h"
@@ -63,6 +62,13 @@
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformnativeinterface.h>
+#ifdef QT_WIDGETS_LIB
+#include <QtWidgets/qtwidgetsglobal.h>
+#if QT_CONFIG(filedialog)
+#include "qcocoafiledialoghelper.h"
+#endif
+#endif
+
#include <Carbon/Carbon.h>
@interface QT_MANGLE_NAMESPACE(QCocoaThemeNotificationReceiver) : NSObject {
@@ -138,7 +144,7 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const
QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const
{
switch (dialogType) {
-#ifndef QT_NO_FILEDIALOG
+#if defined(QT_WIDGETS_LIB) && QT_CONFIG(filedialog)
case QPlatformTheme::FileDialog:
return new QCocoaFileDialogHelper();
#endif