forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
@@ -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();
|
||||
});
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user