forked from qt-creator/qt-creator
Debugger: Avoid looking up references too often
Change-Id: Icec24ce1af8d273c3439ee91800ed1f4381ee19a Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -125,7 +125,7 @@ struct LookupData
|
|||||||
QByteArray exp;
|
QByteArray exp;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QMultiHash<int, LookupData> LookupItems; // id -> (iname, exp)
|
typedef QHash<int, LookupData> LookupItems; // id -> (iname, exp)
|
||||||
|
|
||||||
class QmlEnginePrivate : QmlDebugClient
|
class QmlEnginePrivate : QmlDebugClient
|
||||||
{
|
{
|
||||||
@@ -1362,8 +1362,14 @@ void QmlEnginePrivate::lookup(const LookupItems &items)
|
|||||||
if (items.isEmpty())
|
if (items.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QList<int> handles = items.keys();
|
QList<int> handles;
|
||||||
currentlyLookingUp += items;
|
for (auto it = items.begin(); it != items.end(); ++it) {
|
||||||
|
const int handle = it.key();
|
||||||
|
if (!currentlyLookingUp.contains(handle)) {
|
||||||
|
currentlyLookingUp.insert(handle, it.value());
|
||||||
|
handles.append(handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DebuggerCommand cmd(LOOKUP);
|
DebuggerCommand cmd(LOOKUP);
|
||||||
cmd.arg(HANDLES, handles);
|
cmd.arg(HANDLES, handles);
|
||||||
|
Reference in New Issue
Block a user