summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-08-02 14:43:56 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-03 03:58:30 +0200
commit680c98b04db6d5a49575782ba5bb58e06fa78bc2 (patch)
treebc22309ed20b41f9c2d2ff33f5a59b05385b8b39 /src
parent1830b5eab5aa692de33fe6f8fe9563b6632994fd (diff)
Do not assume ordering of resources declared for the default property
The order in which resources declared in QML are placed into the default property is not defined, and should not be relied upon. Task-number: QTBUG-26702 Change-Id: I5023b8dad89513cde69852e0c3a910477f60888e Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug.cpp14
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug_p.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/src/declarative/debugger/qdeclarativeenginedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebug.cpp
index 3232eeab..2eabc0ba 100644
--- a/src/declarative/debugger/qdeclarativeenginedebug.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebug.cpp
@@ -932,6 +932,20 @@ QList<QDeclarativeDebugObjectReference> QDeclarativeDebugObjectReference::childr
return m_children;
}
+QDeclarativeDebugObjectReference QDeclarativeDebugObjectReference::findChildByClassName(const QString &className, QDeclarativeDebugObjectReference after) const
+{
+ foreach (const QDeclarativeDebugObjectReference &child, m_children)
+ if (after.debugId() != -1) {
+ if (child.debugId() == after.debugId())
+ after = QDeclarativeDebugObjectReference();
+ } else {
+ if (child.className() == className)
+ return child;
+ }
+
+ return QDeclarativeDebugObjectReference();
+}
+
QDeclarativeDebugContextReference::QDeclarativeDebugContextReference()
: m_debugId(-1)
{
diff --git a/src/declarative/debugger/qdeclarativeenginedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebug_p.h
index 9c1246ac..c1e37110 100644
--- a/src/declarative/debugger/qdeclarativeenginedebug_p.h
+++ b/src/declarative/debugger/qdeclarativeenginedebug_p.h
@@ -254,6 +254,9 @@ public:
QList<QDeclarativeDebugPropertyReference> properties() const;
QList<QDeclarativeDebugObjectReference> children() const;
+ QDeclarativeDebugObjectReference findChildByClassName(const QString &className,
+ QDeclarativeDebugObjectReference after = QDeclarativeDebugObjectReference()) const;
+
private:
friend class QDeclarativeEngineDebugPrivate;
int m_debugId;