diff options
author | con <[email protected]> | 2009-06-12 17:03:17 +0200 |
---|---|---|
committer | con <[email protected]> | 2009-06-12 17:03:17 +0200 |
commit | 9c7801956df14f00c677f080c14be0e1b9b3e6ff (patch) | |
tree | 62c65443807cb4007f92e8975a778c1bba91b148 /src/plugins/debugger/breakwindow.cpp | |
parent | 7d1bf1fe577bdd93de27372fd7aa609dc601df4b (diff) | |
parent | 992a178be33538ec256861d3bd54d9adc40027ea (diff) |
Merge commit 'origin/1.2'
Conflicts:
src/plugins/debugger/breakwindow.cpp
Diffstat (limited to 'src/plugins/debugger/breakwindow.cpp')
-rw-r--r-- | src/plugins/debugger/breakwindow.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp index 72e9989bf12..1c71129c87f 100644 --- a/src/plugins/debugger/breakwindow.cpp +++ b/src/plugins/debugger/breakwindow.cpp @@ -31,6 +31,7 @@ #include "debuggeractions.h" #include "ui_breakcondition.h" +#include "ui_breakbyfunction.h" #include <utils/qtcassert.h> @@ -51,6 +52,32 @@ using Debugger::Internal::BreakWindow; +/////////////////////////////////////////////////////////////////////// +// +// BreakByFunctionDialog +// +/////////////////////////////////////////////////////////////////////// + +class BreakByFunctionDialog : public QDialog, Ui::BreakByFunctionDialog +{ +public: + explicit BreakByFunctionDialog(QWidget *parent) + : QDialog(parent) + { + setupUi(this); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); + connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + } + QString functionName() const { return functionLineEdit->text(); } +}; + + +/////////////////////////////////////////////////////////////////////// +// +// BreakWindow +// +/////////////////////////////////////////////////////////////////////// + BreakWindow::BreakWindow(QWidget *parent) : QTreeView(parent), m_alwaysResizeColumnsToContents(false) { @@ -132,6 +159,11 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev) QAction *act6 = new QAction(str6, &menu); act6->setEnabled(si.size() > 0); + QAction *act7 = new QAction(this); + act7->setText(tr("Set Breakpoint at Function...")); + QAction *act8 = new QAction(this); + act8->setText(tr("Set Breakpoint at Function \"main\"")); + menu.addAction(act0); menu.addAction(act3); menu.addAction(act5); @@ -141,6 +173,9 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addAction(act2); menu.addAction(act4); menu.addSeparator(); + menu.addAction(act7); + menu.addAction(act8); + menu.addSeparator(); menu.addAction(theDebuggerAction(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); @@ -159,6 +194,12 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev) setBreakpointsEnabled(si, !enabled); else if (act == act6) setBreakpointsFullPath(si, !enabled); + else if (act == act7) { + BreakByFunctionDialog dlg(this); + if (dlg.exec()) + emit breakByFunctionRequested(dlg.functionName()); + } else if (act == act8) + emit breakByFunctionMainRequested(); } void BreakWindow::setBreakpointsEnabled(const QModelIndexList &list, bool enabled) |