src/MainWindow.cpp

changeset 254
b0adda0053c5
parent 234
51aea8b798f0
child 275
f472f9773782
--- a/src/MainWindow.cpp	Fri Jun 03 16:32:18 2022 +0200
+++ b/src/MainWindow.cpp	Sun Jun 05 14:50:33 2022 +0200
@@ -106,8 +106,6 @@
 
 MainWindow::~MainWindow()
 {
-    qDebug() << Q_FUNC_INFO;
-
     writesettings();
     webSocket->close(QWebSocketProtocol::CloseCodeNormal, "");
     db->closeDataBase();
@@ -138,7 +136,7 @@
     my_default_water = query.value(13).toInt();
     my_yeastlab = query.value(14).toString();
 
-    qDebug() << "loadSetup" << my_brewery_name;
+    qInfo() << "loadSetup" << my_brewery_name;
 }
 
 
@@ -150,7 +148,7 @@
     else
 	server = wsProd.host;
     QUrl url(QString("ws://%1/ws").arg(server));
-    qDebug() << "Open websocket:" << url;
+    qInfo() << "Open websocket:" << url;
 
     webSocket = new QWebSocket;
     QObject::connect(webSocket, &QWebSocket::connected, this, &MainWindow::wsConnected);
@@ -171,7 +169,7 @@
 
 void MainWindow::wsClosed()
 {
-    qDebug() << Q_FUNC_INFO << webSocket->closeReason();
+    qWarning() << Q_FUNC_INFO << webSocket->closeReason();
 
     // Should triger a periodic timer to try to reconnect.
 }
@@ -293,14 +291,12 @@
 
 void MainWindow::on_actionExit_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     this->close();
 }
 
 
 void MainWindow::fromRecipesTree()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(RecipesTreeWindow);
     delete RecipesTreeWindow;
@@ -311,8 +307,6 @@
 
 void MainWindow::on_actionRecipes_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
-
     RecipesTreeWindow = new RecipesTree(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(RecipesTreeWindow);
@@ -324,7 +318,6 @@
 
 void MainWindow::fromInventorySuppliers()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventorySuppliersWindow);
     delete InventorySuppliersWindow;
@@ -335,8 +328,6 @@
 
 void MainWindow::on_actionSuppliers_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
-
     InventorySuppliersWindow = new InventorySuppliers(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventorySuppliersWindow);
@@ -348,7 +339,6 @@
 
 void MainWindow::fromInventoryFermentables()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventoryFermentablesWindow);
     delete InventoryFermentablesWindow;
@@ -360,8 +350,6 @@
 
 void MainWindow::on_actionFermentables_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
-
     InventoryFermentablesWindow = new InventoryFermentables(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventoryFermentablesWindow);
@@ -373,7 +361,6 @@
 
 void MainWindow::fromInventoryHops()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventoryHopsWindow);
     delete InventoryHopsWindow;
@@ -385,7 +372,6 @@
 
 void MainWindow::on_actionHops_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     InventoryHopsWindow = new InventoryHops(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventoryHopsWindow);
@@ -397,7 +383,6 @@
 
 void MainWindow::fromInventoryYeasts()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventoryYeastsWindow);
     delete InventoryYeastsWindow;
@@ -409,7 +394,6 @@
 
 void MainWindow::on_actionYeasts_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     InventoryYeastsWindow = new InventoryYeasts(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventoryYeastsWindow);
@@ -421,7 +405,6 @@
 
 void MainWindow::fromInventoryMiscs()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventoryMiscsWindow);
     delete InventoryMiscsWindow;
@@ -433,7 +416,6 @@
 
 void MainWindow::on_actionMiscs_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     InventoryMiscsWindow = new InventoryMiscs(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventoryMiscsWindow);
@@ -445,7 +427,6 @@
 
 void MainWindow::fromInventoryWaters()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventoryWatersWindow);
     delete InventoryWatersWindow;
@@ -457,7 +438,6 @@
 
 void MainWindow::on_actionWaters_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     InventoryWatersWindow = new InventoryWaters(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventoryWatersWindow);
@@ -469,7 +449,6 @@
 
 void MainWindow::fromInventoryEquipments()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventoryEquipmentsWindow);
     delete InventoryEquipmentsWindow;
@@ -481,7 +460,6 @@
 
 void MainWindow::on_actionEquipments_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     InventoryEquipmentsWindow = new InventoryEquipments(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventoryEquipmentsWindow);
@@ -493,21 +471,18 @@
 
 void MainWindow::on_actionSupplies_list_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     PrinterDialog(PR_SUPPLIES, -1, this);
 }
 
 
 void MainWindow::on_actionYeast_bank_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     PrinterDialog(PR_YEASTBANK, -1, this);
 }
 
 
 void MainWindow::fromProdInprod()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProdInprodWindow);
     delete ProdInprodWindow;
@@ -519,7 +494,6 @@
 
 void MainWindow::on_actionProd_inprod_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProdInprodWindow = new ProdInprod(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProdInprodWindow);
@@ -531,7 +505,6 @@
 
 void MainWindow::fromProdOnName()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProdOnNameWindow);
     delete ProdOnNameWindow;
@@ -543,7 +516,6 @@
 
 void MainWindow::on_actionOn_Name_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProdOnNameWindow = new ProdOnName(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProdOnNameWindow);
@@ -555,7 +527,6 @@
 
 void MainWindow::fromProdOnCode()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProdOnCodeWindow);
     delete ProdOnCodeWindow;
@@ -567,7 +538,6 @@
 
 void MainWindow::on_actionOn_Code_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProdOnCodeWindow = new ProdOnCode(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProdOnCodeWindow);
@@ -579,7 +549,6 @@
 
 void MainWindow::fromProdOnDate()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProdOnDateWindow);
     delete ProdOnDateWindow;
@@ -591,7 +560,6 @@
 
 void MainWindow::on_actionOn_Date_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProdOnDateWindow = new ProdOnDate(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProdOnDateWindow);
@@ -603,7 +571,6 @@
 
 void MainWindow::fromProdOnTree()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProdOnTreeWindow);
     delete ProdOnTreeWindow;
@@ -615,7 +582,6 @@
 
 void MainWindow::on_actionOn_Tree_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProdOnTreeWindow = new ProdOnTree(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProdOnTreeWindow);
@@ -627,7 +593,6 @@
 
 void MainWindow::fromProfileWaters()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProfileWatersWindow);
     delete ProfileWatersWindow;
@@ -639,7 +604,6 @@
 
 void MainWindow::on_actionWater_profiles_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProfileWatersWindow = new ProfileWaters(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProfileWatersWindow);
@@ -651,7 +615,6 @@
 
 void MainWindow::fromProfileMashs()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProfileMashsWindow);
     delete ProfileMashsWindow;
@@ -663,7 +626,6 @@
 
 void MainWindow::on_actionMash_profiles_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProfileMashsWindow = new ProfileMashs(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProfileMashsWindow);
@@ -675,7 +637,6 @@
 
 void MainWindow::fromProfileStyles()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProfileStylesWindow);
     delete ProfileStylesWindow;
@@ -687,7 +648,6 @@
 
 void MainWindow::on_actionStyles_profiles_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProfileStylesWindow = new ProfileStyles(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProfileStylesWindow);
@@ -699,7 +659,6 @@
 
 void MainWindow::fromProfileFerments()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(ProfileFermentsWindow);
     delete ProfileFermentsWindow;
@@ -711,7 +670,6 @@
 
 void MainWindow::on_actionFerments_profiles_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     ProfileFermentsWindow = new ProfileFerments(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(ProfileFermentsWindow);
@@ -723,7 +681,6 @@
 
 void MainWindow::fromSetup()
 {
-    qDebug() << Q_FUNC_INFO;
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(SetupWindow);
     delete SetupWindow;
@@ -735,7 +692,6 @@
 
 void MainWindow::on_actionSetup_triggered()
 {
-    qDebug() << Q_FUNC_INFO;
     SetupWindow = new Setup(this);
     int index = ui->mainStack->count();
     ui->mainStack->addWidget(SetupWindow);

mercurial