Cdbext: Do not sort container children.

They are already sorted in an intended order.

Task-number: QTCREATORBUG-14872
Change-Id: If28d41eb220cb875fa5ef25f0fab075329900bff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
David Schulz
2015-08-12 11:12:50 +02:00
parent 4f50aa74d6
commit 537eb2f159
3 changed files with 4 additions and 2 deletions

View File

@@ -1104,6 +1104,7 @@ AbstractSymbolGroupNodePtrVector containerChildren(SymbolGroupNode *node, int ty
}
if (!size)
return AbstractSymbolGroupNodePtrVector();
node->addFlags(SymbolGroupNode::PreSortedChildren);
const unsigned maxArraySize = ExtensionContext::instance().parameters().maxArraySize;
if (size > maxArraySize)
size = maxArraySize;

View File

@@ -168,7 +168,7 @@ bool AbstractSymbolGroupNode::accept(SymbolGroupNodeVisitor &visitor,
break;
case SymbolGroupNodeVisitor::VisitContinue: {
AbstractSymbolGroupNodePtrVector c = children();
if (visitor.sortChildrenAlphabetically()) {
if (visitor.sortChildrenAlphabetically() && !testFlags(SymbolGroupNode::PreSortedChildren)) {
std::sort(c.begin(), c.end(), [](AbstractSymbolGroupNode *a, AbstractSymbolGroupNode *b) {
return a->name() < b->name();
});

View File

@@ -230,7 +230,8 @@ public:
AdditionalSymbol = 0x20, // Introduced by addSymbol, should not be visible
Obscured = 0x40, // Symbol is obscured by (for example) fake container children
ComplexDumperOk = 0x80,
WatchNode = 0x100
WatchNode = 0x100,
PreSortedChildren = 0x200
};
~SymbolGroupNode();