Commit 6b754e8a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix crash

parent 8f62273b
Pipeline #35453 passed with stage
in 77 minutes and 33 seconds
......@@ -114,6 +114,9 @@ void CollectionGeneralWidget::slotIdentityCheckboxChanged()
void CollectionGeneralWidget::save(Akonadi::Collection &collection)
{
if (!mFolderCollection) {
mFolderCollection = FolderSettings::forCollection(collection);
}
if (!mNotifyOnNewMailCheckBox->isChecked()) {
Akonadi::NewMailNotifierAttribute *newMailNotifierAttr = collection.attribute<Akonadi::NewMailNotifierAttribute>(Akonadi::Collection::AddIfMissing);
newMailNotifierAttr->setIgnoreNewMail(true);
......
......@@ -54,8 +54,11 @@ CollectionTemplatesWidget::~CollectionTemplatesWidget()
{
}
void CollectionTemplatesWidget::save(Akonadi::Collection &)
void CollectionTemplatesWidget::save(Akonadi::Collection &col)
{
if (mCollectionId.isEmpty()) {
mCollectionId = QString::number(col.id());
}
if (mChanged && !mCollectionId.isEmpty()) {
TemplateParser::Templates t(mCollectionId);
//qCDebug(KMAIL_LOG) << "use custom templates for folder" << fid <<":" << mCustom->isChecked();
......
......@@ -152,6 +152,9 @@ void CollectionViewWidget::load(const Akonadi::Collection &col)
void CollectionViewWidget::save(Akonadi::Collection &col)
{
if (!mFolderCollection) {
mFolderCollection = MailCommon::FolderSettings::forCollection(col);
}
const int currentIndex = mShowSenderReceiverComboBox->currentIndex();
if (mShowSenderReceiverValue != currentIndex) {
if (currentIndex == 1) {
......
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