Files
UnrealEngineUWP/Engine/Source/Developer/SourceControl/Private/DefaultSourceControlProvider.cpp
Steve Robb 0756ef15b9 Delegate comparisons deprecated, lots of other associated code deprecated, and lots of warning fixups:
* Multicast delegate Add* calls now return FDelegateHandles, and Remove* calls are now all deprecated, except for a new Remove function which takes a FDelegateHandle.
* New FConsoleManager::RegisterConsoleVariableSink_Handle and UnregisterConsoleVariableSink_Handle functions which work in terms of FConsoleVariableSinkHandle.
* Timer calls which don't take FTimerHandles are deprecated.
* FTicker::AddTicker now returns an FDelegateHandle and is removed by an overloaded Remove function.
* DEFINE_ONLINE_DELEGATE* macros now define _Handle variants of the Add/Remove functions which return/take handles.
* Various other handle-based registration changes.
* Some unity build fixes.
* Some simplification of delegate code.
* Fixes for lots of existing code to use handle-based registration and unregistration.

#codereview robert.manuszewski

[CL 2400883 by Steve Robb in Main branch]
2015-01-08 09:29:27 -05:00

104 lines
2.9 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "SourceControlPrivatePCH.h"
#include "DefaultSourceControlProvider.h"
#include "ISourceControlState.h"
#include "ISourceControlModule.h"
#include "ISourceControlLabel.h"
#include "MessageLog.h"
#define LOCTEXT_NAMESPACE "DefaultSourceControlProvider"
void FDefaultSourceControlProvider::Init(bool bForceConnection)
{
FMessageLog("SourceControl").Info(LOCTEXT("SourceControlDisabled", "Source control is disabled"));
}
void FDefaultSourceControlProvider::Close()
{
}
FText FDefaultSourceControlProvider::GetStatusText() const
{
return LOCTEXT("SourceControlDisabled", "Source control is disabled");
}
bool FDefaultSourceControlProvider::IsAvailable() const
{
return false;
}
bool FDefaultSourceControlProvider::IsEnabled() const
{
return false;
}
const FName& FDefaultSourceControlProvider::GetName(void) const
{
static FName ProviderName("None");
return ProviderName;
}
ECommandResult::Type FDefaultSourceControlProvider::GetState( const TArray<FString>& InFiles, TArray< TSharedRef<ISourceControlState, ESPMode::ThreadSafe> >& OutState, EStateCacheUsage::Type InStateCacheUsage )
{
return ECommandResult::Failed;
}
void FDefaultSourceControlProvider::RegisterSourceControlStateChanged( const FSourceControlStateChanged::FDelegate& SourceControlStateChanged )
{
}
void FDefaultSourceControlProvider::UnregisterSourceControlStateChanged( const FSourceControlStateChanged::FDelegate& SourceControlStateChanged )
{
}
FDelegateHandle FDefaultSourceControlProvider::RegisterSourceControlStateChanged_Handle( const FSourceControlStateChanged::FDelegate& SourceControlStateChanged )
{
return FDelegateHandle();
}
void FDefaultSourceControlProvider::UnregisterSourceControlStateChanged_Handle( FDelegateHandle Handle )
{
}
ECommandResult::Type FDefaultSourceControlProvider::Execute( const TSharedRef<ISourceControlOperation, ESPMode::ThreadSafe>& InOperation, const TArray<FString>& InFiles, EConcurrency::Type InConcurrency, const FSourceControlOperationComplete& InOperationCompleteDelegate )
{
return ECommandResult::Failed;
}
bool FDefaultSourceControlProvider::CanCancelOperation( const TSharedRef<ISourceControlOperation, ESPMode::ThreadSafe>& InOperation ) const
{
return false;
}
void FDefaultSourceControlProvider::CancelOperation( const TSharedRef<ISourceControlOperation, ESPMode::ThreadSafe>& InOperation )
{
}
bool FDefaultSourceControlProvider::UsesLocalReadOnlyState() const
{
return false;
}
void FDefaultSourceControlProvider::Tick()
{
}
TArray< TSharedRef<ISourceControlLabel> > FDefaultSourceControlProvider::GetLabels( const FString& InMatchingSpec ) const
{
return TArray< TSharedRef<ISourceControlLabel> >();
}
#if SOURCE_CONTROL_WITH_SLATE
TSharedRef<class SWidget> FDefaultSourceControlProvider::MakeSettingsWidget() const
{
return SNullWidget::NullWidget;
}
#endif // SOURCE_CONTROL_WITH_SLATE
#undef LOCTEXT_NAMESPACE