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:
@@ -129,18 +129,6 @@ bool FormWindowFile::isSaveAsAllowed() const
|
||||
return true;
|
||||
}
|
||||
|
||||
Core::IFile::ReloadBehavior FormWindowFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
|
||||
{
|
||||
if (type == TypePermissions)
|
||||
return BehaviorSilent;
|
||||
if (type == TypeContents) {
|
||||
if (state == TriggerInternal && !isModified())
|
||||
return BehaviorSilent;
|
||||
return BehaviorAsk;
|
||||
}
|
||||
return BehaviorAsk;
|
||||
}
|
||||
|
||||
bool FormWindowFile::reload(QString *errorString, ReloadFlag flag, ChangeType type)
|
||||
{
|
||||
if (flag == FlagIgnore)
|
||||
|
||||
Reference in New Issue
Block a user