summaryrefslogtreecommitdiffstats
path: root/examples/graphicsview
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/graphicsview
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/graphicsview')
-rw-r--r--examples/graphicsview/chip/chip.pro3
-rw-r--r--examples/graphicsview/chip/view.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/graphicsview/chip/chip.pro b/examples/graphicsview/chip/chip.pro
index 94a461a99e..afe748946e 100644
--- a/examples/graphicsview/chip/chip.pro
+++ b/examples/graphicsview/chip/chip.pro
@@ -4,7 +4,8 @@ HEADERS += mainwindow.h view.h chip.h
SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp
-QT += widgets printsupport
+QT += widgets
+!isEmpty(QT.printsupport.name): QT += printsupport
contains(QT_CONFIG, opengl):QT += opengl
build_all:!build_pass {
diff --git a/examples/graphicsview/chip/view.cpp b/examples/graphicsview/chip/view.cpp
index ce8aff9a83..b755b8eadd 100644
--- a/examples/graphicsview/chip/view.cpp
+++ b/examples/graphicsview/chip/view.cpp
@@ -42,13 +42,13 @@
#include "view.h"
#include <QtWidgets>
+#ifndef QT_NO_PRINTER
#include <QPrinter>
#include <QPrintDialog>
-
+#endif
#ifndef QT_NO_OPENGL
#include <QtOpenGL>
#endif
-
#include <qmath.h>
void GraphicsView::wheelEvent(QWheelEvent *e)