diff options
Diffstat (limited to 'common/propertymapper.cpp')
-rw-r--r-- | common/propertymapper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/propertymapper.cpp b/common/propertymapper.cpp index 17a73cb..5348b11 100644 --- a/common/propertymapper.cpp +++ b/common/propertymapper.cpp | |||
@@ -68,6 +68,16 @@ QVariant propertyToVariant<QByteArray>(const flatbuffers::String *property) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | template <> | 70 | template <> |
71 | QVariant propertyToVariant<QByteArray>(const flatbuffers::Vector<uint8_t> *property) | ||
72 | { | ||
73 | if (property) { | ||
74 | //We have to copy the memory, otherwise it would become eventually invalid | ||
75 | return QByteArray(reinterpret_cast<const char *>(property->Data()), property->Length()); | ||
76 | } | ||
77 | return QVariant(); | ||
78 | } | ||
79 | |||
80 | template <> | ||
71 | QVariant propertyToVariant<bool>(uint8_t property) | 81 | QVariant propertyToVariant<bool>(uint8_t property) |
72 | { | 82 | { |
73 | return static_cast<bool>(property); | 83 | return static_cast<bool>(property); |