mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Clear clipboard on database lock
- Always store the last copied text - clearCopiedText will always clear clipboard regardless of timer state
This commit is contained in:
committed by
Jonathan White
parent
c511cb518c
commit
0aa029d548
@@ -67,11 +67,13 @@ void Clipboard::setText(const QString& text, bool clear)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (clear && config()->get(Config::Security_ClearClipboard).toBool()) {
|
if (clear) {
|
||||||
int timeout = config()->get(Config::Security_ClearClipboardTimeout).toInt();
|
m_lastCopied = text;
|
||||||
if (timeout > 0) {
|
if (config()->get(Config::Security_ClearClipboard).toBool()) {
|
||||||
m_lastCopied = text;
|
int timeout = config()->get(Config::Security_ClearClipboardTimeout).toInt();
|
||||||
m_timer->start(timeout * 1000);
|
if (timeout > 0) {
|
||||||
|
m_timer->start(timeout * 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,8 +82,9 @@ void Clipboard::clearCopiedText()
|
|||||||
{
|
{
|
||||||
if (m_timer->isActive()) {
|
if (m_timer->isActive()) {
|
||||||
m_timer->stop();
|
m_timer->stop();
|
||||||
clearClipboard();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clearClipboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clipboard::clearClipboard()
|
void Clipboard::clearClipboard()
|
||||||
|
|||||||
Reference in New Issue
Block a user