forked from qt-creator/qt-creator
Handle watching/tooltips of C++ editor tokens consistently.
For editor tooltips and the editor context menu 'Watch expression', always try to find a local variable first and use its expression. Change the tooltip manager/widgets not to rely on the debugger model enum and obscure expression, filter by complete iname instead. Remove obsolete enumeration. Change gdb's handling of tooltips such that local variables are displayed immediately without creating additional tooltip items. Change-Id: I9b55823428029ba50d84d3a8cab55eb58942e72b Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -58,15 +58,6 @@ public:
|
||||
|
||||
typedef QHash<QString, QStringList> TypeFormats;
|
||||
|
||||
enum WatchType
|
||||
{
|
||||
LocalsType,
|
||||
InspectType,
|
||||
WatchersType,
|
||||
ReturnType,
|
||||
TooltipType
|
||||
};
|
||||
|
||||
enum IntegerFormat
|
||||
{
|
||||
DecimalFormat = 0, // Keep that at 0 as default.
|
||||
@@ -86,7 +77,7 @@ public:
|
||||
QAbstractItemModel *model() const;
|
||||
|
||||
void cleanup();
|
||||
void watchExpression(const QString &exp);
|
||||
void watchExpression(const QString &exp, const QString &name = QString());
|
||||
Q_SLOT void clearWatches();
|
||||
|
||||
void updateWatchers(); // Called after locals are fetched
|
||||
@@ -95,6 +86,7 @@ public:
|
||||
|
||||
const WatchData *watchData(const QModelIndex &) const;
|
||||
const WatchData *findData(const QByteArray &iname) const;
|
||||
const WatchData *findCppLocalVariable(const QString &name) const;
|
||||
QString displayForAutoTest(const QByteArray &iname) const;
|
||||
bool hasItem(const QByteArray &iname) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user