Fix warning in tst_qquickdesignersupport.cpp
authorThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Tue, 25 Aug 2015 07:08:58 +0000 (09:08 +0200)
committerThomas Hartmann <Thomas.Hartmann@digia.com>
Tue, 25 Aug 2015 15:02:57 +0000 (15:02 +0000)
Taking the address of a temporary is not allowed.
It is against the standard to pass a non-const reference
to a temporary object.

Change-Id: Ib333fa9a366725b8f0491a4216597fa5baeef7ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
tests/auto/quick/qquickdesignersupport/tst_qquickdesignersupport.cpp

index 49535783c17a971046c1e2b0af8ee0eca69df35e..1104ce1d98fea4be9d6106c43a460ad645fc85c7 100644 (file)
@@ -394,7 +394,8 @@ void tst_qquickdesignersupport::statesPropertyChanges()
     //Create new PropertyChanges
     QQuickPropertyChanges *newPropertyChange = new QQuickPropertyChanges();
     newPropertyChange->setParent(state01);
-    QQuickStatePrivate::operations_append(&state01->changes(), newPropertyChange);
+    QQmlListProperty<QQuickStateOperation> changes = state01->changes();
+    QQuickStatePrivate::operations_append(&changes, newPropertyChange);
 
     newPropertyChange->setObject(rootItem);