OSDN Git Service

QmlJSDebugger: Update API to changes in QDeclarativeEngine
authorKai Koehne <kai.koehne@nokia.com>
Mon, 27 Sep 2010 08:25:01 +0000 (10:25 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Fri, 1 Oct 2010 11:43:40 +0000 (13:43 +0200)
Reviewed-by: Christiaan Janssen
share/qtcreator/qml/qmljsdebugger/include/jsdebuggeragent.h
share/qtcreator/qml/qmljsdebugger/include/qdeclarativeobserverservice.h
share/qtcreator/qml/qmljsdebugger/jsdebuggeragent.cpp
share/qtcreator/qml/qmljsdebugger/qdeclarativeobserverservice.cpp

index 39b559c..47b17c4 100644 (file)
@@ -103,7 +103,7 @@ public:
                        const QVariant &argument = QVariant());
 
     void messageReceived(const QByteArray &);
-    void enabledChanged(bool);
+    void statusChanged(Status status);
 
 public slots:
 //    void pauses();
index 121a847..9120c51 100644 (file)
@@ -98,7 +98,7 @@ Q_SIGNALS:
     void clearComponentCacheRequested();
 
 protected:
-    virtual void enabledChanged(bool enabled);
+    virtual void statusChanged(Status status);
     virtual void messageReceived(const QByteArray &);
 
 private:
index 4258882..d398150 100644 (file)
@@ -511,9 +511,10 @@ void JSDebuggerAgent::continueExec()
     loop.quit();
 }
 
-void JSDebuggerAgent::enabledChanged(bool on)
+void JSDebuggerAgent::statusChanged(Status status)
 {
     engine()->setAgent(on ? this : 0);
+    engine()->setAgent((status == QDeclarativeDebugService::Enabled) ? this : 0);
 }
 
 } // namespace QmlJSDebugger
index 16b5145..0b79609 100644 (file)
@@ -60,9 +60,9 @@ QDeclarativeObserverService *QDeclarativeObserverService::instance()
     return serviceInstance();
 }
 
-void QDeclarativeObserverService::enabledChanged(bool enabled)
+void QDeclarativeObserverService::statusChanged(Status status)
 {
-    emit debuggingClientChanged(enabled);
+    emit debuggingClientChanged((status == Enabled));
 }
 
 void QDeclarativeObserverService::messageReceived(const QByteArray &message)