debugger: refactoring of the plugin interface

There's  some 'external' and some 'internal' part now. Other plugins
are only supposed the external interface.
This commit is contained in:
hjk
2010-11-10 11:39:01 +01:00
parent 60bafeb81d
commit 2161e0f6d9
29 changed files with 480 additions and 590 deletions

View File

@@ -144,23 +144,22 @@ QmlRunControlFactory::~QmlRunControlFactory()
bool QmlRunControlFactory::canRun(RunConfiguration *runConfiguration,
const QString &mode) const
{
QmlProjectRunConfiguration *config = qobject_cast<QmlProjectRunConfiguration*>(runConfiguration);
if (mode == ProjectExplorer::Constants::RUNMODE) {
QmlProjectRunConfiguration *config =
qobject_cast<QmlProjectRunConfiguration*>(runConfiguration);
if (mode == ProjectExplorer::Constants::RUNMODE)
return config != 0 && !config->viewerPath().isEmpty();
} else {
bool qmlDebugSupportInstalled = Debugger::DebuggerUISwitcher::instance()->supportedLanguages()
& Debugger::QmlLanguage;
if (config && qmlDebugSupportInstalled) {
if (!config->observerPath().isEmpty()) {
return true;
}
bool qmlDebugSupportInstalled =
Debugger::DebuggerPlugin::isActiveDebugLanguage(Debugger::QmlLanguage);
if (config->qtVersion() && Qt4ProjectManager::QmlObserverTool::canBuild(config->qtVersion())) {
return true;
} else {
return false;
}
if (config && qmlDebugSupportInstalled) {
if (!config->observerPath().isEmpty())
return true;
if (config->qtVersion() && Qt4ProjectManager::QmlObserverTool::canBuild(config->qtVersion())) {
return true;
} else {
return false;
}
}
@@ -212,8 +211,7 @@ ProjectExplorer::RunControl *QmlRunControlFactory::createDebugRunControl(QmlProj
return 0;
}
Debugger::DebuggerRunControl *debuggerRunControl = Debugger::DebuggerPlugin::createDebugger(params, runConfig);
return debuggerRunControl;
return Debugger::DebuggerPlugin::createDebugger(params, runConfig);
}
void QmlRunControlFactory::showQmlObserverToolWarning() {