GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
VersionCheckTask.h
1 
29 #pragma once
30 
31 #include <core/thread/Task.h>
32 
33 #include "SoftwareVersion.h"
34 
35 class QNetworkReply;
36 class QNetworkAccessManager;
37 
42 class VersionCheckTask : public QObject {
43  Q_OBJECT
44  public:
50 
56  auto Run() -> int;
57 
58  signals:
59 
66 
67  private slots:
68 
73  void slot_parse_latest_version_info();
74 
79  void slot_parse_current_version_info();
80 
81  private:
82  QByteArray latest_reply_bytes_;
83  QByteArray current_reply_bytes_;
84  QNetworkReply* latest_reply_ = nullptr;
85  QNetworkReply* current_reply_ = nullptr;
86  QNetworkAccessManager* network_manager_;
87  QString current_version_;
88  SoftwareVersion version_;
89 };
Definition: VersionCheckTask.h:42
void SignalUpgradeVersion(SoftwareVersion version)
VersionCheckTask()
Construct a new Version Check Thread object.
Definition: VersionCheckTask.cpp:38
auto Run() -> int
Definition: VersionCheckTask.cpp:45
QNetworkReply * latest_reply_
latest version info reply
Definition: VersionCheckTask.h:84
QNetworkReply * current_reply_
current version info reply
Definition: VersionCheckTask.h:85
Definition: SoftwareVersion.h:37