aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2018-07-13 18:45:58 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-13 11:26:28 -0700
commitdaab13eba9924acc69eec3dc23eeb4ef0bfce268 (patch)
treeafc1b3e06d0d54bdfed3fb0489803ed90a27cb0d
parent24c915e97c4607a000c2df82ac412286854c7c2c (diff)
downloadsubsurface-daab13eba9924acc69eec3dc23eeb4ef0bfce268.tar.gz
Code cleanup in diveplanner.cpp
Move a variable declaration and added some initialization. Added missing spaces. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
-rw-r--r--desktop-widgets/diveplanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index 6ec14795f..7d4f1a5f5 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -421,7 +421,6 @@ void DivePlannerWidget::printDecoPlan()
PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
{
ui.setupUi(this);
- QStringList rebreather_modes;
plannerModel->getDiveplan().bottomsac = prefs.bottomsac;
plannerModel->getDiveplan().decosac = prefs.decosac;
@@ -448,7 +447,8 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
disableDecoElements((int) prefs.planner_deco_mode);
// should be the same order as in dive_comp_type!
- for (int i=0; i < FREEDIVE; i++)
+ QStringList rebreather_modes = QStringList();
+ for (int i = 0; i < FREEDIVE; i++)
rebreather_modes.append(gettextFromC::tr(divemode_text_ui[i]));
ui.rebreathermode->insertItems(0, rebreather_modes);