Add Network tests (#2304)
Also changes the way timeouts happen, since right now if a timeout was met (which it mostly wasn't), it would run the error callback twice causing potentially undefined behaviour
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
|
||||
#include <QHttpMultiPart>
|
||||
#include <QNetworkRequest>
|
||||
#include <QTimer>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
class QNetworkReply;
|
||||
|
||||
@@ -54,7 +56,8 @@ struct NetworkData {
|
||||
// to enable the timer, the "setTimeout" function needs to be called before
|
||||
// execute is called
|
||||
bool hasTimeout_{};
|
||||
QTimer *timer_;
|
||||
int timeoutMS_{};
|
||||
QTimer *timer_ = nullptr;
|
||||
QObject *lifetimeManager_;
|
||||
|
||||
QString getHash();
|
||||
|
||||
Reference in New Issue
Block a user