Skip to content

Commit 5bdcfd5

Browse files
committed
FwdSqlQuery: Add FwdSqlQuery::bindValue(const QString&, int) overload to resolve conflicts
This prevents pQuery->bindValue(":position", 1) from causing a compile-time error, as the compiler cannot decide between QVariant(int) and DbId(int) (even though the later is deleted).
1 parent 17be527 commit 5bdcfd5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/util/db/fwdsqlquery.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ class FwdSqlQuery final : protected QSqlQuery {
7272
bindValue(placeholder, value.toVariant());
7373
}
7474

75+
// Overloaded function for type int to resolve overload conflict
76+
void bindValue(const QString& placeholder, const int value) {
77+
bindValue(placeholder, QVariant(value));
78+
}
79+
7580
QString executedQuery() const {
7681
return QSqlQuery::executedQuery();
7782
}

0 commit comments

Comments
 (0)