From dbb03bfeff364297500c788853619f3c0e2ec31d Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 8 Oct 2023 17:52:11 -0400 Subject: [PATCH] Remove unused launch functions The official launcher, config backup tool, and sys info functions were removed from the interface so lets yeet these unused functions from bitrot. --- launcher/include/launchercore.h | 4 --- launcher/src/launchercore.cpp | 44 --------------------------------- 2 files changed, 48 deletions(-) diff --git a/launcher/include/launchercore.h b/launcher/include/launchercore.h index f52f7e1..c1df648 100755 --- a/launcher/include/launchercore.h +++ b/launcher/include/launchercore.h @@ -169,10 +169,6 @@ public: Q_INVOKABLE void refreshNews(); [[nodiscard]] Headline *headline() const; - Q_INVOKABLE void openOfficialLauncher(Profile *profile); - Q_INVOKABLE void openSystemInfo(Profile *profile); - Q_INVOKABLE void openConfigBackup(Profile *profile); - [[nodiscard]] Profile *currentProfile() const; void setCurrentProfile(Profile *profile); diff --git a/launcher/src/launchercore.cpp b/launcher/src/launchercore.cpp index 0c73ffd..1ea4d9a 100755 --- a/launcher/src/launchercore.cpp +++ b/launcher/src/launchercore.cpp @@ -758,50 +758,6 @@ bool LauncherCore::isSteam() const return m_isSteam; } -void LauncherCore::openOfficialLauncher(Profile *profile) -{ - struct Argument { - QString key, value; - }; - - QString executeArg = QStringLiteral("%1%2%3%4"); - QDateTime dateTime = QDateTime::currentDateTime(); - executeArg = executeArg.arg(dateTime.date().month() + 1, 2, 10, QLatin1Char('0')); - executeArg = executeArg.arg(dateTime.date().day(), 2, 10, QLatin1Char('0')); - executeArg = executeArg.arg(dateTime.time().hour(), 2, 10, QLatin1Char('0')); - executeArg = executeArg.arg(dateTime.time().minute(), 2, 10, QLatin1Char('0')); - - QList arguments{{QStringLiteral("ExecuteArg"), executeArg}, - {QStringLiteral("UserPath"), Utility::toWindowsPath(profile->account()->getConfigDir().absolutePath())}}; - - const QString argFormat = QStringLiteral(" /%1 =%2"); - - QString argJoined; - for (auto &arg : arguments) { - argJoined += argFormat.arg(arg.key, arg.value.replace(QLatin1Char(' '), QLatin1String(" "))); - } - - QString finalArg = encryptGameArg(argJoined); - - auto launcherProcess = new QProcess(this); - launcherProcess->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); - launchExecutable(*profile, launcherProcess, {profile->gamePath() + QStringLiteral("/boot/ffxivlauncher64.exe"), finalArg}, false, true); -} - -void LauncherCore::openSystemInfo(Profile *profile) -{ - auto sysinfoProcess = new QProcess(this); - sysinfoProcess->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); - launchExecutable(*profile, sysinfoProcess, {profile->gamePath() + QStringLiteral("/boot/ffxivsysinfo64.exe")}, false, false); -} - -void LauncherCore::openConfigBackup(Profile *profile) -{ - auto configProcess = new QProcess(this); - configProcess->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); - launchExecutable(*profile, configProcess, {profile->gamePath() + QStringLiteral("/boot/ffxivconfig64.exe")}, false, false); -} - bool LauncherCore::isSteamDeck() const { return m_steamApi->isDeck();