diff options
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index d10af391f5..6d44b61aee 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -1553,7 +1553,7 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) } else { method = builder.addSlot(signature); } - method.setAccess(QMetaMethod::Protected); + method.setAccess(QMetaMethod::Public); if (arguments && arguments->names) method.setParameterNames(*arguments->names); diff --git a/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp b/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp index 061f2c0b1b..b1f83fcd6c 100644 --- a/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp +++ b/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp @@ -379,10 +379,7 @@ void tst_QQmlMetaObject::method() QMetaMethod method = mo->method(mo->methodOffset()); QCOMPARE(method.methodType(), methodType); QCOMPARE(QString::fromUtf8(method.methodSignature().constData()), signature); - if (method.methodType() != QMetaMethod::Signal) - QCOMPARE(method.access(), QMetaMethod::Protected); - else - QCOMPARE(method.access(), QMetaMethod::Public); + QCOMPARE(method.access(), QMetaMethod::Public); QString computedName = signature.left(signature.indexOf('(')); QCOMPARE(QString::fromUtf8(method.name()), computedName); |