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();
|
QPushButton *lastButton = d->m_buttons.last();
|
||||||
|
|
||||||
QMenu *childList = lastButton->menu();
|
QMenu *childList = lastButton->menu();
|
||||||
|
QTC_ASSERT(childList, return);
|
||||||
QList<QAction *> actions = childList->actions();
|
QList<QAction *> actions = childList->actions();
|
||||||
|
|
||||||
if (order == Qt::AscendingOrder)
|
if (order == Qt::AscendingOrder)
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ void ContextCrumblePath::addChildren(const QStringList &childrenNames, const QLi
|
|||||||
addChild(childrenNames[i], childrenDebugIds[i]);
|
addChild(childrenNames[i], childrenDebugIds[i]);
|
||||||
|
|
||||||
//Sort them alphabetically
|
//Sort them alphabetically
|
||||||
sortChildren();
|
if (childrenDebugIds.count())
|
||||||
|
sortChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContextCrumblePath::clear()
|
void ContextCrumblePath::clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user