From 5e6605f7b006225f112b92956961974c8c8ad1a9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 25 Aug 2011 15:53:04 +0200 Subject: Fix building of examples. Change-Id: Iebb56c81fd13deaa82d8883e3f1529f1a78ebea8 Reviewed-on: http://codereview.qt.nokia.com/3603 Reviewed-by: Friedemann Kleint --- examples/animation/appchooser/main.cpp | 2 +- examples/animation/states/main.cpp | 2 +- examples/animation/stickman/graphicsview.cpp | 2 +- examples/animation/stickman/rectbutton.cpp | 4 ++-- examples/dialogs/licensewizard/licensewizard.cpp | 2 ++ examples/dialogs/licensewizard/licensewizard.pro | 2 +- examples/graphicsview/chip/chip.pro | 3 ++- examples/graphicsview/chip/view.cpp | 3 +++ examples/graphicsview/dragdroprobot/main.cpp | 2 +- examples/itemviews/pixelator/mainwindow.cpp | 2 ++ examples/itemviews/pixelator/pixelator.pro | 2 +- examples/itemviews/spreadsheet/spreadsheet.cpp | 4 ++++ examples/painting/fontsampler/fontsampler.pro | 2 +- examples/painting/fontsampler/mainwindow.cpp | 3 +++ examples/painting/fontsampler/mainwindow.h | 1 + examples/richtext/orderform/mainwindow.cpp | 2 ++ examples/richtext/orderform/orderform.pro | 2 +- examples/touch/fingerpaint/fingerpaint.pro | 2 +- examples/touch/fingerpaint/scribblearea.cpp | 2 ++ examples/tutorials/threads/movedobject/thread.cpp | 3 +-- examples/widgets/imageviewer/imageviewer.cpp | 1 + examples/widgets/imageviewer/imageviewer.pro | 2 +- examples/widgets/scribble/scribble.pro | 2 +- examples/widgets/scribble/scribblearea.cpp | 2 ++ 24 files changed, 38 insertions(+), 16 deletions(-) (limited to 'examples') diff --git a/examples/animation/appchooser/main.cpp b/examples/animation/appchooser/main.cpp index 0a54842ef2..873054ce5f 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 631ec973f7..f37c2bdbbf 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 a42dd1600b..0d422ab1d2 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 d45e8abefe..d1bd9e42d1 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 49f9a27d7f..c73b99b8b2 100644 --- a/examples/dialogs/licensewizard/licensewizard.cpp +++ b/examples/dialogs/licensewizard/licensewizard.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include +#include +#include #include "licensewizard.h" diff --git a/examples/dialogs/licensewizard/licensewizard.pro b/examples/dialogs/licensewizard/licensewizard.pro index e3d0e7af04..20b533644e 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 227768deb9..5bf1b88164 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 872a10e4be..072dafaed4 100644 --- a/examples/graphicsview/chip/view.cpp +++ b/examples/graphicsview/chip/view.cpp @@ -42,6 +42,9 @@ #include "view.h" #include +#include +#include + #ifndef QT_NO_OPENGL #include #endif diff --git a/examples/graphicsview/dragdroprobot/main.cpp b/examples/graphicsview/dragdroprobot/main.cpp index 001b81e0b7..9b6f95c7a2 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 7df4c0b126..15bd60e1b4 100644 --- a/examples/itemviews/pixelator/mainwindow.cpp +++ b/examples/itemviews/pixelator/mainwindow.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include +#include +#include #include "imagemodel.h" #include "mainwindow.h" diff --git a/examples/itemviews/pixelator/pixelator.pro b/examples/itemviews/pixelator/pixelator.pro index 57450fe992..91a78aa1f5 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 04ddfc7b66..d3e57a5f4f 100644 --- a/examples/itemviews/spreadsheet/spreadsheet.cpp +++ b/examples/itemviews/spreadsheet/spreadsheet.cpp @@ -40,6 +40,10 @@ ****************************************************************************/ #include +#include +#include +#include + #include "spreadsheet.h" #include "spreadsheetdelegate.h" #include "spreadsheetitem.h" diff --git a/examples/painting/fontsampler/fontsampler.pro b/examples/painting/fontsampler/fontsampler.pro index 69960cd68e..63892a319a 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 21babaf8d2..9efd307f88 100644 --- a/examples/painting/fontsampler/mainwindow.cpp +++ b/examples/painting/fontsampler/mainwindow.cpp @@ -39,6 +39,9 @@ ****************************************************************************/ #include +#include +#include +#include #include "mainwindow.h" diff --git a/examples/painting/fontsampler/mainwindow.h b/examples/painting/fontsampler/mainwindow.h index 4021ee7c6c..1b66c3c370 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 30ea7a70be..e94d4e6316 100644 --- a/examples/richtext/orderform/mainwindow.cpp +++ b/examples/richtext/orderform/mainwindow.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include +#include +#include #include "detailsdialog.h" #include "mainwindow.h" diff --git a/examples/richtext/orderform/orderform.pro b/examples/richtext/orderform/orderform.pro index 4ba2ecf203..729f66c873 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 138d0c2bed..2d11eb7da7 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 3b3b2ce33f..a83a9f3f1d 100644 --- a/examples/touch/fingerpaint/scribblearea.cpp +++ b/examples/touch/fingerpaint/scribblearea.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include +#include +#include #include "scribblearea.h" diff --git a/examples/tutorials/threads/movedobject/thread.cpp b/examples/tutorials/threads/movedobject/thread.cpp index 6dfe8ff159..d8a17eefe6 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 40bef145e5..edee9ce00b 100644 --- a/examples/widgets/imageviewer/imageviewer.cpp +++ b/examples/widgets/imageviewer/imageviewer.cpp @@ -39,6 +39,7 @@ ****************************************************************************/ #include +#include #include "imageviewer.h" diff --git a/examples/widgets/imageviewer/imageviewer.pro b/examples/widgets/imageviewer/imageviewer.pro index d3eaf379d4..939d60a208 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 bf0363c137..ef11636efd 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 984629fb44..7e76d16eda 100644 --- a/examples/widgets/scribble/scribblearea.cpp +++ b/examples/widgets/scribble/scribblearea.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include +#include +#include #include "scribblearea.h" -- cgit v1.2.3