mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
f8517c583b
commit
40fa148548
1 changed files with 8 additions and 11 deletions
|
@ -1115,8 +1115,6 @@ void MainWindow::on_actionYearlyStatistics_triggered()
|
||||||
d.exec();
|
d.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BEHAVIOR QList<int>()
|
|
||||||
|
|
||||||
void MainWindow::toggleCollapsible(bool toggle)
|
void MainWindow::toggleCollapsible(bool toggle)
|
||||||
{
|
{
|
||||||
ui.mainSplitter->setCollapsible(0, toggle);
|
ui.mainSplitter->setCollapsible(0, toggle);
|
||||||
|
@ -1131,34 +1129,33 @@ void MainWindow::on_actionViewList_triggered()
|
||||||
{
|
{
|
||||||
toggleCollapsible(true);
|
toggleCollapsible(true);
|
||||||
beginChangeState(LIST_MAXIMIZED);
|
beginChangeState(LIST_MAXIMIZED);
|
||||||
ui.mainSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
|
ui.mainSplitter->setSizes({ COLLAPSED, EXPANDED });
|
||||||
ui.bottomSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
|
ui.bottomSplitter->setSizes({ EXPANDED, COLLAPSED });
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionViewProfile_triggered()
|
void MainWindow::on_actionViewProfile_triggered()
|
||||||
{
|
{
|
||||||
toggleCollapsible(true);
|
toggleCollapsible(true);
|
||||||
beginChangeState(PROFILE_MAXIMIZED);
|
beginChangeState(PROFILE_MAXIMIZED);
|
||||||
ui.topSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
|
ui.topSplitter->setSizes({ COLLAPSED, EXPANDED });
|
||||||
ui.mainSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
|
ui.mainSplitter->setSizes({ EXPANDED, COLLAPSED });
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionViewInfo_triggered()
|
void MainWindow::on_actionViewInfo_triggered()
|
||||||
{
|
{
|
||||||
toggleCollapsible(true);
|
toggleCollapsible(true);
|
||||||
beginChangeState(INFO_MAXIMIZED);
|
beginChangeState(INFO_MAXIMIZED);
|
||||||
ui.topSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
|
ui.topSplitter->setSizes({ EXPANDED, COLLAPSED });
|
||||||
ui.mainSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
|
ui.mainSplitter->setSizes({ EXPANDED, COLLAPSED });
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionViewMap_triggered()
|
void MainWindow::on_actionViewMap_triggered()
|
||||||
{
|
{
|
||||||
toggleCollapsible(true);
|
toggleCollapsible(true);
|
||||||
beginChangeState(MAP_MAXIMIZED);
|
beginChangeState(MAP_MAXIMIZED);
|
||||||
ui.mainSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
|
ui.mainSplitter->setSizes({ COLLAPSED, EXPANDED });
|
||||||
ui.bottomSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
|
ui.bottomSplitter->setSizes({ COLLAPSED, EXPANDED });
|
||||||
}
|
}
|
||||||
#undef BEHAVIOR
|
|
||||||
|
|
||||||
void MainWindow::on_actionViewAll_triggered()
|
void MainWindow::on_actionViewAll_triggered()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue