mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04: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:
parent
c511cb518c
commit
0aa029d548
@ -67,21 +67,24 @@ void Clipboard::setText(const QString& text, bool clear)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (clear && config()->get(Config::Security_ClearClipboard).toBool()) {
|
||||
if (clear) {
|
||||
m_lastCopied = text;
|
||||
if (config()->get(Config::Security_ClearClipboard).toBool()) {
|
||||
int timeout = config()->get(Config::Security_ClearClipboardTimeout).toInt();
|
||||
if (timeout > 0) {
|
||||
m_lastCopied = text;
|
||||
m_timer->start(timeout * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Clipboard::clearCopiedText()
|
||||
{
|
||||
if (m_timer->isActive()) {
|
||||
m_timer->stop();
|
||||
clearClipboard();
|
||||
}
|
||||
|
||||
clearClipboard();
|
||||
}
|
||||
|
||||
void Clipboard::clearClipboard()
|
||||
|
Loading…
Reference in New Issue
Block a user