forked from qt-creator/qt-creator
Try to watch local variable in watchwindow-DND, too.
Fix codepath overlooked in
6886e485de by introducing
a WatchHandler::watchVariable().
Task-number: QTCREATORBUG-8120
Change-Id: Ibab2619754e0006f3c81810a6bfdf758261c169e
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -1586,6 +1586,18 @@ void WatchHandler::watchExpression(const QString &exp, const QString &name)
|
||||
updateWatchersWindow();
|
||||
}
|
||||
|
||||
// Watch something obtained from the editor.
|
||||
// Prefer to watch an existing local variable by its expression
|
||||
// (address) if it can be found. Default to watchExpression().
|
||||
void WatchHandler::watchVariable(const QString &exp)
|
||||
{
|
||||
if (const WatchData *localVariable = findCppLocalVariable(exp)) {
|
||||
watchExpression(QLatin1String(localVariable->exp), exp);
|
||||
} else {
|
||||
watchExpression(exp);
|
||||
}
|
||||
}
|
||||
|
||||
static void swapEndian(char *d, int nchar)
|
||||
{
|
||||
QTC_ASSERT(nchar % 4 == 0, return);
|
||||
|
||||
Reference in New Issue
Block a user