From 1f380798b63eaf5d0e5b14feb52507d289bb46b5 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 4 Sep 2015 11:32:42 +0200 Subject: [PATCH] Debugger: Allow terminals for sessions started from command line Change-Id: I43751fa90e54cd1d93b97822568d21c90118fb23 Reviewed-by: Christian Stenger --- src/plugins/debugger/Debugger.json.in | 3 +-- src/plugins/debugger/debuggerplugin.cpp | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/Debugger.json.in b/src/plugins/debugger/Debugger.json.in index 82e11af696..d0980b4830 100644 --- a/src/plugins/debugger/Debugger.json.in +++ b/src/plugins/debugger/Debugger.json.in @@ -22,8 +22,7 @@ \"Description\" : \"Attach to local process\" }, { - \"Name\" : \"-debug\", - \"Parameter\" : \"executable\", + \"Name\" : \"-debug [,kit=][,terminal={0,1}]\", \"Description\" : \"Start and debug executable\" }, { diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 0a9dd8385a..bd7716ee9d 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1116,7 +1116,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, { const QString &option = *it; // '-debug ' - // '-debug [,server=][,core=][,kit=]' + // '-debug [,server=][,core=][,kit=][,terminal={0,1}]' if (*it == _("-debug")) { ++it; if (it == cend) { @@ -1159,6 +1159,8 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, rp.coreFile = val; rp.displayName = tr("Core file \"%1\"").arg(rp.coreFile); rp.startMessage = tr("Attaching to core file %1.").arg(rp.coreFile); + } else if (key == QLatin1String("terminal")) { + rp.useTerminal = bool(val.toInt()); } else if (key == QLatin1String("kit")) { kit = KitManager::find(Id::fromString(val)); } -- GitLab