forked from qt-creator/qt-creator
Revert "Replace virtual isModified method with a getter/setter/notifier"
This doesn't fix the issue with cleaning the clear state of undo stack. This introduced the issue when ui file is opened it's marked as modified. It reverts59c90e00c1andd0c537ca75Change-Id: Ifd4ff8483d6c297461632de500a4502b1fd0871f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -44,6 +44,7 @@ using namespace Utils;
|
||||
|
||||
SubmitEditorFile::SubmitEditorFile(const VcsBaseSubmitEditorParameters *parameters, VcsBaseSubmitEditor *parent) :
|
||||
Core::IDocument(parent),
|
||||
m_modified(false),
|
||||
m_editor(parent)
|
||||
{
|
||||
setId(parameters->id);
|
||||
@@ -82,6 +83,14 @@ bool SubmitEditorFile::setContents(const QByteArray &contents)
|
||||
return m_editor->setFileContents(contents);
|
||||
}
|
||||
|
||||
void SubmitEditorFile::setModified(bool modified)
|
||||
{
|
||||
if (m_modified == modified)
|
||||
return;
|
||||
m_modified = modified;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
bool SubmitEditorFile::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
{
|
||||
const FileName fName = fileName.isEmpty() ? filePath() : FileName::fromString(fileName);
|
||||
|
||||
Reference in New Issue
Block a user