diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-15 11:52:29 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-15 11:52:29 +0200 |
commit | d2d2f9e8f561b121a0ce0c1e626d503bf5de2aa2 (patch) | |
tree | 9d66e7c66091203906dc3ed58abd11eb4be1b645 | |
parent | e836d15e0b4e1ad813505d8492696e061322f156 (diff) | |
download | sink-d2d2f9e8f561b121a0ce0c1e626d503bf5de2aa2.tar.gz sink-d2d2f9e8f561b121a0ce0c1e626d503bf5de2aa2.zip |
Build on windows
-rw-r--r-- | common/propertymapper.cpp | 14 | ||||
-rw-r--r-- | common/propertymapper.h | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/common/propertymapper.cpp b/common/propertymapper.cpp index f9f9c9b..75d0536 100644 --- a/common/propertymapper.cpp +++ b/common/propertymapper.cpp | |||
@@ -258,7 +258,7 @@ QVariant propertyToVariant<QList<Sink::ApplicationDomain::Contact::Email>>(const | |||
258 | template <> | 258 | template <> |
259 | QVariant propertyToVariant<bool>(uint8_t property) | 259 | QVariant propertyToVariant<bool>(uint8_t property) |
260 | { | 260 | { |
261 | return static_cast<bool>(property); | 261 | return bool(property); |
262 | } | 262 | } |
263 | 263 | ||
264 | template <> | 264 | template <> |
@@ -268,6 +268,18 @@ QVariant propertyToVariant<int>(uint8_t property) | |||
268 | } | 268 | } |
269 | 269 | ||
270 | template <> | 270 | template <> |
271 | QVariant propertyToVariant<int>(int property) | ||
272 | { | ||
273 | return property; | ||
274 | } | ||
275 | |||
276 | template <> | ||
277 | QVariant propertyToVariant<bool>(int property) | ||
278 | { | ||
279 | return bool(property); | ||
280 | } | ||
281 | |||
282 | template <> | ||
271 | QVariant propertyToVariant<QDateTime>(const flatbuffers::String *property) | 283 | QVariant propertyToVariant<QDateTime>(const flatbuffers::String *property) |
272 | { | 284 | { |
273 | if (property) { | 285 | if (property) { |
diff --git a/common/propertymapper.h b/common/propertymapper.h index 49224fa..9177e3f 100644 --- a/common/propertymapper.h +++ b/common/propertymapper.h | |||
@@ -48,6 +48,8 @@ QVariant SINK_EXPORT propertyToVariant(const flatbuffers::String *); | |||
48 | template <typename T> | 48 | template <typename T> |
49 | QVariant SINK_EXPORT propertyToVariant(uint8_t); | 49 | QVariant SINK_EXPORT propertyToVariant(uint8_t); |
50 | template <typename T> | 50 | template <typename T> |
51 | QVariant SINK_EXPORT propertyToVariant(int); | ||
52 | template <typename T> | ||
51 | QVariant SINK_EXPORT propertyToVariant(const flatbuffers::Vector<uint8_t> *); | 53 | QVariant SINK_EXPORT propertyToVariant(const flatbuffers::Vector<uint8_t> *); |
52 | template <typename T> | 54 | template <typename T> |
53 | QVariant SINK_EXPORT propertyToVariant(const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *); | 55 | QVariant SINK_EXPORT propertyToVariant(const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *); |