Skip to content

Commit 6de32cf

Browse files
empty2filljwindgassen
authored andcommitted
Support UE 4.26 - 5.0
1 parent ddf63df commit 6de32cf

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

Source/Linter/Private/LinterNamingConvention.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,18 @@ void ULinterNamingConvention::SortConventions()
159159
});
160160
}
161161

162+
#if UE_VERSION_NEWER_THAN(5, 0, 0)
163+
void ULinterNamingConvention::PreSave(FObjectPreSaveContext ObjectSaveContext)
164+
{
165+
Super::PreSave(ObjectSaveContext);
166+
167+
SortConventions();
168+
}
169+
#else
162170
void ULinterNamingConvention::PreSave(const class ITargetPlatform* TargetPlatform)
163171
{
164172
Super::PreSave(TargetPlatform);
165173

166174
SortConventions();
167175
}
168-
>>>>>>> 99c97f0 (Sort Class Naming Conventions on PreSave):Plugins/Linter/Source/Linter/Private/LinterNamingConvention.cpp
176+
#endif

Source/Linter/Private/UI/LintWizard.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@ void SLintWizard::Construct(const FArguments& InArgs)
8888
SAssignNew(MainWizard, SWizard)
8989
.ShowPageList(false)
9090
.ShowCancelButton(false)
91-
.ButtonStyle(FAppStyle::Get(), "FlatButton.Default")
92-
.CancelButtonStyle(FAppStyle::Get(), "FlatButton.Default")
93-
.FinishButtonStyle(FAppStyle::Get(), "FlatButton.Success")
94-
.ButtonTextStyle(FAppStyle::Get(), "LargeText")
95-
//.ForegroundColor(FAppStyle::Get().GetSlateColor("WhiteBrush"))
91+
.ButtonStyle(FEditorStyle::Get(), "FlatButton.Default")
92+
.CancelButtonStyle(FEditorStyle::Get(), "FlatButton.Default")
93+
.FinishButtonStyle(FEditorStyle::Get(), "FlatButton.Success")
94+
.ButtonTextStyle(FEditorStyle::Get(), "LargeText")
95+
#if UE_VERSION_OLDER_THAN(5, 0, 0)
96+
.ForegroundColor(FEditorStyle::Get().GetSlateColor("WhiteBrush"))
97+
#endif
9698
.CanFinish(true)
9799
.FinishButtonText(LOCTEXT("FinishButtonText", "Close"))
98100
.OnFinished_Lambda([&]()

Source/Linter/Public/LinterNamingConvention.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
#include "Templates/SharedPointer.h"
77
#include "IDetailCustomization.h"
88
#include "PropertyHandle.h"
9+
#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
914
#include "LinterNamingConvention.generated.h"
1015

1116

@@ -76,7 +81,11 @@ class LINTER_API ULinterNamingConvention : public UDataAsset
7681
UFUNCTION(Blueprintcallable, Category = "Conventions")
7782
void SortConventions();
7883

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

8190
protected:
8291

Source/Linter/Public/LinterSettings.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ class ULinterSettings : public UObject
2121

2222
UPROPERTY(EditAnywhere, config, Category = Settings)
2323
TSoftObjectPtr<ULintRuleSet> DefaultLintRuleSet;
24-
};
24+
25+
};

0 commit comments

Comments
 (0)