summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativepropertycache.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-02-23 20:41:53 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-18 11:47:17 +0200
commit6d3676e877da86d9ec8d4c5094ec19c38a6649e7 (patch)
treebdcd861841b385f1f28f90404055ed5bf3bd7f02 /src/declarative/qml/qdeclarativepropertycache.cpp
parentd2e40f5dbd6d1a550bc70a7adb8511788eeca031 (diff)
Adapt to Qt5 meta-object changes
QMetaMethod::signature() has been renamed to methodSignature(), and returns a QByteArray, not const char *. Thew new function QMetaMethod::isValid() should be used to check whether a method is valid (it's a lot cheaper than calling signature()). Also use the new QMetaObject::checkConnectArgs() overload that takes QMetaMethods, not strings, as arguments. Further improvements can be made by using the new functions QMetaMethod::name(), parameterCount() and parameterTypes(), but that will be done in separate commits. Change-Id: I3e4cfbdc7799d8bce747ef37f07d0d097370e409 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativepropertycache.cpp')
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index ea94ee23..2ffa1ef7 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -196,7 +196,7 @@ QDeclarativePropertyCache::Data QDeclarativePropertyCache::create(const QMetaObj
QMetaMethod m = metaObject->method(ii);
if (m.access() == QMetaMethod::Private)
continue;
- QString methodName = QString::fromUtf8(m.signature());
+ QString methodName = QString::fromUtf8(m.methodSignature());
int parenIdx = methodName.indexOf(QLatin1Char('('));
Q_ASSERT(parenIdx != -1);
@@ -258,7 +258,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
QMetaMethod m = metaObject->method(ii);
if (m.access() == QMetaMethod::Private)
continue;
- QString methodName = QString::fromUtf8(m.signature());
+ QString methodName = QString::fromUtf8(m.methodSignature());
int parenIdx = methodName.indexOf(QLatin1Char('('));
Q_ASSERT(parenIdx != -1);
@@ -392,7 +392,7 @@ QString QDeclarativePropertyCache::Data::name(const QMetaObject *metaObject)
if (flags & IsFunction) {
QMetaMethod m = metaObject->method(coreIndex);
- QString name = QString::fromUtf8(m.signature());
+ QString name = QString::fromUtf8(m.methodSignature());
int parenIdx = name.indexOf(QLatin1Char('('));
if (parenIdx != -1)
name = name.left(parenIdx);