forked from qt-creator/qt-creator
EditorManager: Auto-suspend editors
Adds an option (enabled by default) to close older documents when opening new documents. These documents are put into "suspended" state, similar to when restoring sessions: They editors and document are removed, freeing the memory from their content and attached resources (e.g. code model resources), but keeping the entry in the open editor list (and history list, of course). This is limited to editor/document types that can restore their UI state when the document is reopened. Task-number: QTCREATORBUG-10016 Change-Id: Icb5595aec950e3f666d42177fe2fd233954f2772 Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -97,8 +97,10 @@ public:
|
||||
virtual void setFilePath(const Utils::FileName &filePath);
|
||||
QString displayName() const;
|
||||
void setPreferredDisplayName(const QString &name);
|
||||
QString preferredDisplayName() const;
|
||||
QString plainDisplayName() const;
|
||||
void setUniqueDisplayName(const QString &name);
|
||||
QString uniqueDisplayName() const;
|
||||
|
||||
virtual bool isFileReadOnly() const;
|
||||
bool isTemporary() const;
|
||||
@@ -113,6 +115,8 @@ public:
|
||||
virtual bool shouldAutoSave() const;
|
||||
virtual bool isModified() const;
|
||||
virtual bool isSaveAsAllowed() const;
|
||||
bool isSuspendAllowed() const;
|
||||
void setSuspendAllowed(bool value);
|
||||
|
||||
virtual ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const;
|
||||
virtual bool reload(QString *errorString, ReloadFlag flag, ChangeType type);
|
||||
|
||||
Reference in New Issue
Block a user