Store version numbers in the appropriate type

This commit is contained in:
sledgehammer999
2025-06-30 10:08:22 +03:00
committed by Vladimir Golovnev (glassez)
parent dd5c934103
commit bb34444ddc
3 changed files with 22 additions and 27 deletions

View File

@@ -30,9 +30,10 @@
#pragma once
#include <QObject>
#include <QString>
#include <QUrl>
#include "base/utils/version.h"
namespace Net
{
struct DownloadResult;
@@ -45,9 +46,10 @@ class ProgramUpdater final : public QObject
public:
using QObject::QObject;
using Version = Utils::Version<4, 3>;
void checkForUpdates() const;
QString getNewVersion() const;
Version getNewVersion() const;
bool updateProgram() const;
signals:
@@ -62,7 +64,7 @@ private:
bool shouldUseFallback() const;
mutable bool m_hasCompletedOneReq = false;
QString m_remoteVersion;
QString m_fallbackRemoteVersion;
Version m_remoteVersion;
Version m_fallbackRemoteVersion;
QUrl m_updateURL;
};