forked from qt-creator/qt-creator
CrumblePath: Add check for child count
Change-Id: Ic8f0ceba7b70048d284f0d3bf75c51615ab7d9d4 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
committed by
Kai Koehne
parent
1378c067a0
commit
aa4c3f2332
@@ -304,6 +304,7 @@ void CrumblePath::sortChildren(Qt::SortOrder order)
|
||||
QPushButton *lastButton = d->m_buttons.last();
|
||||
|
||||
QMenu *childList = lastButton->menu();
|
||||
QTC_ASSERT(childList, return);
|
||||
QList<QAction *> actions = childList->actions();
|
||||
|
||||
if (order == Qt::AscendingOrder)
|
||||
|
||||
@@ -66,6 +66,7 @@ void ContextCrumblePath::addChildren(const QStringList &childrenNames, const QLi
|
||||
addChild(childrenNames[i], childrenDebugIds[i]);
|
||||
|
||||
//Sort them alphabetically
|
||||
if (childrenDebugIds.count())
|
||||
sortChildren();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user