Qml: Replace 'inspector' by 'observer'

We should restrict ourselves to calling all qml debugging support
observer, instead of mixing qml debugger / inspector / observer
interchangeably.
This commit is contained in:
Kai Koehne
2010-09-16 16:20:12 +02:00
parent 832f6889b5
commit a10b26920b
6 changed files with 18 additions and 18 deletions

View File

@@ -70,7 +70,7 @@ public Q_SLOTS:
void continueExecution(qreal slowdownFactor = 1.0f); void continueExecution(qreal slowdownFactor = 1.0f);
void pauseExecution(); void pauseExecution();
void setInspectorContext(int contextIndex); void setObserverContext(int contextIndex);
Q_SIGNALS: Q_SIGNALS:
void designModeBehaviorChanged(bool inDesignMode); void designModeBehaviorChanged(bool inDesignMode);

View File

@@ -127,7 +127,7 @@ QDeclarativeViewObserver::~QDeclarativeViewObserver()
{ {
} }
void QDeclarativeViewObserver::setInspectorContext(int contextIndex) void QDeclarativeViewObserver::setObserverContext(int contextIndex)
{ {
if (data->subcomponentEditorTool->contextIndex() != contextIndex) { if (data->subcomponentEditorTool->contextIndex() != contextIndex) {
QGraphicsObject *object = data->subcomponentEditorTool->setContext(contextIndex); QGraphicsObject *object = data->subcomponentEditorTool->setContext(contextIndex);

View File

@@ -18,9 +18,9 @@ symbian:TARGET.UID3 = 0xE1111234
symbian:ICON = symbianicon.svg symbian:ICON = symbianicon.svg
# Define to enable the Qml Inspector in debug mode # Define to enable the Qml Observer in debug mode
# QMLINSPECTOR # # QMLOBSERVER #
#DEFINES += QMLINSPECTOR #DEFINES += QMLOBSERVER
SOURCES += main.cpp SOURCES += main.cpp

View File

@@ -7,7 +7,7 @@
#include <QtDeclarative/QDeclarativeEngine> #include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext> #include <QtDeclarative/QDeclarativeContext>
#if defined(QMLINSPECTOR) #if defined(QMLOBSERVER)
#include <qdeclarativeviewobserver.h> #include <qdeclarativeviewobserver.h>
#endif #endif
@@ -50,7 +50,7 @@ QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
{ {
connect(engine(), SIGNAL(quit()), SLOT(close())); connect(engine(), SIGNAL(quit()), SLOT(close()));
setResizeMode(QDeclarativeView::SizeRootObjectToView); setResizeMode(QDeclarativeView::SizeRootObjectToView);
#ifdef QMLINSPECTOR #ifdef QMLOBSERVER
new QmlObserver::QDeclarativeViewObserver(this, parent); new QmlObserver::QDeclarativeViewObserver(this, parent);
#endif #endif
} }

View File

@@ -7,15 +7,15 @@ SOURCES += $$PWD/qmlapplicationviewer.cpp
HEADERS += $$PWD/qmlapplicationviewer.h HEADERS += $$PWD/qmlapplicationviewer.h
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
contains(DEFINES, QMLINSPECTOR) { contains(DEFINES, QMLOBSERVER) {
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
isEmpty(QMLINSPECTOR_PATH) { isEmpty(QMLOBSERVER_PATH) {
warning(QMLINSPECTOR_PATH was not set. QMLINSPECTOR not activated.) warning(QMLOBSERVER_PATH was not set. QMLOBSERVER not activated.)
DEFINES -= QMLINSPECTOR DEFINES -= QMLOBSERVER
} else { } else {
include($$QMLINSPECTOR_PATH/qmljsdebugger-lib.pri) include($$QMLOBSERVER_PATH/qmljsdebugger-lib.pri)
} }
} else { } else {
DEFINES -= QMLINSPECTOR DEFINES -= QMLOBSERVER
} }
} }

View File

@@ -579,20 +579,20 @@ void InspectorUi::setupDockWidgets()
m_objectTreeWidget = new QmlJSObjectTree; m_objectTreeWidget = new QmlJSObjectTree;
QWidget *inspectorWidget = new QWidget; QWidget *observerWidget = new QWidget;
inspectorWidget->setWindowTitle(tr("Inspector")); observerWidget->setWindowTitle(tr("QML Observer"));
QVBoxLayout *wlay = new QVBoxLayout(inspectorWidget); QVBoxLayout *wlay = new QVBoxLayout(observerWidget);
wlay->setMargin(0); wlay->setMargin(0);
wlay->setSpacing(0); wlay->setSpacing(0);
inspectorWidget->setLayout(wlay); observerWidget->setLayout(wlay);
wlay->addWidget(m_toolbar->widget()); wlay->addWidget(m_toolbar->widget());
wlay->addWidget(m_objectTreeWidget); wlay->addWidget(m_objectTreeWidget);
wlay->addWidget(m_crumblePath); wlay->addWidget(m_crumblePath);
m_inspectorDockWidget = uiSwitcher->createDockWidget(Debugger::QmlLanguage, m_inspectorDockWidget = uiSwitcher->createDockWidget(Debugger::QmlLanguage,
inspectorWidget, Qt::BottomDockWidgetArea); observerWidget, Qt::BottomDockWidgetArea);
m_inspectorDockWidget->setObjectName(Debugger::Constants::DOCKWIDGET_QML_INSPECTOR); m_inspectorDockWidget->setObjectName(Debugger::Constants::DOCKWIDGET_QML_INSPECTOR);
m_inspectorDockWidget->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea); m_inspectorDockWidget->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
m_inspectorDockWidget->setTitleBarWidget(new QWidget(m_inspectorDockWidget)); m_inspectorDockWidget->setTitleBarWidget(new QWidget(m_inspectorDockWidget));