Fix qqmlproperty::warnOnInvalidBinding
authorSimon Hausmann <simon.hausmann@digia.com>
Fri, 14 Jun 2013 06:07:01 +0000 (08:07 +0200)
committerLars Knoll <lars.knoll@digia.com>
Sat, 15 Jun 2013 13:26:19 +0000 (15:26 +0200)
* Add column to expected warning message
* Get rid of eval that doesn't make sense with only one JS engine
  and doesn't work in strict mode

Change-Id: I63cd3784cd8c255af8832ea5ca1e6e5e2d48431e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tests/auto/qml/qqmlproperty/data/invalidBinding.qml
tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp

index e2bb1d1..9364cda 100644 (file)
@@ -4,7 +4,7 @@ Item {
     property Text text: myText
 
     property Rectangle rectangle1: myText
-    property Rectangle rectangle2: eval('getMyText()') // eval to force non-shared (v8) binding
+    property Rectangle rectangle2: getMyText()
 
     function getMyText() { return myText; }
 
index 9b83698..ff7d119 100644 (file)
@@ -1856,7 +1856,7 @@ void tst_qqmlproperty::warnOnInvalidBinding()
     QTest::ignoreMessage(QtWarningMsg, expectedWarning.toLatin1().constData());
 
     // V8 error message for invalid binding to anchor
-    expectedWarning = testUrl.toString() + QString::fromLatin1(":14: Unable to assign QQuickItem_QML_6 to QQuickAnchorLine");
+    expectedWarning = testUrl.toString() + QString::fromLatin1(":14:33: Unable to assign QQuickItem_QML_6 to QQuickAnchorLine");
     QTest::ignoreMessage(QtWarningMsg, expectedWarning.toLatin1().constData());
 
     QQmlComponent component(&engine, testUrl);