Skip to content
Permalink
Browse files

Deprecate older thread-unsafe signals

  • Loading branch information
nyalldawson committed Jan 23, 2019
1 parent ca592b7 commit 535965ba8cf655b8b385dfa5e34ba43e2c2f41bf
@@ -161,7 +161,12 @@ Returns whether the system proxy should be used
%End

signals:
void requestAboutToBeCreated( QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice * );

void requestAboutToBeCreated( QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice * ) /Deprecated/;
%Docstring

.. deprecated:: Use the thread-safe requestAboutToBeCreated( QgsNetworkRequestParameters ) signal instead.
%End

void requestAboutToBeCreated( QgsNetworkRequestParameters request );
%Docstring
@@ -211,7 +216,12 @@ created in any thread.
.. versionadded:: 3.6
%End

void requestCreated( QNetworkReply * );
void requestCreated( QNetworkReply * ) /Deprecated/;
%Docstring

.. deprecated:: Use the thread-safe requestAboutToBeCreated( QgsNetworkRequestParameters ) signal instead.
%End

void requestTimedOut( QNetworkReply * );

protected:
@@ -208,11 +208,15 @@ QNetworkReply *QgsNetworkAccessManager::createRequest( QNetworkAccessManager::Op
const int requestId = ++sRequestId;

emit requestAboutToBeCreated( QgsNetworkRequestParameters( op, req, requestId ) );
Q_NOWARN_DEPRECATED_PUSH
emit requestAboutToBeCreated( op, req, outgoingData );
Q_NOWARN_DEPRECATED_POP
QNetworkReply *reply = QNetworkAccessManager::createRequest( op, req, outgoingData );
reply->setProperty( "requestId", requestId );

Q_NOWARN_DEPRECATED_PUSH
emit requestCreated( reply );
Q_NOWARN_DEPRECATED_POP

// The timer will call abortRequest slot to abort the connection if needed.
// The timer is stopped by the finished signal and is restarted on downloadProgress and
@@ -27,6 +27,7 @@
#include <QNetworkRequest>

#include "qgis_core.h"
#include "qgis_sip.h"

/**
* \class QgsNetworkRequestParameters
@@ -164,7 +165,11 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
bool useSystemProxy() const { return mUseSystemProxy; }

signals:
void requestAboutToBeCreated( QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice * );

/**
* \deprecated Use the thread-safe requestAboutToBeCreated( QgsNetworkRequestParameters ) signal instead.
*/
Q_DECL_DEPRECATED void requestAboutToBeCreated( QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice * ) SIP_DEPRECATED;

/**
* Emitted when a network request is about to be created.
@@ -208,7 +213,11 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
*/
void requestTimedOut( QgsNetworkRequestParameters request );

void requestCreated( QNetworkReply * );
/**
* \deprecated Use the thread-safe requestAboutToBeCreated( QgsNetworkRequestParameters ) signal instead.
*/
Q_DECL_DEPRECATED void requestCreated( QNetworkReply * ) SIP_DEPRECATED;

void requestTimedOut( QNetworkReply * );

private slots:

0 comments on commit 535965b

Please sign in to comment.
You can’t perform that action at this time.