From 0df05c79ad06a3135c6efcda8c86e4d5329bec2c Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 11 Oct 2023 14:40:56 -0400 Subject: [PATCH] Add some more documentation to Account, AssetUpdater and LauncherCore --- launcher/include/account.h | 2 ++ launcher/include/assetupdater.h | 2 ++ launcher/include/launchercore.h | 20 +++++++------------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/launcher/include/account.h b/launcher/include/account.h index 71a2dd8..3a500a8 100644 --- a/launcher/include/account.h +++ b/launcher/include/account.h @@ -76,8 +76,10 @@ public: Q_INVOKABLE QString getOTP(); Q_INVOKABLE void setOTPSecret(const QString &secret); + /// Returns the path to the FFXIV config folder [[nodiscard]] QDir getConfigDir() const; + /// Updates FFXIV.cfg with some recommended options like turning the opening cutscene movie off void updateConfig(); Q_SIGNALS: diff --git a/launcher/include/assetupdater.h b/launcher/include/assetupdater.h index 6c53c8f..d513a3f 100644 --- a/launcher/include/assetupdater.h +++ b/launcher/include/assetupdater.h @@ -20,6 +20,8 @@ class AssetUpdater : public QObject public: explicit AssetUpdater(Profile &profile, LauncherCore &launcher, QObject *parent = nullptr); + /// Checks for any asset updates. (This currently only means Dalamud.) + /// \return False if the asset update failed, which should be considered fatal and Dalamud should not be used. QCoro::Task update(); private: diff --git a/launcher/include/launchercore.h b/launcher/include/launchercore.h index cf272cb..bb6f161 100755 --- a/launcher/include/launchercore.h +++ b/launcher/include/launchercore.h @@ -76,23 +76,17 @@ public: ProfileManager *profileManager(); AccountManager *accountManager(); + /// Initializes the Steamworks API. void initializeSteam(); - /* - * Begins the login process, and may call SquareBoot or SapphireLauncher depending on the profile type. - * It's designed to be opaque as possible to the caller. - * - * The login process is asynchronous. - */ + /// Begins the login process, and may call SquareBoot or SapphireLauncher depending on the profile type. + /// It's designed to be opaque as possible to the caller. + /// \note The login process is asynchronous. Q_INVOKABLE void login(Profile *profile, const QString &username, const QString &password, const QString &oneTimePassword); - /* - * Attempts to log into a profile without LoginInformation, which may or may not work depending on a combination of - * the password failing, OTP not being available to auto-generate, among other things. - * - * The launcher will still warn the user about any possible errors, however the call site will need to check the - * result to see whether they need to "reset" or show a failed state or not. - */ + /// Attempts to log into a profile without LoginInformation, which may or may not work depending on a combination of the password failing, OTP not being + /// available to auto-generate, among other things. The launcher will still warn the user about any possible errors, however the call site will need to + /// check the result to see whether they need to "reset" or show a failed state or not. \note The login process is asynchronous. Q_INVOKABLE bool autoLogin(Profile *profile); void buildRequest(const Profile &settings, QNetworkRequest &request);