forked from qt-creator/qt-creator
provide default implementation of IFile::reloadBehavior()
there only two classes of files anyway: regularly editable ones which may ask for interaction, and "background" files which always operate silently. the regular case is the more complex one, so put that into the base class.
This commit is contained in:
@@ -42,6 +42,15 @@ IFile::~IFile()
|
||||
{
|
||||
}
|
||||
|
||||
IFile::ReloadBehavior IFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
|
||||
{
|
||||
if (type == TypePermissions)
|
||||
return BehaviorSilent;
|
||||
if (type == TypeContents && state == TriggerInternal && !isModified())
|
||||
return BehaviorSilent;
|
||||
return BehaviorAsk;
|
||||
}
|
||||
|
||||
void IFile::checkPermissions()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user