Commit f77f6e21 authored by hjk's avatar hjk

Debugger: Make QmlEngine heed "Sort Struct Members Alphabetically"

Change-Id: Ib24e62c60eea4b0af355c3e93e48a78dc0b51efc
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 184b1612
......@@ -62,6 +62,7 @@
#include <texteditor/textdocument.h>
#include <texteditor/texteditor.h>
#include <utils/treemodel.h>
#include <utils/qtcassert.h>
#include <QDebug>
......@@ -90,6 +91,7 @@ using namespace ProjectExplorer;
using namespace QmlDebug;
using namespace QmlJS;
using namespace TextEditor;
using namespace Utils;
namespace Debugger {
namespace Internal {
......@@ -937,6 +939,11 @@ void QmlEngine::reloadSourceFiles()
d->scripts(4, QList<int>(), true, QVariant());
}
void QmlEngine::updateAll()
{
d->updateLocals();
}
void QmlEngine::requestModuleSymbols(const QString &moduleName)
{
Q_UNUSED(moduleName)
......@@ -2354,6 +2361,12 @@ void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &pro
item->setHasChildren(propertyData.properties.count());
parent->appendChild(item);
}
if (boolSetting(SortStructMembers))
parent->sortChildren([](const TreeItem *item1, const TreeItem *item2) -> bool {
return static_cast<const WatchItem *>(item1)->name
< static_cast<const WatchItem *>(item2)->name;
});
}
void QmlEnginePrivate::handleExecuteDebuggerCommand(const QVariantMap &response)
......
......@@ -129,6 +129,7 @@ private:
void reloadSourceFiles();
void reloadFullStack() {}
void updateAll();
void updateItem(const QByteArray &iname);
void expandItem(const QByteArray &iname);
void selectWatchData(const QByteArray &iname);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment