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
532c18d7
Commit
532c18d7
authored
Mar 19, 2009
by
hjk
Browse files
debugger: make add & remove wathcers work again after the action changes
parent
50cabb92
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggeractions.cpp
View file @
532c18d7
...
...
@@ -145,6 +145,7 @@ QAction *QtcSettingsItem::updatedAction(const QString &text0)
}
}
m_action
->
setEnabled
(
enabled
);
m_action
->
setData
(
text0
);
m_action
->
setText
(
text
);
return
m_action
;
}
...
...
src/plugins/debugger/gdbengine.cpp
View file @
532c18d7
...
...
@@ -3533,7 +3533,7 @@ void GdbEngine::updateWatchModel2()
void
GdbEngine
::
handleQueryDataDumper
(
const
GdbResultRecord
&
record
)
{
qDebug
()
<<
"DATA DUMPER TRIAL:"
<<
record
.
toString
();
//
qDebug() << "DATA DUMPER TRIAL:" << record.toString();
GdbMi
output
=
record
.
data
.
findChild
(
"consolestreamoutput"
);
QByteArray
out
=
output
.
data
();
out
=
out
.
mid
(
out
.
indexOf
(
'"'
)
+
2
);
// + 1 is success marker
...
...
src/plugins/debugger/watchhandler.cpp
View file @
532c18d7
...
...
@@ -368,11 +368,11 @@ WatchHandler::WatchHandler()
m_incompleteSet
.
clear
();
m_displaySet
=
m_completeSet
;
connect
(
theDebuggerSetting
(
WatchExpression
)
,
SIGNAL
(
stringValueChanged
(
QString
)
),
this
,
SLOT
(
watchExpression
(
QString
)));
connect
(
theDebuggerSetting
(
WatchExpression
)
->
action
(
),
SIGNAL
(
triggered
()),
this
,
SLOT
(
watchExpression
()));
connect
(
theDebuggerSetting
(
RemoveWatchExpression
)
,
SIGNAL
(
stringValueChanged
(
QString
)
),
this
,
SLOT
(
removeWatchExpression
(
QString
)));
connect
(
theDebuggerSetting
(
RemoveWatchExpression
)
->
action
(
),
SIGNAL
(
triggered
()),
this
,
SLOT
(
removeWatchExpression
()));
}
bool
WatchHandler
::
setData
(
const
QModelIndex
&
idx
,
...
...
@@ -884,6 +884,12 @@ void WatchHandler::insertData(const WatchData &data)
//MODEL_DEBUG("INSERT RESULT" << toString());
}
void
WatchHandler
::
watchExpression
()
{
if
(
QAction
*
action
=
qobject_cast
<
QAction
*>
(
sender
()))
watchExpression
(
action
->
data
().
toString
());
}
void
WatchHandler
::
watchExpression
(
const
QString
&
exp
)
{
// FIXME: 'exp' can contain illegal characters
...
...
@@ -969,6 +975,12 @@ void WatchHandler::showEditValue(const WatchData &data)
w
->
show
();
}
void
WatchHandler
::
removeWatchExpression
()
{
if
(
QAction
*
action
=
qobject_cast
<
QAction
*>
(
sender
()))
removeWatchExpression
(
action
->
data
().
toString
());
}
void
WatchHandler
::
removeWatchExpression
(
const
QString
&
exp
)
{
MODEL_DEBUG
(
"REMOVE WATCH: "
<<
exp
);
...
...
src/plugins/debugger/watchhandler.h
View file @
532c18d7
...
...
@@ -160,7 +160,9 @@ public:
//public slots:
void
cleanup
();
Q_SLOT
void
watchExpression
();
// data in action->data().toString()
Q_SLOT
void
watchExpression
(
const
QString
&
exp
);
Q_SLOT
void
removeWatchExpression
();
Q_SLOT
void
removeWatchExpression
(
const
QString
&
exp
);
void
reinitializeWatchers
();
...
...
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