forked from qt-creator/qt-creator
Even more algorithm usage in ProjectExplorer
Add Utils::transform and anyOf that take a member function pointer. Remove bestElementOr it's unused. Use declval<T> in transform's return type, because msvc does evaluate T() and for types that don't have simple constructor this fails. Add std::remove_reference since decltype returns a reference for lvalues. Change-Id: I22248b226748eeb27af0d300182d574438d7f756 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -864,12 +864,8 @@ void MiniProjectTargetSelector::doLayout(bool keepSize)
|
||||
onlySummary = true;
|
||||
} else {
|
||||
if (visibleLineCount < 3) {
|
||||
foreach (Project *p, SessionManager::projects()) {
|
||||
if (p->needsConfiguration()) {
|
||||
visibleLineCount = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Utils::anyOf(SessionManager::projects(), &Project::needsConfiguration))
|
||||
visibleLineCount = 3;
|
||||
}
|
||||
if (visibleLineCount)
|
||||
summaryLabelHeight = visibleLineCount * QFontMetrics(m_summaryLabel->font()).height()
|
||||
|
||||
Reference in New Issue
Block a user