diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-31 20:43:28 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-06-29 02:23:22 +0000 |
commit | 63cc734abb7b31a73c60767b9af521783c102bd4 (patch) | |
tree | 3ccbdaaaf8d45dbded4b9132088e29b90b2e4706 /src/printsupport | |
parent | 003dc8e29a89c18729fc696ea9ca224645e792fd (diff) |
Convert features.messagebox to QT_[REQUIRE_]CONFIG
Change-Id: Ie25dc672f8a675c06585c7757255f7dbadbfc5ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/printsupport')
-rw-r--r-- | src/printsupport/dialogs/qprintdialog.h | 4 | ||||
-rw-r--r-- | src/printsupport/dialogs/qprintdialog_unix.cpp | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h index 53a6224f49..5b81440a3c 100644 --- a/src/printsupport/dialogs/qprintdialog.h +++ b/src/printsupport/dialogs/qprintdialog.h @@ -94,9 +94,9 @@ private: #if defined (Q_OS_UNIX) && !defined(Q_OS_MAC) Q_PRIVATE_SLOT(d_func(), void _q_togglePageSetCombo(bool)) Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog()) -# if !defined(QT_NO_MESSAGEBOX) +#if QT_CONFIG(messagebox) Q_PRIVATE_SLOT(d_func(), void _q_checkFields()) -# endif // QT_NO_MESSAGEBOX +#endif // QT_CONFIG(messagebox) friend class QUnixPrintWidget; # endif // Q_OS_UNIX }; diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp index d80cc1fa3d..1af682f74a 100644 --- a/src/printsupport/dialogs/qprintdialog_unix.cpp +++ b/src/printsupport/dialogs/qprintdialog_unix.cpp @@ -41,7 +41,9 @@ #include <QtPrintSupport/private/qtprintsupportglobal_p.h> #include "private/qabstractprintdialog_p.h" +#if QT_CONFIG(messagebox) #include <QtWidgets/qmessagebox.h> +#endif #include "qprintdialog.h" #if QT_CONFIG(filedialog) #include "qfiledialog.h" @@ -203,7 +205,7 @@ public: void selectPrinter(const QPrinter::OutputFormat outputFormat); void _q_togglePageSetCombo(bool); -#ifndef QT_NO_MESSAGEBOX +#if QT_CONFIG(messagebox) void _q_checkFields(); #endif void _q_collapseOrExpandDialog(); @@ -337,7 +339,7 @@ void QPrintDialogPrivate::init() lay->addWidget(bottom); lay->addWidget(buttons); -#ifdef QT_NO_MESSAGEBOX +#if !QT_CONFIG(messagebox) QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(accept())); #else QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(_q_checkFields())); @@ -496,14 +498,14 @@ void QPrintDialogPrivate::_q_collapseOrExpandDialog() } } -#ifndef QT_NO_MESSAGEBOX +#if QT_CONFIG(messagebox) void QPrintDialogPrivate::_q_checkFields() { Q_Q(QPrintDialog); if (top->d->checkFields()) q->accept(); } -#endif // QT_NO_MESSAGEBOX +#endif // QT_CONFIG(messagebox) void QPrintDialogPrivate::updateWidgets() @@ -836,7 +838,7 @@ void QUnixPrintWidgetPrivate::applyPrinterProperties() propertiesDialog->applyPrinterProperties(printer); } -#ifndef QT_NO_MESSAGEBOX +#if QT_CONFIG(messagebox) bool QUnixPrintWidgetPrivate::checkFields() { if (widget.filename->isEnabled()) { @@ -887,7 +889,7 @@ bool QUnixPrintWidgetPrivate::checkFields() // Every test passed. Accept the dialog. return true; } -#endif // QT_NO_MESSAGEBOX +#endif // QT_CONFIG(messagebox) void QUnixPrintWidgetPrivate::setupPrinterProperties() { |