Commit f2ceb65a authored by Glen Ditchfield's avatar Glen Ditchfield 🐛 Committed by Glen Ditchfield
Browse files

Make summary's todo settings consistent

`KCMTodoSummary` and `TodoSummaryWidget` disagreed on the default value
of the OpenEnded setting.  Changing `KCMTodoSummary` avoids changes in
the summary view's behaviour if the user has not customized that
setting.
parent 2aac30d8
Pipeline #196101 passed with stage
in 3 minutes and 51 seconds
......@@ -59,6 +59,8 @@ void KCMTodoSummary::customDaysChanged(int value)
void KCMTodoSummary::load()
{
// Note: match default entry values with those in defaults() and
// TodoSummaryWidget::updateView().
KConfig config(QStringLiteral("kcmtodosummaryrc"));
KConfigGroup group = config.group("Days");
......@@ -77,7 +79,7 @@ void KCMTodoSummary::load()
mHideInProgressBox->setChecked(group.readEntry("InProgress", false));
mHideOverdueBox->setChecked(group.readEntry("Overdue", false));
mHideCompletedBox->setChecked(group.readEntry("Completed", true));
mHideOpenEndedBox->setChecked(group.readEntry("OpenEnded", false));
mHideOpenEndedBox->setChecked(group.readEntry("OpenEnded", true));
mHideUnstartedBox->setChecked(group.readEntry("NotStarted", false));
group = config.group("Groupware");
......@@ -124,7 +126,7 @@ void KCMTodoSummary::defaults()
mHideInProgressBox->setChecked(false);
mHideOverdueBox->setChecked(false);
mHideCompletedBox->setChecked(true);
mHideOpenEndedBox->setChecked(false);
mHideOpenEndedBox->setChecked(true);
mHideUnstartedBox->setChecked(false);
mShowMineOnly->setChecked(false);
......
......@@ -64,6 +64,7 @@ TodoSummaryWidget::~TodoSummaryWidget() = default;
void TodoSummaryWidget::updateView()
{
// Note: match default entry values with those in KCMTodoSummary::load().
qDeleteAll(mLabels);
mLabels.clear();
......
Supports Markdown
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