From b1a7a7b250e3575579ad43979c5bc27283f3d5f2 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Fri, 10 Mar 2017 13:20:12 +0100 Subject: Add feature.dialog Change-Id: I160d0f270d7f41671459358b9c180d71dd7786d6 Reviewed-by: Oswald Buddenhagen --- src/widgets/dialogs/dialogs.pri | 12 +++++++++--- src/widgets/dialogs/qcolordialog.h | 9 +++++---- src/widgets/dialogs/qdialog.h | 2 ++ src/widgets/dialogs/qdialog_p.h | 2 ++ src/widgets/dialogs/qerrormessage.h | 9 +++++---- src/widgets/dialogs/qfiledialog.h | 9 +++++---- src/widgets/dialogs/qfontdialog.h | 11 ++++++----- src/widgets/dialogs/qinputdialog.h | 11 ++++++----- src/widgets/dialogs/qmessagebox.h | 9 +++++---- src/widgets/dialogs/qprogressdialog.h | 9 +++++---- src/widgets/dialogs/qwizard.h | 5 +++-- 11 files changed, 53 insertions(+), 35 deletions(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri index 4f4a9b1517..8614d2bcc6 100644 --- a/src/widgets/dialogs/dialogs.pri +++ b/src/widgets/dialogs/dialogs.pri @@ -3,8 +3,6 @@ HEADERS += \ dialogs/qcolordialog.h \ dialogs/qfscompleter_p.h \ - dialogs/qdialog.h \ - dialogs/qdialog_p.h \ dialogs/qerrormessage.h \ dialogs/qfiledialog.h \ dialogs/qfiledialog_p.h \ @@ -30,7 +28,6 @@ else: FORMS += dialogs/qfiledialog.ui INCLUDEPATH += $$PWD SOURCES += \ dialogs/qcolordialog.cpp \ - dialogs/qdialog.cpp \ dialogs/qerrormessage.cpp \ dialogs/qfiledialog.cpp \ dialogs/qfontdialog.cpp \ @@ -42,4 +39,13 @@ SOURCES += \ dialogs/qfileinfogatherer.cpp \ dialogs/qwizard.cpp \ +qtConfig(dialog) { + HEADERS += \ + dialogs/qdialog.h \ + dialogs/qdialog_p.h + + SOURCES += \ + dialogs/qdialog.cpp +} + RESOURCES += dialogs/qmessagebox.qrc diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index 3b56f0b5d1..fb5b843ce4 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -41,13 +41,14 @@ #define QCOLORDIALOG_H #include + +#ifndef QT_NO_COLORDIALOG + #include QT_BEGIN_NAMESPACE -#ifndef QT_NO_COLORDIALOG - class QColorDialogPrivate; class Q_WIDGETS_EXPORT QColorDialog : public QDialog @@ -124,8 +125,8 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(QColorDialog::ColorDialogOptions) -#endif // QT_NO_COLORDIALOG - QT_END_NAMESPACE +#endif // QT_NO_COLORDIALOG + #endif // QCOLORDIALOG_H diff --git a/src/widgets/dialogs/qdialog.h b/src/widgets/dialogs/qdialog.h index d88ff4a841..72250172d3 100644 --- a/src/widgets/dialogs/qdialog.h +++ b/src/widgets/dialogs/qdialog.h @@ -43,6 +43,8 @@ #include #include +QT_REQUIRE_CONFIG(dialog); + QT_BEGIN_NAMESPACE diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h index 6723edae38..9ee89863f6 100644 --- a/src/widgets/dialogs/qdialog_p.h +++ b/src/widgets/dialogs/qdialog_p.h @@ -61,6 +61,8 @@ #endif #include +QT_REQUIRE_CONFIG(dialog); + QT_BEGIN_NAMESPACE class QSizeGrip; diff --git a/src/widgets/dialogs/qerrormessage.h b/src/widgets/dialogs/qerrormessage.h index 5ffa568c10..976ba9abd5 100644 --- a/src/widgets/dialogs/qerrormessage.h +++ b/src/widgets/dialogs/qerrormessage.h @@ -41,13 +41,14 @@ #define QERRORMESSAGE_H #include + +#ifndef QT_NO_ERRORMESSAGE + #include QT_BEGIN_NAMESPACE -#ifndef QT_NO_ERRORMESSAGE - class QErrorMessagePrivate; class Q_WIDGETS_EXPORT QErrorMessage: public QDialog @@ -72,8 +73,8 @@ private: Q_DISABLE_COPY(QErrorMessage) }; -#endif // QT_NO_ERRORMESSAGE - QT_END_NAMESPACE +#endif // QT_NO_ERRORMESSAGE + #endif // QERRORMESSAGE_H diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h index 7959eebd7b..733dd03092 100644 --- a/src/widgets/dialogs/qfiledialog.h +++ b/src/widgets/dialogs/qfiledialog.h @@ -44,13 +44,14 @@ #include #include #include + +#ifndef QT_NO_FILEDIALOG + #include QT_BEGIN_NAMESPACE -#ifndef QT_NO_FILEDIALOG - class QModelIndex; class QItemSelection; struct QFileDialogArgs; @@ -313,8 +314,8 @@ inline void QFileDialog::setDirectory(const QDir &adirectory) Q_DECLARE_OPERATORS_FOR_FLAGS(QFileDialog::Options) -#endif // QT_NO_FILEDIALOG - QT_END_NAMESPACE +#endif // QT_NO_FILEDIALOG + #endif // QFILEDIALOG_H diff --git a/src/widgets/dialogs/qfontdialog.h b/src/widgets/dialogs/qfontdialog.h index 276f8f5e83..da13a5ab99 100644 --- a/src/widgets/dialogs/qfontdialog.h +++ b/src/widgets/dialogs/qfontdialog.h @@ -42,13 +42,14 @@ #include #include -#include #include -QT_BEGIN_NAMESPACE +#ifndef QT_NO_FONTDIALOG +#include + +QT_BEGIN_NAMESPACE -#ifndef QT_NO_FONTDIALOG class QFontDialogPrivate; @@ -117,8 +118,8 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(QFontDialog::FontDialogOptions) -#endif // QT_NO_FONTDIALOG - QT_END_NAMESPACE +#endif // QT_NO_FONTDIALOG + #endif // QFONTDIALOG_H diff --git a/src/widgets/dialogs/qinputdialog.h b/src/widgets/dialogs/qinputdialog.h index 2fbea908cb..7b43e774a7 100644 --- a/src/widgets/dialogs/qinputdialog.h +++ b/src/widgets/dialogs/qinputdialog.h @@ -41,14 +41,15 @@ #define QINPUTDIALOG_H #include -#include #include #include -QT_BEGIN_NAMESPACE +#ifndef QT_NO_INPUTDIALOG +#include + +QT_BEGIN_NAMESPACE -#ifndef QT_NO_INPUTDIALOG class QInputDialogPrivate; @@ -209,8 +210,8 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(QInputDialog::InputDialogOptions) -#endif // QT_NO_INPUTDIALOG - QT_END_NAMESPACE +#endif // QT_NO_INPUTDIALOG + #endif // QINPUTDIALOG_H diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h index 3e561a5161..40e5c701fe 100644 --- a/src/widgets/dialogs/qmessagebox.h +++ b/src/widgets/dialogs/qmessagebox.h @@ -41,13 +41,14 @@ #define QMESSAGEBOX_H #include + +#ifndef QT_NO_MESSAGEBOX + #include QT_BEGIN_NAMESPACE -#ifndef QT_NO_MESSAGEBOX - class QLabel; class QMessageBoxPrivate; class QAbstractButton; @@ -322,8 +323,8 @@ QString s = QApplication::tr("Executable '%1' requires Qt "\ str)).arg(QString::fromLatin1(qVersion())); QMessageBox::critical(0, QApplication::tr(\ "Incompatible Qt Library Error"), s, QMessageBox::Abort, 0); qFatal("%s", s.toLatin1().data()); }} -#endif // QT_NO_MESSAGEBOX - QT_END_NAMESPACE +#endif // QT_NO_MESSAGEBOX + #endif // QMESSAGEBOX_H diff --git a/src/widgets/dialogs/qprogressdialog.h b/src/widgets/dialogs/qprogressdialog.h index a5e333259f..f4e63fb088 100644 --- a/src/widgets/dialogs/qprogressdialog.h +++ b/src/widgets/dialogs/qprogressdialog.h @@ -41,13 +41,14 @@ #define QPROGRESSDIALOG_H #include + +#ifndef QT_NO_PROGRESSDIALOG + #include QT_BEGIN_NAMESPACE -#ifndef QT_NO_PROGRESSDIALOG - class QPushButton; class QLabel; class QProgressBar; @@ -127,8 +128,8 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_disconnectOnClose()) }; -#endif // QT_NO_PROGRESSDIALOG - QT_END_NAMESPACE +#endif // QT_NO_PROGRESSDIALOG + #endif // QPROGRESSDIALOG_H diff --git a/src/widgets/dialogs/qwizard.h b/src/widgets/dialogs/qwizard.h index 7915c9e7f8..3236ee90df 100644 --- a/src/widgets/dialogs/qwizard.h +++ b/src/widgets/dialogs/qwizard.h @@ -41,13 +41,14 @@ #define QWIZARD_H #include + +#ifndef QT_NO_WIZARD + #include QT_BEGIN_NAMESPACE -#ifndef QT_NO_WIZARD - class QAbstractButton; class QWizardPage; class QWizardPrivate; -- cgit v1.2.3