File tree Expand file tree Collapse file tree 4 files changed +27
-7
lines changed Expand file tree Collapse file tree 4 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,18 @@ void ULinterNamingConvention::SortConventions()
159
159
});
160
160
}
161
161
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
162
170
void ULinterNamingConvention::PreSave (const class ITargetPlatform * TargetPlatform)
163
171
{
164
172
Super::PreSave (TargetPlatform);
165
173
166
174
SortConventions ();
167
175
}
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)
88
88
SAssignNew (MainWizard, SWizard)
89
89
.ShowPageList (false )
90
90
.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
96
98
.CanFinish (true )
97
99
.FinishButtonText (LOCTEXT (" FinishButtonText" , " Close" ))
98
100
.OnFinished_Lambda ([&]()
Original file line number Diff line number Diff line change 6
6
#include " Templates/SharedPointer.h"
7
7
#include " IDetailCustomization.h"
8
8
#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
9
14
#include " LinterNamingConvention.generated.h"
10
15
11
16
@@ -76,7 +81,11 @@ class LINTER_API ULinterNamingConvention : public UDataAsset
76
81
UFUNCTION (Blueprintcallable, Category = " Conventions" )
77
82
void SortConventions ();
78
83
84
+ #if UE_VERSION_NEWER_THAN(5, 0, 0)
85
+ virtual void PreSave (FObjectPreSaveContext ObjectSaveContext) override ;
86
+ #else
79
87
virtual void PreSave (const class ITargetPlatform * TargetPlatform) override ;
88
+ #endif
80
89
81
90
protected:
82
91
Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ class ULinterSettings : public UObject
21
21
22
22
UPROPERTY (EditAnywhere, config, Category = Settings)
23
23
TSoftObjectPtr<ULintRuleSet> DefaultLintRuleSet;
24
- };
24
+
25
+ };
You can’t perform that action at this time.
0 commit comments