From 8cfb848ee7cb0ceffe082a888c6216e490059a903b7aabce37d78c086aac5b45 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Thu, 31 Aug 2017 10:03:29 +0000 Subject: [PATCH] - Add upstream consider-collections-that-not-match-mimetype.patch: * Fixes Korganizer reminders not showing up OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/akonadi-server?expand=0&rev=123 --- akonadi-server.changes | 6 ++++ akonadi-server.spec | 7 ++-- ...-collections-that-not-match-mimetype.patch | 35 +++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 consider-collections-that-not-match-mimetype.patch diff --git a/akonadi-server.changes b/akonadi-server.changes index 457a886..783d55d 100644 --- a/akonadi-server.changes +++ b/akonadi-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 31 10:02:46 UTC 2017 - lbeltrame@kde.org + +- Add upstream consider-collections-that-not-match-mimetype.patch: + * Fixes Korganizer reminders not showing up + ------------------------------------------------------------------- Sat Aug 26 10:25:05 UTC 2017 - wbauer@tmo.at diff --git a/akonadi-server.spec b/akonadi-server.spec index fbc06c9..b49eca7 100644 --- a/akonadi-server.spec +++ b/akonadi-server.spec @@ -32,7 +32,9 @@ Url: http://akonadi-project.org Source: %{rname}-%{version}.tar.xz Source99: akonadi-server-rpmlintrc # PATCH-FIX-UPSTREAM -Patch: Fix-SQLite-DB-schema-upgrade.patch +Patch0: Fix-SQLite-DB-schema-upgrade.patch +# PATCH-FIX-UPSTREAM +Patch1: consider-collections-that-not-match-mimetype.patch %if 0%{?suse_version} > 1325 BuildRequires: libboost_headers-devel %else @@ -174,7 +176,8 @@ service. %prep %setup -q -n %{rname}-%{version} -%patch -p1 +%patch0 -p1 +%patch1 -p1 %build %cmake_kf5 -d build -- -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE -DQT_PLUGINS_DIR=%{_kf5_plugindir} diff --git a/consider-collections-that-not-match-mimetype.patch b/consider-collections-that-not-match-mimetype.patch new file mode 100644 index 0000000..cfca686 --- /dev/null +++ b/consider-collections-that-not-match-mimetype.patch @@ -0,0 +1,35 @@ +From d3c6ba904798768b0c83c2e182c27b1c624f78ca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= +Date: Tue, 15 Aug 2017 12:16:48 +0200 +Subject: ETM: consider collections that don't match mimetype filter populated + +After commit 0741892fe the ETM only runs ItemFetchJob for collections +that match the current mimetype filter. This caused collections that +don't match the filter (like top-level collections) to never be marked +as populated, breaking applications like korgac that check the +IsPopulatedRole of all collections in the tree. +--- + src/core/models/entitytreemodel_p.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/core/models/entitytreemodel_p.cpp b/src/core/models/entitytreemodel_p.cpp +index 94c080b..879ba57 100644 +--- a/src/core/models/entitytreemodel_p.cpp ++++ b/src/core/models/entitytreemodel_p.cpp +@@ -473,6 +473,13 @@ void EntityTreeModelPrivate::collectionsFetched(const Akonadi::Collection::List + const auto col = m_collections.value(collectionId); + if (m_mimeChecker.wantedMimeTypes().isEmpty() || m_mimeChecker.isWantedCollection(col)) { + fetchItems(m_collections.value(collectionId)); ++ } else { ++ // Consider collections that don't contain relevant mimetypes to be populated ++ m_populatedCols.insert(collectionId); ++ Q_EMIT q_ptr->collectionPopulated(collectionId); ++ const auto idx = indexForCollection(Collection(collectionId)); ++ Q_ASSERT(idx.isValid()); ++ dataChanged(idx, idx); + } + } + } +-- +cgit v0.11.2 +