Replace BEHAVIOR macro by initializer lists

The macro BEHAVIOR expanded to "QList<int>()". This was used to
generate temporary QList<int>s with constructs such as
  BEHAVIOR << COLLAPSED << EXPANDED
Instead, simply use initializer lists such as
  {COLLAPSED, EXPANDED}

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-12-29 12:05:34 +01:00 committed by Dirk Hohndel
parent f8517c583b
commit 40fa148548

View file

@ -1115,8 +1115,6 @@ void MainWindow::on_actionYearlyStatistics_triggered()
d.exec();
}
#define BEHAVIOR QList<int>()
void MainWindow::toggleCollapsible(bool toggle)
{
ui.mainSplitter->setCollapsible(0, toggle);
@ -1131,34 +1129,33 @@ void MainWindow::on_actionViewList_triggered()
{
toggleCollapsible(true);
beginChangeState(LIST_MAXIMIZED);
ui.mainSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
ui.bottomSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
ui.mainSplitter->setSizes({ COLLAPSED, EXPANDED });
ui.bottomSplitter->setSizes({ EXPANDED, COLLAPSED });
}
void MainWindow::on_actionViewProfile_triggered()
{
toggleCollapsible(true);
beginChangeState(PROFILE_MAXIMIZED);
ui.topSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
ui.mainSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
ui.topSplitter->setSizes({ COLLAPSED, EXPANDED });
ui.mainSplitter->setSizes({ EXPANDED, COLLAPSED });
}
void MainWindow::on_actionViewInfo_triggered()
{
toggleCollapsible(true);
beginChangeState(INFO_MAXIMIZED);
ui.topSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
ui.mainSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
ui.topSplitter->setSizes({ EXPANDED, COLLAPSED });
ui.mainSplitter->setSizes({ EXPANDED, COLLAPSED });
}
void MainWindow::on_actionViewMap_triggered()
{
toggleCollapsible(true);
beginChangeState(MAP_MAXIMIZED);
ui.mainSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
ui.bottomSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
ui.mainSplitter->setSizes({ COLLAPSED, EXPANDED });
ui.bottomSplitter->setSizes({ COLLAPSED, EXPANDED });
}
#undef BEHAVIOR
void MainWindow::on_actionViewAll_triggered()
{