context-based hiding/showing of debug menu entries

the previous implementation relied on poking around with setVisible
of the menu actions. Now, command attribute CA_Hide is used instead for
the necessary entries.

Reviewed-by: hjk
This commit is contained in:
Lasse Holmstedt
2010-03-19 13:58:26 +01:00
parent 8c83a9d088
commit d5bdad2269
7 changed files with 90 additions and 51 deletions

View File

@@ -103,11 +103,13 @@ bool QmlInspectorPlugin::initialize(const QStringList &arguments, QString *error
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>();
uiSwitcher->addLanguage(Qml::Constants::LANG_QML);
m_inspector = new QmlInspector;
addObject(m_inspector);
Core::ICore::instance()->addContextObject(m_inspector->context());
uiSwitcher->addLanguage(Qml::Constants::LANG_QML, m_inspector->context()->context());
m_inspector->createDockWidgets();
connect(m_connectionTimer, SIGNAL(timeout()), SLOT(pollInspector()));