Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/database settings spin box bug #9101

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/gui/dbsettings/DatabaseSettingsWidgetGeneral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ void DatabaseSettingsWidgetGeneral::initialize()
m_ui->historyMaxItemsCheckBox->setChecked(true);
} else {
m_ui->historyMaxItemsSpinBox->setValue(Metadata::DefaultHistoryMaxItems);
m_ui->historyMaxItemsSpinBox->setEnabled(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it easy to test it in GUI tests?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't seem useful, this is a very minor UI setting. I also could not replicate the original problem reported of the max history items spin box being enabled even though the checkbox was unchecked.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't seem useful, this is a very minor UI setting. I also could not replicate the original problem reported of the max history items spin box being enabled even though the checkbox was unchecked.

To replicate you could make a new db, disable both settings then close keepassxc and relaunch into the settings. I can replicate 100% of the time on linux at current release.

I could still add the test altho i also think its a bit too much for such a minor bug. I could also see that this code is run in coverage already.
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh you have to restart the program, missing detail :-)

m_ui->historyMaxItemsCheckBox->setChecked(false);
}
int historyMaxSizeMiB = qRound(meta->historyMaxSize() / qreal(1048576));
Expand All @@ -58,6 +59,7 @@ void DatabaseSettingsWidgetGeneral::initialize()
m_ui->historyMaxSizeCheckBox->setChecked(true);
} else {
m_ui->historyMaxSizeSpinBox->setValue(qRound(Metadata::DefaultHistoryMaxSize / qreal(1048576)));
jNullj marked this conversation as resolved.
Show resolved Hide resolved
m_ui->historyMaxSizeSpinBox->setEnabled(false);
m_ui->historyMaxSizeCheckBox->setChecked(false);
}
}
Expand Down