summaryrefslogtreecommitdiffstats
path: root/common/typeindex.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-26 21:38:45 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-26 21:38:45 +0100
commit5eb17e7eab0cbbed0f7b7df84d745f228446703d (patch)
tree4dbf28540dedda264b4f93d47d650f5336f30d81 /common/typeindex.cpp
parent50ac3277be22bb408e84baab5b60e0eb0c6db7f3 (diff)
downloadsink-5eb17e7eab0cbbed0f7b7df84d745f228446703d.tar.gz
sink-5eb17e7eab0cbbed0f7b7df84d745f228446703d.zip
Don't try to index stuff that isn't available
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r--common/typeindex.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp
index 1e41267..e9a0f79 100644
--- a/common/typeindex.cpp
+++ b/common/typeindex.cpp
@@ -62,7 +62,9 @@ void TypeIndex::addProperty<QDateTime>(const QByteArray &property)
62{ 62{
63 auto indexer = [this, property](const QByteArray &identifier, const QVariant &value, Akonadi2::Storage::Transaction &transaction) { 63 auto indexer = [this, property](const QByteArray &identifier, const QVariant &value, Akonadi2::Storage::Transaction &transaction) {
64 // Trace() << "Indexing " << mType + ".index." + property << value.toByteArray(); 64 // Trace() << "Indexing " << mType + ".index." + property << value.toByteArray();
65 Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier); 65 if (value.isValid()) {
66 Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier);
67 }
66 }; 68 };
67 mIndexer.insert(property, indexer); 69 mIndexer.insert(property, indexer);
68 mProperties << property; 70 mProperties << property;