You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none #jira UE-191791 #rnx - When a connection attempt fails we now return the credentials used and the errors given by the system. -- The credentials will be used to auto fill out the dialog, letting the user see what credentials were attempted in the last attempt. -- The errors are shown in a box with red error text, letting them know what went wrong. - We no longer let the revision control provider log errors when establishing a connection, so if the users correct info and successfully connects on a subsequent attempt they will not see an error in the logs. -- If the connection completely fails we still log as before. [CL 27302825 by paul chipchase in ue5-main branch]
95 lines
1.7 KiB
C++
95 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#if UE_VA_WITH_SLATE
|
|
|
|
#include "Input/Reply.h"
|
|
#include "Widgets/SCompoundWidget.h"
|
|
|
|
class SEditableTextBox;
|
|
class SWindow;
|
|
|
|
namespace UE::Virtualization
|
|
{
|
|
|
|
class SRevisionControlConnectionDialog : public SCompoundWidget
|
|
{
|
|
public:
|
|
struct FResult
|
|
{
|
|
public:
|
|
FResult() = default;
|
|
FResult(const FString& InPort, const FString& InUserName)
|
|
: bShouldRetry(true)
|
|
, Port(InPort)
|
|
, UserName(InUserName)
|
|
{
|
|
|
|
}
|
|
|
|
~FResult() = default;
|
|
|
|
public:
|
|
bool bShouldRetry = false;
|
|
|
|
FString Port;
|
|
FString UserName;
|
|
};
|
|
|
|
static FResult RunDialog(FStringView RevisionControlName, FStringView ConfigSectionName, FStringView CurrentPort, FStringView CurrentUsername, const FText& ErrorMessage);
|
|
|
|
SLATE_BEGIN_ARGS(SRevisionControlConnectionDialog) {}
|
|
SLATE_ARGUMENT(TSharedPtr<SWindow>, Window)
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments& InArgs, FStringView RevisionControlName, FStringView ConfigSectionName, FStringView CurrentPort, FStringView CurrentUsername, const FText& ErrorMessage);
|
|
|
|
enum class EResult : uint8
|
|
{
|
|
Retry,
|
|
Skip
|
|
};
|
|
|
|
EResult GetResult() const
|
|
{
|
|
return Result;
|
|
}
|
|
|
|
const FString& GetPort() const
|
|
{
|
|
return Port;
|
|
}
|
|
|
|
const FString& GetUserName() const
|
|
{
|
|
return UserName;
|
|
}
|
|
|
|
private:
|
|
|
|
void CloseModalDialog();
|
|
|
|
FReply OnResetToDefaults();
|
|
FReply OnRetryConnection();
|
|
FReply OnSkip();
|
|
|
|
void OnUrlClicked() const;
|
|
|
|
TWeakPtr<SWindow> WindowWidget;
|
|
|
|
TSharedPtr<SEditableTextBox> PortTextWidget;
|
|
TSharedPtr<SEditableTextBox> UsernameTextWidget;
|
|
|
|
EResult Result = EResult::Skip;
|
|
|
|
FString ConfigSectionName;
|
|
|
|
FString Port;
|
|
FString UserName;
|
|
};
|
|
|
|
} // namespace UE::Virtualization
|
|
|
|
#endif //UE_VA_WITH_SLATE
|