summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/orderform/mainwindow.cpp
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 /examples/widgets/richtext/orderform/mainwindow.cpp
parentf209215c0d96c8badcc14a3fc1cd8a6b0e56625c (diff)
Convert features.printdialog to QT_[REQUIRE_]CONFIG
Change-Id: Ifb016ae2a0986b436f788b34513c81ea91f3804a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'examples/widgets/richtext/orderform/mainwindow.cpp')
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp
index 35934bee72..030072978e 100644
--- a/examples/widgets/richtext/orderform/mainwindow.cpp
+++ b/examples/widgets/richtext/orderform/mainwindow.cpp
@@ -49,10 +49,13 @@
****************************************************************************/
#include <QtWidgets>
-#ifndef QT_NO_PRINTER
+#if defined(QT_PRINTSUPPORT_LIB)
+#include <QtPrintSupport/qtprintsupportglobal.h>
+#if QT_CONFIG(printdialog)
#include <QPrinter>
#include <QPrintDialog>
#endif
+#endif
#include "detailsdialog.h"
#include "mainwindow.h"
@@ -245,7 +248,7 @@ void MainWindow::openDialog()
//! [17]
void MainWindow::printFile()
{
-#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
+#if QT_CONFIG(printdialog)
QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
//! [18]
QPrinter printer;