diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h index b825fc8239e27da6910ab16556ac970b2a36bb79..e593abd2913f92a8550bab551429b5bc8b9d0916 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.h +++ b/src/plugins/qmljsinspector/qmljsclientproxy.h @@ -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 diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca637d3856c117b6d51b159022deaf096fccdc29 --- /dev/null +++ b/src/plugins/qmljsinspector/qmljsinspector.cpp @@ -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() +{ +} diff --git a/src/plugins/qmljsinspector/qmljsinspector.h b/src/plugins/qmljsinspector/qmljsinspector.h new file mode 100644 index 0000000000000000000000000000000000000000..c90163fec563a4b1c1f2b1bc3519574974608a07 --- /dev/null +++ b/src/plugins/qmljsinspector/qmljsinspector.h @@ -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 diff --git a/src/plugins/qmljsinspector/qmljsinspector.pro b/src/plugins/qmljsinspector/qmljsinspector.pro index 1237cf590b48216cc708e7428ec18bc7734ff18f..b1c337cc562cd8305c53573cf54f8136f9e7c8ba 100644 --- a/src/plugins/qmljsinspector/qmljsinspector.pro +++ b/src/plugins/qmljsinspector/qmljsinspector.pro @@ -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 diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp index 7d99e2f559560df8093b6409879089fb0e20bcdb..8f8e53cff200f90ce95fed01dfd2c690412aa869 100644 --- a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp @@ -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) diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.h b/src/plugins/qmljsinspector/qmljsinspectorplugin.h index c4a84a6c9c101552ce2623f0148fbe77124236e7..bff6f3da781fea61146e8fb2d1b9a592686d6d8c 100644 --- a/src/plugins/qmljsinspector/qmljsinspectorplugin.h +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.h @@ -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