src/MainWindow.cpp

changeset 337
8133cdb19aa1
parent 332
146874d7bb47
child 357
08f73b616345
--- a/src/MainWindow.cpp	Tue Jul 05 14:31:39 2022 +0200
+++ b/src/MainWindow.cpp	Thu Jul 07 08:51:57 2022 +0200
@@ -126,20 +126,21 @@
      */
     QSqlQuery query("SELECT * FROM profile_setup WHERE record='1'");
     query.first();
-    my_brewery_name = query.value(1).toString();
-    my_logoByteArray = query.value(2).toByteArray();
-    my_factor_mashhop = query.value(3).toInt();
-    my_factor_fwh = query.value(4).toInt();
-    my_factor_pellet = query.value(5).toInt();
-    my_factor_plug = query.value(6).toInt();
-    my_factor_wethop = query.value(7).toInt();
-    my_factor_cryohop = query.value(8).toInt();
-    my_ibu_method = query.value(9).toInt();
-    my_color_method = query.value(10).toInt();
-    my_brix_correction = query.value(11).toDouble();
-    my_grain_absorbtion = query.value(12).toDouble();
-    my_default_water = query.value(13).toInt();
-    my_yeastlab = query.value(14).toString();
+    my_brewery_name = query.value("brewery_name").toString();
+    my_logoByteArray = query.value("brewery_logo").toByteArray();
+    my_factor_mashhop = query.value("factor_mashhop").toInt();
+    my_factor_fwh = query.value("factor_fwh").toInt();
+    my_factor_pellet = query.value("factor_pellet").toInt();
+    my_factor_plug = query.value("factor_plug").toInt();
+    my_factor_wethop = query.value("factor_wethop").toInt();
+    my_factor_cryohop = query.value("factor_cryohop").toInt();
+    my_ibu_method = query.value("ibu_method").toInt();
+    my_color_method = query.value("color_method").toInt();
+    my_brix_correction = query.value("brix_correction").toDouble();
+    my_grain_absorbtion = query.value("grain_absorbtion").toDouble();
+    my_default_water = query.value("default_water").toInt();
+    my_yeastlab = query.value("my_yeastlab").toString();
+    my_height = query.value("brewery_height").toInt();
 
     qInfo() << "loadSetup" << my_brewery_name;
 }

mercurial