Commit b7da86de authored by Laurent Montel's avatar Laurent Montel 😁

Don't show annotation widget in collectiongeneralpage when imap doesn't support it

parent f6a92a74
......@@ -27,6 +27,7 @@
#include "util/mailutil.h"
#include "pimcommon/util/pimutil.h"
#include "pimcommon/util/imapresourcemanager.h"
#include <Akonadi/AgentManager>
#include <Akonadi/AttributeFactory>
#include <Akonadi/Collection>
......@@ -183,7 +184,8 @@ void CollectionGeneralPage::init( const Akonadi::Collection &collection )
// Only do make this settable, if the IMAP resource is enabled
// and it's not the personal folders (those must not be changed)
if ( PimCommon::Util::isImapResource(collection.resource()) ) {
const QString collectionResource = collection.resource();
if ( CommonKernel->imapResourceManager()->hasAnnotationSupport(collectionResource) ) {
CollectionTypeUtil::FolderContentsType contentsType = CollectionTypeUtil::ContentsTypeMail;
const CollectionAnnotationsAttribute *annotationAttribute =
......
......@@ -34,8 +34,6 @@ public:
explicit ImapResourceManager(QObject *parent = 0);
~ImapResourceManager();
bool hasAnnotationSupport() const;
bool hasAnnotationSupport(const QString &identifier) const;
private Q_SLOTS:
void slotInstanceAdded(const Akonadi::AgentInstance &instance);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment