summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
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/widgets/dialogs
parent7a1b7c74209cdd26510edd440651b259897b8769 (diff)
Convert features.colordialog to QT_[REQUIRE_]CONFIG
Change-Id: If2ac57a10f38002db5a49be3882dfc507a84a3df Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/dialogs.pri7
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp5
-rw-r--r--src/widgets/dialogs/qcolordialog.h7
-rw-r--r--src/widgets/dialogs/qdialog.cpp5
4 files changed, 11 insertions, 13 deletions
diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri
index 1ea5403b79..0ebb912ffc 100644
--- a/src/widgets/dialogs/dialogs.pri
+++ b/src/widgets/dialogs/dialogs.pri
@@ -1,7 +1,6 @@
# Qt dialogs module
HEADERS += \
- dialogs/qcolordialog.h \
dialogs/qfscompleter_p.h \
dialogs/qerrormessage.h \
dialogs/qfontdialog.h \
@@ -18,13 +17,17 @@ win32 {
INCLUDEPATH += $$PWD
SOURCES += \
- dialogs/qcolordialog.cpp \
dialogs/qerrormessage.cpp \
dialogs/qfontdialog.cpp \
dialogs/qfilesystemmodel.cpp \
dialogs/qfileinfogatherer.cpp \
dialogs/qwizard.cpp \
+qtConfig(colordialog) {
+ HEADERS += dialogs/qcolordialog.h
+ SOURCES += dialogs/qcolordialog.cpp
+}
+
qtConfig(dialog) {
HEADERS += \
dialogs/qdialog.h \
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index dbcd2d7fe2..f361770c3e 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -39,8 +39,6 @@
#include "qcolordialog.h"
-#ifndef QT_NO_COLORDIALOG
-
#include "qapplication.h"
#include "qdesktopwidget.h"
#include "qdrawutil.h"
@@ -2289,6 +2287,3 @@ QT_END_NAMESPACE
#include "qcolordialog.moc"
#include "moc_qcolordialog.cpp"
-
-#endif // QT_NO_COLORDIALOG
-
diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h
index fb5b843ce4..a27cfaf953 100644
--- a/src/widgets/dialogs/qcolordialog.h
+++ b/src/widgets/dialogs/qcolordialog.h
@@ -42,12 +42,11 @@
#include <QtWidgets/qtwidgetsglobal.h>
-#ifndef QT_NO_COLORDIALOG
-
#include <QtWidgets/qdialog.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(colordialog);
+QT_BEGIN_NAMESPACE
class QColorDialogPrivate;
@@ -127,6 +126,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QColorDialog::ColorDialogOptions)
QT_END_NAMESPACE
-#endif // QT_NO_COLORDIALOG
-
#endif // QCOLORDIALOG_H
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index e1a38438d1..851f195633 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -37,7 +37,10 @@
**
****************************************************************************/
+#include <QtWidgets/qtwidgetsglobal.h>
+#if QT_CONFIG(colordialog)
#include "qcolordialog.h"
+#endif
#include "qfontdialog.h"
#if QT_CONFIG(filedialog)
#include "qfiledialog.h"
@@ -72,7 +75,7 @@ static inline int themeDialogType(const QDialog *dialog)
if (qobject_cast<const QFileDialog *>(dialog))
return QPlatformTheme::FileDialog;
#endif
-#ifndef QT_NO_COLORDIALOG
+#if QT_CONFIG(colordialog)
if (qobject_cast<const QColorDialog *>(dialog))
return QPlatformTheme::ColorDialog;
#endif