Allow invalid ctime/mtime

Possible fix for #815 and #947
This commit is contained in:
Jonas Kvinge
2022-07-10 03:24:02 +02:00
parent 05232065f8
commit 71263863ad
5 changed files with 27 additions and 16 deletions

View File

@@ -62,6 +62,12 @@ void SqlQuery::BindLongLongValue(const QString &placeholder, const qint64 value)
}
void SqlQuery::BindLongLongValueOrZero(const QString &placeholder, const qint64 value) {
BindValue(placeholder, value <= 0 ? 0 : value);
}
void SqlQuery::BindFloatValue(const QString &placeholder, const float value) {
BindValue(placeholder, value <= 0 ? -1 : value);
@@ -80,12 +86,6 @@ void SqlQuery::BindNotNullIntValue(const QString &placeholder, const int value)
}
void SqlQuery::BindNotNullLongLongValue(const QString &placeholder, const qint64 value) {
BindValue(placeholder, value == -1 ? QVariant() : value);
}
bool SqlQuery::Exec() {
bool success = exec();