forked from qt-creator/qt-creator
Move IEditor::isTemporary to IDocument
It's a property of the document implementation, not of the specific editor instance working on it. Change-Id: I5c3dd054e21b646e2d94b891916a096d045923f8 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -151,23 +151,18 @@ public:
|
||||
|
||||
Core::Id id() const { return m_id; }
|
||||
|
||||
bool isTemporary() const { return m_temporary; }
|
||||
void setTemporary(bool t) { m_temporary = t; }
|
||||
|
||||
signals:
|
||||
void describeRequested(const QString &source, const QString &change);
|
||||
void annotateRevisionRequested(const QString &source, const QString &change, int line);
|
||||
|
||||
private:
|
||||
Core::Id m_id;
|
||||
bool m_temporary;
|
||||
};
|
||||
|
||||
VcsBaseEditor::VcsBaseEditor(VcsBaseEditorWidget *widget,
|
||||
const VcsBaseEditorParameters *type) :
|
||||
BaseTextEditor(widget),
|
||||
m_id(type->id),
|
||||
m_temporary(false)
|
||||
m_id(type->id)
|
||||
{
|
||||
setContext(Core::Context(type->context, TextEditor::Constants::C_TEXTEDITOR));
|
||||
}
|
||||
@@ -725,7 +720,7 @@ void VcsBaseEditorWidget::setForceReadOnly(bool b)
|
||||
VcsBaseEditor *eda = qobject_cast<VcsBaseEditor *>(editor());
|
||||
QTC_ASSERT(eda != 0, return);
|
||||
setReadOnly(b);
|
||||
eda->setTemporary(b);
|
||||
eda->document()->setTemporary(b);
|
||||
}
|
||||
|
||||
QString VcsBaseEditorWidget::source() const
|
||||
|
||||
Reference in New Issue
Block a user