subsurface/core/cloudstorage.h
Rolf Eike Beer c4c8094e32 get rid of some foreach and Q_FOREACH constructs
See https://www.kdab.com/goodbye-q_foreach/

This is reduced to the places where the container is const or can be made const
without the need to always introduce an extra variable. Sadly qAsConst (Qt 5.7)
and std::as_const (C++17) are not available in all supported setups.

Also do some minor cleanups along the way.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-12 12:59:17 +03:00

28 lines
732 B
C++

// SPDX-License-Identifier: GPL-2.0
#ifndef CLOUD_STORAGE_H
#define CLOUD_STORAGE_H
#include <QObject>
#include <QNetworkReply>
class CloudStorageAuthenticate : public QObject {
Q_OBJECT
public:
QNetworkReply* backend(const QString& email,const QString& password,const QString& pin = QString(),const QString& newpasswd = QString());
explicit CloudStorageAuthenticate(QObject *parent);
signals:
void finishedAuthenticate();
void passwordChangeSuccessful();
private
slots:
void uploadError(QNetworkReply::NetworkError error);
void sslErrors(const QList<QSslError> &errorList);
void uploadFinished();
private:
QNetworkReply *reply;
QString userAgent;
QString cloudNewPassword;
};
QNetworkAccessManager *manager();
#endif