Fix some compiler warnings in tests and examples.
authorChristian Kandeler <christian.kandeler@digia.com>
Tue, 14 Jan 2014 11:31:39 +0000 (12:31 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 15 Jan 2014 09:45:05 +0000 (10:45 +0100)
Change-Id: Ia739c995005635caf6fd0bd4e495ed8567350e83
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
examples/quick/models/abstractitemmodel/model.cpp
tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
tests/auto/quick/qquickimage/tst_qquickimage.cpp
tests/auto/quick/qquickview/tst_qquickview.cpp

index 724e2ed..30eff6a 100644 (file)
@@ -67,6 +67,7 @@ void AnimalModel::addAnimal(const Animal &animal)
 }
 
 int AnimalModel::rowCount(const QModelIndex & parent) const {
+    Q_UNUSED(parent);
     return m_animals.count();
 }
 
index 4f21231..553663a 100644 (file)
@@ -676,6 +676,7 @@ void tst_qqmlcontext::qobjectDerived()
     QQmlContext context(engine.rootContext());
 
     QObject *o1 = component.create(&context);
+    Q_UNUSED(o1);
 
     QCOMPARE(command.count, 2);
 }
index 8bdb9c9..7fa5803 100644 (file)
@@ -885,6 +885,7 @@ public:
 
     QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize)
     {
+        Q_UNUSED(requestedSize);
         if (id == QLatin1String("first-image.png")) {
             QTest::qWait(50);
             int width = 100;
index a4ed126..02c00ff 100644 (file)
@@ -186,10 +186,6 @@ void tst_QQuickView::resizemodeitem()
     delete view;
 }
 
-static void silentErrorsMsgHandler(QtMsgType, const QMessageLogContext &, const QString &)
-{
-}
-
 void tst_QQuickView::errors()
 {
     QQuickView *view = new QQuickView;