summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-05-31 22:08:27 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-07-02 10:38:52 +0000
commit379179df9d172fd350f869c9f87391c05090187d (patch)
tree6d8dedf130373301cba30b45708e2b5c234667bb /src/widgets/dialogs
parent330f0245898dd2c163a3a8b8dfb7b672cf8def3b (diff)
Convert features.errormessage to QT_[REQUIRE_]CONFIG
Change-Id: I9cc4f5190108c4bb96ddbd782ef1a031c9889f7e 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/qdialog.cpp4
-rw-r--r--src/widgets/dialogs/qerrormessage.cpp4
-rw-r--r--src/widgets/dialogs/qerrormessage.h7
4 files changed, 10 insertions, 12 deletions
diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri
index 718db3bb5d..a9da465884 100644
--- a/src/widgets/dialogs/dialogs.pri
+++ b/src/widgets/dialogs/dialogs.pri
@@ -2,7 +2,6 @@
HEADERS += \
dialogs/qfscompleter_p.h \
- dialogs/qerrormessage.h \
dialogs/qfontdialog.h \
dialogs/qfontdialog_p.h \
dialogs/qfilesystemmodel.h \
@@ -11,7 +10,6 @@ HEADERS += \
INCLUDEPATH += $$PWD
SOURCES += \
- dialogs/qerrormessage.cpp \
dialogs/qfontdialog.cpp \
dialogs/qfilesystemmodel.cpp \
dialogs/qfileinfogatherer.cpp
@@ -30,6 +28,11 @@ qtConfig(dialog) {
dialogs/qdialog.cpp
}
+qtConfig(errormessage) {
+ HEADERS += dialogs/qerrormessage.h
+ SOURCES += dialogs/qerrormessage.cpp
+}
+
qtConfig(filedialog) {
HEADERS += \
dialogs/qfiledialog.h \
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 851f195633..7cb24d65fc 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -59,7 +59,9 @@
#if QT_CONFIG(messagebox)
#include "qmessagebox.h"
#endif
+#if QT_CONFIG(errormessage)
#include "qerrormessage.h"
+#endif
#include <qpa/qplatformtheme.h>
#include "private/qdialog_p.h"
#include "private/qguiapplication_p.h"
@@ -87,7 +89,7 @@ static inline int themeDialogType(const QDialog *dialog)
if (qobject_cast<const QMessageBox *>(dialog))
return QPlatformTheme::MessageDialog;
#endif
-#ifndef QT_NO_ERRORMESSAGE
+#if QT_CONFIG(errormessage)
if (qobject_cast<const QErrorMessage *>(dialog))
return QPlatformTheme::MessageDialog;
#endif
diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp
index 38f0954b1c..39035b743d 100644
--- a/src/widgets/dialogs/qerrormessage.cpp
+++ b/src/widgets/dialogs/qerrormessage.cpp
@@ -39,8 +39,6 @@
#include "qerrormessage.h"
-#ifndef QT_NO_ERRORMESSAGE
-
#include "qapplication.h"
#include "qcheckbox.h"
#include "qlabel.h"
@@ -392,5 +390,3 @@ void QErrorMessagePrivate::retranslateStrings()
QT_END_NAMESPACE
#include "moc_qerrormessage.cpp"
-
-#endif // QT_NO_ERRORMESSAGE
diff --git a/src/widgets/dialogs/qerrormessage.h b/src/widgets/dialogs/qerrormessage.h
index 976ba9abd5..4cb1fad845 100644
--- a/src/widgets/dialogs/qerrormessage.h
+++ b/src/widgets/dialogs/qerrormessage.h
@@ -42,12 +42,11 @@
#include <QtWidgets/qtwidgetsglobal.h>
-#ifndef QT_NO_ERRORMESSAGE
-
#include <QtWidgets/qdialog.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(errormessage);
+QT_BEGIN_NAMESPACE
class QErrorMessagePrivate;
@@ -75,6 +74,4 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_ERRORMESSAGE
-
#endif // QERRORMESSAGE_H