From c7f59cad196dae2ee83e2073e546428695f0e1f0 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 29 Jan 2020 19:58:01 +0100 Subject: 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 --- examples/widgets/touch/fingerpaint/scribblearea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/widgets/touch') diff --git a/examples/widgets/touch/fingerpaint/scribblearea.cpp b/examples/widgets/touch/fingerpaint/scribblearea.cpp index 0b0c4476d9..e490495cd9 100644 --- a/examples/widgets/touch/fingerpaint/scribblearea.cpp +++ b/examples/widgets/touch/fingerpaint/scribblearea.cpp @@ -170,7 +170,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize) //! [21] void ScribbleArea::print() { -#if QT_CONFIG(printdialog) +#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog) QPrinter printer(QPrinter::HighResolution); QPrintDialog printDialog(&printer, this); -- cgit v1.2.3