Commit aaf6b61e authored by Karel Slaný's avatar Karel Slaný

NetLayer is no longer derived from QObject.

parent d15998a8
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,6 +25,7 @@
#include <QEventLoop>
#include <QNetworkAccessManager>
#include <QNetworkCookie>
#include <QObject>
#include <QSslConfiguration>
#include <QTimer>
......@@ -41,8 +42,7 @@
*/
#define PRINT_RESPONSE_STDOUT 0
NetLayer::NetLayer(QObject *parent)
: QObject(parent)
NetLayer::NetLayer(void)
{
}
......@@ -379,9 +379,10 @@ bool NetLayer::sendRequest(IsdsSession::IsdsContext &ctx,
success = getResponse(ctx, reply, xmlDataOut);
} else {
// timeout expired
disconnect(reply, SIGNAL(finished()), &eventLoop, SLOT(quit()));
ctx.last_isds_msg = tr("Connection timeout expired. "
"Check your internet connection.");
QObject::disconnect(reply, SIGNAL(finished()),
&eventLoop, SLOT(quit()));
ctx.last_isds_msg =
tr("Connection timeout expired. Check your internet connection.");
reply->abort();
}
......
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -24,8 +24,8 @@
#ifndef _NET_LAYER_H_
#define _NET_LAYER_H_
#include <QObject>
#include <QByteArray>
#include <QCoreApplication> /* Q_DECLARE_TR_FUNCTIONS */
#include <QNetworkReply>
#include <QNetworkRequest>
......@@ -36,14 +36,14 @@
* and provides network management for ISDS connection.
* Class is initialised and used in the ISDS wrapper class (isds_wrapper.h)
*/
class NetLayer : public QObject {
Q_OBJECT
class NetLayer {
Q_DECLARE_TR_FUNCTIONS(NetLayer)
public:
/*!
* @brief Constructor.
*/
NetLayer(QObject *parent = Q_NULLPTR);
NetLayer(void);
/*!
* @brief Create ISDS change password request from context.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment