diff options
author | Friedemann Kleint <[email protected]> | 2011-08-25 15:53:04 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2011-08-25 15:54:16 +0200 |
commit | 5e6605f7b006225f112b92956961974c8c8ad1a9 (patch) | |
tree | 4e00075b970d26f640b952b03a2c32865f6ea3ff | |
parent | 794feb002ad468bcfa60d1edc55637273fef5832 (diff) |
Fix building of examples.
Change-Id: Iebb56c81fd13deaa82d8883e3f1529f1a78ebea8
Reviewed-on: http://codereview.qt.nokia.com/3603
Reviewed-by: Friedemann Kleint <[email protected]>
24 files changed, 38 insertions, 16 deletions
diff --git a/examples/animation/appchooser/main.cpp b/examples/animation/appchooser/main.cpp index 0a54842ef2c..873054ce5f1 100644 --- a/examples/animation/appchooser/main.cpp +++ b/examples/animation/appchooser/main.cpp @@ -88,7 +88,7 @@ public: { } - virtual void resizeEvent(QResizeEvent *event) + virtual void resizeEvent(QResizeEvent *) { fitInView(sceneRect(), Qt::KeepAspectRatio); } diff --git a/examples/animation/states/main.cpp b/examples/animation/states/main.cpp index 631ec973f77..f37c2bdbbf8 100644 --- a/examples/animation/states/main.cpp +++ b/examples/animation/states/main.cpp @@ -69,7 +69,7 @@ public: { } - virtual void resizeEvent(QResizeEvent *event) + virtual void resizeEvent(QResizeEvent *) { fitInView(sceneRect(), Qt::KeepAspectRatio); } diff --git a/examples/animation/stickman/graphicsview.cpp b/examples/animation/stickman/graphicsview.cpp index a42dd1600bf..0d422ab1d2b 100644 --- a/examples/animation/stickman/graphicsview.cpp +++ b/examples/animation/stickman/graphicsview.cpp @@ -54,7 +54,7 @@ void GraphicsView::keyPressEvent(QKeyEvent *e) emit keyPressed(Qt::Key(e->key())); } -void GraphicsView::resizeEvent(QResizeEvent *event) +void GraphicsView::resizeEvent(QResizeEvent *) { fitInView(scene()->sceneRect()); } diff --git a/examples/animation/stickman/rectbutton.cpp b/examples/animation/stickman/rectbutton.cpp index d45e8abefe1..d1bd9e42d1a 100644 --- a/examples/animation/stickman/rectbutton.cpp +++ b/examples/animation/stickman/rectbutton.cpp @@ -51,7 +51,7 @@ RectButton::~RectButton() } -void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *event) +void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *) { emit clicked(); } @@ -63,7 +63,7 @@ QRectF RectButton::boundingRect() const } -void RectButton::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +void RectButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /* option */, QWidget * /* widget */) { painter->setBrush(Qt::gray); painter->drawRoundedRect(boundingRect(), 5, 5); diff --git a/examples/dialogs/licensewizard/licensewizard.cpp b/examples/dialogs/licensewizard/licensewizard.cpp index 49f9a27d7f5..c73b99b8b22 100644 --- a/examples/dialogs/licensewizard/licensewizard.cpp +++ b/examples/dialogs/licensewizard/licensewizard.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> #include "licensewizard.h" diff --git a/examples/dialogs/licensewizard/licensewizard.pro b/examples/dialogs/licensewizard/licensewizard.pro index e3d0e7af041..20b533644eb 100644 --- a/examples/dialogs/licensewizard/licensewizard.pro +++ b/examples/dialogs/licensewizard/licensewizard.pro @@ -10,7 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/licensewizard INSTALLS += target sources symbian: CONFIG += qt_example -QT += widgets +QT += widgets printsupport maemo5: CONFIG += qt_example symbian: warning(This example might not fully work on Symbian platform) maemo5: warning(This example might not fully work on Maemo platform) diff --git a/examples/graphicsview/chip/chip.pro b/examples/graphicsview/chip/chip.pro index 227768deb9c..5bf1b88164a 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 -contains(QT_CONFIG, opengl):QT += opengl widgets +QT += widgets printsupport +contains(QT_CONFIG, opengl):QT += opengl build_all:!build_pass { CONFIG -= build_all diff --git a/examples/graphicsview/chip/view.cpp b/examples/graphicsview/chip/view.cpp index 872a10e4be1..072dafaed46 100644 --- a/examples/graphicsview/chip/view.cpp +++ b/examples/graphicsview/chip/view.cpp @@ -42,6 +42,9 @@ #include "view.h" #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> + #ifndef QT_NO_OPENGL #include <QtOpenGL> #endif diff --git a/examples/graphicsview/dragdroprobot/main.cpp b/examples/graphicsview/dragdroprobot/main.cpp index 001b81e0b76..9b6f95c7a25 100644 --- a/examples/graphicsview/dragdroprobot/main.cpp +++ b/examples/graphicsview/dragdroprobot/main.cpp @@ -53,7 +53,7 @@ public: } protected: - virtual void resizeEvent(QResizeEvent *event) + virtual void resizeEvent(QResizeEvent *) { #if defined(Q_OS_SYMBIAN) fitInView(sceneRect(), Qt::KeepAspectRatio); diff --git a/examples/itemviews/pixelator/mainwindow.cpp b/examples/itemviews/pixelator/mainwindow.cpp index 7df4c0b1265..15bd60e1b46 100644 --- a/examples/itemviews/pixelator/mainwindow.cpp +++ b/examples/itemviews/pixelator/mainwindow.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> #include "imagemodel.h" #include "mainwindow.h" diff --git a/examples/itemviews/pixelator/pixelator.pro b/examples/itemviews/pixelator/pixelator.pro index 57450fe9927..91a78aa1f5e 100644 --- a/examples/itemviews/pixelator/pixelator.pro +++ b/examples/itemviews/pixelator/pixelator.pro @@ -14,5 +14,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/pixelator INSTALLS += target sources symbian: CONFIG += qt_example -QT += widgets +QT += widgets printsupport maemo5: CONFIG += qt_example diff --git a/examples/itemviews/spreadsheet/spreadsheet.cpp b/examples/itemviews/spreadsheet/spreadsheet.cpp index 04ddfc7b665..d3e57a5f4fc 100644 --- a/examples/itemviews/spreadsheet/spreadsheet.cpp +++ b/examples/itemviews/spreadsheet/spreadsheet.cpp @@ -40,6 +40,10 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> +#include <QPrintPreviewDialog> + #include "spreadsheet.h" #include "spreadsheetdelegate.h" #include "spreadsheetitem.h" diff --git a/examples/painting/fontsampler/fontsampler.pro b/examples/painting/fontsampler/fontsampler.pro index 69960cd68e1..63892a319a9 100644 --- a/examples/painting/fontsampler/fontsampler.pro +++ b/examples/painting/fontsampler/fontsampler.pro @@ -10,5 +10,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/fontsampler INSTALLS += target sources symbian: CONFIG += qt_example -QT += widgets +QT += widgets printsupport maemo5: CONFIG += qt_example diff --git a/examples/painting/fontsampler/mainwindow.cpp b/examples/painting/fontsampler/mainwindow.cpp index 21babaf8d21..9efd307f886 100644 --- a/examples/painting/fontsampler/mainwindow.cpp +++ b/examples/painting/fontsampler/mainwindow.cpp @@ -39,6 +39,9 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> +#include <QPrintPreviewDialog> #include "mainwindow.h" diff --git a/examples/painting/fontsampler/mainwindow.h b/examples/painting/fontsampler/mainwindow.h index 4021ee7c6c5..1b66c3c3703 100644 --- a/examples/painting/fontsampler/mainwindow.h +++ b/examples/painting/fontsampler/mainwindow.h @@ -44,6 +44,7 @@ #include "ui_mainwindowbase.h" QT_BEGIN_NAMESPACE +class QPrinter; class QTextEdit; class QTreeWidget; class QTreeWidgetItem; diff --git a/examples/richtext/orderform/mainwindow.cpp b/examples/richtext/orderform/mainwindow.cpp index 30ea7a70bec..e94d4e63160 100644 --- a/examples/richtext/orderform/mainwindow.cpp +++ b/examples/richtext/orderform/mainwindow.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> #include "detailsdialog.h" #include "mainwindow.h" diff --git a/examples/richtext/orderform/orderform.pro b/examples/richtext/orderform/orderform.pro index 4ba2ecf2030..729f66c873c 100644 --- a/examples/richtext/orderform/orderform.pro +++ b/examples/richtext/orderform/orderform.pro @@ -11,5 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/orderform INSTALLS += target sources symbian: CONFIG += qt_example -QT += widgets +QT += widgets printsupport maemo5: CONFIG += qt_example diff --git a/examples/touch/fingerpaint/fingerpaint.pro b/examples/touch/fingerpaint/fingerpaint.pro index 138d0c2bed1..2d11eb7da75 100644 --- a/examples/touch/fingerpaint/fingerpaint.pro +++ b/examples/touch/fingerpaint/fingerpaint.pro @@ -9,7 +9,7 @@ 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 +QT += widgets printsupport symbian: CONFIG += qt_example maemo5: CONFIG += qt_example diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp index 3b3b2ce33f2..a83a9f3f1d6 100644 --- a/examples/touch/fingerpaint/scribblearea.cpp +++ b/examples/touch/fingerpaint/scribblearea.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> #include "scribblearea.h" diff --git a/examples/tutorials/threads/movedobject/thread.cpp b/examples/tutorials/threads/movedobject/thread.cpp index 6dfe8ff1595..d8a17eefe62 100644 --- a/examples/tutorials/threads/movedobject/thread.cpp +++ b/examples/tutorials/threads/movedobject/thread.cpp @@ -43,7 +43,7 @@ /* * QThread derived class with additional capability to move a QObject to the * new thread, to stop the thread and move the QObject back to the thread where - *it came from. + *it came from. */ Thread::Thread( QObject *parent) @@ -68,7 +68,6 @@ void Thread::launchWorker(QObject *worker) { worker = worker; start(); - int i=0; worker->moveToThread(this); shutDownHelper->moveToThread(this); connect(shutDownHelper, SIGNAL(mapped(int) ), this, SLOT(stopExecutor()), Qt::DirectConnection ); diff --git a/examples/widgets/imageviewer/imageviewer.cpp b/examples/widgets/imageviewer/imageviewer.cpp index 40bef145e54..edee9ce00bf 100644 --- a/examples/widgets/imageviewer/imageviewer.cpp +++ b/examples/widgets/imageviewer/imageviewer.cpp @@ -39,6 +39,7 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrintDialog> #include "imageviewer.h" diff --git a/examples/widgets/imageviewer/imageviewer.pro b/examples/widgets/imageviewer/imageviewer.pro index d3eaf379d4e..939d60a2085 100644 --- a/examples/widgets/imageviewer/imageviewer.pro +++ b/examples/widgets/imageviewer/imageviewer.pro @@ -16,7 +16,7 @@ symbian: TARGET = imageviewerexample wince*: { DEPLOYMENT_PLUGIN += qjpeg qmng qgif } -QT += widgets +QT += widgets printsupport maemo5: CONFIG += qt_example symbian: warning(This example might not fully work on Symbian platform) diff --git a/examples/widgets/scribble/scribble.pro b/examples/widgets/scribble/scribble.pro index bf0363c1375..ef11636efdd 100644 --- a/examples/widgets/scribble/scribble.pro +++ b/examples/widgets/scribble/scribble.pro @@ -11,5 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/scribble INSTALLS += target sources symbian: CONFIG += qt_example -QT += widgets +QT += widgets printsupport maemo5: CONFIG += qt_example diff --git a/examples/widgets/scribble/scribblearea.cpp b/examples/widgets/scribble/scribblearea.cpp index 984629fb445..7e76d16eda9 100644 --- a/examples/widgets/scribble/scribblearea.cpp +++ b/examples/widgets/scribble/scribblearea.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include <QtWidgets> +#include <QPrinter> +#include <QPrintDialog> #include "scribblearea.h" |