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:
@@ -320,12 +320,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
bool isModified() const override
|
||||
{
|
||||
return isTemporary()/*e.g. memory view*/ ? false
|
||||
: m_widget->isModified();
|
||||
}
|
||||
|
||||
bool isFileReadOnly() const override {
|
||||
const FileName fn = filePath();
|
||||
if (fn.isEmpty())
|
||||
@@ -391,7 +385,12 @@ public:
|
||||
connect(m_addressEdit, &QLineEdit::editingFinished,
|
||||
this, &BinEditor::jumpToAddress);
|
||||
connect(widget, &BinEditorWidget::modificationChanged,
|
||||
m_file, &IDocument::changed);
|
||||
m_file, &IDocument::setModified);
|
||||
connect(m_file, &IDocument::modificationChanged,
|
||||
widget, &BinEditorWidget::setModified);
|
||||
|
||||
m_file->setModified(widget->isModified());
|
||||
|
||||
updateCursorPosition(widget->cursorPosition());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user