File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
162170void 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
Original file line number Diff line number Diff 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 ([&]()
Original file line number Diff line number Diff line change 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
8190protected:
8291
Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ class ULinterSettings : public UObject
2121
2222 UPROPERTY (EditAnywhere, config, Category = Settings)
2323 TSoftObjectPtr<ULintRuleSet> DefaultLintRuleSet;
24- };
24+
25+ };
You can’t perform that action at this time.
0 commit comments