summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-04-04 07:06:07 +0200
committerLaurent Montel <[email protected]>2018-04-04 07:06:07 +0200
commit523161ef94b717ad025246f3e4c64f20684a2c73 (patch)
tree95e2179066cf3ba1cf010d9c055938b68c463185
parent74eb2c8dd295963475ab7790e17c6493b72d8250 (diff)
Allow to disable search akonadiv18.03.90
-rw-r--r--src/pimcommonakonadi/acl/aclmodifyjob.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pimcommonakonadi/acl/aclmodifyjob.cpp b/src/pimcommonakonadi/acl/aclmodifyjob.cpp
index 9054049..411cf5d 100644
--- a/src/pimcommonakonadi/acl/aclmodifyjob.cpp
+++ b/src/pimcommonakonadi/acl/aclmodifyjob.cpp
@@ -38,6 +38,7 @@
#include <KContacts/Addressee>
using namespace PimCommon;
+//#define SEARCHCONTACT_AKONADI 1
AclModifyJob::AclModifyJob(QObject *parent)
: QObject(parent)
@@ -95,8 +96,21 @@ void AclModifyJob::start()
deleteLater();
return;
}
+#ifdef SEARCHCONTACT_AKONADI
mIt = mCurrentRight.cbegin();
searchContact();
+#else
+ const QMap<QByteArray, KIMAP::Acl::Rights> rights = mCurrentRight;
+ QMap<QByteArray, KIMAP::Acl::Rights>::const_iterator it = rights.cbegin();
+ const QMap<QByteArray, KIMAP::Acl::Rights>::const_iterator itEnd = rights.cend();
+ for (; it != itEnd; ++it) {
+ const QByteArray rawEmail = KEmailAddress::extractEmailAddress(it.key());
+ if (!rawEmail.isEmpty()) {
+ mNewRight[rawEmail] = it.value();
+ }
+ }
+ slotModifyAcl();
+#endif
}
void AclModifyJob::slotModifyAcl()