diff options
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r-- | common/typeindex.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp index fca083c..8d1b7f3 100644 --- a/common/typeindex.cpp +++ b/common/typeindex.cpp | |||
@@ -124,7 +124,10 @@ void TypeIndex::remove(const QByteArray &identifier, const Sink::ApplicationDoma | |||
124 | for (const auto &property : mProperties) { | 124 | for (const auto &property : mProperties) { |
125 | const auto value = bufferAdaptor.getProperty(property); | 125 | const auto value = bufferAdaptor.getProperty(property); |
126 | // FIXME don't always convert to byte array | 126 | // FIXME don't always convert to byte array |
127 | Index(indexName(property), transaction).remove(getByteArray(value), identifier); | 127 | const auto data = getByteArray(value); |
128 | if (data.isEmpty()) { | ||
129 | Index(indexName(property), transaction).remove(data, identifier); | ||
130 | } | ||
128 | } | 131 | } |
129 | for (auto it = mSortedProperties.constBegin(); it != mSortedProperties.constEnd(); it++) { | 132 | for (auto it = mSortedProperties.constBegin(); it != mSortedProperties.constEnd(); it++) { |
130 | const auto propertyValue = bufferAdaptor.getProperty(it.key()); | 133 | const auto propertyValue = bufferAdaptor.getProperty(it.key()); |