Convert features.errormessage to QT_[REQUIRE_]CONFIG

Change-Id: I9cc4f5190108c4bb96ddbd782ef1a031c9889f7e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Stephan Binner 2017-05-31 22:08:27 +02:00
parent 330f024589
commit 379179df9d
4 changed files with 10 additions and 12 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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