Hello community, here is the log from the commit of package kdepim4 for openSUSE:Factory checked in at 2013-04-18 10:22:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepim4 (Old) and /work/SRC/openSUSE:Factory/.kdepim4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdepim4", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/kdepim4/kdepim4.changes 2013-03-15 10:39:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kdepim4.new/kdepim4.changes 2013-04-18 10:22:43.000000000 +0200 @@ -1,0 +2,16 @@ +Mon Apr 8 16:06:51 UTC 2013 - [email protected] + +- Add three patches from upstream, those fix mail completion that + was lost with 4.10.2 (kde#259949): + 0001-Add-missing-mimetype-for-contact-groups-in-the-direc.patches, + 0002-Use-the-index-we-just-calculated-a-bit-faster.patch and + 0003-Fix-kmail-autocompletion-from-akonadi.patch + +------------------------------------------------------------------- +Mon Apr 1 19:17:14 UTC 2013 - [email protected] + +- Update to 4.10.2 + * Contains bug fixes +- Drop akregator-bug305494.diff, it is included upstream + +------------------------------------------------------------------- Old: ---- akregator-bug305494.diff kdepim-4.10.1.tar.xz New: ---- 0001-Add-missing-mimetype-for-contact-groups-in-the-direc.patch 0002-Use-the-index-we-just-calculated-a-bit-faster.patch 0003-Fix-kmail-autocompletion-from-akonadi.patch kdepim-4.10.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepim4.spec ++++++ --- /var/tmp/diff_new_pack.gKquih/_old 2013-04-18 10:22:47.000000000 +0200 +++ /var/tmp/diff_new_pack.gKquih/_new 2013-04-18 10:22:47.000000000 +0200 @@ -17,7 +17,7 @@ Name: kdepim4 -Version: 4.10.1 +Version: 4.10.2 Release: 0 Summary: Base package of kdepim License: GPL-2.0+ and LGPL-2.1+ @@ -28,7 +28,12 @@ #TODO desktop-files.diff need an update for upcoming 4.10.2 due to fixed kontact-import-wizard icon missing Patch2: desktop-files.diff Patch3: knode-kontact-default.diff -Patch4: akregator-bug305494.diff +# PATCH-FIX-UPSTREAM 0001-Add-missing-mimetype-for-contact-groups-in-the-direc.patch +Patch4: 0001-Add-missing-mimetype-for-contact-groups-in-the-direc.patch +# PATCH-FIX-UPSTREAM 0002-Use-the-index-we-just-calculated-a-bit-faster.patch +Patch5: 0002-Use-the-index-we-just-calculated-a-bit-faster.patch +# PATCH-FIX-UPSTREAM 0003-Fix-kmail-autocompletion-from-akonadi.patch +Patch6: 0003-Fix-kmail-autocompletion-from-akonadi.patch BuildRequires: fdupes BuildRequires: gpgme-devel BuildRequires: grantlee-devel @@ -67,6 +72,8 @@ %patch2 %patch3 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %ifarch ppc64 ++++++ 0001-Add-missing-mimetype-for-contact-groups-in-the-direc.patch ++++++ >From a24942ac27c27a4a540148292a9e6fbee1c8fff7 Mon Sep 17 00:00:00 2001 From: David Faure <[email protected]> Date: Mon, 8 Apr 2013 15:34:13 +0200 Subject: [PATCH 2/4] Add missing mimetype for contact groups, in the direct-akonadi-search. --- libkdepim/addresseelineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp index 6f4d312..3c39c7d 100644 --- a/libkdepim/addresseelineedit.cpp +++ b/libkdepim/addresseelineedit.cpp @@ -715,7 +715,7 @@ void AddresseeLineEdit::Private::akonadiListAllContacts() kDebug() << "listing all contacts in Akonadi"; Akonadi::RecursiveItemFetchJob *job = new Akonadi::RecursiveItemFetchJob( Akonadi::Collection::root(), - QStringList() << KABC::Addressee::mimeType(), + QStringList() << KABC::Addressee::mimeType() << KABC::ContactGroup::mimeType(), s_static->akonadiSession ); job->fetchScope().fetchFullPayload(); job->fetchScope().setAncestorRetrieval( Akonadi::ItemFetchScope::Parent ); -- 1.8.2 ++++++ 0002-Use-the-index-we-just-calculated-a-bit-faster.patch ++++++ >From 5b6bf4b21c027905b3b4d05008f5100d32d37d5e Mon Sep 17 00:00:00 2001 From: David Faure <[email protected]> Date: Mon, 8 Apr 2013 15:34:52 +0200 Subject: [PATCH 3/4] Use the index we just calculated, a bit faster. --- libkdepim/addresseelineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp index 3c39c7d..b7b11be 100644 --- a/libkdepim/addresseelineedit.cpp +++ b/libkdepim/addresseelineedit.cpp @@ -1010,7 +1010,7 @@ void AddresseeLineEdit::Private::slotAkonadiSearchResult( KJob *job ) { const int index = s_static->akonadiJobsInFlight.indexOf( qobject_cast<Akonadi::Job*>( job ) ); if( index != -1 ) - s_static->akonadiJobsInFlight.remove( s_static->akonadiJobsInFlight.indexOf( qobject_cast<Akonadi::Job*>( job ) ) ); + s_static->akonadiJobsInFlight.remove( index ); const Akonadi::ContactSearchJob *contactJob = qobject_cast<Akonadi::ContactSearchJob*>( job ); const Akonadi::ContactGroupSearchJob *groupJob = -- 1.8.2 ++++++ 0003-Fix-kmail-autocompletion-from-akonadi.patch ++++++ >From 6a06c57f52a00018d607085efa7570deb91dc707 Mon Sep 17 00:00:00 2001 From: David Faure <[email protected]> Date: Mon, 8 Apr 2013 17:41:39 +0200 Subject: [PATCH 4/4] Fix kmail autocompletion from akonadi. My commit 02f5f0214e made autocompletion from nepomuk work better, but broke completion from akonadi. I kept the "keywords" based code, but now it's only used for the special case of nickname-based search (because the nickname shouldn't appear in the completion item). For everything else it really doesn't make sense to have a search engine (akonadi/nepomuk) on top of a search engine (the one inside KCompletion). This time I verified that: * nepomuk search still works * contacts from akonadi work again * contact groups from akonadi work (after previous commit) * nickname-search in akonadi still doesn't work, but it didn't before. More work needed for that one. This is the only reason to keep KMailCompletion around btw, everything else would work without it. BUG: 259949 FIXED-IN: 4.10.3 --- libkdepim/addresseelineedit.cpp | 66 +++++++++++------------------------------ libkdepim/addresseelineedit.h | 5 ---- libkdepim/kmailcompletion.h | 4 ++- 3 files changed, 21 insertions(+), 54 deletions(-) diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp index b7b11be..ec4caf9 100644 --- a/libkdepim/addresseelineedit.cpp +++ b/libkdepim/addresseelineedit.cpp @@ -30,6 +30,8 @@ #include "completionordereditor.h" #endif +#include "kmailcompletion.h" + #include <Akonadi/Contact/ContactSearchJob> #include <Akonadi/Contact/ContactGroupSearchJob> #include <Akonadi/CollectionFetchJob> @@ -77,6 +79,10 @@ using namespace KPIM; +namespace KPIM { + typedef QMap< QString, QPair<int,int> > CompletionItemsMap; +} + class AddresseeLineEditStatic { public: @@ -496,11 +502,9 @@ void AddresseeLineEdit::Private::addCompletionItem( const QString &string, int w s_static->completionItemMap.insert( string, qMakePair( weight, completionItemSource ) ); } - if ( keyWords == 0 ) { - s_static->completion->addItem( string, weight ); - } else { - s_static->completion->addItemWithKeys( string, weight, keyWords ); - } + s_static->completion->addItem(string, weight); + if (keyWords && !keyWords->isEmpty()) + s_static->completion->addItemWithKeys(string, weight, keyWords); // see kmailcompletion.cpp } const QStringList KPIM::AddresseeLineEdit::Private::adjustedCompletionItems( bool fullSearch ) @@ -1348,17 +1352,13 @@ void AddresseeLineEdit::addItem( const Akonadi::Item &item, int weight, int sour void AddresseeLineEdit::addContactGroup( const KABC::ContactGroup &group, int weight, int source ) { d->addCompletionItem( group.name(), weight, source ); - QStringList keyWords; - keyWords.append( group.name() ); - d->addCompletionItem( group.name(), weight, source, &keyWords ); } void AddresseeLineEdit::addContact( const KABC::Addressee &addr, int weight, int source ) { const QStringList emails = addr.emails(); QStringList::ConstIterator it; - const int prefEmailWeight = 1; //increment weight by prefEmailWeight - int isPrefEmail = prefEmailWeight; //first in list is preferredEmail + int isPrefEmail = 1; //first in list is preferredEmail QStringList::ConstIterator end( emails.constEnd() ); for ( it = emails.constBegin(); it != end; ++it ) { //TODO: highlight preferredEmail @@ -1368,40 +1368,6 @@ void AddresseeLineEdit::addContact( const KABC::Addressee &addr, int weight, int const QString nickName = addr.nickName(); QString fullEmail = addr.fullEmail( email ); - // Prepare keywords (for CompletionShell, CompletionPopup) - QStringList keyWords; - const QString realName = addr.realName(); - - if ( !givenName.isEmpty() && !familyName.isEmpty() ) { - keyWords.append( givenName + QLatin1Char( ' ' ) + familyName ); - keyWords.append( familyName + QLatin1Char( ' ' ) + givenName ); - keyWords.append( familyName + QLatin1String( ", " ) + givenName ); - } else if ( !givenName.isEmpty() ) { - keyWords.append( givenName ); - } else if ( !familyName.isEmpty() ) { - keyWords.append( familyName ); - } - - if ( !nickName.isEmpty() ) { - keyWords.append( nickName ); - } - - if ( !realName.isEmpty() ) { - keyWords.append( realName ); - } - - keyWords.append( email ); - - /* KMailCompletion does not have knowledge about identities, it stores emails and - * keywords for each email. KMailCompletion::allMatches does a lookup on the - * keywords and returns an ordered list of emails. In order to get the preferred - * email before others for each identity we use this little trick. - * We remove the <blank> in adjustedCompletionItems. - */ - if ( isPrefEmail == prefEmailWeight ) { - fullEmail.replace( QLatin1String( " <" ), QLatin1String( " <" ) ); - } - // Prepare "givenName" + ' ' + "familyName" QString fullName = givenName; if (!familyName.isEmpty()) { @@ -1413,12 +1379,16 @@ void AddresseeLineEdit::addContact( const KABC::Addressee &addr, int weight, int // Finally, we can add the completion items if (!fullName.isEmpty()) { const QString address = KPIMUtils::normalizedAddress(fullName, email, QString()); - d->addCompletionItem(address, weight + isPrefEmail, source, &keyWords); + if (fullEmail != address) { + // This happens when fullEmail contains a middle name, while our own fullName+email only has "first last". + // Let's offer both, the fullEmail with 3 parts, looks a tad formal. + d->addCompletionItem(address, weight + isPrefEmail, source); + } } - if ( !nickName.isEmpty() ) { - const QString address = KPIMUtils::normalizedAddress(nickName, email, QString()); - d->addCompletionItem(address, weight + isPrefEmail, source, &keyWords); + QStringList keyWords; + if (!nickName.isEmpty()) { + keyWords.append(nickName); } d->addCompletionItem( fullEmail, weight + isPrefEmail, source, &keyWords ); diff --git a/libkdepim/addresseelineedit.h b/libkdepim/addresseelineedit.h index 4e6784b..b2af4a9 100644 --- a/libkdepim/addresseelineedit.h +++ b/libkdepim/addresseelineedit.h @@ -27,7 +27,6 @@ #ifndef KDEPIM_ADDRESSEELINEEDIT_H #define KDEPIM_ADDRESSEELINEEDIT_H -#include "kmailcompletion.h" #include "kdepim_export.h" #include "ldap/ldapclient.h" @@ -50,10 +49,6 @@ namespace KABC { class ContactGroup; } -namespace KPIM { - typedef QMap< QString, QPair<int,int> > CompletionItemsMap; -} - namespace Nepomuk2 { namespace Query { class Result; diff --git a/libkdepim/kmailcompletion.h b/libkdepim/kmailcompletion.h index e8574cc..93771d3 100644 --- a/libkdepim/kmailcompletion.h +++ b/libkdepim/kmailcompletion.h @@ -32,7 +32,9 @@ namespace KPIM { /** * KMailCompletion allows lookup of email addresses by keyword. - * Typically a keywods would be firstname, lastname, nickname or domain. + * This is used for lookup by nickname, since we don't want the nickname to appear in the final email. + * E.g. you have a nickname "idiot" for your boss, you want to type "idiot" but you want the completion + * to offer "Full Name <email@domain>", without the nickname being visible. */ class KMailCompletion : public KCompletion { -- 1.8.2 ++++++ kdepim-4.10.1.tar.xz -> kdepim-4.10.2.tar.xz ++++++ /work/SRC/openSUSE:Factory/kdepim4/kdepim-4.10.1.tar.xz /work/SRC/openSUSE:Factory/.kdepim4.new/kdepim-4.10.2.tar.xz differ: char 27, line 1 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
