summaryrefslogtreecommitdiffstats
path: root/common/typeindex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r--common/typeindex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp
index b1bcf6a..37c0517 100644
--- a/common/typeindex.cpp
+++ b/common/typeindex.cpp
@@ -36,7 +36,7 @@ void TypeIndex::addProperty<QByteArray>(const QByteArray &property)
36{ 36{
37 auto indexer = [this, property](const QByteArray &identifier, const QVariant &value, Sink::Storage::Transaction &transaction) { 37 auto indexer = [this, property](const QByteArray &identifier, const QVariant &value, Sink::Storage::Transaction &transaction) {
38 // Trace() << "Indexing " << mType + ".index." + property << value.toByteArray(); 38 // Trace() << "Indexing " << mType + ".index." + property << value.toByteArray();
39 if (value.isValid()) { 39 if (value.isValid() && !value.toByteArray().isEmpty()) {
40 Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier); 40 Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier);
41 } else { 41 } else {
42 Index(mType + ".index." + property, transaction).add("toplevel", identifier); 42 Index(mType + ".index." + property, transaction).add("toplevel", identifier);
@@ -51,7 +51,7 @@ void TypeIndex::addProperty<QString>(const QByteArray &property)
51{ 51{
52 auto indexer = [this, property](const QByteArray &identifier, const QVariant &value, Sink::Storage::Transaction &transaction) { 52 auto indexer = [this, property](const QByteArray &identifier, const QVariant &value, Sink::Storage::Transaction &transaction) {
53 // Trace() << "Indexing " << mType + ".index." + property << value.toByteArray(); 53 // Trace() << "Indexing " << mType + ".index." + property << value.toByteArray();
54 if (value.isValid()) { 54 if (value.isValid() && !value.toByteArray().isEmpty()) {
55 Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier); 55 Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier);
56 } else { 56 } else {
57 Index(mType + ".index." + property, transaction).add("toplevel", identifier); 57 Index(mType + ".index." + property, transaction).add("toplevel", identifier);