Replace virtual isModified method with a getter/setter/notifier

We have lacked the setter and dedicated notifier before.

Change-Id: I58845a48259d260c5cc90ae94b173c79cddcfef9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jarek Kobus
2016-10-07 15:58:40 +02:00
committed by Jarek Kobus
parent caf721430b
commit 59c90e00c1
28 changed files with 113 additions and 136 deletions

View File

@@ -79,6 +79,7 @@ public:
bool hasWriteWarning = false;
bool restored = false;
bool isSuspendAllowed = false;
bool isModified = false;
};
} // namespace Internal
@@ -200,7 +201,17 @@ bool IDocument::shouldAutoSave() const
bool IDocument::isModified() const
{
return false;
return d->isModified;
}
void IDocument::setModified(bool modified)
{
if (d->isModified == modified)
return;
d->isModified = modified;
emit modificationChanged(modified);
emit changed();
}
bool IDocument::isSaveAsAllowed() const