forked from qt-creator/qt-creator
IDocument: Simplify permission changes
Take care of handling file permission changes centrally. TextDocument had its own, caching implementation of tracking the backing file's read-only state. Move that into IDocument directly. IDocument::reload with a permission-only change is not a very interesting case, but every subclass needed to add handling of it. Instead, remove TypePermission from the file-change types, and handle it separately via the now unified checkPermissions() implementation. IDocument::reloadBehavior already was never called with TypePermission. Change-Id: I321d47ba6193bc878efa9bb50ba7a739fa492745 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -642,9 +642,7 @@ bool GenericProjectFile::reload(QString *errorString, IDocument::ReloadFlag flag
|
||||
{
|
||||
Q_UNUSED(errorString)
|
||||
Q_UNUSED(flag)
|
||||
if (type == TypePermissions)
|
||||
return true;
|
||||
|
||||
Q_UNUSED(type)
|
||||
if (Target *t = m_project->activeTarget())
|
||||
static_cast<GenericBuildSystem *>(t->buildSystem())->refresh(m_options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user