From dffc6e2a03ec3a6a2bb84a15ef3ef31e1230a218 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 11 Sep 2024 11:56:06 +0200 Subject: [PATCH] Minor: removed some debug output. --- library/src/configuration.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/src/configuration.cpp b/library/src/configuration.cpp index 6aa6918..51d8cae 100644 --- a/library/src/configuration.cpp +++ b/library/src/configuration.cpp @@ -1477,7 +1477,6 @@ bool Configuration::isDayIncludedAsSpecialDay(uint64_t businessHours, QDateTime if (isSpecialDay(dt)) { bool const &r = ((businessHours & BusinessHours::OFFICIAL_HOLIDAY) == BusinessHours::OFFICIAL_HOLIDAY); - qCritical() << "XXXXXXXXXXXXXXXXXX r" << r << businessHours; return r; } @@ -1584,6 +1583,8 @@ int getPaymentOptionIndex(Configuration const &cfg, QDateTime const &dt) { int const numOptions = cfg.getAllPaymentOptions().size(); + // qCritical() << __func__ << ":" << __LINE__ << "numOptions" << numOptions; + for (int opt=0; opt < numOptions; ++opt) { uint64_t const pop_business_hours = cfg.getPaymentOptions(opt).pop_business_hours; @@ -1594,6 +1595,8 @@ int getPaymentOptionIndex(Configuration const &cfg, QDateTime const &dt) { // QDateTime const dt = QDateTime::currentDateTime(); int const dayOfWeek = dt.date().dayOfWeek(); + // qCritical() << __func__ << ":" << __LINE__ << "dayOfWeek" << dayOfWeek; + if (isHoliday(cfg, dt)) { if (pop_business_hours & BusinessHours::OFFICIAL_HOLIDAY) { return opt; @@ -1632,6 +1635,7 @@ int getPaymentOptionIndex(Configuration const &cfg, QDateTime const &dt) { } break; case (int)Qt::Sunday: { if (pop_business_hours & BusinessHours::SUN) { + qCritical() << __func__ << ":" << __LINE__ << "opt" << opt; return opt; } } break;