diff options
Diffstat (limited to 'common/propertymapper.cpp')
-rw-r--r-- | common/propertymapper.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/common/propertymapper.cpp b/common/propertymapper.cpp index dbf93a3..7c313cc 100644 --- a/common/propertymapper.cpp +++ b/common/propertymapper.cpp | |||
@@ -35,17 +35,6 @@ flatbuffers::uoffset_t variantToProperty<QString>(const QVariant &property, flat | |||
35 | } | 35 | } |
36 | 36 | ||
37 | template <> | 37 | template <> |
38 | flatbuffers::uoffset_t variantToProperty<Sink::ApplicationDomain::BLOB>(const QVariant &property, flatbuffers::FlatBufferBuilder &fbb) | ||
39 | { | ||
40 | if (property.isValid()) { | ||
41 | const auto blob = property.value<Sink::ApplicationDomain::BLOB>(); | ||
42 | auto s = blob.value + (blob.isExternal ? ":ext" : ":int"); | ||
43 | return fbb.CreateString(s.toStdString()).o; | ||
44 | } | ||
45 | return 0; | ||
46 | } | ||
47 | |||
48 | template <> | ||
49 | flatbuffers::uoffset_t variantToProperty<Sink::ApplicationDomain::Reference>(const QVariant &property, flatbuffers::FlatBufferBuilder &fbb) | 38 | flatbuffers::uoffset_t variantToProperty<Sink::ApplicationDomain::Reference>(const QVariant &property, flatbuffers::FlatBufferBuilder &fbb) |
50 | { | 39 | { |
51 | if (property.isValid()) { | 40 | if (property.isValid()) { |
@@ -153,22 +142,6 @@ QVariant propertyToVariant<QString>(const flatbuffers::String *property) | |||
153 | } | 142 | } |
154 | 143 | ||
155 | template <> | 144 | template <> |
156 | QVariant propertyToVariant<Sink::ApplicationDomain::BLOB>(const flatbuffers::String *property) | ||
157 | { | ||
158 | if (property) { | ||
159 | // We have to copy the memory, otherwise it would become eventually invalid | ||
160 | auto s = QString::fromStdString(property->str()); | ||
161 | auto ext = s.endsWith(":ext"); | ||
162 | s.chop(4); | ||
163 | |||
164 | auto blob = Sink::ApplicationDomain::BLOB{s}; | ||
165 | blob.isExternal = ext; | ||
166 | return QVariant::fromValue(blob); | ||
167 | } | ||
168 | return QVariant(); | ||
169 | } | ||
170 | |||
171 | template <> | ||
172 | QVariant propertyToVariant<Sink::ApplicationDomain::Reference>(const flatbuffers::String *property) | 145 | QVariant propertyToVariant<Sink::ApplicationDomain::Reference>(const flatbuffers::String *property) |
173 | { | 146 | { |
174 | if (property) { | 147 | if (property) { |