summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hüttel <dilfridge@gentoo.org>2011-04-06 07:40:14 +0000
committerAndreas Hüttel <dilfridge@gentoo.org>2011-04-06 07:40:14 +0000
commit7a40bfba3fb1ab39a7b5584f273625aad432ab64 (patch)
tree8dc5ec001d8bed2f6d5012cfc744522bf790d4fe /kde-base/kmail/files
parentStart akonadi asynchronously on kde-4.6, bug 362199 (diff)
downloadhistorical-7a40bfba3fb1ab39a7b5584f273625aad432ab64.tar.gz
historical-7a40bfba3fb1ab39a7b5584f273625aad432ab64.tar.bz2
historical-7a40bfba3fb1ab39a7b5584f273625aad432ab64.zip
Start akonadi asynchronously on kde-4.6, bug 362199
Package-Manager: portage-2.1.9.45/cvs/Linux x86_64
Diffstat (limited to 'kde-base/kmail/files')
-rw-r--r--kde-base/kmail/files/kmail-4.4.10-asyncako.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/kde-base/kmail/files/kmail-4.4.10-asyncako.patch b/kde-base/kmail/files/kmail-4.4.10-asyncako.patch
new file mode 100644
index 000000000000..b8c07165de72
--- /dev/null
+++ b/kde-base/kmail/files/kmail-4.4.10-asyncako.patch
@@ -0,0 +1,53 @@
+commit cfa404b7188e4c26bddbc9579728f6d25f8cd214
+Author: Stephen Kelly <steveire@gmail.com>
+Date: Tue Apr 5 11:09:43 2011 +0200
+
+ Start kdepim 4.4 asynchronously if built against 4.6.
+
+ The synchronous mechanism doesn't have enough time to start
+ before it reports failure.
+
+diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp
+index a31973a..10b14e4 100644
+--- a/kmail/kmmainwidget.cpp
++++ b/kmail/kmmainwidget.cpp
+@@ -165,6 +165,9 @@ using KMail::TemplateParser;
+
+ #include <errno.h> // ugh
+
++#include <akonadi/control.h>
++#include <akonadi/servermanager.h>
++
+ #include "kmmainwidget.moc"
+
+ K_GLOBAL_STATIC( KMMainWidget::PtrList, theMainWidgetList )
+@@ -186,6 +189,10 @@ KMMainWidget::KMMainWidget( QWidget *parent, KXMLGUIClient *aGUIClient,
+ mVacationIndicatorActive( false ),
+ mGoToFirstUnreadMessageInSelectedFolder( false )
+ {
++#if KDE_IS_VERSION(4,6,0)
++ Akonadi::Control::widgetNeedsAkonadi(this);
++ Akonadi::ServerManager::start();
++#endif
+ // must be the first line of the constructor:
+ mStartupDone = false;
+ mWasEverShown = false;
+diff --git a/kmail/main.cpp b/kmail/main.cpp
+index f39ca5f..c2dd1c3 100644
+--- a/kmail/main.cpp
++++ b/kmail/main.cpp
+@@ -145,12 +145,14 @@ int main(int argc, char *argv[])
+ app.setEventLoopReached();
+ app.delayedInstanceCreation();
+
++#if !KDE_IS_VERSION(4,6,0)
+ // Start Akonadi
+ if ( !Akonadi::Control::start( kmkernel->getKMMainWidget() ) ) {
+ //TODO: add message box after string freeze
+ kWarning() << "Unable to start Akonadi server, exit application";
+ return 1;
+ }
++#endif
+
+ // Go!
+ int ret = qApp->exec();