summaryrefslogtreecommitdiffstats
path: root/examples/mainwindows
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2012-06-13 13:59:54 +0300
committerQt by Nokia <qt-info@nokia.com>2012-06-18 09:48:55 +0200
commit9fe5139e73958a2102cd5bb754c5049d18812c89 (patch)
tree4167c33c120f5f65ea1172dddb674ee001faa4cb /examples/mainwindows
parent15db02cb11ff070fa32f90862ce00a895e614cad (diff)
Fix building of qtbase examples when printsupport module is disabled.
Printsupport module is not that interesting in embedded environments, and it also does not compile at the moment for WEC7. Fixed qtbase examples to obey the availability of printsupport module. Change-Id: I960d1b628b9ca82450aa3b0df8dd101b2544ee12 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'examples/mainwindows')
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.pro3
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/examples/mainwindows/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro
index 42eab88010..7e0da2496e 100644
--- a/examples/mainwindows/dockwidgets/dockwidgets.pro
+++ b/examples/mainwindows/dockwidgets/dockwidgets.pro
@@ -9,6 +9,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES dockwidgets.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/dockwidgets
INSTALLS += target sources
-QT += widgets printsupport
+QT += widgets
+!isEmpty(QT.printsupport.name): QT += printsupport
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp
index 9f1a09c7d5..da01d56502 100644
--- a/examples/mainwindows/dockwidgets/mainwindow.cpp
+++ b/examples/mainwindows/dockwidgets/mainwindow.cpp
@@ -40,7 +40,10 @@
//! [0]
#include <QtWidgets>
+#ifndef QT_NO_PRINTDIALOG
#include <QtPrintSupport>
+#endif
+
#include "mainwindow.h"
//! [0]