Fix building of examples.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Thu, 25 Aug 2011 13:53:04 +0000 (15:53 +0200)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>
Thu, 25 Aug 2011 13:54:16 +0000 (15:54 +0200)
Change-Id: Iebb56c81fd13deaa82d8883e3f1529f1a78ebea8
Reviewed-on: http://codereview.qt.nokia.com/3603
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
24 files changed:
examples/animation/appchooser/main.cpp
examples/animation/states/main.cpp
examples/animation/stickman/graphicsview.cpp
examples/animation/stickman/rectbutton.cpp
examples/dialogs/licensewizard/licensewizard.cpp
examples/dialogs/licensewizard/licensewizard.pro
examples/graphicsview/chip/chip.pro
examples/graphicsview/chip/view.cpp
examples/graphicsview/dragdroprobot/main.cpp
examples/itemviews/pixelator/mainwindow.cpp
examples/itemviews/pixelator/pixelator.pro
examples/itemviews/spreadsheet/spreadsheet.cpp
examples/painting/fontsampler/fontsampler.pro
examples/painting/fontsampler/mainwindow.cpp
examples/painting/fontsampler/mainwindow.h
examples/richtext/orderform/mainwindow.cpp
examples/richtext/orderform/orderform.pro
examples/touch/fingerpaint/fingerpaint.pro
examples/touch/fingerpaint/scribblearea.cpp
examples/tutorials/threads/movedobject/thread.cpp
examples/widgets/imageviewer/imageviewer.cpp
examples/widgets/imageviewer/imageviewer.pro
examples/widgets/scribble/scribble.pro
examples/widgets/scribble/scribblearea.cpp

index 0a54842..873054c 100644 (file)
@@ -88,7 +88,7 @@ public:
     {
     }
 
-    virtual void resizeEvent(QResizeEvent *event)
+    virtual void resizeEvent(QResizeEvent *)
     {
         fitInView(sceneRect(), Qt::KeepAspectRatio);
     }
index 631ec97..f37c2bd 100644 (file)
@@ -69,7 +69,7 @@ public:
     {
     }
 
-    virtual void resizeEvent(QResizeEvent *event)
+    virtual void resizeEvent(QResizeEvent *)
     {
         fitInView(sceneRect(), Qt::KeepAspectRatio);
     }
index a42dd16..0d422ab 100644 (file)
@@ -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());
 }
index d45e8ab..d1bd9e4 100644 (file)
@@ -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);
index 49f9a27..c73b99b 100644 (file)
@@ -39,6 +39,8 @@
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
 
 #include "licensewizard.h"
 
index e3d0e7a..20b5336 100644 (file)
@@ -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)
index 227768d..5bf1b88 100644 (file)
@@ -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
index 872a10e..072dafa 100644 (file)
@@ -42,6 +42,9 @@
 #include "view.h"
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+
 #ifndef QT_NO_OPENGL
 #include <QtOpenGL>
 #endif
index 001b81e..9b6f95c 100644 (file)
@@ -53,7 +53,7 @@ public:
     }
 
 protected:
-    virtual void resizeEvent(QResizeEvent *event)
+    virtual void resizeEvent(QResizeEvent *)
     {
 #if defined(Q_OS_SYMBIAN)
         fitInView(sceneRect(), Qt::KeepAspectRatio);
index 7df4c0b..15bd60e 100644 (file)
@@ -39,6 +39,8 @@
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
 
 #include "imagemodel.h"
 #include "mainwindow.h"
index 57450fe..91a78aa 100644 (file)
@@ -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
index 04ddfc7..d3e57a5 100644 (file)
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPrintPreviewDialog>
+
 #include "spreadsheet.h"
 #include "spreadsheetdelegate.h"
 #include "spreadsheetitem.h"
index 69960cd..63892a3 100644 (file)
@@ -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
index 21babaf..9efd307 100644 (file)
@@ -39,6 +39,9 @@
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPrintPreviewDialog>
 
 #include "mainwindow.h"
 
index 4021ee7..1b66c3c 100644 (file)
@@ -44,6 +44,7 @@
 #include "ui_mainwindowbase.h"
 
 QT_BEGIN_NAMESPACE
+class QPrinter;
 class QTextEdit;
 class QTreeWidget;
 class QTreeWidgetItem;
index 30ea7a7..e94d4e6 100644 (file)
@@ -39,6 +39,8 @@
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
 
 #include "detailsdialog.h"
 #include "mainwindow.h"
index 4ba2ecf..729f66c 100644 (file)
@@ -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
index 138d0c2..2d11eb7 100644 (file)
@@ -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
index 3b3b2ce..a83a9f3 100644 (file)
@@ -39,6 +39,8 @@
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
 
 #include "scribblearea.h"
 
index 6dfe8ff..d8a17ee 100644 (file)
@@ -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 );
index 40bef14..edee9ce 100644 (file)
@@ -39,6 +39,7 @@
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrintDialog>
 
 #include "imageviewer.h"
 
index d3eaf37..939d60a 100644 (file)
@@ -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)
index bf0363c..ef11636 100644 (file)
@@ -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
index 984629f..7e76d16 100644 (file)
@@ -39,6 +39,8 @@
 ****************************************************************************/
 
 #include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
 
 #include "scribblearea.h"