Fix assistant and designer builds without printer.
authorJanne Anttila <janne.anttila@digia.com>
Wed, 24 Apr 2013 12:02:40 +0000 (15:02 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 22 May 2013 07:34:12 +0000 (09:34 +0200)
The actual code using printer related classes is already wrapped with
QT_NO_PRINTER macros, but the include statements were not.

The reason why include statement probably were not wrapped with
QT_NO_PRINTER is that in Qt4 all headers were synchronized to include
directory. Now with Qt5 modularization headers for modules which
are disabled are not anymore synchronized to include directory so
they need to be wrapped with same ifdefs.

Change-Id: I0efd1342cd18860b5fed63b248812e9dced8f2b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
src/assistant/assistant/centralwidget.cpp
src/designer/src/designer/qdesigner_actions.cpp
src/designer/src/designer/qdesigner_actions.h

index 29648fe..ccab203 100644 (file)
 
 #include <QtGui/QKeyEvent>
 #include <QtWidgets/QMenu>
+#ifndef QT_NO_PRINTER
 #include <QtPrintSupport/QPageSetupDialog>
 #include <QtPrintSupport/QPrintDialog>
 #include <QtPrintSupport/QPrintPreviewDialog>
 #include <QtPrintSupport/QPrinter>
+#endif
 #include <QtWidgets/QStackedWidget>
 #include <QtWidgets/QTextBrowser>
 #include <QtWidgets/QVBoxLayout>
index 8f6d978..f8c042c 100644 (file)
@@ -85,7 +85,9 @@
 #include <QtGui/QImage>
 #include <QtGui/QPixmap>
 #include <QtWidgets/QMdiSubWindow>
+#ifndef QT_NO_PRINTER
 #include <QtPrintSupport/QPrintDialog>
+#endif
 #include <QtGui/QPainter>
 #include <QtGui/QTransform>
 #include <QtGui/QCursor>
index c1c257f..d7780e3 100644 (file)
@@ -47,7 +47,9 @@
 
 #include <QtCore/QObject>
 #include <QtCore/QPointer>
+#ifndef QT_NO_PRINTER
 #include <QtPrintSupport/QPrinter>
+#endif
 
 QT_BEGIN_NAMESPACE