aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp8
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp1
2 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 3713de9270..6c4465eb96 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -379,13 +379,15 @@ QQmlBoundSignalParameters::QQmlBoundSignalParameters(const QMetaMethod &method,
types = new int[paramTypes.count()];
for (int ii = 0; ii < paramTypes.count(); ++ii) {
const QByteArray &type = paramTypes.at(ii);
- const QByteArray &name = paramNames.at(ii);
-
- if (name.isEmpty() || type.isEmpty()) {
+ if (type.isEmpty()) {
types[ii] = 0;
continue;
}
+ QByteArray name = paramNames.at(ii);
+ if (name.isEmpty())
+ name = "__qt_anonymous_param_" + QByteArray::number(ii);
+
int t = QMetaType::type(type.constData());
if (QQmlMetaType::isQObject(t)) {
types[ii] = QMetaType::QObjectStar;
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index c7763fcbd4..4e1638f516 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -509,7 +509,6 @@ void tst_qqmlecmascript::signalAssignment()
QVERIFY(object != 0);
QCOMPARE(object->string(), QString());
emit object->unnamedArgumentSignal(19, 10.25, "Hello world!");
- QEXPECT_FAIL("", "QTBUG-24481", Continue);
QCOMPARE(object->string(), QString("pass 19 Hello world!"));
delete object;
}