void FSourceControlModule::SetUseGlobalSettings(bool bIsUseGlobalSettings) { SourceControlSettings.SetUseGlobalSettings(bIsUseGlobalSettings); // force the user to re-log in ShowLoginDialog(FSourceControlLoginClosed(), ELoginWindowMode::Modeless, EOnLoginWindowStartup::PreserveProvider); }
/** * Initialise the source control interface, and ensure we have a valid connection */ bool ICrashDebugHelper::InitSourceControl(bool bShowLogin) { // Ensure we are in a valid state to sync if (bInitialized == false) { UE_LOG(LogCrashDebugHelper, Warning, TEXT("InitSourceControl: CrashDebugHelper is not initialized properly.")); return false; } // Initialize the source control if it hasn't already been if( !ISourceControlModule::Get().IsEnabled() || !ISourceControlModule::Get().GetProvider().IsAvailable() ) { // make sure our provider is set to Perforce ISourceControlModule::Get().SetProvider("Perforce"); // Attempt to load in a source control module ISourceControlModule::Get().GetProvider().Init(); #if !MINIDUMPDIAGNOSTICS if ((ISourceControlModule::Get().GetProvider().IsAvailable() == false) || bShowLogin) { // Unable to connect? Prompt the user for login information ISourceControlModule::Get().ShowLoginDialog(FSourceControlLoginClosed(), ELoginWindowMode::Modeless, EOnLoginWindowStartup::PreserveProvider); } #endif // If it's still disabled, none was found, so exit if( !ISourceControlModule::Get().IsEnabled() || !ISourceControlModule::Get().GetProvider().IsAvailable() ) { UE_LOG(LogCrashDebugHelper, Warning, TEXT("InitSourceControl: Source control unavailable or disabled.")); return false; } } return true; }
void FLevelCollectionModel::OnSCCConnect() const { ISourceControlModule::Get().ShowLoginDialog(FSourceControlLoginClosed(), ELoginWindowMode::Modeless); }
void FPathContextMenu::ExecuteSCCConnect() const { ISourceControlModule::Get().ShowLoginDialog(FSourceControlLoginClosed(), ELoginWindowMode::Modeless); }
void FAssetContextMenu::ExecuteEnableSourceControl() { ISourceControlModule::Get().ShowLoginDialog(FSourceControlLoginClosed(), ELoginWindowMode::Modeless); }