From 5e6605f7b006225f112b92956961974c8c8ad1a9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 25 Aug 2011 15:53:04 +0200 Subject: [PATCH] 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(-) diff --git a/examples/animation/appchooser/main.cpp b/examples/animation/appchooser/main.cpp index 0a54842..873054c 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 631ec97..f37c2bd 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 a42dd16..0d422ab 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 d45e8ab..d1bd9e4 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 49f9a27..c73b99b 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 e3d0e7a..20b5336 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 227768d..5bf1b88 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 872a10e..072dafa 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 001b81e..9b6f95c 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 7df4c0b..15bd60e 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 57450fe..91a78aa 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 04ddfc7..d3e57a5 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 69960cd..63892a3 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 21babaf..9efd307 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 4021ee7..1b66c3c 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 30ea7a7..e94d4e6 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 4ba2ecf..729f66c 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 138d0c2..2d11eb7 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 3b3b2ce..a83a9f3 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 6dfe8ff..d8a17ee 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 40bef14..edee9ce 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 d3eaf37..939d60a 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 bf0363c..ef11636 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 984629f..7e76d16 100644 --- a/examples/widgets/scribble/scribblearea.cpp +++ b/examples/widgets/scribble/scribblearea.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include +#include +#include #include "scribblearea.h" -- 2.7.4