From 6ef2ca90e21b57fb74bb7a8985ef9c7fadc1b613 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 23 Sep 2015 14:48:04 +0200 Subject: Smaller cleanups Change-Id: Ib75bf9de898975dcbb98b411a1e98524754c0788 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlpropertycache.cpp | 8 +++----- src/qml/qml/qqmlpropertycache_p.h | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src/qml/qml') diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 8f17c2ac44..67b3f93bcb 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -810,19 +810,17 @@ void QQmlPropertyCache::invalidate(const QMetaObject *metaObject) This is different from QMetaMethod::methodIndex(). */ QQmlPropertyData * -QQmlPropertyCache::signal(int index, QQmlPropertyCache **c) const +QQmlPropertyCache::signal(int index) const { if (index < 0 || index >= (signalHandlerIndexCacheStart + signalHandlerIndexCache.count())) return 0; if (index < signalHandlerIndexCacheStart) - return _parent->signal(index, c); + return _parent->signal(index); QQmlPropertyData *rv = const_cast(&methodIndexCache.at(index - signalHandlerIndexCacheStart)); - if (rv->notFullyResolved()) resolve(rv); Q_ASSERT(rv->isSignal() || rv->coreIndex == -1); - if (c) *c = const_cast(this); - return rv; + return ensureResolved(rv); } int QQmlPropertyCache::methodIndexToSignalIndex(int index) const diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index fa4aaac5c5..610709ef7f 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -284,7 +284,7 @@ public: QQmlPropertyData *property(int) const; QQmlPropertyData *method(int) const; - QQmlPropertyData *signal(int index) const { return signal(index, 0); } + QQmlPropertyData *signal(int index) const; int methodIndexToSignalIndex(int) const; QStringList propertyNames() const; @@ -340,9 +340,7 @@ private: QQmlPropertyData::Flag methodFlags = QQmlPropertyData::NoFlags, QQmlPropertyData::Flag signalFlags = QQmlPropertyData::NoFlags); - QQmlPropertyCacheMethodArguments *createArgumentsObject(int count, - const QList &names); - QQmlPropertyData *signal(int, QQmlPropertyCache **) const; + QQmlPropertyCacheMethodArguments *createArgumentsObject(int count, const QList &names); typedef QVector IndexCache; typedef QStringMultiHash > StringCache; -- cgit v1.2.3