forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -173,7 +173,7 @@ using namespace Qt4ProjectManager::Internal;
|
||||
Qt4PriFile::Qt4PriFile(Qt4ProjectManager::Qt4PriFileNode *qt4PriFile)
|
||||
: IDocument(qt4PriFile), m_priFile(qt4PriFile)
|
||||
{
|
||||
|
||||
setFileName(m_priFile->path());
|
||||
}
|
||||
|
||||
bool Qt4PriFile::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
@@ -184,18 +184,6 @@ bool Qt4PriFile::save(QString *errorString, const QString &fileName, bool autoSa
|
||||
return false;
|
||||
}
|
||||
|
||||
void Qt4PriFile::rename(const QString &newName)
|
||||
{
|
||||
// Can't happen
|
||||
Q_ASSERT(false);
|
||||
Q_UNUSED(newName);
|
||||
}
|
||||
|
||||
QString Qt4PriFile::fileName() const
|
||||
{
|
||||
return m_priFile->path();
|
||||
}
|
||||
|
||||
QString Qt4PriFile::defaultPath() const
|
||||
{
|
||||
return QString();
|
||||
|
||||
Reference in New Issue
Block a user