forked from qt-creator/qt-creator
ProjectExplorer: Order projects in session alphabetically again
Task-number: QTCREATORBUG-18337 Change-Id: I716369a1012f93c6c676e89c3b32cd1a406996a5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -689,6 +689,13 @@ void TreeItem::insertChild(int pos, TreeItem *item)
|
||||
}
|
||||
}
|
||||
|
||||
void TreeItem::insertOrderedChild(TreeItem *item,
|
||||
const std::function<bool (const TreeItem *, const TreeItem *)> &cmp)
|
||||
{
|
||||
auto where = std::lower_bound(begin(), end(), item, cmp);
|
||||
insertChild(int(where - begin()), item);
|
||||
}
|
||||
|
||||
void TreeItem::removeChildAt(int pos)
|
||||
{
|
||||
QTC_ASSERT(0 <= pos && pos < m_children.count(), return);
|
||||
|
||||
Reference in New Issue
Block a user