Skip to content

Commit 2719584

Browse files
empty2filljwindgassen
authored andcommitted
Merge changes from empty2fill
1 parent 42de2a5 commit 2719584

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

Plugins/Linter/Source/Linter/Private/Linter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ TSharedRef<SDockTab> FLinterModule::SpawnTab(const FSpawnTabArgs& TabSpawnArgs,
103103

104104
const TSharedRef<SDockTab> MajorTab =
105105
SNew(SDockTab)
106-
.Icon(IconBrush)
107106
.TabRole(ETabRole::MajorTab);
108107

109108
MajorTab->SetContent(SNew(SLintWizard));
109+
MajorTab->SetTabIcon(IconBrush);
110110

111111
return MajorTab;
112112
}

Plugins/Linter/Source/Linter/Private/LinterNamingConvention.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,18 @@ void ULinterNamingConvention::SortConventions()
147147
});
148148
}
149149

150+
#if UE_VERSION_NEWER_THAN(5, 0, 0)
151+
void ULinterNamingConvention::PreSave(FObjectPreSaveContext ObjectSaveContext)
152+
{
153+
Super::PreSave(ObjectSaveContext);
154+
155+
SortConventions();
156+
}
157+
#else
150158
void ULinterNamingConvention::PreSave(const class ITargetPlatform* TargetPlatform)
151159
{
152160
Super::PreSave(TargetPlatform);
153161

154162
SortConventions();
155163
}
164+
#endif

Plugins/Linter/Source/Linter/Private/UI/LintWizard.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ void SLintWizard::Construct(const FArguments& InArgs)
9393
.CancelButtonStyle(FEditorStyle::Get(), "FlatButton.Default")
9494
.FinishButtonStyle(FEditorStyle::Get(), "FlatButton.Success")
9595
.ButtonTextStyle(FEditorStyle::Get(), "LargeText")
96+
#if UE_VERSION_OLDER_THAN(5, 0, 0)
9697
.ForegroundColor(FEditorStyle::Get().GetSlateColor("WhiteBrush"))
98+
#endif
9799
.CanFinish(true)
98100
.FinishButtonText(LOCTEXT("FinishButtonText", "Close"))
99101
.OnFinished_Lambda([&]()

Plugins/Linter/Source/Linter/Public/LinterNamingConvention.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
#include "IDetailCustomization.h"
88
#include "PropertyHandle.h"
99
#include "Engine/DataAsset.h"
10+
#include "Misc/EngineVersionComparison.h"
11+
#if UE_VERSION_NEWER_THAN(5, 0, 0)
12+
#include "UObject/ObjectSaveContext.h"
13+
#endif
1014
#include "LinterNamingConvention.generated.h"
1115

1216

@@ -75,7 +79,11 @@ class LINTER_API ULinterNamingConvention : public UDataAsset
7579
UFUNCTION(Blueprintcallable, Category = "Conventions")
7680
void SortConventions();
7781

82+
#if UE_VERSION_NEWER_THAN(5, 0, 0)
83+
virtual void PreSave(FObjectPreSaveContext ObjectSaveContext) override;
84+
#else
7885
virtual void PreSave(const class ITargetPlatform* TargetPlatform) override;
86+
#endif
7987

8088
protected:
8189

Plugins/Linter/Source/Linter/Public/LinterSettings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ class ULinterSettings : public UObject
1818
public:
1919

2020
UPROPERTY(EditAnywhere, config, Category = Settings)
21-
TAssetPtr<ULintRuleSet> DefaultLintRuleSet;
21+
TSoftObjectPtr<ULintRuleSet> DefaultLintRuleSet;
2222

2323
};

0 commit comments

Comments
 (0)