aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/thread/ProxyConnectionTestTask.h
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2023-03-31 21:27:08 +0000
committerGitHub <[email protected]>2023-03-31 21:27:08 +0000
commit3cb863592a548edc074dde045493e0f83e5d694a (patch)
tree242534c257e723f49080428db22118c75706e233 /src/ui/thread/ProxyConnectionTestTask.h
parentMerge pull request #91 from saturneric/dev/2.0.10/main (diff)
parentfeat: add project security document (diff)
downloadGpgFrontend-3cb863592a548edc074dde045493e0f83e5d694a.tar.gz
GpgFrontend-3cb863592a548edc074dde045493e0f83e5d694a.zip
Merge pull request #93 from saturneric/dev/2.0.10/mainv2.1.0
Develop 2.1.0.2
Diffstat (limited to '')
-rw-r--r--src/ui/thread/ProxyConnectionTestTask.h (renamed from src/ui/thread/ProxyConnectionTestThread.h)16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ui/thread/ProxyConnectionTestThread.h b/src/ui/thread/ProxyConnectionTestTask.h
index 70757e03..38e78ae4 100644
--- a/src/ui/thread/ProxyConnectionTestThread.h
+++ b/src/ui/thread/ProxyConnectionTestTask.h
@@ -39,7 +39,7 @@ namespace GpgFrontend::UI {
* @brief
*
*/
-class ProxyConnectionTestThread : public QThread {
+class ProxyConnectionTestTask : public Thread::Task {
Q_OBJECT
public:
/**
@@ -49,9 +49,7 @@ class ProxyConnectionTestThread : public QThread {
* @param timeout
* @param parent
*/
- explicit ProxyConnectionTestThread(QString url, int timeout,
- QWidget* parent = nullptr)
- : QThread(parent), url_(std::move(url)), timeout_(timeout) {}
+ explicit ProxyConnectionTestTask(QString url, int timeout);
signals:
/**
@@ -68,10 +66,14 @@ class ProxyConnectionTestThread : public QThread {
*/
void run() override;
+ private slots:
+ void slot_process_network_reply(QNetworkReply* reply);
+
private:
- QString url_; ///<
- QString result_; ///<
- int timeout_ = 500; ///<
+ QString url_; ///<
+ QString result_; ///<
+ int timeout_ = 500; ///<
+ QNetworkAccessManager* network_manager_; ///<
};
} // namespace GpgFrontend::UI