From 1fdc150116cad39aae5c5da407c3312b47a59e3a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 17 Dec 2021 07:06:30 -0500 Subject: New upstream version 3.3.3+dfsg1. --- .../coreSQLiteStudio/services/updatemanager.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'SQLiteStudio3/coreSQLiteStudio/services/updatemanager.h') 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 #include -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& updates); + void updateAvailable(const QString& version, const QString& url); void noUpdatesAvailable(); void updatingError(const QString& errorMessage); }; -Q_DECLARE_METATYPE(QList) - #define UPDATES SQLITESTUDIO->getUpdateManager() #endif // PORTABLE_CONFIG -- cgit v1.2.3