Version: unspecified (using Devel) OS: Windows CE version 20101219 svn 1207720 Reproducible: Always Steps to Reproduce: 1. Set option delete mails from trashcan after closing on. 2. Move some mails to the trashcan. 3. Close kmail mobile. 4. Restart it. Actual Results: The mails are not deleted. Expected Results: The mailss in the trashcan should be deleted Used German as language. Here trashcan is named Mülleimer.
commit 4f43a240652fc3bfd93a212d9be059876f53cd94 branch master Author: Tobias Koenig <tokoe@kde.org> Date: Thu Dec 23 15:44:31 2010 +0100 Implement 'Empty trash on exit' functionality BUG: 261055 diff --git a/mobile/mail/mainview.cpp b/mobile/mail/mainview.cpp index 6fd855a..5a2d07c 100644 --- a/mobile/mail/mainview.cpp +++ b/mobile/mail/mainview.cpp @@ -159,6 +159,24 @@ MainView::MainView(QWidget* parent) MainView::~MainView() { delete m_grouperComparator; + + const Akonadi::Collection trashCollection = CommonKernel->trashCollectionFolder(); + if ( trashCollection.isValid() ) { + if ( Settings::self()->miscEmptyTrashAtExit() ) { + if ( trashCollection.statistics().count() > 0 ) { + qDebug( "Emptying trash..." ); + Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( trashCollection, this ); + if ( job->exec() ) { + const Akonadi::Item::List items = job->items(); + if ( !items.isEmpty() ) { + Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob( items, this ); + deleteJob->exec(); + qDebug( "done" ); + } + } + } + } + } } void MainView::setConfigWidget( ConfigWidget *configWidget )
test of description version 2011-01-16 git-4d1bc61 test passed. Closed.