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])
emit object->basicSignal();
QCOMPARE(object->string(), QString("pass"));
QCOMPARE(object->property("argumentCount").toInt(), 0);
- QCOMPARE(object->property("calleeCorrect").toBool(), true);
delete object;
}
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;
}
}