Skip to content

Commit

Permalink
Make Entry::endUpdate() return whether the entry has been modified.
Browse files Browse the repository at this point in the history
  • Loading branch information
debfx authored and droidmonkey committed Oct 3, 2016
1 parent c78822f commit 61ce733
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/core/Entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void Entry::beginUpdate()
m_modifiedSinceBegin = false;
}

void Entry::endUpdate()
bool Entry::endUpdate()
{
Q_ASSERT(m_tmpHistoryItem);
if (m_modifiedSinceBegin) {
Expand All @@ -521,6 +521,8 @@ void Entry::endUpdate()
}

m_tmpHistoryItem = nullptr;

return m_modifiedSinceBegin;
}

void Entry::updateModifiedSinceBegin()
Expand Down
2 changes: 1 addition & 1 deletion src/core/Entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Entry : public QObject
* if the entry has been changed.
*/
void beginUpdate();
void endUpdate();
bool endUpdate();

Group* group();
const Group* group() const;
Expand Down

0 comments on commit 61ce733

Please sign in to comment.