[Qt] Explicitly map the bool binder to int
On Qt4 and Qt5 the QVariant conversion from bool behaves differently.
This commit is contained in:
committed by
Bruno de Oliveira Abinader
parent
1065917e59
commit
1c759cfa09
@@ -192,7 +192,6 @@ template void Statement::bind(int, int8_t);
|
||||
template void Statement::bind(int, int32_t);
|
||||
template void Statement::bind(int, int64_t);
|
||||
template void Statement::bind(int, uint8_t);
|
||||
template void Statement::bind(int, bool);
|
||||
|
||||
template <typename T>
|
||||
void Statement::bind(int offset, T value) {
|
||||
@@ -210,6 +209,11 @@ void Statement::bind(int offset, std::nullptr_t) {
|
||||
checkQueryError(impl->query);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Statement::bind(int offset, bool value) {
|
||||
bind(offset, static_cast<int>(value));
|
||||
}
|
||||
|
||||
template <>
|
||||
void Statement::bind(int offset, mbgl::Timestamp value) {
|
||||
bind(offset, std::chrono::system_clock::to_time_t(value));
|
||||
|
||||
Reference in New Issue
Block a user