forked from qt-creator/qt-creator
Fixes: debugger: easier access to debugger properties from watchers window
This commit is contained in:
@@ -258,6 +258,8 @@ void DebuggerManager::init()
|
||||
this, SLOT(assignValueInDebugger(QString,QString)));
|
||||
connect(localsView, SIGNAL(requestWatchExpression(QString)),
|
||||
this, SLOT(watchExpression(QString)));
|
||||
connect(localsView, SIGNAL(settingsDialogRequested()),
|
||||
this, SIGNAL(settingsDialogRequested()));
|
||||
|
||||
// Watchers
|
||||
QTreeView *watchersView = qobject_cast<QTreeView *>(m_watchersWindow);
|
||||
@@ -276,6 +278,8 @@ void DebuggerManager::init()
|
||||
this, SIGNAL(sessionValueRequested(QString,QVariant*)));
|
||||
connect(m_watchHandler, SIGNAL(setSessionValueRequested(QString,QVariant)),
|
||||
this, SIGNAL(setSessionValueRequested(QString,QVariant)));
|
||||
connect(watchersView, SIGNAL(settingsDialogRequested()),
|
||||
this, SIGNAL(settingsDialogRequested()));
|
||||
|
||||
// Tooltip
|
||||
QTreeView *tooltipView = qobject_cast<QTreeView *>(m_tooltipWindow);
|
||||
|
||||
@@ -371,6 +371,7 @@ signals:
|
||||
void configValueRequested(const QString &name, QVariant *value);
|
||||
void setConfigValueRequested(const QString &name, const QVariant &value);
|
||||
void applicationOutputAvailable(const QString &output);
|
||||
void settingsDialogRequested();
|
||||
|
||||
public:
|
||||
// FIXME: make private
|
||||
|
||||
@@ -707,6 +707,9 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
|
||||
connect(m_manager, SIGNAL(debugModeRequested()),
|
||||
this, SLOT(activateDebugMode()));
|
||||
|
||||
connect(m_manager, SIGNAL(settingsDialogRequested()),
|
||||
this, SLOT(showSettingsDialog()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -963,6 +966,11 @@ void DebuggerPlugin::focusCurrentEditor(IMode *mode)
|
||||
editorManager->currentEditor()->widget()->setFocus();
|
||||
}
|
||||
|
||||
void DebuggerPlugin::showSettingsDialog()
|
||||
{
|
||||
Core::ICore::instance()->showOptionsDialog("Debugger", "Gdb");
|
||||
}
|
||||
|
||||
#include "debuggerplugin.moc"
|
||||
|
||||
Q_EXPORT_PLUGIN(DebuggerPlugin)
|
||||
|
||||
@@ -93,6 +93,7 @@ private slots:
|
||||
|
||||
void breakpointMarginActionTriggered();
|
||||
void focusCurrentEditor(Core::IMode *mode);
|
||||
void showSettingsDialog();
|
||||
|
||||
private:
|
||||
void readSettings();
|
||||
|
||||
@@ -102,12 +102,13 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
QAction *act2 = new QAction("Always adjust column widths to contents", &menu);
|
||||
act2->setCheckable(true);
|
||||
act2->setChecked(m_alwaysResizeColumnsToContents);
|
||||
QAction *act3 = 0;
|
||||
QAction *act4 = 0;
|
||||
QAction *act5 = new QAction("Debugger properties...", &menu);
|
||||
|
||||
menu.addAction(act1);
|
||||
menu.addAction(act2);
|
||||
|
||||
QAction *act3 = 0;
|
||||
QAction *act4 = 0;
|
||||
QModelIndex idx = indexAt(ev->pos());
|
||||
QModelIndex mi0 = idx.sibling(idx.row(), 0);
|
||||
QString exp = model()->data(mi0).toString();
|
||||
@@ -128,6 +129,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
act4->setChecked(visual);
|
||||
// FIXME: menu.addAction(act4);
|
||||
}
|
||||
menu.addSeparator();
|
||||
menu.addAction(act5);
|
||||
|
||||
QAction *act = menu.exec(ev->globalPos());
|
||||
|
||||
@@ -144,6 +147,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
emit requestRemoveWatchExpression(exp);
|
||||
else if (act == act4)
|
||||
model()->setData(mi0, !visual, VisualRole);
|
||||
else if (act == act5)
|
||||
emit settingsDialogRequested();
|
||||
}
|
||||
|
||||
void WatchWindow::resizeColumnsToContents()
|
||||
|
||||
@@ -63,6 +63,7 @@ signals:
|
||||
void requestAssignValue(const QString &exp, const QString &value);
|
||||
void requestExpandChildren(const QModelIndex &idx);
|
||||
void requestCollapseChildren(const QModelIndex &idx);
|
||||
void settingsDialogRequested();
|
||||
|
||||
private slots:
|
||||
void handleChangedItem(QWidget *);
|
||||
|
||||
Reference in New Issue
Block a user