mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
[qt6] Fix narrowing warnings due to int->size_t type change
This commit is contained in:
parent
0a45c064bd
commit
a63e2cf4af
@ -198,7 +198,7 @@ class TcpServerWorker: public QObject
|
||||
try
|
||||
{
|
||||
// Parse protocol and URL GET /path HTTP/1.1
|
||||
const int firstLinePos { incomingData->indexOf( "\r\n" ) };
|
||||
const auto firstLinePos { incomingData->indexOf( "\r\n" ) };
|
||||
if ( firstLinePos == -1 )
|
||||
{
|
||||
throw HttpException( QStringLiteral( "HTTP error finding protocol header" ) );
|
||||
@ -251,7 +251,7 @@ class TcpServerWorker: public QObject
|
||||
|
||||
// Headers
|
||||
QgsBufferServerRequest::Headers headers;
|
||||
const int endHeadersPos { incomingData->indexOf( "\r\n\r\n" ) };
|
||||
const auto endHeadersPos { incomingData->indexOf( "\r\n\r\n" ) };
|
||||
|
||||
if ( endHeadersPos == -1 )
|
||||
{
|
||||
@ -262,7 +262,7 @@ class TcpServerWorker: public QObject
|
||||
|
||||
for ( const auto &headerLine : httpHeaders )
|
||||
{
|
||||
const int headerColonPos { headerLine.indexOf( ':' ) };
|
||||
const auto headerColonPos { headerLine.indexOf( ':' ) };
|
||||
if ( headerColonPos > 0 )
|
||||
{
|
||||
headers.insert( headerLine.left( headerColonPos ), headerLine.mid( headerColonPos + 2 ) );
|
||||
|
@ -59,8 +59,8 @@ QgsServerInterface *QgsServerApiContext::serverInterface() const
|
||||
|
||||
const QString QgsServerApiContext::matchedPath() const
|
||||
{
|
||||
auto path { mRequest->url().path( )};
|
||||
const int idx { path.indexOf( mApiRootPath )};
|
||||
QString path { mRequest->url().path( )};
|
||||
const auto idx { path.indexOf( mApiRootPath )};
|
||||
if ( idx != -1 )
|
||||
{
|
||||
path.truncate( idx + mApiRootPath.length() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user