Commit 818a3684 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to use method from expery widget too

parent 97364d72
Pipeline #36481 passed with stage
in 34 minutes and 13 seconds
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.15.47")
set(PIM_VERSION "5.15.48")
project(mailcommon VERSION ${PIM_VERSION})
......
......@@ -33,8 +33,7 @@ CollectionExpiryPage::~CollectionExpiryPage()
bool CollectionExpiryPage::canHandle(const Akonadi::Collection &col) const
{
QSharedPointer<FolderSettings> fd = FolderSettings::forCollection(col, false);
return fd->canDeleteMessages() && !fd->isStructural() && !MailCommon::Util::isVirtualCollection(col);
return CollectionExpiryWidget::canHandle(col);
}
void CollectionExpiryPage::init()
......
......@@ -244,3 +244,9 @@ void CollectionExpiryWidget::save(Akonadi::Collection &collection, bool saveSett
const CollectionExpirySettings collectionExpirySettings = settings();
save(collectionExpirySettings, collection, saveSettings, expireNow);
}
bool CollectionExpiryWidget::canHandle(const Akonadi::Collection &col)
{
QSharedPointer<FolderSettings> fd = FolderSettings::forCollection(col, false);
return fd->canDeleteMessages() && !fd->isStructural() && !MailCommon::Util::isVirtualCollection(col);
}
......@@ -50,6 +50,7 @@ public:
void save(const CollectionExpirySettings &collectionExpirySettings, Akonadi::Collection &collection, bool saveSettings, bool expireNow);
Q_REQUIRED_RESULT CollectionExpirySettings settings() const;
void hideExpireNowButton();
static Q_REQUIRED_RESULT bool canHandle(const Akonadi::Collection &col);
Q_SIGNALS:
void saveAndExpireRequested();
void configChanged(bool changed = true);
......
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