summaryrefslogtreecommitdiffstats
path: root/examples/network/torrent/trackerclient.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/torrent/trackerclient.h')
-rw-r--r--examples/network/torrent/trackerclient.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/examples/network/torrent/trackerclient.h b/examples/network/torrent/trackerclient.h
index 323fc67eba..b8c169ff22 100644
--- a/examples/network/torrent/trackerclient.h
+++ b/examples/network/torrent/trackerclient.h
@@ -69,7 +69,7 @@ class TrackerClient : public QObject
Q_OBJECT
public:
- explicit TrackerClient(TorrentClient *downloader, QObject *parent = 0);
+ explicit TrackerClient(TorrentClient *downloader, QObject *parent = nullptr);
void start(const MetaInfo &info);
void stop();
@@ -98,21 +98,19 @@ private slots:
private:
TorrentClient *torrentDownloader;
- int requestInterval;
- int requestIntervalTimer;
+ int requestInterval = 5 * 60;
+ int requestIntervalTimer = -1;
QNetworkAccessManager http;
MetaInfo metaInfo;
QByteArray trackerId;
QList<TorrentPeer> peers;
- qint64 uploadedBytes;
- qint64 downloadedBytes;
- qint64 length;
+ qint64 length = 0;
QString uname;
QString pwd;
- bool firstTrackerRequest;
- bool lastTrackerRequest;
- bool firstSeeding;
+ bool firstTrackerRequest = true;
+ bool lastTrackerRequest = false;
+ bool firstSeeding = true;
};
#endif