diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-07-04 11:35:56 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-07-09 10:21:58 +0200 |
commit | 99c383f3d06b93d79172a0bc3984b4f3332a8842 (patch) | |
tree | d47b752f0d82c6535a3fcaf29f19452073ff97a5 /src/plugins/coreplugin/idocument.h | |
parent | 7dd81eca30b69b847709d00cb75fd432385c0917 (diff) | |
download | qt-creator-99c383f3d06b93d79172a0bc3984b4f3332a8842.tar.gz |
Make IDocument::fileName a member with setter.
Instead of requiring subclasses to implement a method.
Also renames IDocument::rename to IDocument::setFileName,
since it doesn't really rename any files or such.
Change-Id: I1344025c24d2f74a6a983e04fb0a5245f1f37aad
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/coreplugin/idocument.h')
-rw-r--r-- | src/plugins/coreplugin/idocument.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/idocument.h b/src/plugins/coreplugin/idocument.h index c543366316..36889a8ec9 100644 --- a/src/plugins/coreplugin/idocument.h +++ b/src/plugins/coreplugin/idocument.h @@ -82,7 +82,8 @@ public: virtual ~IDocument(); virtual bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false) = 0; - virtual QString fileName() const = 0; + QString fileName() const { return m_fileName; } + virtual void setFileName(const QString &fileName); virtual bool isFileReadOnly() const; virtual QString defaultPath() const = 0; @@ -95,7 +96,6 @@ public: virtual ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const; virtual bool reload(QString *errorString, ReloadFlag flag, ChangeType type) = 0; - virtual void rename(const QString &newName) = 0; virtual void checkPermissions(); @@ -117,6 +117,7 @@ signals: void fileNameChanged(const QString &oldName, const QString &newName); private: + QString m_fileName; QString m_autoSaveName; InfoBar *m_infoBar; bool m_hasWriteWarning; |