summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/orderform/mainwindow.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-07 12:05:33 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-07 14:02:43 +0200
commit7cbee5629604aa49c618829c8e3e55fc64e94df7 (patch)
treed12041105160c1cb21226b365edb9653d87b5853 /examples/widgets/richtext/orderform/mainwindow.cpp
parente400b7e326c554ccd819448866265953d2a0f24d (diff)
parent5f0ce2333f7e11a3ffb5d16a27cd9303efa712d5 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
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;