2022-01-31 17:03:09 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "SourceControlPreferences.h"
|
|
|
|
|
|
2024-08-26 14:02:18 -04:00
|
|
|
#include "ISourceControlModule.h"
|
|
|
|
|
#include "ISourceControlProvider.h"
|
|
|
|
|
|
2022-09-24 13:31:25 -04:00
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(SourceControlPreferences)
|
|
|
|
|
|
2022-01-31 17:03:09 -05:00
|
|
|
bool USourceControlPreferences::IsValidationTagEnabled()
|
|
|
|
|
{
|
|
|
|
|
return GetDefault<USourceControlPreferences>()->bEnableValidationTag;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool USourceControlPreferences::ShouldDeleteNewFilesOnRevert()
|
|
|
|
|
{
|
|
|
|
|
return GetDefault<USourceControlPreferences>()->bShouldDeleteNewFilesOnRevert;
|
|
|
|
|
}
|
2022-09-19 21:54:38 -04:00
|
|
|
|
|
|
|
|
bool USourceControlPreferences::AreUncontrolledChangelistsEnabled()
|
|
|
|
|
{
|
|
|
|
|
return GetDefault<USourceControlPreferences>()->bEnableUncontrolledChangelists;
|
|
|
|
|
}
|
2022-09-24 13:31:25 -04:00
|
|
|
|
2024-08-26 14:02:18 -04:00
|
|
|
bool USourceControlPreferences::RequiresRevisionControlToRenameLocalizableAssets()
|
|
|
|
|
{
|
|
|
|
|
// This feature only works for Perforce (assume it is Perforce until Revision Control is configured)
|
|
|
|
|
bool bRevisionControlIsPerforce = true;
|
|
|
|
|
ISourceControlModule& SCModule = ISourceControlModule::Get();
|
|
|
|
|
if (SCModule.IsEnabled())
|
|
|
|
|
{
|
|
|
|
|
ISourceControlProvider& SCProvider = SCModule.GetProvider();
|
|
|
|
|
bRevisionControlIsPerforce = SCProvider.GetName() == "Perforce";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bRevisionControlIsPerforce && GetDefault<USourceControlPreferences>()->bRequiresRevisionControlToRenameLocalizableAssets;
|
|
|
|
|
}
|
|
|
|
|
|