OSDN Git Service

QmlJSDebugger: Renamed "execution paused" to "animation paused"
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Tue, 22 Mar 2011 09:37:14 +0000 (10:37 +0100)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Tue, 22 Mar 2011 09:40:46 +0000 (10:40 +0100)
The latter better describes what is paused, since expressions are
actually still executed.

Suggested by Kai.

16 files changed:
share/qtcreator/qml/qmljsdebugger/editor/qmltoolbar.cpp
share/qtcreator/qml/qmljsdebugger/editor/qmltoolbar.h
share/qtcreator/qml/qmljsdebugger/include/qdeclarativeobserverservice.h
share/qtcreator/qml/qmljsdebugger/include/qdeclarativeviewobserver.h
share/qtcreator/qml/qmljsdebugger/protocol/observerprotocol.h
share/qtcreator/qml/qmljsdebugger/qdeclarativeobserverservice.cpp
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h
share/qtcreator/qml/qmlobserver/qmlruntime.cpp
src/plugins/qmljsinspector/qmlinspectortoolbar.cpp
src/plugins/qmljsinspector/qmlinspectortoolbar.h
src/plugins/qmljsinspector/qmljsclientproxy.cpp
src/plugins/qmljsinspector/qmljsclientproxy.h
src/plugins/qmljsinspector/qmljsinspector.cpp
src/plugins/qmljsinspector/qmljsobserverclient.cpp
src/plugins/qmljsinspector/qmljsobserverclient.h

index 942a6ad..41c98a0 100644 (file)
@@ -195,7 +195,7 @@ void QmlToolBar::setAnimationSpeed(qreal slowDownFactor)
     m_emitSignals = true;
 }
 
-void QmlToolBar::setExecutionPaused(bool paused)
+void QmlToolBar::setAnimationPaused(bool paused)
 {
     if (m_paused == paused)
         return;
@@ -240,7 +240,7 @@ void QmlToolBar::setColorBoxColor(const QColor &color)
 void QmlToolBar::activatePlayOnClick()
 {
     m_paused = !m_paused;
-    emit executionPausedChanged(m_paused);
+    emit animationPausedChanged(m_paused);
     updatePlayAction();
 }
 
index de21869..c2927ef 100644 (file)
@@ -62,11 +62,11 @@ public slots:
     void activateZoom();
 
     void setAnimationSpeed(qreal slowDownFactor);
-    void setExecutionPaused(bool paused);
+    void setAnimationPaused(bool paused);
 
 signals:
     void animationSpeedChanged(qreal factor);
-    void executionPausedChanged(bool paused);
+    void animationPausedChanged(bool paused);
 
     void designModeBehaviorChanged(bool inDesignMode);
     void colorPickerSelected();
index 29b6412..2259858 100644 (file)
@@ -66,7 +66,7 @@ public:
     void setDesignModeBehavior(bool inDesignMode);
     void setCurrentObjects(QList<QObject*> items);
     void setAnimationSpeed(qreal slowDownFactor);
-    void setExecutionPaused(bool paused);
+    void setAnimationPaused(bool paused);
     void setCurrentTool(QmlJSDebugger::Constants::DesignTool toolId);
     void reloaded();
     void setShowAppOnTop(bool showAppOnTop);
index a20dca2..fc4ee84 100644 (file)
@@ -74,7 +74,7 @@ public Q_SLOTS:
     void setShowAppOnTop(bool appOnTop);
 
     void setAnimationSpeed(qreal factor);
-    void setExecutionPaused(bool paused);
+    void setAnimationPaused(bool paused);
 
     void setObserverContext(int contextIndex);
 
@@ -89,7 +89,7 @@ Q_SIGNALS:
     void selectedColorChanged(const QColor &color);
 
     void animationSpeedChanged(qreal factor);
-    void executionPausedChanged(bool paused);
+    void animationPausedChanged(bool paused);
 
     void inspectorContextCleared();
     void inspectorContextPushed(const QString &contextTitle);
@@ -111,7 +111,7 @@ protected:
 
 private slots:
     void animationSpeedChangeRequested(qreal factor);
-    void executionPausedChangeRequested(bool paused);
+    void animationPausedChangeRequested(bool paused);
 
 private:
     Q_DISABLE_COPY(QDeclarativeViewObserver)
index fde32fc..b138806 100644 (file)
@@ -49,7 +49,7 @@ class ObserverProtocol : public QObject
 public:
     enum Message {
         AnimationSpeedChanged  = 0,
-        ExecutionPausedChanged = 19, // highest value
+        AnimationPausedChanged = 19, // highest value
         ChangeTool             = 1,
         ClearComponentCache    = 2,
         ColorChanged           = 3,
@@ -62,7 +62,7 @@ public:
         Reload                 = 10,
         Reloaded               = 11,
         SetAnimationSpeed      = 12,
-        SetExecutionPaused     = 18,
+        SetAnimationPaused     = 18,
         SetContextPathIdx      = 13,
         SetCurrentObjects      = 14,
         SetDesignMode          = 15,
index e6f236f..00a59d0 100644 (file)
@@ -100,7 +100,7 @@ void QDeclarativeObserverService::messageReceived(const QByteArray &message)
         emit animationSpeedChangeRequested(speed);
         break;
     }
-    case ObserverProtocol::SetExecutionPaused: {
+    case ObserverProtocol::SetAnimationPaused: {
         bool paused;
         ds >> paused;
         emit executionPauseChangeRequested(paused);
@@ -239,12 +239,12 @@ void QDeclarativeObserverService::setAnimationSpeed(qreal slowDownFactor)
     sendMessage(message);
 }
 
-void QDeclarativeObserverService::setExecutionPaused(bool paused)
+void QDeclarativeObserverService::setAnimationPaused(bool paused)
 {
     QByteArray message;
     QDataStream ds(&message, QIODevice::WriteOnly);
 
-    ds << ObserverProtocol::ExecutionPausedChanged
+    ds << ObserverProtocol::AnimationPausedChanged
        << paused;
 
     sendMessage(message);
index a32f094..6bf346f 100644 (file)
@@ -105,7 +105,7 @@ QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeVie
     q(q),
     designModeBehavior(false),
     showAppOnTop(false),
-    executionPaused(false),
+    animationPaused(false),
     slowDownFactor(1.0f),
     toolBox(0)
 {
@@ -149,7 +149,7 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje
     connect(data->debugService, SIGNAL(animationSpeedChangeRequested(qreal)),
             SLOT(animationSpeedChangeRequested(qreal)));
     connect(data->debugService, SIGNAL(executionPauseChangeRequested(bool)),
-            SLOT(executionPausedChangeRequested(bool)));
+            SLOT(animationPausedChangeRequested(bool)));
     connect(data->debugService, SIGNAL(colorPickerToolRequested()),
             data.data(), SLOT(_q_changeToColorPickerTool()));
     connect(data->debugService, SIGNAL(selectMarqueeToolRequested()),
@@ -386,7 +386,7 @@ bool QDeclarativeViewObserver::keyReleaseEvent(QKeyEvent *event)
             data->subcomponentEditorTool->setCurrentItem(data->selectedItems().first());
         break;
     case Qt::Key_Space:
-        setExecutionPaused(!data->executionPaused);
+        setAnimationPaused(!data->animationPaused);
         break;
     default:
         break;
@@ -765,13 +765,13 @@ void QDeclarativeViewObserver::setAnimationSpeed(qreal slowDownFactor)
     data->debugService->setAnimationSpeed(slowDownFactor);
 }
 
-void QDeclarativeViewObserver::setExecutionPaused(bool paused)
+void QDeclarativeViewObserver::setAnimationPaused(bool paused)
 {
-    if (data->executionPaused == paused)
+    if (data->animationPaused == paused)
         return;
 
-    executionPausedChangeRequested(paused);
-    data->debugService->setExecutionPaused(paused);
+    animationPausedChangeRequested(paused);
+    data->debugService->setAnimationPaused(paused);
 }
 
 void QDeclarativeViewObserver::animationSpeedChangeRequested(qreal factor)
@@ -781,15 +781,15 @@ void QDeclarativeViewObserver::animationSpeedChangeRequested(qreal factor)
         emit animationSpeedChanged(factor);
     }
 
-    const float effectiveFactor = data->executionPaused ? 0 : factor;
+    const float effectiveFactor = data->animationPaused ? 0 : factor;
     QDeclarativeDebugHelper::setAnimationSlowDownFactor(effectiveFactor);
 }
 
-void QDeclarativeViewObserver::executionPausedChangeRequested(bool paused)
+void QDeclarativeViewObserver::animationPausedChangeRequested(bool paused)
 {
-    if (data->executionPaused != paused) {
-        data->executionPaused = paused;
-        emit executionPausedChanged(paused);
+    if (data->animationPaused != paused) {
+        data->animationPaused = paused;
+        emit animationPausedChanged(paused);
     }
 
     const float effectiveFactor = paused ? 0 : data->slowDownFactor;
@@ -918,7 +918,7 @@ void QDeclarativeViewObserverPrivate::createToolBox()
     QObject::connect(toolBar, SIGNAL(designModeBehaviorChanged(bool)),
                      q, SLOT(setDesignModeBehavior(bool)));
     QObject::connect(toolBar, SIGNAL(animationSpeedChanged(qreal)), q, SLOT(setAnimationSpeed(qreal)));
-    QObject::connect(toolBar, SIGNAL(executionPausedChanged(bool)), q, SLOT(setExecutionPaused(bool)));
+    QObject::connect(toolBar, SIGNAL(animationPausedChanged(bool)), q, SLOT(setAnimationPaused(bool)));
     QObject::connect(toolBar, SIGNAL(colorPickerSelected()), this, SLOT(_q_changeToColorPickerTool()));
     QObject::connect(toolBar, SIGNAL(zoomToolSelected()), this, SLOT(_q_changeToZoomTool()));
     QObject::connect(toolBar, SIGNAL(selectToolSelected()), this, SLOT(_q_changeToSingleSelectTool()));
@@ -929,7 +929,7 @@ void QDeclarativeViewObserverPrivate::createToolBox()
                      this, SLOT(_q_applyChangesFromClient()));
 
     QObject::connect(q, SIGNAL(animationSpeedChanged(qreal)), toolBar, SLOT(setAnimationSpeed(qreal)));
-    QObject::connect(q, SIGNAL(executionPausedChanged(bool)), toolBar, SLOT(setExecutionPaused(bool)));
+    QObject::connect(q, SIGNAL(animationPausedChanged(bool)), toolBar, SLOT(setAnimationPaused(bool)));
 
     QObject::connect(q, SIGNAL(selectToolActivated()), toolBar, SLOT(activateSelectTool()));
 
index 7ed1103..9e64e69 100644 (file)
@@ -88,7 +88,7 @@ public:
     bool designModeBehavior;
     bool showAppOnTop;
 
-    bool executionPaused;
+    bool animationPaused;
     qreal slowDownFactor;
 
     ToolBox *toolBox;
index a21318e..e86e96e 100644 (file)
@@ -787,7 +787,7 @@ void QDeclarativeViewer::createMenu()
     speedAction->setData(10.0f);
     playSpeedMenuActions->addAction(speedAction);
 
-    pauseAnimationsAction = playSpeedMenu->addAction(tr("Pause"), observer, SLOT(setExecutionPaused(bool)));
+    pauseAnimationsAction = playSpeedMenu->addAction(tr("Pause"), observer, SLOT(setAnimationPaused(bool)));
     pauseAnimationsAction->setCheckable(true);
     pauseAnimationsAction->setShortcut(QKeySequence("Ctrl+."));
 
@@ -801,7 +801,7 @@ void QDeclarativeViewer::createMenu()
     playSpeedAction->setMenu(playSpeedMenu);
 
     connect(observer, SIGNAL(animationSpeedChanged(qreal)), SLOT(animationSpeedChanged(qreal)));
-    connect(observer, SIGNAL(executionPausedChanged(bool)), pauseAnimationsAction, SLOT(setChecked(bool)));
+    connect(observer, SIGNAL(animationPausedChanged(bool)), pauseAnimationsAction, SLOT(setChecked(bool)));
 
     showWarningsWindow = new QAction(tr("Show Warnings"), this);
     showWarningsWindow->setCheckable((true));
@@ -1080,12 +1080,12 @@ void QDeclarativeViewer::toggleRecording()
 
 void QDeclarativeViewer::pauseAnimations()
 {
-    observer->setExecutionPaused(true);
+    observer->setAnimationPaused(true);
 }
 
 void QDeclarativeViewer::stepAnimations()
 {
-    observer->setExecutionPaused(false);
+    observer->setAnimationPaused(false);
     QTimer::singleShot(m_stepSize, this, SLOT(pauseAnimations()));
  }
 
index d33dd8e..89ee15b 100644 (file)
@@ -154,7 +154,7 @@ void QmlInspectorToolBar::setAnimationSpeed(qreal slowDownFactor)
     m_emitSignals = true;
 }
 
-void QmlInspectorToolBar::setExecutionPaused(bool paused)
+void QmlInspectorToolBar::setAnimationPaused(bool paused)
 {
     if (m_paused == paused)
         return;
@@ -338,7 +338,7 @@ void QmlInspectorToolBar::activateDesignModeOnClick()
 void QmlInspectorToolBar::activatePlayOnClick()
 {
     m_paused = !m_paused;
-    emit executionPausedChanged(m_paused);
+    emit animationPausedChanged(m_paused);
     updatePlayAction();
 }
 
index 9ead3bc..545c614 100644 (file)
@@ -87,7 +87,7 @@ public slots:
     void activateZoomTool();
 
     void setAnimationSpeed(qreal slowDownFactor);
-    void setExecutionPaused(bool paused);
+    void setAnimationPaused(bool paused);
 
     void setDesignModeBehavior(bool inDesignMode);
     void setShowAppOnTop(bool showAppOnTop);
@@ -105,7 +105,7 @@ signals:
     void showAppOnTopSelected(bool isChecked);
 
     void animationSpeedChanged(qreal slowdownFactor);
-    void executionPausedChanged(bool paused);
+    void animationPausedChanged(bool paused);
 
 private slots:
     void activateDesignModeOnClick();
index 80c117c..296d39a 100644 (file)
@@ -86,8 +86,8 @@ void ClientProxy::connectToServer()
         SIGNAL(selectMarqueeToolActivated()));
     connect(m_observerClient, SIGNAL(animationSpeedChanged(qreal)),
         SIGNAL(animationSpeedChanged(qreal)));
-    connect(m_observerClient, SIGNAL(executionPausedChanged(bool)),
-        SIGNAL(executionPausedChanged(bool)));
+    connect(m_observerClient, SIGNAL(animationPausedChanged(bool)),
+        SIGNAL(animationPausedChanged(bool)));
     connect(m_observerClient, SIGNAL(designModeBehaviorChanged(bool)),
         SIGNAL(designModeBehaviorChanged(bool)));
     connect(m_observerClient, SIGNAL(showAppOnTopChanged(bool)),
@@ -553,10 +553,10 @@ void ClientProxy::setAnimationSpeed(qreal slowDownFactor)
         m_observerClient->setAnimationSpeed(slowDownFactor);
 }
 
-void ClientProxy::setExecutionPaused(bool paused)
+void ClientProxy::setAnimationPaused(bool paused)
 {
     if (isConnected())
-        m_observerClient->setExecutionPaused(paused);
+        m_observerClient->setAnimationPaused(paused);
 }
 
 void ClientProxy::changeToColorPickerTool()
index b6ee5dd..191b69b 100644 (file)
@@ -107,7 +107,7 @@ signals:
     void selectMarqueeToolActivated();
     void zoomToolActivated();
     void animationSpeedChanged(qreal slowDownFactor);
-    void executionPausedChanged(bool paused);
+    void animationPausedChanged(bool paused);
     void designModeBehaviorChanged(bool inDesignMode);
     void showAppOnTopChanged(bool showAppOnTop);
     void serverReloaded();
@@ -122,7 +122,7 @@ public slots:
 
     void setDesignModeBehavior(bool inDesignMode);
     void setAnimationSpeed(qreal slowDownFactor);
-    void setExecutionPaused(bool paused);
+    void setAnimationPaused(bool paused);
     void changeToColorPickerTool();
     void changeToZoomTool();
     void changeToSelectTool();
index f1e0139..dc9f2df 100644 (file)
@@ -884,8 +884,8 @@ void InspectorUi::connectSignals()
             m_toolBar, SLOT(setSelectedColor(QColor)));
     connect(m_clientProxy, SIGNAL(animationSpeedChanged(qreal)),
             m_toolBar, SLOT(setAnimationSpeed(qreal)));
-    connect(m_clientProxy, SIGNAL(executionPausedChanged(bool)),
-            m_toolBar, SLOT(setExecutionPaused(bool)));
+    connect(m_clientProxy, SIGNAL(animationPausedChanged(bool)),
+            m_toolBar, SLOT(setAnimationPaused(bool)));
 
     connect(m_toolBar, SIGNAL(applyChangesFromQmlFileTriggered(bool)),
             this, SLOT(setApplyChangesToQmlObserver(bool)));
@@ -896,8 +896,8 @@ void InspectorUi::connectSignals()
             m_clientProxy, SLOT(reloadQmlViewer()));
     connect(m_toolBar, SIGNAL(animationSpeedChanged(qreal)),
             m_clientProxy, SLOT(setAnimationSpeed(qreal)));
-    connect(m_toolBar, SIGNAL(executionPausedChanged(bool)),
-            m_clientProxy, SLOT(setExecutionPaused(bool)));
+    connect(m_toolBar, SIGNAL(animationPausedChanged(bool)),
+            m_clientProxy, SLOT(setAnimationPaused(bool)));
     connect(m_toolBar, SIGNAL(colorPickerSelected()),
             m_clientProxy, SLOT(changeToColorPickerTool()));
     connect(m_toolBar, SIGNAL(zoomToolSelected()),
index 8068f44..a61ccc3 100644 (file)
@@ -114,13 +114,13 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message)
         emit animationSpeedChanged(slowDownFactor);
         break;
     }
-    case ObserverProtocol::ExecutionPausedChanged: {
+    case ObserverProtocol::AnimationPausedChanged: {
         bool paused;
         ds >> paused;
 
         log(LogReceive, type, paused ? QLatin1String("true") : QLatin1String("false"));
 
-        emit executionPausedChanged(paused);
+        emit animationPausedChanged(paused);
         break;
     }
     case ObserverProtocol::SetDesignMode: {
@@ -318,7 +318,7 @@ void QmlJSObserverClient::setAnimationSpeed(qreal slowDownFactor)
     sendMessage(message);
 }
 
-void QmlJSObserverClient::setExecutionPaused(bool paused)
+void QmlJSObserverClient::setAnimationPaused(bool paused)
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -326,7 +326,7 @@ void QmlJSObserverClient::setExecutionPaused(bool paused)
     QByteArray message;
     QDataStream ds(&message, QIODevice::WriteOnly);
 
-    ObserverProtocol::Message cmd = ObserverProtocol::SetExecutionPaused;
+    ObserverProtocol::Message cmd = ObserverProtocol::SetAnimationPaused;
     ds << cmd
        << paused;
 
index 5dd30d9..e0259ea 100644 (file)
@@ -60,7 +60,7 @@ public:
     void reloadViewer();
     void setDesignModeBehavior(bool inDesignMode);
     void setAnimationSpeed(qreal slowDownFactor);
-    void setExecutionPaused(bool paused);
+    void setAnimationPaused(bool paused);
     void changeToColorPickerTool();
     void changeToSelectTool();
     void changeToSelectMarqueeTool();
@@ -93,7 +93,7 @@ signals:
     void selectMarqueeToolActivated();
     void zoomToolActivated();
     void animationSpeedChanged(qreal slowdownFactor);
-    void executionPausedChanged(bool paused);
+    void animationPausedChanged(bool paused);
     void designModeBehaviorChanged(bool inDesignMode);
     void showAppOnTopChanged(bool showAppOnTop);
     void reloaded(); // the server has reloadetd he document