forked from qt-creator/qt-creator
Added QmlJS::Internal::Inspector.
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Debugger {
|
||||
namespace QmlJSInspector {
|
||||
namespace Internal {
|
||||
|
||||
class QmlInspectorPlugin;
|
||||
class InspectorPlugin;
|
||||
|
||||
class ClientProxy : public QObject
|
||||
{
|
||||
@@ -119,7 +119,7 @@ private:
|
||||
QList<QDeclarativeDebugEngineReference> m_engines;
|
||||
|
||||
Debugger::DebuggerRunControl *m_debuggerRunControl;
|
||||
friend class QmlJSInspector::Internal::QmlInspectorPlugin;
|
||||
friend class QmlJSInspector::Internal::InspectorPlugin;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
44
src/plugins/qmljsinspector/qmljsinspector.cpp
Normal file
44
src/plugins/qmljsinspector/qmljsinspector.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmljsinspector.h"
|
||||
#include "qmljsinspectorconstants.h"
|
||||
#include "qmljsinspectorplugin.h"
|
||||
|
||||
using namespace QmlJSInspector::Internal;
|
||||
using namespace QmlJSInspector::Constants;
|
||||
|
||||
Inspector::Inspector(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
Inspector::~Inspector()
|
||||
{
|
||||
}
|
||||
50
src/plugins/qmljsinspector/qmljsinspector.h
Normal file
50
src/plugins/qmljsinspector/qmljsinspector.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLJSINSPECTOR_H
|
||||
#define QMLJSINSPECTOR_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace QmlJSInspector {
|
||||
namespace Internal {
|
||||
|
||||
class Inspector : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Inspector(QObject *parent = 0);
|
||||
virtual ~Inspector();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlJSInspector
|
||||
|
||||
#endif // QMLJSINSPECTOR_H
|
||||
@@ -15,13 +15,15 @@ qmljsinspector_global.h \
|
||||
qmljsinspectorconstants.h \
|
||||
qmljsinspectorcontext.h \
|
||||
qmljsinspectorplugin.h \
|
||||
qmljsclientproxy.h
|
||||
qmljsclientproxy.h \
|
||||
qmljsinspector.h
|
||||
|
||||
SOURCES += \
|
||||
qmljsdebuggerclient.cpp \
|
||||
qmljsinspectorcontext.cpp \
|
||||
qmljsinspectorplugin.cpp \
|
||||
qmljsclientproxy.cpp
|
||||
qmljsclientproxy.cpp \
|
||||
qmljsinspector.cpp
|
||||
|
||||
OTHER_FILES += QmlJSInspector.pluginspec
|
||||
RESOURCES += qmljsinspector.qrc
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "qmljsinspectorconstants.h"
|
||||
#include "qmljsinspectorplugin.h"
|
||||
#include "qmljsclientproxy.h"
|
||||
|
||||
#include <debugger/debuggeruiswitcher.h>
|
||||
#include <debugger/debuggerconstants.h>
|
||||
@@ -66,7 +67,7 @@ using namespace QmlJSInspector::Constants;
|
||||
|
||||
namespace {
|
||||
|
||||
QmlInspectorPlugin *g_instance = 0; // the global QML/JS inspector instance
|
||||
InspectorPlugin *g_instance = 0; // the global QML/JS inspector instance
|
||||
|
||||
QToolButton *createToolButton(QAction *action)
|
||||
{
|
||||
@@ -77,24 +78,26 @@ QToolButton *createToolButton(QAction *action)
|
||||
|
||||
} // end of anonymous namespace
|
||||
|
||||
QmlInspectorPlugin::QmlInspectorPlugin()
|
||||
InspectorPlugin::InspectorPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
Q_ASSERT(! g_instance);
|
||||
g_instance = this;
|
||||
|
||||
(void) new ClientProxy(this);
|
||||
}
|
||||
|
||||
QmlInspectorPlugin::~QmlInspectorPlugin()
|
||||
InspectorPlugin::~InspectorPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
void QmlInspectorPlugin::aboutToShutdown()
|
||||
void InspectorPlugin::aboutToShutdown()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
bool QmlInspectorPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
bool InspectorPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
Q_UNUSED(arguments);
|
||||
Q_UNUSED(errorString);
|
||||
@@ -117,7 +120,7 @@ bool QmlInspectorPlugin::initialize(const QStringList &arguments, QString *error
|
||||
return true;
|
||||
}
|
||||
|
||||
void QmlInspectorPlugin::extensionsInitialized()
|
||||
void InspectorPlugin::extensionsInitialized()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
@@ -148,7 +151,7 @@ void QmlInspectorPlugin::extensionsInitialized()
|
||||
uiSwitcher->setToolbar(LANG_QML, configBar);
|
||||
}
|
||||
|
||||
void QmlInspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode)
|
||||
void InspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode)
|
||||
{
|
||||
Q_UNUSED(project);
|
||||
Q_UNUSED(runMode);
|
||||
@@ -166,7 +169,7 @@ void QmlInspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *pr
|
||||
}
|
||||
}
|
||||
|
||||
void QmlInspectorPlugin::prepareDebugger(Core::IMode *mode)
|
||||
void InspectorPlugin::prepareDebugger(Core::IMode *mode)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
@@ -182,7 +185,7 @@ void QmlInspectorPlugin::prepareDebugger(Core::IMode *mode)
|
||||
}
|
||||
}
|
||||
|
||||
void QmlInspectorPlugin::setDockWidgetArrangement(const QString &activeLanguage)
|
||||
void InspectorPlugin::setDockWidgetArrangement(const QString &activeLanguage)
|
||||
{
|
||||
Q_UNUSED(activeLanguage);
|
||||
|
||||
@@ -195,4 +198,4 @@ void QmlInspectorPlugin::setDockWidgetArrangement(const QString &activeLanguage)
|
||||
}
|
||||
|
||||
|
||||
Q_EXPORT_PLUGIN(QmlInspectorPlugin)
|
||||
Q_EXPORT_PLUGIN(InspectorPlugin)
|
||||
|
||||
@@ -48,15 +48,17 @@ namespace ProjectExplorer {
|
||||
namespace QmlJSInspector {
|
||||
namespace Internal {
|
||||
|
||||
class QmlInspectorPlugin : public ExtensionSystem::IPlugin
|
||||
class Inspector;
|
||||
|
||||
class InspectorPlugin : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QmlInspectorPlugin();
|
||||
virtual ~QmlInspectorPlugin();
|
||||
InspectorPlugin();
|
||||
virtual ~InspectorPlugin();
|
||||
|
||||
static QmlInspectorPlugin *instance();
|
||||
static InspectorPlugin *instance();
|
||||
|
||||
// ExtensionSystem::IPlugin interface
|
||||
virtual bool initialize(const QStringList &arguments, QString *errorString);
|
||||
@@ -69,6 +71,9 @@ public slots:
|
||||
|
||||
private slots:
|
||||
void prepareDebugger(Core::IMode *mode);
|
||||
|
||||
private:
|
||||
Inspector *_inspector;
|
||||
};
|
||||
|
||||
} // end of namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user