mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
766f297bc4
If we can't reach our preferred server, try using a different one. The diff makes more sense when ignoring white space. With this we check the connection to the cloud server much earlier and in case of failure to connect try a different cloud_base_url. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
25 lines
542 B
C++
25 lines
542 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef CHECKCLOUDCONNECTION_H
|
|
#define CHECKCLOUDCONNECTION_H
|
|
|
|
#include <QObject>
|
|
#include <QNetworkReply>
|
|
#include <QSsl>
|
|
|
|
class CheckCloudConnection : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
CheckCloudConnection(QObject *parent = 0);
|
|
bool checkServer();
|
|
void pickServer();
|
|
private:
|
|
QNetworkReply *reply;
|
|
bool nextServer();
|
|
private
|
|
slots:
|
|
void sslErrors(const QList<QSslError> &errorList);
|
|
void gotIP(QNetworkReply *reply);
|
|
void gotContinent(QNetworkReply *reply);
|
|
};
|
|
|
|
#endif // CHECKCLOUDCONNECTION_H
|