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

Be sure to block all

parent 6b175418
......@@ -180,9 +180,11 @@ void CollectionGeneralPage::save( Collection &collection )
}
if ( mBlockAlarmsCheckBox->isChecked() ) {
if ( !collection.hasAttribute<BlockAlarmsAttribute>() ) {
collection.attribute<BlockAlarmsAttribute>( Collection::AddIfMissing );
}
BlockAlarmsAttribute *attr = collection.attribute<BlockAlarmsAttribute>( Collection::AddIfMissing );
attr->blockAlarmType(KCalCore::Alarm::Audio, true);
attr->blockAlarmType(KCalCore::Alarm::Display, true);
attr->blockAlarmType(KCalCore::Alarm::Email, true);
attr->blockAlarmType(KCalCore::Alarm::Procedure, true);
} else {
collection.removeAttribute<BlockAlarmsAttribute>();
}
......
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