# HG changeset patch # User Michiel Broek # Date 1667589262 -3600 # Node ID f189af715073c94a634c04d10143cc22258a1b1d # Parent bfac9a7008a3a58c9c414d476451ede335838d1c Removed several debug logmessages in tab 3 and database load. diff -r bfac9a7008a3 -r f189af715073 src/EditProductTab3.cpp --- a/src/EditProductTab3.cpp Fri Nov 04 15:56:14 2022 +0100 +++ b/src/EditProductTab3.cpp Fri Nov 04 20:14:22 2022 +0100 @@ -224,9 +224,6 @@ } mashtemp = mashtemp / mashtime; mvol = mashinfuse; - qDebug() << " mash time" << mashtime << "temp" << mashtemp << "infuse" << mashinfuse; - } else { - qDebug() << " no mash schedule"; } /* @@ -348,11 +345,11 @@ product->fermentables_ok = false; } } - qDebug() << " adjust to 100" << product->fermentables_use100; - qDebug() << " supplies" << product->fermentables_ok; - qDebug() << " colort" << colort << "colorh" << colorh << "colorn" << colorn; - qDebug() << " psugar" << psugar << "pcara" << pcara << "mvol" << mvol; - qDebug() << " sugarsf" << sugarsf << "sugarsm" << sugarsm; +// qDebug() << " adjust to 100" << product->fermentables_use100; +// qDebug() << " supplies" << product->fermentables_ok; +// qDebug() << " colort" << colort << "colorh" << colorh << "colorn" << colorn; +// qDebug() << " psugar" << psugar << "pcara" << pcara << "mvol" << mvol; +// qDebug() << " sugarsf" << sugarsf << "sugarsm" << sugarsm; double v = s / sugardensity + mvol; s = 1000 * s / (v * 10); //deg. Plato @@ -361,7 +358,7 @@ /* Estimate total recipe OG */ product->est_og = Utils::estimate_sg(sugarsf + addedS, product->batch_size); - qDebug() << " OG" << ui->est_ogEdit->value() << product->est_og; +// qDebug() << " OG" << ui->est_ogEdit->value() << product->est_og; if (product->stage > PROD_STAGE_BREW) { ui->est_ogLabel->setText(tr("Final OG:")); ui->est_ogEdit->setValue(product->og); @@ -380,7 +377,7 @@ /* Estimate SG in kettle before boil */ product->preboil_sg = Utils::estimate_sg(sugarsm, product->boil_size); ui->brew_preboilsgShow->setValue(product->preboil_sg); - qDebug() << " preboil SG" << product->preboil_sg; +// qDebug() << " preboil SG" << product->preboil_sg; /* * Recalculate volumes @@ -458,7 +455,7 @@ color = Utils::kw_to_ebc(product->color_method, cw); //qDebug() << " oud EBC" << color << "new EBC" << Utils::kw_to_newebc(product->color_method, cw) << "SRM" << Utils::kw_to_srm(product->color_method, cw); } - qDebug() << " color" << ui->est_colorEdit->value() << color << product->est_color; + //qDebug() << " color" << ui->est_colorEdit->value() << color << product->est_color; product->est_color = color; ui->est_color2Edit->setValue(color); ui->est_color2Edit->setStyleSheet(Utils::ebc_to_style(color)); @@ -481,10 +478,10 @@ ui->perc_sugarsShow->setValue(round(psugar)); ui->perc_caraShow->setValue(round(pcara)); if (product->mashs_kg > 0) { - qDebug() << " lintner" << lintner << " mashkg" << product->mashs_kg << "final" << round(lintner / product->mashs_kg); +// qDebug() << " lintner" << lintner << " mashkg" << product->mashs_kg << "final" << round(lintner / product->mashs_kg); ui->lintnerShow->setValue(round(lintner / product->mashs_kg)); } else { - qDebug() << " lintner N/A"; +// qDebug() << " lintner N/A"; ui->lintnerShow->setValue(0); } @@ -513,7 +510,7 @@ product->yeasts_ok = false; } } - qDebug() << " est SVG" << svg; +// qDebug() << " est SVG" << svg; } if (svg == 0) svg = 77.0; @@ -523,9 +520,9 @@ product->est_fg = Utils::estimate_fg(psugar, pcara, mashinfuse / product->mashs_kg, mashtime, mashtemp, svg, product->est_og); else product->est_fg = Utils::estimate_fg(psugar, pcara, 0, 0, 0, svg, product->est_og); - qDebug() << " est FG" << ui->est_fgEdit->value() << product->est_fg; +// qDebug() << " est FG" << ui->est_fgEdit->value() << product->est_fg; product->est_abv = Utils::abvol(product->est_og, product->est_fg); - qDebug() << " est ABV" << ui->est_abvEdit->value() << product->est_abv; +// qDebug() << " est ABV" << ui->est_abvEdit->value() << product->est_abv; if (product->stage > PROD_STAGE_TERTIARY) { ui->est_fgLabel->setText(tr("Final FG:")); @@ -705,7 +702,6 @@ QPushButton *pb = qobject_cast(QObject::sender()); int row = pb->objectName().toInt(); - qDebug() << "Delete fermentable row" << row << product->fermentables.size(); if (product->fermentables.size() < 1) return; @@ -855,7 +851,7 @@ } product->fermentables[product->fermentables_row].adjust_to_total_100 = true; } else { - qDebug() << "bug"; + qWarning() << "ferment_to100_changed(" << val << ") bug triggered"; return; } diff -r bfac9a7008a3 -r f189af715073 src/database/db_product.cpp --- a/src/database/db_product.cpp Fri Nov 04 15:56:14 2022 +0100 +++ b/src/database/db_product.cpp Fri Nov 04 20:14:22 2022 +0100 @@ -33,9 +33,9 @@ return false; } - QSqlRecord rec = query.record(); - for (int i = 0; i < rec.count(); i++) - qDebug() << i << rec.fieldName(i) << query.value(i); +// QSqlRecord rec = query.record(); +// for (int i = 0; i < rec.count(); i++) +// qDebug() << i << rec.fieldName(i) << query.value(i); prod->record = query.value("record").toInt(); prod->uuid = query.value("uuid").toString(); @@ -321,7 +321,7 @@ } prod->fermentables.append(f); } - qDebug() << "fermentables" << prod->fermentables.size() << percentcheck; +// qDebug() << "fermentables" << prod->fermentables.size() << percentcheck; if (percentcheck == 0 && prod->fermentables.size()) { /* Missing percentages, fix it. */ double total = 0; @@ -334,11 +334,10 @@ prod->fermentables[i].percentage = round((prod->fermentables.at(i).amount / total) * 10000.0) / 100.0; } qInfo() << " fixed missing percentages"; -// is_changed(); } } } else { - qDebug() << "empty fermentables"; + qInfo() << "empty fermentables"; } const auto& h_json = query.value("json_hops").toString(); @@ -389,10 +388,10 @@ } prod->hops.append(h); } - qDebug() << "hops" << prod->hops.size(); +// qDebug() << "hops" << prod->hops.size(); } } else { - qDebug() << "empty hops"; + qInfo() << "empty hops"; } const auto& json = query.value("json_miscs").toString(); @@ -424,10 +423,10 @@ } prod->miscs.append(m); } - qDebug() << "miscs" << prod->miscs.size(); +// qDebug() << "miscs" << prod->miscs.size(); } } else { - qDebug() << "empty miscs"; + qInfo() << "empty miscs"; } const auto& y_json = query.value("json_yeasts").toString(); @@ -507,10 +506,10 @@ } prod->yeasts.append(y); } - qDebug() << "yeasts" << prod->yeasts.size(); +// qDebug() << "yeasts" << prod->yeasts.size(); } } else { - qDebug() << "empty yeasts"; + qInfo() << "empty yeasts"; } const auto& ma_json = query.value("json_mashs").toString().trimmed(); @@ -539,9 +538,9 @@ } } } else { - qDebug() << "empty mashs"; + qInfo() << "empty mashs"; } - qDebug() << "mashs" << prod->mashs.size(); +// qDebug() << "mashs" << prod->mashs.size(); return true; } diff -r bfac9a7008a3 -r f189af715073 translations/bmsapp_en.ts --- a/translations/bmsapp_en.ts Fri Nov 04 15:56:14 2022 +0100 +++ b/translations/bmsapp_en.ts Fri Nov 04 20:14:22 2022 +0100 @@ -2913,7 +2913,7 @@ - + Mash @@ -4116,32 +4116,32 @@ - + Final OG: - + Final EBC: - + Final FG: - + Final ABV: - + Delete fermentable - + @@ -4151,46 +4151,46 @@ - + Current ingredient: - + Supplier: - + Amount in kg: - + Percentage in batch: - + Auto fill to 100%: - + Use at: - + Select ingredient: - + @@ -4198,23 +4198,23 @@ - + Max in batch: - - - Boil - - - - Fermentation + + Boil + Fermentation + + + + Lagering @@ -11649,8 +11649,8 @@ - - + + Database error @@ -11663,8 +11663,8 @@ - - + + MySQL error: %1 %2 %3 diff -r bfac9a7008a3 -r f189af715073 translations/bmsapp_nl.ts --- a/translations/bmsapp_nl.ts Fri Nov 04 15:56:14 2022 +0100 +++ b/translations/bmsapp_nl.ts Fri Nov 04 20:14:22 2022 +0100 @@ -2994,7 +2994,7 @@ - + Mash Maischen @@ -4478,22 +4478,22 @@ Vergistbaar ingredient is al verwerkt - + Final OG: Finale OG: - + Final EBC: Finale EBC: - + Final FG: Finale FG: - + Final ABV: Finale ABV: @@ -4510,12 +4510,12 @@ Finale FG: - + Delete fermentable Verwijder vergistbaar ingredient - + @@ -4525,46 +4525,46 @@ Verwijder %1 - + Current ingredient: Huidig ingredient: - + Supplier: Leverancier: - + Amount in kg: Gewicht in kg: - + Percentage in batch: Percentage in stort: - + Auto fill to 100%: Aanvullen tot 100%: - + Use at: Toevoegen bij: - + Select ingredient: Kies ingredient: - + @@ -4572,23 +4572,23 @@ In voorraad: - + Max in batch: Max. in stort: - + Boil Koken - + Fermentation Hoofdvergisting - + Lagering Nagisting/lagering @@ -13082,8 +13082,8 @@ - - + + Database error Database fout @@ -13096,8 +13096,8 @@ - - + + MySQL error: %1 %2 %3