diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-09-23 14:48:04 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-09-25 18:53:49 +0000 |
commit | 6ef2ca90e21b57fb74bb7a8985ef9c7fadc1b613 (patch) | |
tree | 428ed60c699644e8e6cf5fdc14388f2df89c3b46 /src/qml/qml | |
parent | 14e49c4a1960bfabf1963fa502b05c754a7f3858 (diff) |
Smaller cleanups
Change-Id: Ib75bf9de898975dcbb98b411a1e98524754c0788
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache_p.h | 6 |
2 files changed, 5 insertions, 9 deletions
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<QQmlPropertyData *>(&methodIndexCache.at(index - signalHandlerIndexCacheStart)); - if (rv->notFullyResolved()) resolve(rv); Q_ASSERT(rv->isSignal() || rv->coreIndex == -1); - if (c) *c = const_cast<QQmlPropertyCache *>(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<QByteArray> &names); - QQmlPropertyData *signal(int, QQmlPropertyCache **) const; + QQmlPropertyCacheMethodArguments *createArgumentsObject(int count, const QList<QByteArray> &names); typedef QVector<QQmlPropertyData> IndexCache; typedef QStringMultiHash<QPair<int, QQmlPropertyData *> > StringCache; |