From a403274aa816a572ded94cc5a735de71e209ace0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 30 Jun 2024 14:34:06 +0200 Subject: [PATCH] Fix ambiguous Version name after semver introduction in uibase. --- src/base_script.cpp | 12 ++++++------ src/base_script.h | 16 ++++++++-------- src/installer_fomod_csharp_en.ts | 10 +++++----- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/base_script.cpp b/src/base_script.cpp index 0826612..b80f9aa 100644 --- a/src/base_script.cpp +++ b/src/base_script.cpp @@ -567,28 +567,28 @@ namespace CSharp { // Versioning / INIs: // Convert to Version^ from a MO2 version: - inline Version^ make_version(VersionInfo version) { + inline System::Version^ make_version(VersionInfo version) { auto qversion = version.asQVersionNumber(); - return gcnew Version(qversion.majorVersion(), qversion.minorVersion(), qversion.microVersion()); + return gcnew System::Version(qversion.majorVersion(), qversion.minorVersion(), qversion.microVersion()); } - Version^ BaseScriptImpl::GetModManagerVersion() { + System::Version^ BaseScriptImpl::GetModManagerVersion() { return make_version(g_Organizer->appVersion()); } - Version^ BaseScriptImpl::GetGameVersion() { + System::Version^ BaseScriptImpl::GetGameVersion() { return make_version(g_Organizer->managedGame()->gameVersion()); } - Version^ BaseScriptImpl::GetScriptExtenderVersion() { + System::Version^ BaseScriptImpl::GetScriptExtenderVersion() { auto scriptExtender = g_Organizer->gameFeatures()->gameFeature(); if (!scriptExtender || !scriptExtender->isInstalled()) { return nullptr; } - return gcnew Version(msclr::interop::marshal_as(scriptExtender->getExtenderVersion().toStdString())); + return gcnew System::Version(msclr::interop::marshal_as(scriptExtender->getExtenderVersion().toStdString())); } bool BaseScriptImpl::ScriptExtenderPresent() { diff --git a/src/base_script.h b/src/base_script.h index 065e5ec..1d3ff5d 100644 --- a/src/base_script.h +++ b/src/base_script.h @@ -323,24 +323,24 @@ namespace CSharp { /// Gets the version of the mod manager. /// /// The version of the mod manager. - static Version^ GetModManagerVersion(); + static System::Version^ GetModManagerVersion(); /// /// Gets the version of the game that is installed. /// /// The version of the game, or null if Fallout /// is not installed. - static Version^ GetGameVersion(); + static System::Version^ GetGameVersion(); // This is not in the spec., but I do not see a point in checking each // script extender in a different way. - static Version^ GetScriptExtenderVersion(); + static System::Version^ GetScriptExtenderVersion(); /// /// Gets the script extender version or null if it's not installed /// /// - static Version^ GetSkseVersion() { + static System::Version^ GetSkseVersion() { return GetScriptExtenderVersion(); } @@ -348,7 +348,7 @@ namespace CSharp { /// Gets the script extender version or null if it's not installed /// /// - static Version^ GetFoseVersion() { + static System::Version^ GetFoseVersion() { return GetScriptExtenderVersion(); } @@ -356,7 +356,7 @@ namespace CSharp { /// Gets the script extender version or null if it's not installed /// /// - static Version^ GetNvseVersion() { + static System::Version^ GetNvseVersion() { return GetScriptExtenderVersion(); } @@ -364,7 +364,7 @@ namespace CSharp { /// Gets the version of the mod manager. /// /// The version of the mod manager. - static Version^ GetFommVersion() { + static System::Version^ GetFommVersion() { return GetModManagerVersion(); } @@ -373,7 +373,7 @@ namespace CSharp { /// /// The version of the game, or null if Fallout /// is not installed. - static Version^ GetFalloutVersion() { + static System::Version^ GetFalloutVersion() { // I think this is an old function... What Fallout anyway? So just going // to return the game version, whatever current game. return GetGameVersion(); diff --git a/src/installer_fomod_csharp_en.ts b/src/installer_fomod_csharp_en.ts index f7d2b5b..f8c13e8 100644 --- a/src/installer_fomod_csharp_en.ts +++ b/src/installer_fomod_csharp_en.ts @@ -91,7 +91,7 @@ FomodInfoReader - + Failed to parse %1. See console for details. @@ -99,12 +99,12 @@ InstallerFomodCSharp - + Fomod Installer C# - + Installer for C# based FOMOD archives. @@ -112,12 +112,12 @@ QObject - + Choose any: - + Choose one: