From 7777e25469689e9c8c62e0d2ed8e95892adf708b Mon Sep 17 00:00:00 2001
From: Olivier Goffart <olivier.goffart@nokia.com>
Date: Thu, 22 Jul 2010 10:10:11 +0200
Subject: [PATCH] QML Live Preview: Apparently, the interresting root object is
 the last.

Even if we should really care about all of them, the object that is the root
of all the graphical QML item is the usually last.
---
 src/plugins/qmljsinspector/qmljsclientproxy.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp
index 0c09172f62e..e0260ed4429 100644
--- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp
+++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp
@@ -361,7 +361,7 @@ void ClientProxy::contextChanged()
             m_rootObject = QDeclarativeDebugObjectReference();
             emit objectTreeUpdated(m_rootObject);
         } else {
-            m_rootObject = m_contextQuery->rootContext().objects().first();
+            m_rootObject = m_contextQuery->rootContext().objects().last();
         }
 
         delete m_contextQuery;
-- 
GitLab