summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/dialogs.pri12
-rw-r--r--src/widgets/dialogs/qcolordialog.h9
-rw-r--r--src/widgets/dialogs/qdialog.h2
-rw-r--r--src/widgets/dialogs/qdialog_p.h2
-rw-r--r--src/widgets/dialogs/qerrormessage.h9
-rw-r--r--src/widgets/dialogs/qfiledialog.h9
-rw-r--r--src/widgets/dialogs/qfontdialog.h11
-rw-r--r--src/widgets/dialogs/qinputdialog.h11
-rw-r--r--src/widgets/dialogs/qmessagebox.h9
-rw-r--r--src/widgets/dialogs/qprogressdialog.h9
-rw-r--r--src/widgets/dialogs/qwizard.h5
11 files changed, 53 insertions, 35 deletions
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 <QtWidgets/qtwidgetsglobal.h>
+
+#ifndef QT_NO_COLORDIALOG
+
#include <QtWidgets/qdialog.h>
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 <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qwidget.h>
+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 <qpa/qplatformdialoghelper.h>
+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 <QtWidgets/qtwidgetsglobal.h>
+
+#ifndef QT_NO_ERRORMESSAGE
+
#include <QtWidgets/qdialog.h>
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 <QtCore/qdir.h>
#include <QtCore/qstring.h>
#include <QtCore/qurl.h>
+
+#ifndef QT_NO_FILEDIALOG
+
#include <QtWidgets/qdialog.h>
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 <QtWidgets/qtwidgetsglobal.h>
#include <QtGui/qwindowdefs.h>
-#include <QtWidgets/qdialog.h>
#include <QtGui/qfont.h>
-QT_BEGIN_NAMESPACE
+#ifndef QT_NO_FONTDIALOG
+#include <QtWidgets/qdialog.h>
+
+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 <QtWidgets/qtwidgetsglobal.h>
-#include <QtWidgets/qdialog.h>
#include <QtCore/qstring.h>
#include <QtWidgets/qlineedit.h>
-QT_BEGIN_NAMESPACE
+#ifndef QT_NO_INPUTDIALOG
+#include <QtWidgets/qdialog.h>
+
+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 <QtWidgets/qtwidgetsglobal.h>
+
+#ifndef QT_NO_MESSAGEBOX
+
#include <QtWidgets/qdialog.h>
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 <QtWidgets/qtwidgetsglobal.h>
+
+#ifndef QT_NO_PROGRESSDIALOG
+
#include <QtWidgets/qdialog.h>
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 <QtWidgets/qtwidgetsglobal.h>
+
+#ifndef QT_NO_WIZARD
+
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_WIZARD
-
class QAbstractButton;
class QWizardPage;
class QWizardPrivate;