From daab13eba9924acc69eec3dc23eeb4ef0bfce268 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Fri, 13 Jul 2018 18:45:58 +0200 Subject: Code cleanup in diveplanner.cpp Move a variable declaration and added some initialization. Added missing spaces. Signed-off-by: Stefan Fuchs --- desktop-widgets/diveplanner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop-widgets/diveplanner.cpp') 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); -- cgit v1.2.3-70-g09d2