aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-02-02 22:06:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-03 14:38:30 +0100
commit7f3ec6bf00238a51c349c663c3fd24ac89fd500c (patch)
treeaf1faae9c3f228a1e53c7316a235fec314216122 /src/qml/qml/qqmlpropertycache.cpp
parent59eaf59103c2cc78ddd9972f410ef1ea43077e22 (diff)
Fix nasty bug in property cache leading to inaccessible signal parameters
The property cache among other things caches the parameter types and names of signals (instead of retrieving them from the meta-object each time). When this cache is created through createArgumentsObject(), the parameter names have to be provided, but the signature didn't enforce that because of the parameter names having a default value of an empty list. All call sites however provided the correct list, except for one in QQmlPropertyCache::methodParameterTypes. Consequently tst_qqmlecmascript::threadSignal() would fail occasionally because the first time this cache was "created" was when the "done" signal was emitted, which caused QQmlBoundSignalExpression::evaluate to call methodParameterTypes. If the signal data had not been cached so far, a new cache with an empty parameter name list was created. Later (in the second half of the test) a new signal handler was compiled and the property cache reported that the signal took no parameters. Change-Id: I19230d0fb1ddd54992f3d6251f82c489626662e7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index 0247cebdc5..a0af0e94ef 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -1195,7 +1195,7 @@ int *QQmlPropertyCache::methodParameterTypes(QObject *object, int index,
int argc = m.parameterCount();
if (!rv->arguments) {
- A *args = c->createArgumentsObject(argc);
+ A *args = c->createArgumentsObject(argc, m.parameterNames());
rv->arguments = args;
}
A *args = static_cast<A *>(rv->arguments);