forked from qt-creator/qt-creator
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:
@@ -70,7 +70,7 @@ public Q_SLOTS:
|
||||
void continueExecution(qreal slowdownFactor = 1.0f);
|
||||
void pauseExecution();
|
||||
|
||||
void setInspectorContext(int contextIndex);
|
||||
void setObserverContext(int contextIndex);
|
||||
|
||||
Q_SIGNALS:
|
||||
void designModeBehaviorChanged(bool inDesignMode);
|
||||
|
||||
@@ -127,7 +127,7 @@ QDeclarativeViewObserver::~QDeclarativeViewObserver()
|
||||
{
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserver::setInspectorContext(int contextIndex)
|
||||
void QDeclarativeViewObserver::setObserverContext(int contextIndex)
|
||||
{
|
||||
if (data->subcomponentEditorTool->contextIndex() != contextIndex) {
|
||||
QGraphicsObject *object = data->subcomponentEditorTool->setContext(contextIndex);
|
||||
|
||||
@@ -18,9 +18,9 @@ symbian:TARGET.UID3 = 0xE1111234
|
||||
|
||||
symbian:ICON = symbianicon.svg
|
||||
|
||||
# Define to enable the Qml Inspector in debug mode
|
||||
# QMLINSPECTOR #
|
||||
#DEFINES += QMLINSPECTOR
|
||||
# Define to enable the Qml Observer in debug mode
|
||||
# QMLOBSERVER #
|
||||
#DEFINES += QMLOBSERVER
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <QtDeclarative/QDeclarativeEngine>
|
||||
#include <QtDeclarative/QDeclarativeContext>
|
||||
|
||||
#if defined(QMLINSPECTOR)
|
||||
#if defined(QMLOBSERVER)
|
||||
#include <qdeclarativeviewobserver.h>
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
|
||||
{
|
||||
connect(engine(), SIGNAL(quit()), SLOT(close()));
|
||||
setResizeMode(QDeclarativeView::SizeRootObjectToView);
|
||||
#ifdef QMLINSPECTOR
|
||||
#ifdef QMLOBSERVER
|
||||
new QmlObserver::QDeclarativeViewObserver(this, parent);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -7,15 +7,15 @@ SOURCES += $$PWD/qmlapplicationviewer.cpp
|
||||
HEADERS += $$PWD/qmlapplicationviewer.h
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
contains(DEFINES, QMLINSPECTOR) {
|
||||
contains(DEFINES, QMLOBSERVER) {
|
||||
CONFIG(debug, debug|release) {
|
||||
isEmpty(QMLINSPECTOR_PATH) {
|
||||
warning(QMLINSPECTOR_PATH was not set. QMLINSPECTOR not activated.)
|
||||
DEFINES -= QMLINSPECTOR
|
||||
isEmpty(QMLOBSERVER_PATH) {
|
||||
warning(QMLOBSERVER_PATH was not set. QMLOBSERVER not activated.)
|
||||
DEFINES -= QMLOBSERVER
|
||||
} else {
|
||||
include($$QMLINSPECTOR_PATH/qmljsdebugger-lib.pri)
|
||||
include($$QMLOBSERVER_PATH/qmljsdebugger-lib.pri)
|
||||
}
|
||||
} else {
|
||||
DEFINES -= QMLINSPECTOR
|
||||
DEFINES -= QMLOBSERVER
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,20 +579,20 @@ void InspectorUi::setupDockWidgets()
|
||||
|
||||
m_objectTreeWidget = new QmlJSObjectTree;
|
||||
|
||||
QWidget *inspectorWidget = new QWidget;
|
||||
inspectorWidget->setWindowTitle(tr("Inspector"));
|
||||
QWidget *observerWidget = new QWidget;
|
||||
observerWidget->setWindowTitle(tr("QML Observer"));
|
||||
|
||||
QVBoxLayout *wlay = new QVBoxLayout(inspectorWidget);
|
||||
QVBoxLayout *wlay = new QVBoxLayout(observerWidget);
|
||||
wlay->setMargin(0);
|
||||
wlay->setSpacing(0);
|
||||
inspectorWidget->setLayout(wlay);
|
||||
observerWidget->setLayout(wlay);
|
||||
wlay->addWidget(m_toolbar->widget());
|
||||
wlay->addWidget(m_objectTreeWidget);
|
||||
wlay->addWidget(m_crumblePath);
|
||||
|
||||
|
||||
m_inspectorDockWidget = uiSwitcher->createDockWidget(Debugger::QmlLanguage,
|
||||
inspectorWidget, Qt::BottomDockWidgetArea);
|
||||
observerWidget, Qt::BottomDockWidgetArea);
|
||||
m_inspectorDockWidget->setObjectName(Debugger::Constants::DOCKWIDGET_QML_INSPECTOR);
|
||||
m_inspectorDockWidget->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
|
||||
m_inspectorDockWidget->setTitleBarWidget(new QWidget(m_inspectorDockWidget));
|
||||
|
||||
Reference in New Issue
Block a user