summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/orderform
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-01-29 19:58:01 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-01-31 06:23:58 +0100
commitc7f59cad196dae2ee83e2073e546428695f0e1f0 (patch)
treec911fb079b1ad679f4d1d0cbe7fb2cdbaac184fb /examples/widgets/richtext/orderform
parent9ede07613dc5b7759f398d5a8839b2ffdb4675a2 (diff)
Examples: fix compile without printsupport
Checking for QT_CONFIG(printdialog) is not enough when printsupport is completely disabled since then the macro will throw an error. Therefore add an additional check 'defined(QT_PRINTSUPPORT_LIB)' before using the QT_CONFIG macro. Fixes: QTBUG-81626 Change-Id: Ie9898f057cdd6bf9daf4ba9135987cb6e901e7bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/widgets/richtext/orderform')
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp
index 0b6a2cac6c..ee6758c9cb 100644
--- a/examples/widgets/richtext/orderform/mainwindow.cpp
+++ b/examples/widgets/richtext/orderform/mainwindow.cpp
@@ -248,7 +248,7 @@ void MainWindow::openDialog()
//! [17]
void MainWindow::printFile()
{
-#if QT_CONFIG(printdialog)
+#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog)
QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
//! [18]
QPrinter printer;