Commit 08dc992a authored by hjk's avatar hjk Committed by hjk

Core: Use QList's initializer list contructor for output panes

More concise code.

Change-Id: I0c83a02de725648294e1b6b49669bdec0c47fafe
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent 0dec1917
......@@ -231,8 +231,7 @@ QWidget *TestResultsPane::outputWidget(QWidget *parent)
QList<QWidget *> TestResultsPane::toolBarWidgets() const
{
return QList<QWidget *>() << m_expandCollapse << m_runAll << m_runSelected << m_stopTestRun
<< m_filterButton;
return { m_expandCollapse, m_runAll, m_runSelected, m_stopTestRun, m_filterButton };
}
QString TestResultsPane::displayName() const
......
......@@ -340,8 +340,8 @@ QWidget *SearchResultWindow::outputWidget(QWidget *)
*/
QList<QWidget*> SearchResultWindow::toolBarWidgets() const
{
return QList<QWidget*>() << d->m_expandCollapseButton << d->m_spacer
<< d->m_historyLabel << d->m_spacer2 << d->m_recentSearchesBox;
return { d->m_expandCollapseButton, d->m_spacer,
d->m_historyLabel, d->m_spacer2, d->m_recentSearchesBox };
}
/*!
......
......@@ -321,8 +321,7 @@ QWidget *AppOutputPane::outputWidget(QWidget *)
QList<QWidget*> AppOutputPane::toolBarWidgets() const
{
return QList<QWidget*>() << m_reRunButton << m_stopButton << m_attachButton
<< m_zoomInButton << m_zoomOutButton;
return { m_reRunButton, m_stopButton, m_attachButton, m_zoomInButton, m_zoomOutButton };
}
QString AppOutputPane::displayName() const
......
......@@ -244,9 +244,7 @@ QWidget *CompileOutputWindow::outputWidget(QWidget *)
QList<QWidget *> CompileOutputWindow::toolBarWidgets() const
{
return QList<QWidget *>() << m_cancelBuildButton
<< m_zoomInButton
<< m_zoomOutButton;
return { m_cancelBuildButton, m_zoomInButton, m_zoomOutButton };
}
void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputFormat format)
......
......@@ -348,7 +348,7 @@ void TaskWindow::delayedInitialization()
QList<QWidget*> TaskWindow::toolBarWidgets() const
{
return QList<QWidget*>() << d->m_filterWarningsButton << d->m_categoriesButton;
return { d->m_filterWarningsButton, d->m_categoriesButton };
}
QWidget *TaskWindow::outputWidget(QWidget *)
......
......@@ -67,11 +67,7 @@ QWidget *TodoOutputPane::outputWidget(QWidget *parent)
QList<QWidget*> TodoOutputPane::toolBarWidgets() const
{
return QList<QWidget*>()
<< m_spacer
<< m_currentFileButton
<< m_wholeProjectButton
<< m_subProjectButton;
return { m_spacer, m_currentFileButton, m_wholeProjectButton, m_subProjectButton };
}
QString TodoOutputPane::displayName() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment