summaryrefslogtreecommitdiffstats
path: root/common/propertymapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/propertymapper.cpp')
-rw-r--r--common/propertymapper.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/common/propertymapper.cpp b/common/propertymapper.cpp
index 4cfe154..4d45644 100644
--- a/common/propertymapper.cpp
+++ b/common/propertymapper.cpp
@@ -36,7 +36,9 @@ template <>
36flatbuffers::uoffset_t variantToProperty<Sink::ApplicationDomain::BLOB>(const QVariant &property, flatbuffers::FlatBufferBuilder &fbb) 36flatbuffers::uoffset_t variantToProperty<Sink::ApplicationDomain::BLOB>(const QVariant &property, flatbuffers::FlatBufferBuilder &fbb)
37{ 37{
38 if (property.isValid()) { 38 if (property.isValid()) {
39 return fbb.CreateString(property.value<Sink::ApplicationDomain::BLOB>().value.toStdString()).o; 39 const auto blob = property.value<Sink::ApplicationDomain::BLOB>();
40 auto s = blob.value + (blob.isExternal ? ":ext" : ":int");
41 return fbb.CreateString(s.toStdString()).o;
40 } 42 }
41 return 0; 43 return 0;
42} 44}
@@ -133,7 +135,13 @@ QVariant propertyToVariant<Sink::ApplicationDomain::BLOB>(const flatbuffers::Str
133{ 135{
134 if (property) { 136 if (property) {
135 // We have to copy the memory, otherwise it would become eventually invalid 137 // We have to copy the memory, otherwise it would become eventually invalid
136 return QVariant::fromValue(Sink::ApplicationDomain::BLOB{QString::fromStdString(property->c_str())}); 138 auto s = QString::fromStdString(property->c_str());
139 auto ext = s.endsWith(":ext");
140 s.chop(4);
141
142 auto blob = Sink::ApplicationDomain::BLOB{s};
143 blob.isExternal = ext;
144 return QVariant::fromValue(blob);
137 } 145 }
138 return QVariant(); 146 return QVariant();
139} 147}