Fix: getPaymentOptionIndex() -> return 0 instead of -1

Removed exit(0)-call which was used for testing.
This commit is contained in:
Gerhard Hoffmann 2024-05-06 11:36:12 +02:00
parent 33f43fb83d
commit b71c979a91

View File

@ -478,19 +478,12 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
} }
} }
qCritical() << "DAY" << dt.day;
qCritical() << "DIR" << dt.direction;
qCritical() << "week" << dt.week;
qCritical() << "DIR" << dt.time;
if (strcmp(inner_obj_name, "pop_min_date_time") == 0) { if (strcmp(inner_obj_name, "pop_min_date_time") == 0) {
this->currentPaymentOptions.last().pop_min_date_time = dt; this->currentPaymentOptions.last().pop_min_date_time = dt;
} else } else
if (strcmp(inner_obj_name, "pop_max_date_time") == 0) { if (strcmp(inner_obj_name, "pop_max_date_time") == 0) {
this->currentPaymentOptions.last().pop_max_date_time = dt; this->currentPaymentOptions.last().pop_max_date_time = dt;
exit(0);
} }
} }
} }
} }
@ -684,7 +677,8 @@ int Configuration::getPaymentOptionIndex(QDateTime const &dt) const {
} }
} }
return -1; qCritical() << DBG_HEADER << "ERROR: DEFAULT VALUE OF '0' RETURNED AS STATIC VALUE";
return 0;
} }
ATBSpecialDays Configuration::specialDay(QDateTime const &dt) const { ATBSpecialDays Configuration::specialDay(QDateTime const &dt) const {