forked from qt-creator/qt-creator
QML Inspector: Don't misinterpret objects with ID 0
The invalid ID is -1 and we shouldn't send 0 to the engine debug service by default as that will select some random object as context for expression evaluation. Change-Id: Ide245468f787cc449ff50ac846c7ff31620c01b4 Task-number: QTCREATORBUG-14931 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -60,6 +60,8 @@ public:
|
||||
| HasChildrenNeeded
|
||||
};
|
||||
|
||||
static const qint64 InvalidId = -1;
|
||||
|
||||
void setAllUnneeded() { state = State(0); }
|
||||
|
||||
bool isValueNeeded() const { return state & ValueNeeded; }
|
||||
@@ -99,7 +101,7 @@ public:
|
||||
void updateDisplayedType(const GdbMi &item);
|
||||
|
||||
public:
|
||||
quint64 id; // Token for the engine for internal mapping
|
||||
qint64 id; // Token for the engine for internal mapping
|
||||
qint32 state; // 'needed' flags;
|
||||
QByteArray iname; // Internal name sth like 'local.baz.public.a'
|
||||
QByteArray exp; // The expression
|
||||
|
||||
Reference in New Issue
Block a user