Summary: | [regression] Special folder icons do not show | ||
---|---|---|---|
Product: | [Applications] kmail2 | Reporter: | Thiago Macieira <thiago> |
Component: | folders | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kumaran, m.wege, mail, montel |
Priority: | NOR | ||
Version: | 2.0.89 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Thiago Macieira
2010-12-07 09:49:50 UTC
I confirm this bug. I tried to fix it in imap resource but don't understand why it doesn't work Index: setupserver.cpp =================================================================== --- setupserver.cpp (révision 1204707) +++ setupserver.cpp (copie de travail) @@ -48,6 +48,7 @@ #include <akonadi/kmime/specialmailcollections.h> #include <akonadi/kmime/specialmailcollectionsrequestjob.h> #include <akonadi/resourcesettings.h> +#include <akonadi/entitydisplayattribute.h> #include <kemailsettings.h> #include <klocale.h> #include <kpushbutton.h> @@ -277,7 +278,14 @@ Settings::self()->setSieveVacationFilename( m_vacationFileName ); Settings::self()->setTrashCollection( m_ui->folderRequester->collection().id() ); + Akonadi::EntityDisplayAttribute *attribute = m_ui->folderRequester->collection().attribute<Akonadi::EntityDisplayAttribute>( Akonadi::Entity::AddIfMissing ); + attribute->setIconName( QLatin1String( "user-trash" ) ); + Akonadi::CollectionModifyJob *job = new Akonadi::CollectionModifyJob( m_ui->folderRequester->collection() ); + job->start(); The patch looks like the right approach, but you are modifying a temporary copy of the collection (Akonadi::Collection is implicitly shared), so the ItemModifyJob will not actually change anything. Try something like: Akonadi::Collection trash = m_ui->folderRequester->collection(); Akonadi::EntityDisplayAttribute *attribute = trash.attribute<Akonadi::EntityDisplayAttribute>( Akonadi::Entity::AddIfMissing ); attribute->setIconName( QLatin1String( "user-trash" ) ); new Akonadi::CollectionModifyJob( trash ); (Akonadi::Job sub-classes are auto-started, so no need to explicitly call start() btw). Ok works fine now that we don't use temporary copy thanks SVN commit 1205151 by mlaurent: Fix Special folder icons do not show bug #259082 Fix for trash icons. Will look at for other special folder type CCBUG: 259082 M +7 -0 setupserver.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1205151 *** Bug 259594 has been marked as a duplicate of this bug. *** |