From 79d6c96d4e54954fee7e561104b6b8dbe6a2a85c Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Fri, 20 Mar 2009 09:53:02 +0100 Subject: [PATCH] debugger: make an option to select terminal application (not used yet) --- src/plugins/debugger/debuggeractions.cpp | 4 ++++ src/plugins/debugger/debuggeractions.h | 1 + src/plugins/debugger/debuggerplugin.cpp | 5 +++++ src/plugins/debugger/gdboptionpage.ui | 20 +++++++++++++++++--- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index d79795cbd28..0a102c4ae95 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -422,6 +422,10 @@ DebuggerSettings *theDebuggerSettings() item->setText(QObject::tr("Use custom dumpers")); item->setCheckable(true); + item = new DebuggerAction(instance); + instance->insertItem(Terminal, item); + item->setDefaultValue("xterm"); + item->setSettingsKey("DebugMode", "Terminal"); item = new DebuggerAction(instance); instance->insertItem(ListSourceFiles, item); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index 2a64e45c2ae..528bcc2c4d9 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -141,6 +141,7 @@ enum DebuggerActionCode GdbScriptFile, GdbAutoRun, GdbAutoQuit, + Terminal, // Watchers & Locals WatchExpression, diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 13de5d0c8e7..8f4905c9d2c 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -268,6 +268,8 @@ QWidget *GdbOptionPage::createPage(QWidget *parent) m_ui.gdbLocationChooser->setPromptDialogTitle(tr("Choose Gdb Location")); m_ui.scriptFileChooser->setExpectedKind(Core::Utils::PathChooser::File); m_ui.scriptFileChooser->setPromptDialogTitle(tr("Choose Location of Startup Script File")); + m_ui.terminalChooser->setExpectedKind(Core::Utils::PathChooser::Command); + m_ui.terminalChooser->setPromptDialogTitle(tr("Choose Location of Terminal Application")); theDebuggerAction(GdbLocation) ->connectWidget(m_ui.gdbLocationChooser); @@ -275,6 +277,8 @@ QWidget *GdbOptionPage::createPage(QWidget *parent) ->connectWidget(m_ui.scriptFileChooser); theDebuggerAction(GdbEnvironment) ->connectWidget(m_ui.environmentEdit); + theDebuggerAction(Terminal) + ->connectWidget(m_ui.terminalChooser); theDebuggerAction(AllPluginBreakpoints) ->connectWidget(m_ui.radioButtonAllPluginBreakpoints); @@ -328,6 +332,7 @@ void GdbOptionPage::apply() theDebuggerAction(GdbLocation)->apply(s); theDebuggerAction(GdbScriptFile)->apply(s); theDebuggerAction(GdbEnvironment)->apply(s); + theDebuggerAction(Terminal)->apply(s); theDebuggerAction(AllPluginBreakpoints)->apply(s); theDebuggerAction(SelectedPluginBreakpoints)->apply(s); diff --git a/src/plugins/debugger/gdboptionpage.ui b/src/plugins/debugger/gdboptionpage.ui index 53055599475..3a51818c86b 100644 --- a/src/plugins/debugger/gdboptionpage.ui +++ b/src/plugins/debugger/gdboptionpage.ui @@ -32,10 +32,21 @@ <item row="0" column="0"> <widget class="QLabel" name="labelGdbLocation"> <property name="toolTip"> - <string>This is either a full abolute path leading to the gdb binary you intend to use or the name of a gdb binary that wiull be searched in your PATH.</string> + <string>This is either a full abolute path leading to the gdb binary you intend to use or the name of a gdb binary that will be searched in your PATH.</string> </property> <property name="text"> - <string>Gdb Location:</string> + <string>Gdb location:</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="terminalLocation"> + <property name="toolTip"> + <string>This is either a full abolute path leading to the terminal +you indent to use or the name of a terminal that will be searched in your PATH.</string> + </property> + <property name="text"> + <string>Terminal:</string> </property> </widget> </item> @@ -55,7 +66,7 @@ <string>This is either empty or points to a file containing gdb commands that will be executed immediately after gdb starts up.</string> </property> <property name="text"> - <string>Gdb Startup Script:</string> + <string>Gdb startup script:</string> </property> </widget> </item> @@ -65,6 +76,9 @@ <item row="0" column="1"> <widget class="Core::Utils::PathChooser" name="gdbLocationChooser" native="true"/> </item> + <item row="3" column="1"> + <widget class="Core::Utils::PathChooser" name="terminalChooser" native="true"/> + </item> </layout> </widget> </item> -- GitLab