Skip to content

Commit

Permalink
Set expiration time to Now when enabling entry expiration
Browse files Browse the repository at this point in the history
* Fixes #3940
  • Loading branch information
droidmonkey committed Apr 8, 2020
1 parent ab9856e commit 7b25fe9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/entry/EditEntryWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ void EditEntryWidget::setupMain()
connect(m_mainUi->urlEdit, SIGNAL(textChanged(QString)), m_iconsWidget, SLOT(setUrl(QString)));
m_mainUi->urlEdit->enableVerifyMode();
#endif
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
connect(m_mainUi->expireCheck, &QCheckBox::toggled, [&](bool enabled) {
m_mainUi->expireDatePicker->setEnabled(enabled);
if (enabled) {
m_mainUi->expireDatePicker->setDateTime(Clock::currentDateTime());
}
});

connect(m_mainUi->notesEnabled, SIGNAL(toggled(bool)), this, SLOT(toggleHideNotes(bool)));

m_mainUi->expirePresets->setMenu(createPresetsMenu());
Expand Down

0 comments on commit 7b25fe9

Please sign in to comment.