diff options
author | Eike Ziller <[email protected]> | 2012-10-29 15:13:06 +0100 |
---|---|---|
committer | Eike Ziller <[email protected]> | 2012-10-29 15:13:06 +0100 |
commit | 67b0637934d0aacc5f9e3525fb8e91623fd7a9bf (patch) | |
tree | 04b88cdb0e102ac2faccb8c02fbafef1c3b75ef6 /src/plugins/debugger/watchhandler.cpp | |
parent | 5011ba940f23c1c78c49611fedfa9a5d189cff61 (diff) | |
parent | 0ae5695649a2dbbcea18b7f491746daaff834568 (diff) |
Merge remote-tracking branch 'origin/2.6'
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r-- | src/plugins/debugger/watchhandler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 7071ca88a27..d71ecc82be4 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -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); |