diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-11 09:02:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 09:02:41 +0200 |
commit | ac8ee9f981ea509c04ce64d70a47429a1207e18e (patch) | |
tree | 8d7b3421af32ead8ee31f70a00ddd6fa14c81afd /launcher/updater/UpdateChecker.h | |
parent | cd948dceaed4625e7a876f680d3dc028e6cfe6de (diff) | |
parent | eae8a2914e99f6e9a6db042a0bc0f984fd890227 (diff) | |
download | PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.tar.gz PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.tar.bz2 PrismLauncher-ac8ee9f981ea509c04ce64d70a47429a1207e18e.zip |
Merge pull request #479 from kthchew/feature/sparkle-mac
Diffstat (limited to 'launcher/updater/UpdateChecker.h')
-rw-r--r-- | launcher/updater/UpdateChecker.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/launcher/updater/UpdateChecker.h b/launcher/updater/UpdateChecker.h index 13ee4efd..94e4312b 100644 --- a/launcher/updater/UpdateChecker.h +++ b/launcher/updater/UpdateChecker.h @@ -17,6 +17,11 @@ #include "net/NetJob.h" #include "GoUpdate.h" +#include "ExternalUpdater.h" + +#ifdef Q_OS_MAC +#include "MacSparkleUpdater.h" +#endif class UpdateChecker : public QObject { @@ -24,7 +29,7 @@ class UpdateChecker : public QObject public: UpdateChecker(shared_qobject_ptr<QNetworkAccessManager> nam, QString channelUrl, QString currentChannel, int currentBuild); - void checkForUpdate(QString updateChannel, bool notifyNoUpdate); + void checkForUpdate(const QString& updateChannel, bool notifyNoUpdate); /*! * Causes the update checker to download the channel list from the URL specified in config.h (generated by CMake). @@ -54,6 +59,11 @@ public: */ bool hasChannels() const; + /*! + * Returns a pointer to an object that controls the external updater, or nullptr if an external updater is not used. + */ + ExternalUpdater *getExternalUpdater(); + signals: //! Signal emitted when an update is available. Passes the URL for the repo and the ID and name for the version. void updateAvailable(GoUpdate::Status status); @@ -117,5 +127,14 @@ private: QString m_currentRepoUrl; QString m_newRepoUrl; + + /*! + * If not a nullptr, then the updater here will be used instead of the old updater that uses GoUpdate when + * checking for updates. + * + * As a result, signals from this class won't be emitted, and most of the functions in this class other + * than checkForUpdate are not useful. Call functions from this external updater object instead. + */ + ExternalUpdater *m_externalUpdater = nullptr; }; |