Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
aa81df02
Commit
aa81df02
authored
Feb 27, 2009
by
hjk
Browse files
Fixes: debugger: easier access to debugger properties from watchers window
parent
b8da40cc
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggermanager.cpp
View file @
aa81df02
...
...
@@ -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
);
...
...
src/plugins/debugger/debuggermanager.h
View file @
aa81df02
...
...
@@ -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
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
aa81df02
...
...
@@ -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
)
src/plugins/debugger/debuggerplugin.h
View file @
aa81df02
...
...
@@ -93,6 +93,7 @@ private slots:
void
breakpointMarginActionTriggered
();
void
focusCurrentEditor
(
Core
::
IMode
*
mode
);
void
showSettingsDialog
();
private:
void
readSettings
();
...
...
src/plugins/debugger/watchwindow.cpp
View file @
aa81df02
...
...
@@ -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
()
...
...
src/plugins/debugger/watchwindow.h
View file @
aa81df02
...
...
@@ -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
*
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment