Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > cf746698214707f972e669b661d0ae59 > files > 52

kdepim4-4.14.10-1.3.mga5.src.rpm

From b614a90936a56db5ffec353b03d75db9decad7ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <daniel.vratil@kdab.com>
Date: Fri, 11 Mar 2016 10:57:56 +0100
Subject: [PATCH 52/74] Remove legacy outlook support

* Stop sending bad invitation replys for outlook2003

Outlook 2003 and older versions ignored comments in ITip
messages. For this reason Kontact sent comments as the
description in replys. Which is bad as it overwrites the
original comment. We've tested this with Outlook 2007 and 2010.
The comment is properly shown there.  Time to rather break
Outlook 2003 and older as removing this option enables proper
comment handling in all other clients.

*  Remove legacy invitation comparison style option
Let's call the "Outlook Comparison Style" the "KMail
Comparison Style". The old list of changes (which I call
legacy) was just ugly and not really user friendly. For
e3.5 at least we are no longer willing to maintain this style.
The comparison style is actually our own style which might
be based on the Outlook style but is of course way better ;-)
---
 messageviewer/settings/messageviewer.kcfg.cmake    | 12 ----------
 messageviewer/ui/invitationsettings.ui             | 26 ----------------------
 messageviewer/widgets/invitationsettings.cpp       | 18 ---------------
 mobile/mail/configwidget.cpp                       |  6 +----
 .../bodypartformatter/text_calendar.cpp            | 15 +++----------
 5 files changed, 4 insertions(+), 73 deletions(-)

diff --git a/messageviewer/settings/messageviewer.kcfg.cmake b/messageviewer/settings/messageviewer.kcfg.cmake
index 4721ef103c..2689dc57fb 100644
--- a/messageviewer/settings/messageviewer.kcfg.cmake
+++ b/messageviewer/settings/messageviewer.kcfg.cmake
@@ -251,18 +251,6 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/sta
         <default>${EXCHANGE_COMPATIBLE_INVITATIONS}</default>
       </entry>
 
-      <entry name="OutlookCompatibleInvitationReplyComments" type="Bool">
-        <label>Outlook compatible invitation reply comments</label>
-        <whatsthis>When replying to invitations, send the reply comment in way that Microsoft Outlook understands.</whatsthis>
-        <default>${OUTLOOK_COMPATIBLE_INVITATION_REPLY_COMMENTS}</default>
-      </entry>
-
-      <entry name="OutlookCompatibleInvitationComparisons" type="Bool">
-        <label>Show invitation update differences in the Outlook style</label>
-        <whatsthis>When viewing invitation updates, show the differences in the Microsoft Outlook style.</whatsthis>
-        <default>true</default>
-      </entry>
-
       <entry name="AutomaticSending" type="Bool">
         <label>Automatic invitation sending</label>
         <whatsthis>When this is checked, you will not see the mail composer window. Instead, all invitation mails are sent automatically. If you want to see the mail before sending it, you can uncheck this option. However, be aware that the text in the composer window is in iCalendar syntax, and you should not try modifying it by hand.</whatsthis>
diff --git a/messageviewer/ui/invitationsettings.ui b/messageviewer/ui/invitationsettings.ui
index b98d9fd644..05bfd77fe4 100644
--- a/messageviewer/ui/invitationsettings.ui
+++ b/messageviewer/ui/invitationsettings.ui
@@ -49,32 +49,6 @@ Turn this option on to send groupware invitations in a way that Microsoft Exchan
         </property>
        </widget>
       </item>
-      <item>
-       <widget class="QCheckBox" name="mOutlookCompatibleInvitationComments">
-        <property name="toolTip">
-         <string>Send invitation reply comments in a way that Microsoft Outlook(tm) understands.</string>
-        </property>
-        <property name="text">
-         <string>Outlook compatible invitation reply comments</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="mOutlookCompatibleInvitationComparisons">
-        <property name="toolTip">
-         <string>Display invitation update differences in the Microsoft Outlook(tm) style.</string>
-        </property>
-        <property name="whatsThis">
-         <string>When viewing invitation updates, show the differences in the Microsoft Outlook style.</string>
-        </property>
-        <property name="text">
-         <string>Show invitation update differences in the Outlook style</string>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
       <item>
        <widget class="QCheckBox" name="mAutomaticSending">
         <property name="toolTip">
diff --git a/messageviewer/widgets/invitationsettings.cpp b/messageviewer/widgets/invitationsettings.cpp
index 040189e654..34dc1ea526 100644
--- a/messageviewer/widgets/invitationsettings.cpp
+++ b/messageviewer/widgets/invitationsettings.cpp
@@ -67,18 +67,6 @@ InvitationSettings::InvitationSettings( QWidget *parent )
     connect( mInvitationUi->mExchangeCompatibleInvitations, SIGNAL(stateChanged(int)),
              this, SIGNAL(changed()) );
 
-    mInvitationUi->mOutlookCompatibleInvitationComments->setWhatsThis(
-                i18n( GlobalSettings::self()->
-                      outlookCompatibleInvitationReplyCommentsItem()->whatsThis().toUtf8() ) );
-    connect( mInvitationUi->mOutlookCompatibleInvitationComments, SIGNAL(stateChanged(int)),
-             this, SIGNAL(changed()) );
-
-    mInvitationUi->mOutlookCompatibleInvitationComparisons->setWhatsThis(
-                i18n( GlobalSettings::self()->
-                      outlookCompatibleInvitationComparisonsItem()->whatsThis().toUtf8() ) );
-    connect( mInvitationUi->mOutlookCompatibleInvitationComparisons, SIGNAL(stateChanged(int)),
-             this, SIGNAL(changed()) );
-
     //Laurent BUG:257723: in kmail2 it's not possible to not send automatically.
     mInvitationUi->mAutomaticSending->hide();
     mInvitationUi->mAutomaticSending->setWhatsThis(
@@ -121,8 +109,6 @@ void InvitationSettings::doLoadFromGlobalSettings()
     loadWidget(mInvitationUi->mLegacyBodyInvites, GlobalSettings::self()->legacyBodyInvitesItem());
     mInvitationUi->mLegacyBodyInvites->blockSignals( false );
     loadWidget(mInvitationUi->mExchangeCompatibleInvitations, GlobalSettings::self()->exchangeCompatibleInvitationsItem());
-    loadWidget(mInvitationUi->mOutlookCompatibleInvitationComments, GlobalSettings::self()->outlookCompatibleInvitationReplyCommentsItem());
-    loadWidget(mInvitationUi->mOutlookCompatibleInvitationComparisons, GlobalSettings::self()->outlookCompatibleInvitationComparisonsItem());
     loadWidget(mInvitationUi->mAutomaticSending, GlobalSettings::self()->automaticSendingItem());
     //TODO verify it
     mInvitationUi->mAutomaticSending->setEnabled( !mInvitationUi->mLegacyBodyInvites->isChecked() );
@@ -134,8 +120,6 @@ void InvitationSettings::save()
     saveCheckBox(mInvitationUi->mLegacyMangleFromTo, GlobalSettings::self()->legacyMangleFromToHeadersItem());
     saveCheckBox(mInvitationUi->mLegacyBodyInvites, GlobalSettings::self()->legacyBodyInvitesItem());
     saveCheckBox(mInvitationUi->mExchangeCompatibleInvitations, GlobalSettings::self()->exchangeCompatibleInvitationsItem());
-    saveCheckBox(mInvitationUi->mOutlookCompatibleInvitationComments, GlobalSettings::self()->outlookCompatibleInvitationReplyCommentsItem());
-    saveCheckBox(mInvitationUi->mOutlookCompatibleInvitationComparisons, GlobalSettings::self()->outlookCompatibleInvitationComparisonsItem());
     saveCheckBox(mInvitationUi->mAutomaticSending, GlobalSettings::self()->automaticSendingItem());
     saveCheckBox(mInvitationUi->mDeleteInvitations, GlobalSettings::self()->deleteInvitationEmailsAfterSendingReplyItem());
 }
@@ -153,8 +137,6 @@ void InvitationSettings::doResetToDefaultsOther()
     loadWidget(mInvitationUi->mLegacyBodyInvites, GlobalSettings::self()->legacyBodyInvitesItem());
     mInvitationUi->mLegacyBodyInvites->blockSignals( false );
     loadWidget(mInvitationUi->mExchangeCompatibleInvitations, GlobalSettings::self()->exchangeCompatibleInvitationsItem());
-    loadWidget(mInvitationUi->mOutlookCompatibleInvitationComments, GlobalSettings::self()->outlookCompatibleInvitationReplyCommentsItem());
-    loadWidget(mInvitationUi->mOutlookCompatibleInvitationComparisons, GlobalSettings::self()->outlookCompatibleInvitationComparisonsItem());
     loadWidget(mInvitationUi->mAutomaticSending, GlobalSettings::self()->automaticSendingItem());
     //TODO verify it
     mInvitationUi->mAutomaticSending->setEnabled( !mInvitationUi->mLegacyBodyInvites->isChecked() );
diff --git a/mobile/mail/configwidget.cpp b/mobile/mail/configwidget.cpp
index 9b51840002..d9fb376142 100644
--- a/mobile/mail/configwidget.cpp
+++ b/mobile/mail/configwidget.cpp
@@ -126,9 +126,7 @@ void ConfigWidget::loadFromExternalSettings()
   // Invitations
   Settings::self()->setInvitationsOutlookCompatible( MessageViewer::GlobalSettings::self()->legacyMangleFromToHeaders() &&
                                                      MessageViewer::GlobalSettings::self()->legacyBodyInvites() &&
-                                                     MessageViewer::GlobalSettings::self()->exchangeCompatibleInvitations() &&
-                                                     MessageViewer::GlobalSettings::self()->outlookCompatibleInvitationReplyComments() &&
-                                                     MessageViewer::GlobalSettings::self()->outlookCompatibleInvitationComparisons() );
+                                                     MessageViewer::GlobalSettings::self()->exchangeCompatibleInvitations() );
   Settings::self()->setInvitationsAutomaticSending( MessageViewer::GlobalSettings::self()->automaticSending() );
   Settings::self()->setInvitationsDeleteAfterReply( MessageViewer::GlobalSettings::self()->deleteInvitationEmailsAfterSendingReply() );
 
@@ -164,8 +162,6 @@ void ConfigWidget::saveToExternalSettings()
   MessageViewer::GlobalSettings::self()->setLegacyMangleFromToHeaders( Settings::self()->invitationsOutlookCompatible() );
   MessageViewer::GlobalSettings::self()->setLegacyBodyInvites( Settings::self()->invitationsOutlookCompatible() );
   MessageViewer::GlobalSettings::self()->setExchangeCompatibleInvitations( Settings::self()->invitationsOutlookCompatible() );
-  MessageViewer::GlobalSettings::self()->setOutlookCompatibleInvitationReplyComments( Settings::self()->invitationsOutlookCompatible() );
-  MessageViewer::GlobalSettings::self()->setOutlookCompatibleInvitationComparisons( Settings::self()->invitationsOutlookCompatible() );
   MessageViewer::GlobalSettings::self()->setAutomaticSending( Settings::self()->invitationsAutomaticSending() );
   MessageViewer::GlobalSettings::self()->setDeleteInvitationEmailsAfterSendingReply( Settings::self()->invitationsDeleteAfterReply() );
 
diff --git a/plugins/messageviewer/bodypartformatter/text_calendar.cpp b/plugins/messageviewer/bodypartformatter/text_calendar.cpp
index 745a5a4e57..59f3ea4fcb 100644
--- a/plugins/messageviewer/bodypartformatter/text_calendar.cpp
+++ b/plugins/messageviewer/bodypartformatter/text_calendar.cpp
@@ -270,8 +270,7 @@ class Formatter : public Interface::BodyPartFormatter
           MemoryCalendar::Ptr cl( new MemoryCalendar( KSystemTimeZones::local() ) );
           const QString html =
             KCalUtils::IncidenceFormatter::formatICalInvitationNoHtml(
-              source, cl, &helper, message->sender()->asUnicodeString(),
-              GlobalSettings::self()->outlookCompatibleInvitationComparisons() );
+              source, cl, &helper, message->sender()->asUnicodeString() );
 
           if ( html.isEmpty() ) {
             return AsIcon;
@@ -933,11 +932,7 @@ class UrlHandler : public Interface::BodyPartURLHandler
             i18n( "You forgot to add proposal. Please add it. Thanks" ) );
           return true;
         } else {
-          if ( GlobalSettings::self()->outlookCompatibleInvitationReplyComments() ) {
-            incidence->setDescription( comment );
-          } else {
-            incidence->addComment( comment );
-          }
+          incidence->addComment( comment );
         }
       }
 
@@ -1190,11 +1185,7 @@ class UrlHandler : public Interface::BodyPartURLHandler
 
         }
         else {
-          if ( GlobalSettings::self()->outlookCompatibleInvitationReplyComments() ) {
-            incidence->setDescription( comment );
-          } else {
-            incidence->addComment( comment );
-          }
+          incidence->addComment( comment );
         }
       }
       return mail( viewerInstance, incidence, QLatin1String("declinecounter"), KCalCore::iTIPDeclineCounter,
-- 
2.14.1