Fix new warnings in qtdeclarative (found by GCC 4.8)
authorThiago Macieira <thiago.macieira@intel.com>
Sat, 6 Apr 2013 18:35:00 +0000 (11:35 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 9 Apr 2013 05:14:01 +0000 (07:14 +0200)
qqmlproperty.cpp:1561:35: warning: typedef ‘VMEMO’ locally defined but not used [-Wunused-local-typedefs]
qquickglobal.cpp:1017:13: warning: ‘initialized’ defined but not used [-Wunused-variable]
qquicktextnode.cpp:245:6: warning: unused parameter ‘position’ [-Wunused-parameter]

Change-Id: I48c5486953278dc960249f68e0e122d108f56e07
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
src/qml/qml/qqmlproperty.cpp
src/quick/items/qquicktextnode.cpp
src/quick/util/qquickglobal.cpp

index f301b5a..fa728fe 100644 (file)
@@ -1558,7 +1558,6 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
             return false;
         }
 
-        typedef QQmlVMEMetaObject VMEMO;
         QQmlVMEMetaObject *vmemo = QQmlVMEMetaObject::get(object);
         Q_ASSERT(vmemo);
         vmemo->setVMEProperty(core.coreIndex, result);
index d469594..4952a37 100644 (file)
@@ -249,6 +249,7 @@ void QQuickTextNode::addTextLayout(const QPointF &position, QTextLayout *textLay
                                 int selectionStart, int selectionEnd,
                                 int lineStart, int lineCount)
 {
+    Q_UNUSED(position);
     initEngine(color, selectedTextColor, selectionColor, anchorColor);
 
 #ifndef QT_NO_IM
index 4d17399..3ea1bc7 100644 (file)
@@ -1014,6 +1014,6 @@ static bool initializeProviders()
     return true;
 }
 
-static bool initialized = initializeProviders();
+Q_CONSTRUCTOR_FUNCTION(initializeProviders)
 
 QT_END_NAMESPACE