QGIS API Documentation
3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
src
core
network
qgssetrequestinitiator_p.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssetrequestinitiator.h - description
3
-------------------
4
begin : 2024-02-10
5
copyright : (C) 2024 by Matthias Kuhn
6
email :
[email protected]
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSSETREQUESTINITIATOR_P_H
19
#define QGSSETREQUESTINITIATOR_P_H
20
21
#include "
qgsnetworkaccessmanager.h
"
22
23
constexpr
int
sFilePrefixLength
= CMAKE_SOURCE_DIR[
sizeof
( CMAKE_SOURCE_DIR ) - 1] ==
'/'
?
sizeof
( CMAKE_SOURCE_DIR ) + 1 :
sizeof
( CMAKE_SOURCE_DIR );
24
25
#define QgsSetRequestInitiatorClass(request, _class) ( request ).setAttribute( static_cast< QNetworkRequest::Attribute >( QgsNetworkRequestParameters::AttributeInitiatorClass ), _class ); ( request ).setAttribute( static_cast< QNetworkRequest::Attribute >( QgsNetworkRequestParameters::AttributeInitiatorRequestId ), QString(QString( __FILE__ ).mid( sFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + ( __FUNCTION__ ) + ")") );
26
#define QgsSetRequestInitiatorId(request, str) ( request ).setAttribute( static_cast< QNetworkRequest::Attribute >( QgsNetworkRequestParameters::AttributeInitiatorRequestId ), QString(QString( __FILE__ ).mid( sFilePrefixLength ) + ':' + QString::number( __LINE__ ) + " (" + ( __FUNCTION__ ) + "): " + ( str ) ) );
27
28
#define QgsSetCPLHTTPFetchOverriderInitiatorClass(overrider, _class) QgsSetRequestInitiatorClass((overrider), _class)
29
#endif
// QGSSETREQUESTINITIATOR_P_H
qgsnetworkaccessmanager.h
sFilePrefixLength
constexpr int sFilePrefixLength
Definition
qgssetrequestinitiator_p.h:23
Generated on Mon Oct 28 2024 22:06:03 for QGIS API Documentation by
1.9.8