qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
src
net
updatecheck.h
Go to the documentation of this file.
1
/*
2
Copyright © 2014-2019 by The qTox Project Contributors
3
4
This file is part of qTox, a Qt-based graphical interface for Tox.
5
6
qTox is libre software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
qTox is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with qTox. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <QNetworkAccessManager>
23
#include <QObject>
24
#include <QTimer>
25
26
#include <memory>
27
28
class
Settings
;
29
class
QString;
30
class
QUrl;
31
class
QNetworkReply;
32
class
UpdateCheck
:
public
QObject
33
{
34
Q_OBJECT
35
36
public
:
37
UpdateCheck
(
const
Settings
&
settings
);
38
void
checkForUpdate
();
39
40
signals:
41
void
updateAvailable
(QString latestVersion, QUrl link);
42
void
upToDate
();
43
void
updateCheckFailed
();
44
void
versionIsUnstable
();
45
46
private
slots:
47
void
handleResponse
(QNetworkReply* reply);
48
49
private
:
50
QNetworkAccessManager
manager
;
51
QTimer
updateTimer
;
52
const
Settings
&
settings
;
53
};
Settings
Definition:
settings.h:51
UpdateCheck::versionIsUnstable
void versionIsUnstable()
UpdateCheck::UpdateCheck
UpdateCheck(const Settings &settings)
Definition:
updatecheck.cpp:102
UpdateCheck::updateTimer
QTimer updateTimer
Definition:
updatecheck.h:51
UpdateCheck::handleResponse
void handleResponse(QNetworkReply *reply)
Definition:
updatecheck.cpp:129
UpdateCheck::updateAvailable
void updateAvailable(QString latestVersion, QUrl link)
UpdateCheck::manager
QNetworkAccessManager manager
Definition:
updatecheck.h:50
UpdateCheck::checkForUpdate
void checkForUpdate()
Definition:
updatecheck.cpp:111
UpdateCheck::settings
const Settings & settings
Definition:
updatecheck.h:52
UpdateCheck::updateCheckFailed
void updateCheckFailed()
UpdateCheck::upToDate
void upToDate()
UpdateCheck
Definition:
updatecheck.h:32
Generated by
1.8.17