mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kutils: attempt to re-open the password store after the timeout
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3716b1ffe5
commit
b3c1452d4e
1 changed files with 8 additions and 3 deletions
|
@ -98,7 +98,7 @@ bool KPasswdStoreImpl::isOpen() const
|
||||||
|
|
||||||
bool KPasswdStoreImpl::openStore(const qlonglong windowid)
|
bool KPasswdStoreImpl::openStore(const qlonglong windowid)
|
||||||
{
|
{
|
||||||
if (m_cacheonly) {
|
if (m_cacheonly && m_passwdtimer.elapsed() < m_timeout) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,9 +111,14 @@ bool KPasswdStoreImpl::openStore(const qlonglong windowid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasPasswd()) {
|
if (!hasPasswd()) {
|
||||||
KMessageBox::error(widgetForWindowID(windowid), i18n("The storage could not be open, no passwords will be permanently stored"));
|
KMessageBox::error(
|
||||||
|
widgetForWindowID(windowid),
|
||||||
|
i18n("The storage could not be open, passwords will not be permanently stored until the store is open")
|
||||||
|
);
|
||||||
setCacheOnly(true);
|
setCacheOnly(true);
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
setCacheOnly(false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -188,7 +193,7 @@ bool KPasswdStoreImpl::ensurePasswd(const qlonglong windowid, const bool showerr
|
||||||
if (!m_passwd.isEmpty() && m_passwdtimer.elapsed() >= m_timeout) {
|
if (!m_passwd.isEmpty() && m_passwdtimer.elapsed() >= m_timeout) {
|
||||||
m_passwd.clear();
|
m_passwd.clear();
|
||||||
}
|
}
|
||||||
m_passwdtimer.restart();
|
m_passwdtimer.start();
|
||||||
|
|
||||||
if (m_passwd.isEmpty()) {
|
if (m_passwd.isEmpty()) {
|
||||||
QByteArray kpasswddialogpass;
|
QByteArray kpasswddialogpass;
|
||||||
|
|
Loading…
Add table
Reference in a new issue