From 106e7f2a19693d0a067131e45cb79abc6b8a2433 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 18 Jun 2010 17:35:03 +0200 Subject: Fix example compile and runtime warnings, webkit examples not built. Reviewed-by: Olivier Goffart --- demos/mainwindow/mainwindow.cpp | 4 ++++ examples/dbus/remotecontrolledcar/car/car.h | 6 ++---- examples/examples.pro | 2 ++ examples/graphicsview/dragdroprobot/coloritem.cpp | 2 +- examples/graphicsview/simpleanchorlayout/main.cpp | 2 +- examples/multimedia/audiodevices/audiodevices.cpp | 2 ++ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/demos/mainwindow/mainwindow.cpp b/demos/mainwindow/mainwindow.cpp index 3ddb74b..350cefa 100644 --- a/demos/mainwindow/mainwindow.cpp +++ b/demos/mainwindow/mainwindow.cpp @@ -81,6 +81,8 @@ static const char * const message = #endif ; +Q_DECLARE_METATYPE(QDockWidget::DockWidgetFeatures) + MainWindow::MainWindow(const QMap &customSizeHints, QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) @@ -274,6 +276,8 @@ QAction *addAction(QMenu *menu, const QString &text, QActionGroup *group, QSigna void MainWindow::setupDockWidgets(const QMap &customSizeHints) { + qRegisterMetaType(); + mapper = new QSignalMapper(this); connect(mapper, SIGNAL(mapped(int)), this, SLOT(setCorner(int))); diff --git a/examples/dbus/remotecontrolledcar/car/car.h b/examples/dbus/remotecontrolledcar/car/car.h index 5ef046e..c611018 100644 --- a/examples/dbus/remotecontrolledcar/car/car.h +++ b/examples/dbus/remotecontrolledcar/car/car.h @@ -41,14 +41,12 @@ #ifndef CAR_H #define CAR_H -#include -#include +#include #include -class Car : public QObject, public QGraphicsItem +class Car : public QGraphicsObject { Q_OBJECT - public: Car(); QRectF boundingRect() const; diff --git a/examples/examples.pro b/examples/examples.pro index 43cad55..9a83216 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -30,6 +30,8 @@ SUBDIRS = \ gestures } +contains(QT_CONFIG, webkit):SUBDIRS += webkit + symbian: SUBDIRS = \ graphicsview \ itemviews \ diff --git a/examples/graphicsview/dragdroprobot/coloritem.cpp b/examples/graphicsview/dragdroprobot/coloritem.cpp index b6113fd..327fa87 100644 --- a/examples/graphicsview/dragdroprobot/coloritem.cpp +++ b/examples/graphicsview/dragdroprobot/coloritem.cpp @@ -76,7 +76,7 @@ void ColorItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, //! [2] //! [3] -void ColorItem::mousePressEvent(QGraphicsSceneMouseEvent *event) +void ColorItem::mousePressEvent(QGraphicsSceneMouseEvent *) { setCursor(Qt::ClosedHandCursor); } diff --git a/examples/graphicsview/simpleanchorlayout/main.cpp b/examples/graphicsview/simpleanchorlayout/main.cpp index 9cb4006..942cdc4 100644 --- a/examples/graphicsview/simpleanchorlayout/main.cpp +++ b/examples/graphicsview/simpleanchorlayout/main.cpp @@ -49,7 +49,7 @@ public: { } - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) + void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * = 0) { QFont font; font.setPixelSize(0.75 * qMin(boundingRect().width(), boundingRect().height())); diff --git a/examples/multimedia/audiodevices/audiodevices.cpp b/examples/multimedia/audiodevices/audiodevices.cpp index 5dc2ef1..5ab4918 100644 --- a/examples/multimedia/audiodevices/audiodevices.cpp +++ b/examples/multimedia/audiodevices/audiodevices.cpp @@ -58,6 +58,8 @@ QString toString(QAudioFormat::SampleType sampleType) case QAudioFormat::Float: result = "Float"; break; + case QAudioFormat::Unknown: + break; } return result; } -- cgit v0.12