diff options
author | 2011-04-06 07:40:14 +0000 | |
---|---|---|
committer | 2011-04-06 07:40:14 +0000 | |
commit | 492bbf23b579d94add4b1021dbd20983d23b0744 (patch) | |
tree | 4394e5ce5a5ac7ccecd7482f60e430ff4188f82e /kde-base/kmail/files | |
parent | Start akonadi asynchronously on kde-4.6, bug 362199 (diff) | |
download | gentoo-2-492bbf23b579d94add4b1021dbd20983d23b0744.tar.gz gentoo-2-492bbf23b579d94add4b1021dbd20983d23b0744.tar.bz2 gentoo-2-492bbf23b579d94add4b1021dbd20983d23b0744.zip |
Start akonadi asynchronously on kde-4.6, bug 362199
(Portage version: 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.patch | 53 |
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(); |