forked from qt-creator/qt-creator
Core: Use QList's initializer list contructor for output panes
More concise code. Change-Id: I0c83a02de725648294e1b6b49669bdec0c47fafe Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -231,8 +231,7 @@ QWidget *TestResultsPane::outputWidget(QWidget *parent)
|
|||||||
|
|
||||||
QList<QWidget *> TestResultsPane::toolBarWidgets() const
|
QList<QWidget *> TestResultsPane::toolBarWidgets() const
|
||||||
{
|
{
|
||||||
return QList<QWidget *>() << m_expandCollapse << m_runAll << m_runSelected << m_stopTestRun
|
return { m_expandCollapse, m_runAll, m_runSelected, m_stopTestRun, m_filterButton };
|
||||||
<< m_filterButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TestResultsPane::displayName() const
|
QString TestResultsPane::displayName() const
|
||||||
|
@@ -340,8 +340,8 @@ QWidget *SearchResultWindow::outputWidget(QWidget *)
|
|||||||
*/
|
*/
|
||||||
QList<QWidget*> SearchResultWindow::toolBarWidgets() const
|
QList<QWidget*> SearchResultWindow::toolBarWidgets() const
|
||||||
{
|
{
|
||||||
return QList<QWidget*>() << d->m_expandCollapseButton << d->m_spacer
|
return { d->m_expandCollapseButton, d->m_spacer,
|
||||||
<< d->m_historyLabel << d->m_spacer2 << d->m_recentSearchesBox;
|
d->m_historyLabel, d->m_spacer2, d->m_recentSearchesBox };
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@@ -321,8 +321,7 @@ QWidget *AppOutputPane::outputWidget(QWidget *)
|
|||||||
|
|
||||||
QList<QWidget*> AppOutputPane::toolBarWidgets() const
|
QList<QWidget*> AppOutputPane::toolBarWidgets() const
|
||||||
{
|
{
|
||||||
return QList<QWidget*>() << m_reRunButton << m_stopButton << m_attachButton
|
return { m_reRunButton, m_stopButton, m_attachButton, m_zoomInButton, m_zoomOutButton };
|
||||||
<< m_zoomInButton << m_zoomOutButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AppOutputPane::displayName() const
|
QString AppOutputPane::displayName() const
|
||||||
|
@@ -244,9 +244,7 @@ QWidget *CompileOutputWindow::outputWidget(QWidget *)
|
|||||||
|
|
||||||
QList<QWidget *> CompileOutputWindow::toolBarWidgets() const
|
QList<QWidget *> CompileOutputWindow::toolBarWidgets() const
|
||||||
{
|
{
|
||||||
return QList<QWidget *>() << m_cancelBuildButton
|
return { m_cancelBuildButton, m_zoomInButton, m_zoomOutButton };
|
||||||
<< m_zoomInButton
|
|
||||||
<< m_zoomOutButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputFormat format)
|
void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputFormat format)
|
||||||
|
@@ -348,7 +348,7 @@ void TaskWindow::delayedInitialization()
|
|||||||
|
|
||||||
QList<QWidget*> TaskWindow::toolBarWidgets() const
|
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 *)
|
QWidget *TaskWindow::outputWidget(QWidget *)
|
||||||
|
@@ -67,11 +67,7 @@ QWidget *TodoOutputPane::outputWidget(QWidget *parent)
|
|||||||
|
|
||||||
QList<QWidget*> TodoOutputPane::toolBarWidgets() const
|
QList<QWidget*> TodoOutputPane::toolBarWidgets() const
|
||||||
{
|
{
|
||||||
return QList<QWidget*>()
|
return { m_spacer, m_currentFileButton, m_wholeProjectButton, m_subProjectButton };
|
||||||
<< m_spacer
|
|
||||||
<< m_currentFileButton
|
|
||||||
<< m_wholeProjectButton
|
|
||||||
<< m_subProjectButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TodoOutputPane::displayName() const
|
QString TodoOutputPane::displayName() const
|
||||||
|
Reference in New Issue
Block a user