File indexing completed on 2025-01-19 04:46:52
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "folderconfiguresettingsexperywidget.h" 0008 0009 #include <MailCommon/CollectionExpiryWidget> 0010 0011 FolderConfigureSettingsExperyWidget::FolderConfigureSettingsExperyWidget(QWidget *parent) 0012 : FolderConfigureSettingsPageBase(parent) 0013 , mCollectionExpiryWidget(new MailCommon::CollectionExpiryWidget(this)) 0014 { 0015 mCollectionExpiryWidget->setObjectName(QLatin1StringView("mCollectionExpiryWidget")); 0016 mCollectionExpiryWidget->hideExpireNowButton(); 0017 addMainWidget(mCollectionExpiryWidget); 0018 } 0019 0020 FolderConfigureSettingsExperyWidget::~FolderConfigureSettingsExperyWidget() = default; 0021 0022 void FolderConfigureSettingsExperyWidget::save(Akonadi::Collection &col) 0023 { 0024 if (MailCommon::CollectionExpiryWidget::canHandle(col)) { 0025 const MailCommon::CollectionExpirySettings settings = mCollectionExpiryWidget->settings(); 0026 if (wasModified()) { 0027 mCollectionExpiryWidget->save(settings, col, true, false); 0028 } 0029 } 0030 } 0031 0032 #include "moc_folderconfiguresettingsexperywidget.cpp"