forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user