summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-29 12:05:34 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-01-04 08:21:43 -0800
commit40fa148548f001ce8a4a1fa250b31b618f8b50d4 (patch)
treef595525404817688fbdd9c7127eb6ffd2d8b680a /desktop-widgets
parentf8517c583bf5fdb787a7d5ce46a8896f9cf04830 (diff)
downloadsubsurface-40fa148548f001ce8a4a1fa250b31b618f8b50d4.tar.gz
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>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/mainwindow.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 4c9cc097c..bbccdc064 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -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()
{