Make IFile::isReadOnly consistent.

It is supposed to refer to the property of the file on disk (if there is
any).

Task-number: QTCREATORBUG-4998
Change-Id: Iaed62c17d124b364aecec4d1f910046bade42d40
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Eike Ziller
2012-02-14 12:10:29 +01:00
parent d7b0ceac8a
commit f916d38dce
35 changed files with 36 additions and 238 deletions

View File

@@ -411,8 +411,6 @@ void BaseTextDocument::rename(const QString &newName)
bool BaseTextDocument::isReadOnly() const
{
if (hasDecodingError())
return true;
if (d->m_fileName.isEmpty()) //have no corresponding file, so editing is ok
return false;
return d->m_fileIsReadOnly;