diff options
| author | 2021-12-17 07:06:30 -0500 | |
|---|---|---|
| committer | 2021-12-17 07:06:30 -0500 | |
| commit | 1fdc150116cad39aae5c5da407c3312b47a59e3a (patch) | |
| tree | 123c79a4d7ad2d45781ba03ce939f7539fb428d8 /SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h | |
| parent | feda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (diff) | |
New upstream version 3.3.3+dfsg1.upstream/3.3.3+dfsg1
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h b/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h index 50f4b6b..d7f59ca 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h +++ b/SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h @@ -9,8 +9,8 @@ #include <functional> #include <QProcess> -class QNetworkAccessManager; class QNetworkReply; +class QNetworkAccessManager; class QTemporaryDir; class QFile; @@ -18,34 +18,27 @@ class API_EXPORT UpdateManager : public QObject { Q_OBJECT public: - struct UpdateEntry - { - QString compontent; - QString version; - }; - explicit UpdateManager(QObject *parent = 0); ~UpdateManager(); void checkForUpdates(); - void update(); bool isPlatformEligibleForUpdate() const; private: QString updateBinaryAbsolutePath; + QNetworkAccessManager *netManager = nullptr; - void checkForUpdatesAsync(); - bool waitForProcess(QProcess& proc); - void processCheckResults(const QByteArray& results); + void handleUpdatesResponse(QNetworkReply* response); + + private slots: + void handleUpdatingError(const QString& errorMessage); signals: - void updatesAvailable(const QList<UpdateManager::UpdateEntry>& updates); + void updateAvailable(const QString& version, const QString& url); void noUpdatesAvailable(); void updatingError(const QString& errorMessage); }; -Q_DECLARE_METATYPE(QList<UpdateManager::UpdateEntry>) - #define UPDATES SQLITESTUDIO->getUpdateManager() #endif // PORTABLE_CONFIG |
