Commit 537eb2f1 authored by David Schulz's avatar David Schulz

Cdbext: Do not sort container children.

They are already sorted in an intended order.

Task-number: QTCREATORBUG-14872
Change-Id: If28d41eb220cb875fa5ef25f0fab075329900bff
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
parent 4f50aa74
...@@ -1104,6 +1104,7 @@ AbstractSymbolGroupNodePtrVector containerChildren(SymbolGroupNode *node, int ty ...@@ -1104,6 +1104,7 @@ AbstractSymbolGroupNodePtrVector containerChildren(SymbolGroupNode *node, int ty
} }
if (!size) if (!size)
return AbstractSymbolGroupNodePtrVector(); return AbstractSymbolGroupNodePtrVector();
node->addFlags(SymbolGroupNode::PreSortedChildren);
const unsigned maxArraySize = ExtensionContext::instance().parameters().maxArraySize; const unsigned maxArraySize = ExtensionContext::instance().parameters().maxArraySize;
if (size > maxArraySize) if (size > maxArraySize)
size = maxArraySize; size = maxArraySize;
......
...@@ -168,7 +168,7 @@ bool AbstractSymbolGroupNode::accept(SymbolGroupNodeVisitor &visitor, ...@@ -168,7 +168,7 @@ bool AbstractSymbolGroupNode::accept(SymbolGroupNodeVisitor &visitor,
break; break;
case SymbolGroupNodeVisitor::VisitContinue: { case SymbolGroupNodeVisitor::VisitContinue: {
AbstractSymbolGroupNodePtrVector c = children(); AbstractSymbolGroupNodePtrVector c = children();
if (visitor.sortChildrenAlphabetically()) { if (visitor.sortChildrenAlphabetically() && !testFlags(SymbolGroupNode::PreSortedChildren)) {
std::sort(c.begin(), c.end(), [](AbstractSymbolGroupNode *a, AbstractSymbolGroupNode *b) { std::sort(c.begin(), c.end(), [](AbstractSymbolGroupNode *a, AbstractSymbolGroupNode *b) {
return a->name() < b->name(); return a->name() < b->name();
}); });
......
...@@ -230,7 +230,8 @@ public: ...@@ -230,7 +230,8 @@ public:
AdditionalSymbol = 0x20, // Introduced by addSymbol, should not be visible AdditionalSymbol = 0x20, // Introduced by addSymbol, should not be visible
Obscured = 0x40, // Symbol is obscured by (for example) fake container children Obscured = 0x40, // Symbol is obscured by (for example) fake container children
ComplexDumperOk = 0x80, ComplexDumperOk = 0x80,
WatchNode = 0x100 WatchNode = 0x100,
PreSortedChildren = 0x200
}; };
~SymbolGroupNode(); ~SymbolGroupNode();
......
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