mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 13:07:38 +03:00
fix randomizing interval bug
This commit is contained in:
parent
c669765256
commit
a174ec4ee7
1 changed files with 2 additions and 2 deletions
|
@ -215,9 +215,9 @@ void EditEntryWidget::setupMain()
|
|||
TimeDelta delta = std::get<1>(m_extensionOnPwUpdate) * std::get<0>(m_extensionOnPwUpdate);
|
||||
QDateTime now = Clock::currentDateTime();
|
||||
QDateTime expiryDateTime = now + delta;
|
||||
if (m_mainUi->randomizeExtensionDeadline->isEnabled()) {
|
||||
if (m_mainUi->randomizeExtensionDeadline->isChecked()) {
|
||||
expiryDateTime =
|
||||
expiryDateTime.addDays(-QRandomGenerator::global()->bounded(0, m_daysRandomizeExtension));
|
||||
expiryDateTime.addDays(-QRandomGenerator::global()->bounded(0, m_daysRandomizeExtension+1));
|
||||
}
|
||||
m_mainUi->expireDatePicker->setDateTime(expiryDateTime);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue