forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user