diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-01-11 20:21:11 -0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-01-23 19:06:53 +0200 |
commit | 1c759cfa09480058243c1896e1340ee06b3f2e14 (patch) | |
tree | 5b7070203cffe4cc1145d6476efad5015b190667 /platform | |
parent | 1065917e59c0238b63dccf8cba46415fffe8da57 (diff) | |
download | qtlocation-mapboxgl-1c759cfa09480058243c1896e1340ee06b3f2e14.tar.gz |
[Qt] Explicitly map the `bool` binder to `int`
On Qt4 and Qt5 the QVariant conversion from bool behaves differently.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/qt/src/sqlite3.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/qt/src/sqlite3.cpp b/platform/qt/src/sqlite3.cpp index b339cb14fa..00ad178fdf 100644 --- a/platform/qt/src/sqlite3.cpp +++ b/platform/qt/src/sqlite3.cpp @@ -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) { @@ -211,6 +210,11 @@ void Statement::bind(int offset, std::nullptr_t) { } 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)); } |