[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkdepim=5D_calendarsupport=3A_Respect_the_config_opt?=
From: Tobias Koenig <tokoe () kde ! org>
Date: 2011-02-02 13:26:10
Message-ID: 20110202132610.985C2A60BE () git ! kde ! org
[Download RAW message or body]
Git commit 7085b41d242b2cbe411db33093b1103e563379e2 by Tobias Koenig.
Committed on 02/02/11 at 14:16.
Pushed by tokoe into branch 'master'.
Respect the config options on invitation sending
Read the invitation handling options from mailviewerrc
to create outlook-conform invitation if needed.
BUG: 264604
M +15 -1 calendarsupport/mailclient.cpp
http://commits.kde.org/kdepim/7085b41d242b2cbe411db33093b1103e563379e2
diff --git a/calendarsupport/mailclient.cpp b/calendarsupport/mailclient.cpp
index 2cd4a07..eb3fc8e 100644
--- a/calendarsupport/mailclient.cpp
+++ b/calendarsupport/mailclient.cpp
@@ -23,6 +23,8 @@
*/
#include "mailclient.h"
+
+#include "config-enterprise.h"
#include "kdepim-version.h"
#include <Akonadi/Collection>
@@ -220,6 +222,18 @@ bool MailClient::send( const KPIMIdentities::Identity &identity,
const int transportId = transport->id();
+ // gather config values
+ KConfig config( "mailviewerrc" );
+
+ KConfigGroup configGroup( &config, QLatin1String( "Invitations" ) );
+ const bool outlookConformInvitation = configGroup.readEntry( "LegacyBodyInvites",
+#ifdef KDEPIM_ENTERPRISE_BUILD
+ true
+#else
+ false
+#endif
+ );
+
// Now build the message we like to send. The message KMime::Message::Ptr instance
// will be the root message that has 2 additional message. The body itself and
// the attached cal.ics calendar file.
@@ -239,7 +253,7 @@ bool MailClient::send( const KPIMIdentities::Identity &identity,
message->date()->setDateTime( KDateTime::currentLocalDateTime() );
message->subject()->fromUnicodeString( subject, "utf-8" );
- if ( false /* Outlook compatible mode */ ) {
+ if ( outlookConformInvitation ) {
message->contentType()->setMimeType( "text/calendar" );
message->contentType()->setCharset( "utf-8" );
message->contentType()->setName( QLatin1String( "cal.ics" ), "utf-8" );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic