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/qt4projectmanager/qt4project.cpp | |
parent | 7dd81eca30b69b847709d00cb75fd432385c0917 (diff) |
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/qt4projectmanager/qt4project.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index 8922ad874a..bb5c147d04 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -120,8 +120,6 @@ public: Qt4ProjectFile(const QString &filePath, QObject *parent = 0); bool save(QString *errorString, const QString &fileName, bool autoSave); - QString fileName() const; - virtual void rename(const QString &newName); QString defaultPath() const; QString suggestedFileName() const; @@ -135,7 +133,6 @@ public: private: const QString m_mimeType; - QString m_filePath; }; /// Watches folders for Qt4PriFile nodes @@ -270,9 +267,9 @@ void ProjectFilesVisitor::visitFolderNode(FolderNode *folderNode) namespace Internal { Qt4ProjectFile::Qt4ProjectFile(const QString &filePath, QObject *parent) : Core::IDocument(parent), - m_mimeType(QLatin1String(Qt4ProjectManager::Constants::PROFILE_MIMETYPE)), - m_filePath(filePath) + m_mimeType(QLatin1String(Qt4ProjectManager::Constants::PROFILE_MIMETYPE)) { + setFileName(filePath); } bool Qt4ProjectFile::save(QString *, const QString &, bool) @@ -281,18 +278,6 @@ bool Qt4ProjectFile::save(QString *, const QString &, bool) return false; } -void Qt4ProjectFile::rename(const QString &newName) -{ - // Can't happen - Q_UNUSED(newName); - Q_ASSERT(false); -} - -QString Qt4ProjectFile::fileName() const -{ - return m_filePath; -} - QString Qt4ProjectFile::defaultPath() const { return QString(); |