From 61ce733c6fc83f882158aaa3615bfc7336c96a3b Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sun, 31 Jul 2016 23:49:38 +0200 Subject: [PATCH] Make Entry::endUpdate() return whether the entry has been modified. --- src/core/Entry.cpp | 4 +++- src/core/Entry.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp index faa7cfacb..e402d33ea 100644 --- a/src/core/Entry.cpp +++ b/src/core/Entry.cpp @@ -508,7 +508,7 @@ void Entry::beginUpdate() m_modifiedSinceBegin = false; } -void Entry::endUpdate() +bool Entry::endUpdate() { Q_ASSERT(m_tmpHistoryItem); if (m_modifiedSinceBegin) { @@ -521,6 +521,8 @@ void Entry::endUpdate() } m_tmpHistoryItem = nullptr; + + return m_modifiedSinceBegin; } void Entry::updateModifiedSinceBegin() diff --git a/src/core/Entry.h b/src/core/Entry.h index cd7c7b779..0b4d4829f 100644 --- a/src/core/Entry.h +++ b/src/core/Entry.h @@ -133,7 +133,7 @@ public: * if the entry has been changed. */ void beginUpdate(); - void endUpdate(); + bool endUpdate(); Group* group(); const Group* group() const;