Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2021-06-06 18:58:52 +0300
committerJonathan White <support@dmapps.us>2021-10-09 18:12:25 +0300
commit484bc5dd018b041ea78affb3ca42e5c57a0d42ba (patch)
tree01fabdb24e4f15aab4d824c6783ca5e5261efe5b
parentbd744d1e32b80c1dee98943a87e828f318e77b2d (diff)
Fix infinite save bug when saving fails
* Introduced in #6438, modified signal is not blocked at the Database level when emitting is blocked. This causes infinite saving to occur when Always Save After Every Change is enabled.
-rw-r--r--src/core/Database.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/Database.cpp b/src/core/Database.cpp
index d9ace8c2e..e29403fcf 100644
--- a/src/core/Database.cpp
+++ b/src/core/Database.cpp
@@ -875,7 +875,7 @@ bool Database::hasNonDataChanges() const
void Database::markAsModified()
{
m_modified = true;
- if (!m_modifiedTimer.isActive()) {
+ if (modifiedSignalEnabled() && !m_modifiedTimer.isActive()) {
// Small time delay prevents numerous consecutive saves due to repeated signals
startModifiedTimer();
}
@@ -942,11 +942,13 @@ bool Database::changeKdf(const QSharedPointer<Kdf>& kdf)
return true;
}
+// Prevent warning about QTimer not allowed to be started/stopped from other thread
void Database::startModifiedTimer()
{
QMetaObject::invokeMethod(&m_modifiedTimer, "start", Q_ARG(int, 150));
}
+// Prevent warning about QTimer not allowed to be started/stopped from other thread
void Database::stopModifiedTimer()
{
QMetaObject::invokeMethod(&m_modifiedTimer, "stop");