[Akonadi] [Bug 317966] Invalid interpretation of '=?UTF-8?Q?X=2DKADDRESSBOOK=2D=E2=80=A6?=' (case sensitive?)
Bernhard
b.d.s.e at gmx.de
Sun Apr 7 08:48:55 BST 2013
https://bugs.kde.org/show_bug.cgi?id=317966
--- Comment #5 from Bernhard <b.d.s.e at gmx.de> ---
This could fix this issue.
BUT be carefull it is not tested!
What did I do?:
- I followed the fix in Bug 307618 .
- X-Profession is removed because it is already in the set.
- Added the upper case version of every key
diff --git a/akonadi/contact/editor/customfieldseditwidget.cpp
b/akonadi/contact/editor/customfieldseditwidget.cpp
index dc0cc6c..c4d1e00 100644
--- a/akonadi/contact/editor/customfieldseditwidget.cpp
+++ b/akonadi/contact/editor/customfieldseditwidget.cpp
@@ -120,9 +120,7 @@ void CustomFieldsEditWidget::loadContact( const
KABC::Addressee &contact )
<< QLatin1String( "X-ManagersName" )
<< QLatin1String( "X-AssistantsName" )
<< QLatin1String( "X-Anniversary" )
- << QLatin1String( "X-ANNIVERSARY" )
<< QLatin1String( "X-SpousesName" )
- << QLatin1String( "X-Profession" )
<< QLatin1String( "MailPreferedFormatting")
<< QLatin1String( "MailAllowToRemoteContent")
<< QLatin1String( "CRYPTOPROTOPREF" )
@@ -130,6 +128,11 @@ void CustomFieldsEditWidget::loadContact( const
KABC::Addressee &contact )
<< QLatin1String( "SMIMEFP" )
<< QLatin1String( "CRYPTOSIGNPREF" )
<< QLatin1String( "CRYPTOENCRYPTPREF" );
+ QSet<QString> upperCaseBlacklist;
+ foreach(const QString& blacklistEntry, blacklist) {
+ upperCaseBlacklist << blacklistEntry.toUpper();
+ }
+ blacklist.unite(upperCaseBlacklist);
}
if ( blacklist.contains( name ) ) { // several KAddressBook specific
fields
diff --git a/akonadi/contact/standardcontactformatter.cpp
b/akonadi/contact/standardcontactformatter.cpp
index 8bbdb5f..0acc23d 100644
--- a/akonadi/contact/standardcontactformatter.cpp
+++ b/akonadi/contact/standardcontactformatter.cpp
@@ -214,6 +214,13 @@ QString StandardContactFormatter::toHtml( HtmlForm form )
const
titleMap.insert( QLatin1String( "IMAddress" ), i18n( "IM Address" ) );
titleMap.insert( QLatin1String( "Anniversary" ), i18n( "Anniversary" ) );
titleMap.insert( QLatin1String( "AddressBook" ), i18n( "Address Book" ) );
+ QMap<QString, QString> upperCaseTitleMap;
+ QMap<QString, QString>::const_iterator iterator = titleMap.constBegin();
+ while (iterator != titleMap.constEnd()) {
+ upperCaseTitleMap.insert(iterator.key().toUpper(), iterator.value());
+ ++iterator;
+ }
+ titleMap.unite(upperCaseTitleMap);
}
static QSet<QString> blacklistedKeys;
@@ -242,7 +249,7 @@ QString StandardContactFormatter::toHtml( HtmlForm form )
const
if ( key == QLatin1String( "Anniversary" ) || key == QLatin1String(
"ANNIVERSARY" ) ) {
const QDateTime dateTime = QDateTime::fromString( value, Qt::ISODate
);
value = KGlobal::locale()->formatDate( dateTime.date() );
- } else if ( key == QLatin1String( "BlogFeed" ) ) { // blog is handled
separated
+ } else if ( key == QLatin1String( "BlogFeed" ) || key ==
QLatin1String( "BLOGFEED" ) ) { // blog is handled separated
continue;
} else if ( blacklistedKeys.contains( key ) ) {
continue;
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list