D18556: Minor: improve QDebug output for Akonadi::Tag
David Faure
noreply at phabricator.kde.org
Sat Jan 26 18:42:26 GMT 2019
dfaure created this revision.
dfaure added reviewers: ervin, dvratil.
Herald added a project: KDE PIM.
dfaure requested review of this revision.
REVISION SUMMARY
Fix tag name/type/gid missing in notifications about tags.
The logic in AggregatedFetchScope was wrong, it led to fetchIdOnly()
being always true.
The mechanism in Aggregated* is all based on default_value || A || B || C
where A, B, C are the boolean request from every subscriber.
This works well for fetchRemoteId(), where the default_value is false.
For fetchIdOnly(), what we really want is "(A && B && C)" ("everyone
wants fetchIdOnly) which was implemented as "!(A || B || C)"
(the '!' in front is the == 0 instead of > 0 in Aggregated*FetchScope::fetchIdOnly()).
The flaw in this logic is the default value. With no subscribers,
we want fetchIdOnly() == false, while it currently returns true.
A default_value of true in the default_value || A || B || C logic,
can't work: the result was always true.
The solution I implemented is to compare the number of subscribers that
called setFetchIdOnly(true) with the total number of subscribers.
This directly implements A && B && C, with a default value of false.
TEST PLAN
1. extended tagstest. 2) this fixes the remaining failures in zanshin's akonadi tests.
REPOSITORY
R165 Akonadi
BRANCH
Applications/18.12
REVISION DETAIL
https://phabricator.kde.org/D18556
AFFECTED FILES
autotests/libs/tagtest.cpp
src/core/tag.cpp
src/server/aggregatedfetchscope.cpp
src/server/aggregatedfetchscope.h
src/server/notificationsubscriber.cpp
To: dfaure, ervin, dvratil
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190126/be8dd1d0/attachment.html>
More information about the kde-pim
mailing list