mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix expiry time and bool not being updated.
This commit is contained in:
parent
e1632e8087
commit
fc8f1231c6
@ -313,6 +313,22 @@ void Entry::setNotes(const QString& notes)
|
||||
m_attributes->set("Notes", notes, m_attributes->isProtected("Notes"));
|
||||
}
|
||||
|
||||
void Entry::setExpires(const bool& value)
|
||||
{
|
||||
if (m_timeInfo.expires() != value) {
|
||||
m_timeInfo.setExpires(value);
|
||||
Q_EMIT modified();
|
||||
}
|
||||
}
|
||||
|
||||
void Entry::setExpiryTime(const QDateTime& dateTime)
|
||||
{
|
||||
if (m_timeInfo.expiryTime() != dateTime) {
|
||||
m_timeInfo.setExpiryTime(dateTime);
|
||||
Q_EMIT modified();
|
||||
}
|
||||
}
|
||||
|
||||
QList<Entry*> Entry::historyItems()
|
||||
{
|
||||
return m_history;
|
||||
|
@ -89,6 +89,8 @@ public:
|
||||
void setUsername(const QString& username);
|
||||
void setPassword(const QString& password);
|
||||
void setNotes(const QString& notes);
|
||||
void setExpires(const bool& value);
|
||||
void setExpiryTime(const QDateTime& dateTime);
|
||||
|
||||
QList<Entry*> historyItems();
|
||||
const QList<Entry*>& historyItems() const;
|
||||
|
@ -120,8 +120,10 @@ void EditEntryWidget::saveEntry()
|
||||
m_entry->setUrl(m_mainUi->urlEdit->text());
|
||||
// TODO check password repeat field
|
||||
m_entry->setPassword(m_mainUi->passwordEdit->text());
|
||||
m_entry->timeInfo().setExpires(m_mainUi->expireCheck->isChecked());
|
||||
m_entry->timeInfo().setExpiryTime(m_mainUi->expireDatePicker->dateTime());
|
||||
m_entry->setExpires(m_mainUi->expireCheck->isChecked());
|
||||
QDateTime dateTime(m_mainUi->expireDatePicker->dateTime());
|
||||
dateTime.setTimeSpec(Qt::UTC);
|
||||
m_entry->setExpiryTime(dateTime);
|
||||
|
||||
m_entry->setNotes(m_notesUi->notesEdit->toPlainText());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user