diff options
author | Simjees Abraham <simjees.abraham@nokia.com> | 2012-05-11 14:37:33 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-14 13:58:03 +0200 |
commit | 7eb5f7b3e0630d59bfa7e4e185df6f34c237e584 (patch) | |
tree | f4a769907beec334e628266032ce8b7436016b00 /src/qml/qml/qqmlengine_p.h | |
parent | fd5c099eea26a8101e2cc0dc3237d1250158b895 (diff) |
Inspector:Modified Apply changes on Save for unsync. changes
Changes done to reload the view if the user opts to do so after making
unsynchronizable changes. Inspector informs the QmlEngine about the
changes which caches it. The cache is used to load the files which
were changed when reloading the view.
Change-Id: I22d476cace294d6ecf4e428dac104a557c3f7dde
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index c7c1a2b805..4c6b3b5f0f 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -241,6 +241,9 @@ public: const QMetaObject *metaObjectForType(int) const; void registerCompositeType(QQmlCompiledData *); + inline void setDebugChangesCache(const QHash<QUrl, QByteArray> &changes); + inline QHash<QUrl, QByteArray> debugChangesCache(); + void sendQuit(); void warning(const QQmlError &); void warning(const QList<QQmlError> &); @@ -299,6 +302,7 @@ private: QHash<QPair<QQmlType *, int>, QQmlPropertyCache *> typePropertyCache; QHash<int, int> m_qmlLists; QHash<int, QQmlCompiledData *> m_compositeTypes; + QHash<QUrl, QByteArray> debugChangesHash; // These members is protected by the full QQmlEnginePrivate::mutex mutex struct Deletable { Deletable():next(0) {} virtual ~Deletable() {} Deletable *next; }; @@ -517,6 +521,19 @@ void QQmlEnginePrivate::captureProperty(QObject *o, int c, int n) propertyCapture->captureProperty(o, c, n); } +void QQmlEnginePrivate::setDebugChangesCache(const QHash<QUrl, QByteArray> &changes) +{ + Locker locker(this); + foreach (const QUrl &key, changes.keys()) + debugChangesHash.insert(key, changes.value(key)); +} + +QHash<QUrl, QByteArray> QQmlEnginePrivate::debugChangesCache() +{ + Locker locker(this); + return debugChangesHash; +} + QT_END_NAMESPACE #endif // QQMLENGINE_P_H |