Commit 3e9f3337 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlDebugger: Enable basic debugging without QmlInspector plugin

Enable setting breakpoints, and showing the script console even if
the QmlInspector plugin is not loaded.

Reviewed-by: hjk
parent 4fdede8b
......@@ -52,6 +52,7 @@ const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
const char * const C_DEBUGMODE = "Debugger.DebugMode";
const char * const C_CPPDEBUGGER = "Gdb Debugger";
const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger";
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
const char * const DEBUGGER_COMMON_SETTINGS_NAME =
......
......@@ -1088,6 +1088,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
const Core::Context globalcontext(CC::C_GLOBAL);
const Core::Context cppDebuggercontext(C_CPPDEBUGGER);
const Core::Context qmlDebuggerContext(C_QMLDEBUGGER);
const Core::Context cppeditorcontext(CppEditor::Constants::C_CPPEDITOR);
m_stopIcon = QIcon(_(":/debugger/images/debugger_stop_small.png"));
......@@ -1260,6 +1261,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
m_uiSwitcher = new DebuggerUISwitcher(m_debugMode, this);
ExtensionSystem::PluginManager::instance()->addObject(m_uiSwitcher);
m_uiSwitcher->addLanguage(CppLanguage, tr("C++"), cppDebuggercontext);
m_uiSwitcher->addLanguage(QmlLanguage, tr("QML/JavaScript"), qmlDebuggerContext);
// Dock widgets
m_breakDock = m_uiSwitcher->createDockWidget(CppLanguage, m_breakWindow);
......
......@@ -569,7 +569,7 @@ void InspectorUi::setupDockWidgets()
{
Debugger::DebuggerUISwitcher *uiSwitcher = Debugger::DebuggerUISwitcher::instance();
m_toolbar->createActions(Core::Context(Constants::C_INSPECTOR));
m_toolbar->createActions(Core::Context(Debugger::Constants::C_QMLDEBUGGER));
m_toolbar->setObjectName("QmlInspectorToolbar");
m_crumblePath = new ContextCrumblePath;
......
......@@ -35,7 +35,6 @@ namespace Constants {
const char * const RUN = "QmlInspector.Run";
const char * const STOP = "QmlInspector.Stop";
const char * const C_INSPECTOR = "QmlInspector";
const char * const COMPLETE_THIS = "QmlInspector.CompleteThis";
const char * const M_DEBUG_SIMULTANEOUSLY = "QmlInspector.Menu.SimultaneousDebug";
......
......@@ -105,11 +105,6 @@ bool InspectorPlugin::initialize(const QStringList &arguments, QString *errorStr
Q_UNUSED(arguments);
Q_UNUSED(errorString);
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>();
uiSwitcher->addLanguage(Debugger::QmlLanguage, tr("QML"), Core::Context(C_INSPECTOR));
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment