Debugger: Fix attach external application.

Change-Id: I61660a3632328ddf87f5689dea00e8c132c5636c
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
David Schulz
2014-10-28 08:26:25 +01:00
committed by Christian Stenger
parent d848a1e22b
commit cf47294491
2 changed files with 6 additions and 8 deletions

View File

@@ -1151,7 +1151,6 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin) :
m_dummyEngine(0),
m_globalDebuggerOptions(new GlobalDebuggerOptions)
{
setObjectName(QLatin1String("DebuggerCore"));
qRegisterMetaType<WatchData>("WatchData");
qRegisterMetaType<ContextData>("ContextData");
qRegisterMetaType<DebuggerStartParameters>("DebuggerStartParameters");
@@ -2538,8 +2537,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
connect(ICore::instance(), SIGNAL(coreAboutToClose()), this, SLOT(coreShutdown()));
m_plugin->addObject(this);
const Context globalcontext(CC::C_GLOBAL);
const Context cppDebuggercontext(C_CPPDEBUGGER);
const Context cppeditorcontext(CppEditor::Constants::CPPEDITOR_ID);
@@ -3384,7 +3381,8 @@ QSharedPointer<Internal::GlobalDebuggerOptions> globalDebuggerOptions()
DebuggerPlugin::DebuggerPlugin()
{
setObjectName(QLatin1String("DebuggerCore"));
setObjectName(QLatin1String("DebuggerPlugin"));
addObject(this);
dd = new DebuggerPluginPrivate(this);
}

View File

@@ -60,9 +60,9 @@ enum { debug = 0 };
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
static QObject *debuggerCore()
static QObject *debuggerPlugin()
{
return ExtensionSystem::PluginManager::getObjectByName(QLatin1String("DebuggerCore"));
return ExtensionSystem::PluginManager::getObjectByName(QLatin1String("DebuggerPlugin"));
}
static QString msgAttachDebuggerTooltip(const QString &handleDescription = QString())
@@ -433,7 +433,7 @@ void AppOutputPane::attachToRunControl()
QTC_ASSERT(index != -1, return);
RunControl *rc = m_runControlTabs.at(index).runControl;
QTC_ASSERT(rc->isRunning(), return);
ExtensionSystem::Invoker<void>(debuggerCore(), "attachExternalApplication", rc);
ExtensionSystem::Invoker<void>(debuggerPlugin(), "attachExternalApplication", rc);
}
void AppOutputPane::stopRunControl()
@@ -538,7 +538,7 @@ void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning
m_reRunButton->setEnabled(!isRunning);
m_reRunButton->setIcon(QIcon(rc->icon()));
m_stopAction->setEnabled(isRunning);
if (isRunning && debuggerCore() && rc->applicationProcessHandle().isValid()) {
if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) {
m_attachButton->setEnabled(true);
m_attachButton->setToolTip(msgAttachDebuggerTooltip(rc->applicationProcessHandle().toString()));
} else {