Fix tst_qqmlecmascript::signalArguments
authorSimon Hausmann <simon.hausmann@digia.com>
Fri, 7 Jun 2013 10:05:42 +0000 (12:05 +0200)
committerLars Knoll <lars.knoll@digia.com>
Fri, 7 Jun 2013 16:33:30 +0000 (18:33 +0200)
Don't check for arguments.callee, which is only available in non-strict
mode

Change-Id: I90851862e36e5bc7c518198f9fe5672178a3ec58
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tests/auto/qml/qqmlecmascript/data/signalArguments.1.qml
tests/auto/qml/qqmlecmascript/data/signalArguments.2.qml
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp

index 3ab714b..09fffbb 100644 (file)
@@ -2,10 +2,8 @@ import Qt.test 1.0
 
 MyQmlObject {
     property int argumentCount: -1
-    property bool calleeCorrect: false
     onBasicSignal: {
         argumentCount = arguments.length
-        calleeCorrect = (arguments.callee === onBasicSignal)
         setString('pass')
     }
 }
index 8ecb8df..fec810f 100644 (file)
@@ -2,11 +2,9 @@ import Qt.test 1.0
 
 MyQmlObject {
     property int argumentCount: -1
-    property bool calleeCorrect: false
 
     onArgumentSignal: {
         argumentCount = arguments.length
-        calleeCorrect = (arguments.callee === onArgumentSignal)
         setString('pass ' + arguments[0] + ' ' + arguments[1] + ' '
                           + arguments[2] + ' ' + arguments[3] + ' '
                           + arguments[4])
index 9362136..f1142ac 100644 (file)
@@ -546,7 +546,6 @@ void tst_qqmlecmascript::signalArguments()
         emit object->basicSignal();
         QCOMPARE(object->string(), QString("pass"));
         QCOMPARE(object->property("argumentCount").toInt(), 0);
-        QCOMPARE(object->property("calleeCorrect").toBool(), true);
         delete object;
     }
 
@@ -558,7 +557,6 @@ void tst_qqmlecmascript::signalArguments()
         emit object->argumentSignal(19, "Hello world!", 10.25, MyQmlObject::EnumValue4, Qt::RightButton);
         QCOMPARE(object->string(), QString("pass 19 Hello world! 10.25 3 2"));
         QCOMPARE(object->property("argumentCount").toInt(), 5);
-        QCOMPARE(object->property("calleeCorrect").toBool(), true);
         delete object;
     }
 }