summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-06-22 14:34:13 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-06-22 14:34:13 (GMT)
commitf58ca7944eb9a978f4ebc3b64428f0b27ecba2b0 (patch)
treee8356828b2dbbd771148c1d78ba7d23cd984f185 /src/declarative
parent078a68ffc84a745830535f1eb0e19ab8a190f542 (diff)
parentb1c746eefffc84403e9a7c0ea9080408d6428bc3 (diff)
downloadQt-f58ca7944eb9a978f4ebc3b64428f0b27ecba2b0.zip
Qt-f58ca7944eb9a978f4ebc3b64428f0b27ecba2b0.tar.gz
Qt-f58ca7944eb9a978f4ebc3b64428f0b27ecba2b0.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging: Fix QDeclarativeInspector when starting with ,block qmlplugindump: Add -v option. qmlplugindump: Fix emitted tooling version.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorservice.cpp14
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorservice_p.h2
2 files changed, 14 insertions, 2 deletions
diff --git a/src/declarative/debugger/qdeclarativeinspectorservice.cpp b/src/declarative/debugger/qdeclarativeinspectorservice.cpp
index 9fec006..15dbf58 100644
--- a/src/declarative/debugger/qdeclarativeinspectorservice.cpp
+++ b/src/declarative/debugger/qdeclarativeinspectorservice.cpp
@@ -67,11 +67,13 @@ QDeclarativeInspectorService *QDeclarativeInspectorService::instance()
void QDeclarativeInspectorService::addView(QDeclarativeView *view)
{
m_views.append(view);
+ updateStatus();
}
void QDeclarativeInspectorService::removeView(QDeclarativeView *view)
{
m_views.removeAll(view);
+ updateStatus();
}
void QDeclarativeInspectorService::sendMessage(const QByteArray &message)
@@ -84,10 +86,18 @@ void QDeclarativeInspectorService::sendMessage(const QByteArray &message)
void QDeclarativeInspectorService::statusChanged(Status status)
{
- if (m_views.isEmpty())
+ updateStatus();
+}
+
+void QDeclarativeInspectorService::updateStatus()
+{
+ if (m_views.isEmpty()) {
+ if (m_inspectorPlugin)
+ m_inspectorPlugin->deactivate();
return;
+ }
- if (status == Enabled) {
+ if (status() == Enabled) {
if (!m_inspectorPlugin)
m_inspectorPlugin = loadInspectorPlugin();
diff --git a/src/declarative/debugger/qdeclarativeinspectorservice_p.h b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
index 9fe0d601f..9a14155 100644
--- a/src/declarative/debugger/qdeclarativeinspectorservice_p.h
+++ b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
@@ -78,6 +78,8 @@ protected:
virtual void messageReceived(const QByteArray &);
private:
+ void updateStatus();
+
static QDeclarativeInspectorInterface *loadInspectorPlugin();
QList<QDeclarativeView*> m_views;