"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/qgsvectorlayer.cpp" between
QGIS-final-3_14_15.tar.gz and QGIS-final-3_14_16.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Latest release (3.14.x series).

qgsvectorlayer.cpp  (QGIS-final-3_14_15):qgsvectorlayer.cpp  (QGIS-final-3_14_16)
skipping to change at line 1936 skipping to change at line 1936
for ( int i = 0; i < queryItems.size(); i++ ) for ( int i = 0; i < queryItems.size(); i++ )
{ {
QString key = queryItems.at( i ).first; QString key = queryItems.at( i ).first;
QString value = queryItems.at( i ).second; QString value = queryItems.at( i ).second;
if ( key == QLatin1String( "layer" ) ) if ( key == QLatin1String( "layer" ) )
{ {
// syntax: provider:url_encoded_source_URI(:name(:encoding)?)? // syntax: provider:url_encoded_source_URI(:name(:encoding)?)?
theURIParts = value.split( ':' ); theURIParts = value.split( ':' );
theURIParts[1] = QUrl::fromPercentEncoding( theURIParts[1].toUtf8() ); theURIParts[1] = QUrl::fromPercentEncoding( theURIParts[1].toUtf8() );
theURIParts[1] = context.pathResolver().writePath( theURIParts[1] );
theURIParts[1] = QUrl::toPercentEncoding( theURIParts[1] ); if ( theURIParts[0] == QLatin1String( "delimitedtext" ) )
{
QUrl urlSource = QUrl( theURIParts[1] );
QUrl urlDest = QUrl::fromLocalFile( context.pathResolver().writePath(
urlSource.toLocalFile() ) );
urlDest.setQuery( urlSource.query() );
theURIParts[1] = QUrl::toPercentEncoding( urlDest.toString(), QByteArr
ay( "" ), QByteArray( ":" ) );
}
else
{
theURIParts[1] = context.pathResolver().writePath( theURIParts[1] );
theURIParts[1] = QUrl::toPercentEncoding( theURIParts[1] );
}
queryItems[i].second = theURIParts.join( QStringLiteral( ":" ) ) ; queryItems[i].second = theURIParts.join( QStringLiteral( ":" ) ) ;
} }
} }
query.setQueryItems( queryItems ); query.setQueryItems( queryItems );
QUrl urlDest = QUrl( urlSource ); QUrl urlDest = QUrl( urlSource );
urlDest.setQuery( query.query() ); urlDest.setQuery( query.query() );
src = QString::fromLatin1( urlDest.toEncoded() ); src = QString::fromLatin1( urlDest.toEncoded() );
} }
skipping to change at line 2010 skipping to change at line 2022
for ( int i = 0; i < queryItems.size(); i++ ) for ( int i = 0; i < queryItems.size(); i++ )
{ {
QString key = queryItems.at( i ).first; QString key = queryItems.at( i ).first;
QString value = queryItems.at( i ).second; QString value = queryItems.at( i ).second;
if ( key == QLatin1String( "layer" ) ) if ( key == QLatin1String( "layer" ) )
{ {
// syntax: provider:url_encoded_source_URI(:name(:encoding)?)? // syntax: provider:url_encoded_source_URI(:name(:encoding)?)?
theURIParts = value.split( ':' ); theURIParts = value.split( ':' );
theURIParts[1] = QUrl::fromPercentEncoding( theURIParts[1].toUtf8() ); theURIParts[1] = QUrl::fromPercentEncoding( theURIParts[1].toUtf8() );
theURIParts[1] = context.pathResolver().readPath( theURIParts[1] );
if ( theURIParts[0] == QStringLiteral( "delimitedtext" ) )
{
QUrl urlSource = QUrl( theURIParts[1] );
if ( !theURIParts[1].startsWith( QLatin1String( "file:" ) ) )
{
QUrl file = QUrl::fromLocalFile( theURIParts[1].left( theURIParts[1]
.indexOf( '?' ) ) );
urlSource.setScheme( QStringLiteral( "file" ) );
urlSource.setPath( file.path() );
}
QUrl urlDest = QUrl::fromLocalFile( context.pathResolver().readPath( u
rlSource.toLocalFile() ) );
urlDest.setQuery( urlSource.query() );
theURIParts[1] = urlDest.toString();
}
else
{
theURIParts[1] = context.pathResolver().readPath( theURIParts[1] );
}
theURIParts[1] = QUrl::toPercentEncoding( theURIParts[1] ); theURIParts[1] = QUrl::toPercentEncoding( theURIParts[1] );
queryItems[i].second = theURIParts.join( QStringLiteral( ":" ) ) ; queryItems[i].second = theURIParts.join( QStringLiteral( ":" ) ) ;
} }
} }
query.setQueryItems( queryItems ); query.setQueryItems( queryItems );
QUrl urlDest = QUrl( urlSource ); QUrl urlDest = QUrl( urlSource );
urlDest.setQuery( query.query() ); urlDest.setQuery( query.query() );
src = QString::fromLatin1( urlDest.toEncoded() ); src = QString::fromLatin1( urlDest.toEncoded() );
 End of changes. 2 change blocks. 
3 lines changed or deleted 40 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)