mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
fix randomizing interval bug
This commit is contained in:
parent
c669765256
commit
a174ec4ee7
@ -215,9 +215,9 @@ void EditEntryWidget::setupMain()
|
|||||||
TimeDelta delta = std::get<1>(m_extensionOnPwUpdate) * std::get<0>(m_extensionOnPwUpdate);
|
TimeDelta delta = std::get<1>(m_extensionOnPwUpdate) * std::get<0>(m_extensionOnPwUpdate);
|
||||||
QDateTime now = Clock::currentDateTime();
|
QDateTime now = Clock::currentDateTime();
|
||||||
QDateTime expiryDateTime = now + delta;
|
QDateTime expiryDateTime = now + delta;
|
||||||
if (m_mainUi->randomizeExtensionDeadline->isEnabled()) {
|
if (m_mainUi->randomizeExtensionDeadline->isChecked()) {
|
||||||
expiryDateTime =
|
expiryDateTime =
|
||||||
expiryDateTime.addDays(-QRandomGenerator::global()->bounded(0, m_daysRandomizeExtension));
|
expiryDateTime.addDays(-QRandomGenerator::global()->bounded(0, m_daysRandomizeExtension+1));
|
||||||
}
|
}
|
||||||
m_mainUi->expireDatePicker->setDateTime(expiryDateTime);
|
m_mainUi->expireDatePicker->setDateTime(expiryDateTime);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user