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>
This commit is contained in:
parent
15db02cb11
commit
9fe5139e73
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -39,8 +39,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
|
||||
#include "imagemodel.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -13,4 +13,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/pixelator
|
||||
INSTALLS += target sources
|
||||
|
||||
QT += widgets printsupport
|
||||
QT += widgets
|
||||
!isEmpty(QT.printsupport.name): QT += printsupport
|
||||
|
@ -40,7 +40,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "printview.h"
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#endif
|
||||
#include <QStyleOptionViewItem>
|
||||
|
||||
PrintView::PrintView()
|
||||
|
@ -40,9 +40,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrintPreviewDialog>
|
||||
#endif
|
||||
|
||||
#include "spreadsheet.h"
|
||||
#include "spreadsheetdelegate.h"
|
||||
|
@ -1,4 +1,5 @@
|
||||
QT += widgets printsupport
|
||||
QT += widgets
|
||||
!isEmpty(QT.printsupport.name): QT += printsupport
|
||||
#unix:contains(QT_CONFIG, dbus):QT += dbus widgets
|
||||
|
||||
HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h
|
||||
|
@ -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)
|
||||
|
@ -40,7 +40,10 @@
|
||||
|
||||
//! [0]
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
#include <QtPrintSupport>
|
||||
#endif
|
||||
|
||||
#include "mainwindow.h"
|
||||
//! [0]
|
||||
|
||||
|
@ -9,4 +9,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fontsampler.pro
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/fontsampler
|
||||
INSTALLS += target sources
|
||||
|
||||
QT += widgets printsupport
|
||||
QT += widgets
|
||||
!isEmpty(QT.printsupport.name): QT += printsupport
|
||||
|
@ -39,9 +39,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrintPreviewDialog>
|
||||
#endif
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
@ -39,8 +39,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
|
||||
#include "detailsdialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -10,4 +10,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS orderform.pro
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/orderform
|
||||
INSTALLS += target sources
|
||||
|
||||
QT += widgets printsupport
|
||||
QT += widgets
|
||||
!isEmpty(QT.printsupport.name): QT += printsupport
|
||||
|
@ -53,8 +53,6 @@
|
||||
#include <QFontDatabase>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrinter>
|
||||
#include <QTextCodec>
|
||||
#include <QTextEdit>
|
||||
#include <QToolBar>
|
||||
@ -64,8 +62,12 @@
|
||||
#include <QtDebug>
|
||||
#include <QCloseEvent>
|
||||
#include <QMessageBox>
|
||||
#include <QPrintPreviewDialog>
|
||||
#include <QMimeData>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrintDialog>
|
||||
#include <QPrinter>
|
||||
#include <QPrintPreviewDialog>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
const QString rsrcPath = ":/images/mac";
|
||||
|
@ -19,4 +19,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.doc images
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/textedit
|
||||
INSTALLS += target sources
|
||||
|
||||
QT += widgets printsupport
|
||||
QT += widgets
|
||||
!isEmpty(QT.printsupport.name): QT += printsupport
|
||||
|
@ -9,7 +9,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
|
||||
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fingerpaint.pro
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
|
||||
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)
|
||||
|
@ -39,8 +39,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
|
||||
#include "scribblearea.h"
|
||||
|
||||
|
@ -39,7 +39,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
|
||||
#include "imageviewer.h"
|
||||
|
||||
|
@ -42,7 +42,9 @@
|
||||
#define IMAGEVIEWER_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAction;
|
||||
|
@ -12,6 +12,7 @@ INSTALLS += target sources
|
||||
wince*: {
|
||||
DEPLOYMENT_PLUGIN += qjpeg qgif
|
||||
}
|
||||
QT += widgets printsupport
|
||||
QT += widgets
|
||||
!isEmpty(QT.printsupport.name): QT += printsupport
|
||||
|
||||
simulator: warning(This example might not fully work on Simulator platform)
|
||||
|
@ -10,4 +10,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS scribble.pro
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/scribble
|
||||
INSTALLS += target sources
|
||||
|
||||
QT += widgets printsupport
|
||||
QT += widgets
|
||||
!isEmpty(QT.printsupport.name): QT += printsupport
|
||||
|
@ -39,8 +39,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#endif
|
||||
|
||||
#include "scribblearea.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user