From 5fddd8ba64d709ec844ad409d9c4927bef7b5858 Mon Sep 17 00:00:00 2001 From: GlebShikovec Date: Fri, 15 Apr 2022 11:55:06 +0300 Subject: [PATCH 1/2] 5.0.0-release pathups --- Plugins/Linter/Linter.uplugin | 2 +- Plugins/Linter/Source/Linter/Private/LintRule.cpp | 8 ++++---- .../Linter/Private/LinterContentBrowserExtensions.cpp | 2 +- Plugins/Linter/Source/Linter/Private/UI/LintWizard.cpp | 6 +++--- Plugins/Linter/Source/Linter/Public/LinterSettings.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Plugins/Linter/Linter.uplugin b/Plugins/Linter/Linter.uplugin index b8697f9..9175915 100644 --- a/Plugins/Linter/Linter.uplugin +++ b/Plugins/Linter/Linter.uplugin @@ -10,7 +10,7 @@ "DocsURL": "http://discord.gamemak.in", "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/ca0639af6339476da86fa3bcf15de8ec", "SupportURL": "http://discord.gamemak.in", - "EngineVersion": "4.26.0", + "EngineVersion": "5.0", "CanContainContent": true, "Installed": true, "Modules": [ diff --git a/Plugins/Linter/Source/Linter/Private/LintRule.cpp b/Plugins/Linter/Source/Linter/Private/LintRule.cpp index 596aa31..d4fd3eb 100644 --- a/Plugins/Linter/Source/Linter/Private/LintRule.cpp +++ b/Plugins/Linter/Source/Linter/Private/LintRule.cpp @@ -61,11 +61,11 @@ FName ULintRule::GetRuleBasedObjectVariantName_Implementation(UObject* ObjectToL UMaterialInterface* MI = Cast(ObjectToLint); if (MI != nullptr) { -#if ENGINE_MINOR_VERSION >= 25 +//#if ENGINE_MINOR_VERSION >= 25 TMicRecursionGuard RecursionGuard; -#else - UMaterialInterface::TMicRecursionGuard RecursionGuard; -#endif +//#else +// UMaterialInterface::TMicRecursionGuard RecursionGuard; +//#endif const UMaterial* Material = MI->GetMaterial_Concurrent(RecursionGuard); if (Material != nullptr) { diff --git a/Plugins/Linter/Source/Linter/Private/LinterContentBrowserExtensions.cpp b/Plugins/Linter/Source/Linter/Private/LinterContentBrowserExtensions.cpp index 099c20d..f18c2ac 100644 --- a/Plugins/Linter/Source/Linter/Private/LinterContentBrowserExtensions.cpp +++ b/Plugins/Linter/Source/Linter/Private/LinterContentBrowserExtensions.cpp @@ -50,8 +50,8 @@ void FLinterContentBrowserExtensions::InstallHooks(FLinterModule* LinterModule, { lm->SetDesiredLintPaths(SelectedPaths); } - FGlobalTabmanager::Get()->InvokeTab(FName("LinterTab")); } + FGlobalTabmanager::Get()->TryInvokeTab(FName("LinterTab")); })), NAME_None, EUserInterfaceActionType::Button); diff --git a/Plugins/Linter/Source/Linter/Private/UI/LintWizard.cpp b/Plugins/Linter/Source/Linter/Private/UI/LintWizard.cpp index 65e9cbd..283064d 100644 --- a/Plugins/Linter/Source/Linter/Private/UI/LintWizard.cpp +++ b/Plugins/Linter/Source/Linter/Private/UI/LintWizard.cpp @@ -83,12 +83,12 @@ void SLintWizard::Construct(const FArguments& InArgs) .CancelButtonStyle(FEditorStyle::Get(), "FlatButton.Default") .FinishButtonStyle(FEditorStyle::Get(), "FlatButton.Success") .ButtonTextStyle(FEditorStyle::Get(), "LargeText") - .ForegroundColor(FEditorStyle::Get().GetSlateColor("WhiteBrush")) + //.ForegroundColor(FEditorStyle::Get().GetSlateColor("WhiteBrush")) .CanFinish(true) .FinishButtonText(LOCTEXT("FinishButtonText", "Close")) .OnFinished_Lambda([&]() { - FGlobalTabmanager::Get()->InvokeTab(FName("LinterTab"))->RequestCloseTab(); + FGlobalTabmanager::Get()->TryInvokeTab(FName("LinterTab"))->RequestCloseTab(); }) + SWizard::Page() .CanShow_Lambda([&]() { return RuleSets.Num() > 0; }) @@ -521,7 +521,7 @@ void SLintWizard::Construct(const FArguments& InArgs) LOCTEXT("ZipTaskShortName", "Zip Project Task"), FEditorStyle::GetBrush(TEXT("MainFrame.CookContent"))); } - FGlobalTabmanager::Get()->InvokeTab(FName("LinterTab"))->RequestCloseTab(); + FGlobalTabmanager::Get()->TryInvokeTab(FName("LinterTab"))->RequestCloseTab(); } return FReply::Handled(); }) diff --git a/Plugins/Linter/Source/Linter/Public/LinterSettings.h b/Plugins/Linter/Source/Linter/Public/LinterSettings.h index 5b13fac..bb7e9f5 100644 --- a/Plugins/Linter/Source/Linter/Public/LinterSettings.h +++ b/Plugins/Linter/Source/Linter/Public/LinterSettings.h @@ -18,6 +18,6 @@ class ULinterSettings : public UObject public: UPROPERTY(EditAnywhere, config, Category = Settings) - TAssetPtr DefaultLintRuleSet; + TSoftObjectPtr DefaultLintRuleSet; }; From 8579f57bf47c286b8a0148aade91aa41db24cb65 Mon Sep 17 00:00:00 2001 From: GlebShikovec Date: Fri, 15 Apr 2022 12:12:12 +0300 Subject: [PATCH 2/2] Fix engine version statement --- Plugins/Linter/Source/Linter/Private/LintRule.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Linter/Source/Linter/Private/LintRule.cpp b/Plugins/Linter/Source/Linter/Private/LintRule.cpp index d4fd3eb..477cd73 100644 --- a/Plugins/Linter/Source/Linter/Private/LintRule.cpp +++ b/Plugins/Linter/Source/Linter/Private/LintRule.cpp @@ -61,11 +61,11 @@ FName ULintRule::GetRuleBasedObjectVariantName_Implementation(UObject* ObjectToL UMaterialInterface* MI = Cast(ObjectToLint); if (MI != nullptr) { -//#if ENGINE_MINOR_VERSION >= 25 +#if ENGINE_MINOR_VERSION >= 25 || ENGINE_MAJOR_VERSION >= 5 TMicRecursionGuard RecursionGuard; -//#else -// UMaterialInterface::TMicRecursionGuard RecursionGuard; -//#endif +#else + UMaterialInterface::TMicRecursionGuard RecursionGuard; +#endif const UMaterial* Material = MI->GetMaterial_Concurrent(RecursionGuard); if (Material != nullptr) {