updater hotfix
tests / package-smoke-linux (push) Skipped
tests / package-smoke-windows (push) Skipped
tests / package-smoke-macos (push) Skipped
tests / macos (push) Successful in 1m15s
tests / linux (push) Failing after 2m3s
tests / windows (push) Failing after 2m7s
release / create-release (push) Failing after 2s
release / build-linux (push) Skipped
release / build-windows (push) Skipped
release / build-macos (push) Skipped
release / publish (push) Skipped

Signed-off-by: galeon <dertiellis@gmail.com>
This commit is contained in:
galeon committed 2026-11-05 23:36:58 +03:00
1 parent f57d6d02fe
commit efb56a8411
5 files changed
+127 -23

No files matched your search

+8
View File
@@ -7,6 +7,7 @@
#include <memory>
class QFile;
class QNetworkReply;
class LauncherUpdates : public QObject
{
@@ -17,6 +18,7 @@ class LauncherUpdates : public QObject
Q_PROPERTY(QVariantMap states READ states NOTIFY catalogChanged)
Q_PROPERTY(QString latest READ latest NOTIFY catalogChanged)
Q_PROPERTY(bool installing READ installing NOTIFY installationChanged)
Q_PROPERTY(double downloadProgress READ downloadProgress NOTIFY downloadProgressChanged)
public:
explicit LauncherUpdates(QObject *parent = nullptr);
@@ -27,13 +29,16 @@ public:
QVariantMap states() const { return m_states; }
QString latest() const { return m_latest; }
bool installing() const { return bool(m_download); }
double downloadProgress() const { return m_downloadProgress; }
Q_INVOKABLE void refresh(const QString &channel);
Q_INVOKABLE void install(const QString &channel, const QString &version);
Q_INVOKABLE void cancelDownload();
signals:
void catalogChanged();
void installationChanged();
void downloadProgressChanged();
void installationFailed();
private:
@@ -46,4 +51,7 @@ private:
QString m_latest;
std::unique_ptr<QTemporaryDir> m_temp;
std::unique_ptr<QFile> m_download;
QNetworkReply *m_downloadReply = nullptr;
double m_downloadProgress = -1;
bool m_cancelRequested = false;
};