summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-05-29 17:35:58 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-05-30 17:21:26 +0000
commitdbeb748de30bcc0e0615d21c593b761408404950 (patch)
tree63868dc50be0138424f82598daa81ded596bd26f /src/printsupport/dialogs
parentf209215c0d96c8badcc14a3fc1cd8a6b0e56625c (diff)
Convert features.printdialog to QT_[REQUIRE_]CONFIG
Change-Id: Ifb016ae2a0986b436f788b34513c81ea91f3804a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/printsupport/dialogs')
-rw-r--r--src/printsupport/dialogs/dialogs.pri57
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.cpp4
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.h7
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog_p.h10
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog.cpp4
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog.h7
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_mac.mm3
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_p.h6
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp3
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix_p.h5
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_win.cpp2
-rw-r--r--src/printsupport/dialogs/qprintdialog.h7
-rw-r--r--src/printsupport/dialogs/qprintdialog_mac.mm4
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp5
-rw-r--r--src/printsupport/dialogs/qprintdialog_win.cpp4
15 files changed, 42 insertions, 86 deletions
diff --git a/src/printsupport/dialogs/dialogs.pri b/src/printsupport/dialogs/dialogs.pri
index 6c75e562ab..0a7b947c79 100644
--- a/src/printsupport/dialogs/dialogs.pri
+++ b/src/printsupport/dialogs/dialogs.pri
@@ -1,43 +1,46 @@
# Qt dialogs module
-HEADERS += \
+INCLUDEPATH += $$PWD
+
+qtConfig(printdialog) {
+ HEADERS += \
dialogs/qabstractprintdialog.h \
dialogs/qabstractprintdialog_p.h \
dialogs/qpagesetupdialog_p.h \
dialogs/qpagesetupdialog.h \
dialogs/qprintdialog.h
-osx {
- OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
- dialogs/qprintdialog_mac.mm
- LIBS_PRIVATE += -framework AppKit
-}
-
-win32 {
- SOURCES += dialogs/qpagesetupdialog_win.cpp \
- dialogs/qprintdialog_win.cpp
-}
-
-unix:!mac {
- INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/printsupport/cups
- HEADERS += dialogs/qpagesetupdialog_unix_p.h
- SOURCES += dialogs/qprintdialog_unix.cpp \
- dialogs/qpagesetupdialog_unix.cpp
- FORMS += dialogs/qprintsettingsoutput.ui \
- dialogs/qprintwidget.ui \
- dialogs/qprintpropertieswidget.ui
-}
-
-INCLUDEPATH += $$PWD
-
-SOURCES += \
+ macos {
+ OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
+ dialogs/qprintdialog_mac.mm
+ LIBS_PRIVATE += -framework AppKit
+ }
+
+ win32 {
+ SOURCES += dialogs/qpagesetupdialog_win.cpp \
+ dialogs/qprintdialog_win.cpp
+ }
+
+ unix:!darwin {
+ INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/printsupport/cups
+ HEADERS += dialogs/qpagesetupdialog_unix_p.h
+ SOURCES += dialogs/qprintdialog_unix.cpp \
+ dialogs/qpagesetupdialog_unix.cpp
+ FORMS += dialogs/qprintsettingsoutput.ui \
+ dialogs/qprintwidget.ui \
+ dialogs/qprintpropertieswidget.ui
+ }
+
+ SOURCES += \
dialogs/qabstractprintdialog.cpp \
dialogs/qpagesetupdialog.cpp
+ FORMS += dialogs/qpagesetupwidget.ui
+ RESOURCES += dialogs/qprintdialog.qrc
+}
+
qtConfig(printpreviewdialog) {
HEADERS += dialogs/qprintpreviewdialog.h
SOURCES += dialogs/qprintpreviewdialog.cpp
}
-FORMS += dialogs/qpagesetupwidget.ui
-RESOURCES += dialogs/qprintdialog.qrc
diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp
index 3c5f882f2e..f982da46d9 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.cpp
+++ b/src/printsupport/dialogs/qabstractprintdialog.cpp
@@ -43,8 +43,6 @@
#include "qprinter.h"
#include "private/qprinter_p.h"
-#ifndef QT_NO_PRINTDIALOG
-
QT_BEGIN_NAMESPACE
// hack
@@ -497,5 +495,3 @@ void QPrintDialog::open(QObject *receiver, const char *member)
}
QT_END_NAMESPACE
-
-#endif // QT_NO_PRINTDIALOG
diff --git a/src/printsupport/dialogs/qabstractprintdialog.h b/src/printsupport/dialogs/qabstractprintdialog.h
index e6d34cdb5b..eb4dc3eb99 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.h
+++ b/src/printsupport/dialogs/qabstractprintdialog.h
@@ -42,12 +42,11 @@
#include <QtPrintSupport/qtprintsupportglobal.h>
-#if QT_CONFIG(printdialog)
-
#include <QtWidgets/qdialog.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(printdialog);
+QT_BEGIN_NAMESPACE
class QAbstractPrintDialogPrivate;
class QPrinter;
@@ -120,6 +119,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractPrintDialog::PrintDialogOptions)
QT_END_NAMESPACE
-#endif // QT_NO_PRINTDIALOG
-
#endif // QABSTRACTPRINTDIALOG_H
diff --git a/src/printsupport/dialogs/qabstractprintdialog_p.h b/src/printsupport/dialogs/qabstractprintdialog_p.h
index 12de4ee882..2537fcbf80 100644
--- a/src/printsupport/dialogs/qabstractprintdialog_p.h
+++ b/src/printsupport/dialogs/qabstractprintdialog_p.h
@@ -53,14 +53,12 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
-#ifndef QT_NO_PRINTDIALOG
-
#include "private/qdialog_p.h"
#include "QtPrintSupport/qabstractprintdialog.h"
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(printdialog);
-#ifndef QT_NO_PRINTER
+QT_BEGIN_NAMESPACE
class QPrinter;
class QPrinterPrivate;
@@ -92,10 +90,6 @@ public:
int maxPage;
};
-#endif //QT_NO_PRINTER
-
QT_END_NAMESPACE
-#endif // QT_NO_PRINTDIALOG
-
#endif // QABSTRACTPRINTDIALOG_P_H
diff --git a/src/printsupport/dialogs/qpagesetupdialog.cpp b/src/printsupport/dialogs/qpagesetupdialog.cpp
index 911c0ecdf7..4acac2c5f1 100644
--- a/src/printsupport/dialogs/qpagesetupdialog.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog.cpp
@@ -42,8 +42,6 @@
#include <QtPrintSupport/qprinter.h>
-#ifndef QT_NO_PRINTDIALOG
-
QT_BEGIN_NAMESPACE
/*!
@@ -183,5 +181,3 @@ void QPageSetupDialog::done(int result)
}
QT_END_NAMESPACE
-
-#endif
diff --git a/src/printsupport/dialogs/qpagesetupdialog.h b/src/printsupport/dialogs/qpagesetupdialog.h
index bc7462ebaa..3bd752a413 100644
--- a/src/printsupport/dialogs/qpagesetupdialog.h
+++ b/src/printsupport/dialogs/qpagesetupdialog.h
@@ -42,12 +42,11 @@
#include <QtPrintSupport/qtprintsupportglobal.h>
-#ifndef QT_NO_PRINTDIALOG
-
#include <QtWidgets/qdialog.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(printdialog);
+QT_BEGIN_NAMESPACE
class QPrinter;
class QPageSetupDialogPrivate;
@@ -77,6 +76,4 @@ public:
QT_END_NAMESPACE
-#endif // QT_NO_PRINTDIALOG
-
#endif // QPAGESETUPDIALOG_H
diff --git a/src/printsupport/dialogs/qpagesetupdialog_mac.mm b/src/printsupport/dialogs/qpagesetupdialog_mac.mm
index 581c0271f1..1e398452f7 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_mac.mm
+++ b/src/printsupport/dialogs/qpagesetupdialog_mac.mm
@@ -42,7 +42,6 @@
#include "qpagesetupdialog.h"
-#ifndef QT_NO_PRINTDIALOG
#include "qpagesetupdialog_p.h"
#include <qpa/qplatformnativeinterface.h>
@@ -222,5 +221,3 @@ int QPageSetupDialog::exec()
}
QT_END_NAMESPACE
-
-#endif /* QT_NO_PRINTDIALOG */
diff --git a/src/printsupport/dialogs/qpagesetupdialog_p.h b/src/printsupport/dialogs/qpagesetupdialog_p.h
index 98b466ccdc..6a389b039a 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_p.h
+++ b/src/printsupport/dialogs/qpagesetupdialog_p.h
@@ -54,14 +54,14 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
-#ifndef QT_NO_PRINTDIALOG
-
#include "private/qdialog_p.h"
#include "qbytearray.h"
#include "qpagesetupdialog.h"
#include "qpointer.h"
+QT_REQUIRE_CONFIG(printdialog);
+
QT_BEGIN_NAMESPACE
class QPrinter;
@@ -83,6 +83,4 @@ public:
QT_END_NAMESPACE
-#endif // QT_NO_PRINTDIALOG
-
#endif // QPAGESETUPDIALOG_P_H
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index fdaeb7ae8c..b4ad718646 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -39,7 +39,6 @@
#include "qpagesetupdialog.h"
-#ifndef QT_NO_PRINTDIALOG
#include "qpagesetupdialog_unix_p.h"
#include <private/qpagesetupdialog_p.h>
@@ -644,5 +643,3 @@ int QPageSetupDialog::exec()
QT_END_NAMESPACE
#include "moc_qpagesetupdialog.cpp"
-
-#endif // QT_NO_PRINTDIALOG
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
index 3c9733dd83..658f103bea 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
@@ -53,14 +53,14 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
-#ifndef QT_NO_PRINTDIALOG
-
#include "qprinter.h"
#include <QtGui/qpagelayout.h>
#include <ui_qpagesetupwidget.h>
+QT_REQUIRE_CONFIG(printdialog);
+
QT_BEGIN_NAMESPACE
class QPrinter;
@@ -106,5 +106,4 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_PRINTDIALOG
#endif
diff --git a/src/printsupport/dialogs/qpagesetupdialog_win.cpp b/src/printsupport/dialogs/qpagesetupdialog_win.cpp
index 88e57d27e5..23fff82f25 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_win.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_win.cpp
@@ -39,7 +39,6 @@
#include "qpagesetupdialog.h"
-#ifndef QT_NO_PRINTDIALOG
#include <qapplication.h>
#include "../kernel/qprintengine_win_p.h"
@@ -168,4 +167,3 @@ void QPageSetupDialog::setVisible(bool visible)
}
QT_END_NAMESPACE
-#endif
diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h
index 35d650a7fc..53a6224f49 100644
--- a/src/printsupport/dialogs/qprintdialog.h
+++ b/src/printsupport/dialogs/qprintdialog.h
@@ -42,12 +42,11 @@
#include <QtPrintSupport/qtprintsupportglobal.h>
-#ifndef QT_NO_PRINTDIALOG
-
#include <QtPrintSupport/qabstractprintdialog.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(printdialog);
+QT_BEGIN_NAMESPACE
class QPrintDialogPrivate;
class QPushButton;
@@ -104,6 +103,4 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_PRINTDIALOG
-
#endif // QPRINTDIALOG_H
diff --git a/src/printsupport/dialogs/qprintdialog_mac.mm b/src/printsupport/dialogs/qprintdialog_mac.mm
index 4595ed71ff..854779977c 100644
--- a/src/printsupport/dialogs/qprintdialog_mac.mm
+++ b/src/printsupport/dialogs/qprintdialog_mac.mm
@@ -48,8 +48,6 @@
#include <QtPrintSupport/qprintengine.h>
#include <qpa/qplatformprintdevice.h>
-#ifndef QT_NO_PRINTDIALOG
-
QT_BEGIN_NAMESPACE
extern qreal qt_pointMultiplier(QPageLayout::Unit unit);
@@ -358,5 +356,3 @@ void QPrintDialog::setVisible(bool visible)
QT_END_NAMESPACE
#include "moc_qprintdialog.cpp"
-
-#endif // QT_NO_PRINTDIALOG
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 7c0e064ddd..32a06a4f7e 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -40,8 +40,6 @@
#include "qplatformdefs.h"
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
-#ifndef QT_NO_PRINTDIALOG
-
#include "private/qabstractprintdialog_p.h"
#include <QtWidgets/qmessagebox.h>
#include "qprintdialog.h"
@@ -983,6 +981,3 @@ QT_END_NAMESPACE
#include "moc_qprintdialog.cpp"
#include "qprintdialog_unix.moc"
-
-#endif // QT_NO_PRINTDIALOG
-
diff --git a/src/printsupport/dialogs/qprintdialog_win.cpp b/src/printsupport/dialogs/qprintdialog_win.cpp
index 2e954a508d..11f2fa3259 100644
--- a/src/printsupport/dialogs/qprintdialog_win.cpp
+++ b/src/printsupport/dialogs/qprintdialog_win.cpp
@@ -39,8 +39,6 @@
#include <QtPrintSupport/qtprintsupportglobal.h>
-#ifndef QT_NO_PRINTDIALOG
-
#include "qprintdialog.h"
#include <qwidget.h>
@@ -308,5 +306,3 @@ void QPrintDialog::setVisible(bool visible)
QT_END_NAMESPACE
#include "moc_qprintdialog.cpp"
-
-#endif // QT_NO_PRINTDIALOG