Skip to content
Permalink
Browse files

Replace obsolete QString::toAscii with QString::toLatin1

  • Loading branch information
m-kuhn committed Aug 17, 2016
1 parent 0269d05 commit 2233cc119781ecfe17b28ea2c66b55b2e666e404
Showing with 81 additions and 81 deletions.
  1. +6 −6 src/analysis/raster/qgsalignraster.cpp
  2. +2 −2 src/app/qgsabout.cpp
  3. +2 −2 src/app/qgshandlebadlayers.cpp
  4. +1 −1 src/auth/basic/qgsauthbasicmethod.cpp
  5. +2 −2 src/auth/pkipkcs12/qgsauthpkcs12method.cpp
  6. +1 −1 src/core/auth/qgsauthcertutils.cpp
  7. +3 −3 src/core/auth/qgsauthconfig.cpp
  8. +2 −2 src/core/auth/qgsauthmanager.cpp
  9. +2 −2 src/core/auth/qgsauthmethodregistry.cpp
  10. +2 −2 src/core/gps/qextserialport/posix_qextserialport.cpp
  11. +1 −1 src/core/gps/qextserialport/qextserialenumerator.cpp
  12. +1 −1 src/core/gps/qextserialport/win_qextserialport.cpp
  13. +7 −7 src/core/qgscoordinatereferencesystem.cpp
  14. +2 −2 src/core/qgscoordinatetransform.cpp
  15. +1 −1 src/core/qgscoordinatetransform_p.h
  16. +1 −1 src/core/qgsdataitem.cpp
  17. +1 −1 src/core/qgsdatasourceuri.cpp
  18. +1 −1 src/core/qgsgml.cpp
  19. +4 −4 src/core/qgsmaplayer.cpp
  20. +1 −1 src/core/qgsmaprenderercustompainterjob.cpp
  21. +3 −3 src/core/qgsnetworkreplyparser.cpp
  22. +1 −1 src/core/qgsproject.cpp
  23. +2 −2 src/core/qgsproviderregistry.cpp
  24. +1 −1 src/core/symbology-ng/qgssvgcache.cpp
  25. +1 −1 src/gui/auth/qgsauthcertificateinfo.cpp
  26. +1 −1 src/gui/auth/qgsauthconfigselect.cpp
  27. +2 −2 src/gui/auth/qgsauthimportidentitydialog.cpp
  28. +1 −1 src/plugins/georeferencer/qgsimagewarper.cpp
  29. +1 −1 src/plugins/georeferencer/qgstransformsettingsdialog.cpp
  30. +1 −1 src/providers/arcgisrest/qgsamsprovider.cpp
  31. +2 −2 src/providers/db2/qgsdb2provider.cpp
  32. +2 −2 src/providers/delimitedtext/qgsdelimitedtextfile.cpp
  33. +2 −2 src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
  34. +1 −1 src/providers/gdal/qgsgdalprovider.cpp
  35. +1 −1 src/providers/grass/qgsgrass.cpp
  36. +2 −2 src/providers/grass/qgsgrassgislib.cpp
  37. +1 −1 src/providers/grass/qgsgrassrasterprovider.cpp
  38. +1 −1 src/providers/ogr/qgsogrprovider.cpp
  39. +2 −2 src/providers/oracle/qgsoracletablecache.cpp
  40. +1 −1 src/providers/wcs/qgswcscapabilities.cpp
  41. +1 −1 src/providers/wcs/qgswcsprovider.cpp
  42. +1 −1 src/providers/wcs/qgswcsprovider.h
  43. +1 −1 src/providers/wfs/qgswfsdatasourceuri.h
  44. +1 −1 src/providers/wfs/qgswfsfeatureiterator.cpp
  45. +2 −2 src/providers/wms/qgswmscapabilities.h
  46. +1 −1 src/server/qgssentdatasourcebuilder.cpp
  47. +1 −1 src/server/qgsserverprojectparser.cpp
  48. +1 −1 src/server/qgswmsserver.cpp
@@ -377,14 +377,14 @@ bool QgsAlignRaster::run()
void QgsAlignRaster::dump() const
{
qDebug( "---ALIGN------------------" );
qDebug( "wkt %s", mCrsWkt.toAscii().constData() );
qDebug( "wkt %s", mCrsWkt.toLatin1().constData() );
qDebug( "w/h %d,%d", mXSize, mYSize );
qDebug( "transform" );
qDebug( "%6.2f %6.2f %6.2f", mGeoTransform[0], mGeoTransform[1], mGeoTransform[2] );
qDebug( "%6.2f %6.2f %6.2f", mGeoTransform[3], mGeoTransform[4], mGeoTransform[5] );

QgsRectangle e = transform_to_extent( mGeoTransform, mXSize, mYSize );
qDebug( "extent %s", e.toString().toAscii().constData() );
qDebug( "extent %s", e.toString().toLatin1().constData() );
}

int QgsAlignRaster::suggestedReferenceLayer() const
@@ -452,7 +452,7 @@ bool QgsAlignRaster::createAndWarp( const Item& raster )
}

// Write out the projection definition.
GDALSetProjection( hDstDS, mCrsWkt.toAscii().constData() );
GDALSetProjection( hDstDS, mCrsWkt.toLatin1().constData() );
GDALSetGeoTransform( hDstDS, mGeoTransform );

// Copy the color table, if required.
@@ -521,7 +521,7 @@ bool QgsAlignRaster::suggestedWarpOutput( const QgsAlignRaster::RasterInfo& info
// to destination georeferenced coordinates (not destination
// pixel line). We do that by omitting the destination dataset
// handle (setting it to nullptr).
void* hTransformArg = GDALCreateGenImgProjTransformer( info.mDataset, info.mCrsWkt.toAscii().constData(), nullptr, destWkt.toAscii().constData(), FALSE, 0, 1 );
void* hTransformArg = GDALCreateGenImgProjTransformer( info.mDataset, info.mCrsWkt.toLatin1().constData(), nullptr, destWkt.toLatin1().constData(), FALSE, 0, 1 );
if ( !hTransformArg )
return false;

@@ -604,12 +604,12 @@ QPointF QgsAlignRaster::RasterInfo::origin() const
void QgsAlignRaster::RasterInfo::dump() const
{
qDebug( "---RASTER INFO------------------" );
qDebug( "wkt %s", mCrsWkt.toAscii().constData() );
qDebug( "wkt %s", mCrsWkt.toLatin1().constData() );
qDebug( "w/h %d,%d", mXSize, mYSize );
qDebug( "cell x/y %f,%f", cellSize().width(), cellSize().width() );

QgsRectangle r = extent();
qDebug( "extent %s", r.toString().toAscii().constData() );
qDebug( "extent %s", r.toString().toLatin1().constData() );

qDebug( "transform" );
qDebug( "%6.2f %6.2f %6.2f", mGeoTransform[0], mGeoTransform[1], mGeoTransform[2] );
@@ -179,7 +179,7 @@ void QgsAbout::init()
txtDonors->clear();
txtDonors->document()->setDefaultStyleSheet( QgsApplication::reportStyleSheet() );
txtDonors->setHtml( donorsHTML );
QgsDebugMsg( QString( "donorsHTML:%1" ).arg( donorsHTML.toAscii().constData() ) );
QgsDebugMsg( QString( "donorsHTML:%1" ).arg( donorsHTML.toLatin1().constData() ) );
}

// read the TRANSLATORS file and populate the text widget
@@ -201,7 +201,7 @@ void QgsAbout::init()
translatorHTML += translatorStream.readLine();
}
txtTranslators->setHtml( translatorHTML );
QgsDebugMsg( QString( "translatorHTML:%1" ).arg( translatorHTML.toAscii().constData() ) );
QgsDebugMsg( QString( "translatorHTML:%1" ).arg( translatorHTML.toLatin1().constData() ) );
}
setWhatsNew();
setLicence();
@@ -196,7 +196,7 @@ QString QgsHandleBadLayers::filename( int row )
}
else if ( provider == "delimitedtext" )
{
return QUrl::fromEncoded( datasource.toAscii() ).toLocalFile();
return QUrl::fromEncoded( datasource.toLatin1() ).toLocalFile();
}
}
else
@@ -234,7 +234,7 @@ void QgsHandleBadLayers::setFilename( int row, const QString& filename )
}
else if ( provider == "delimitedtext" )
{
QUrl uriSource = QUrl::fromEncoded( datasource.toAscii() );
QUrl uriSource = QUrl::fromEncoded( datasource.toLatin1() );
QUrl uriDest = QUrl::fromLocalFile( filename );
uriDest.setQueryItems( uriSource.queryItems() );
datasource = QString::fromAscii( uriDest.toEncoded() );
@@ -76,7 +76,7 @@ bool QgsAuthBasicMethod::updateNetworkRequest( QNetworkRequest &request, const Q

if ( !username.isEmpty() )
{
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( username, password ).toAscii().toBase64() );
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( username, password ).toLatin1().toBase64() );
}
return true;
}
@@ -249,15 +249,15 @@ QgsPkiConfigBundle *QgsAuthPkcs12Method::getPkiConfigBundle( const QString &auth

// init client cert
// Note: if this is not valid, no sense continuing
QSslCertificate clientcert( bundlelist.at( 0 ).toAscii() );
QSslCertificate clientcert( bundlelist.at( 0 ).toLatin1() );
if ( !clientcert.isValid() )
{
QgsDebugMsg( QString( "PKI bundle for authcfg %1: insert FAILED, client cert is not valid" ).arg( authcfg ) );
return bundle;
}

// init key
QSslKey clientkey( bundlelist.at( 1 ).toAscii(),
QSslKey clientkey( bundlelist.at( 1 ).toLatin1(),
QSsl::Rsa,
QSsl::Pem,
QSsl::PrivateKey,
@@ -182,7 +182,7 @@ QSslKey QgsAuthCertUtils::keyFromFile( const QString &keypath,
QList<QSslCertificate> QgsAuthCertUtils::certsFromString( const QString &pemtext )
{
QList<QSslCertificate> certs;
certs = QSslCertificate::fromData( pemtext.toAscii(), QSsl::Pem );
certs = QSslCertificate::fromData( pemtext.toLatin1(), QSsl::Pem );
if ( certs.isEmpty() )
{
QgsDebugMsg( "Parsed cert(s) EMPTY" );
@@ -257,12 +257,12 @@ const QgsPkiBundle QgsPkiBundle::fromPkcs12Paths( const QString &bundlepath,
if ( res == QCA::ConvertGood && !bundle.isNull() )
{
QCA::CertificateChain cert_chain( bundle.certificateChain() );
QSslCertificate cert( cert_chain.primary().toPEM().toAscii() );
QSslCertificate cert( cert_chain.primary().toPEM().toLatin1() );
if ( !cert.isNull() )
{
pkibundle.setClientCert( cert );
}
QSslKey cert_key( bundle.privateKey().toPEM().toAscii(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, QByteArray() );
QSslKey cert_key( bundle.privateKey().toPEM().toLatin1(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, QByteArray() );
if ( !cert_key.isNull() )
{
pkibundle.setClientKey( cert_key );
@@ -275,7 +275,7 @@ const QgsPkiBundle QgsPkiBundle::fromPkcs12Paths( const QString &bundlepath,
{
if ( ca_cert != cert_chain.primary() )
{
ca_chain << QSslCertificate( ca_cert.toPEM().toAscii() );
ca_chain << QSslCertificate( ca_cert.toPEM().toLatin1() );
}
}
pkibundle.setCaChain( ca_chain );
@@ -1688,7 +1688,7 @@ const QPair<QSslCertificate, QSslKey> QgsAuthManager::getCertIdentityBundle( con
QSslKey key;
if ( query.first() )
{
key = QSslKey( QgsAuthCrypto::decrypt( mMasterPass, masterPasswordCiv(), query.value( 0 ).toString() ).toAscii(),
key = QSslKey( QgsAuthCrypto::decrypt( mMasterPass, masterPasswordCiv(), query.value( 0 ).toString() ).toLatin1(),
QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey );
if ( key.isNull() )
{
@@ -2714,7 +2714,7 @@ const QByteArray QgsAuthManager::getTrustedCaCertsPemText()
{
certslist << cert.toPem();
}
capem = certslist.join( "\n" ).toAscii(); //+ "\n";
capem = certslist.join( "\n" ).toLatin1(); //+ "\n";
}
return capem;
}
@@ -334,7 +334,7 @@ QFunctionPointer QgsAuthMethodRegistry::function( QString const & authMethodKey,

if ( myLib.load() )
{
return myLib.resolve( functionName.toAscii().data() );
return myLib.resolve( functionName.toLatin1().data() );
}
else
{
@@ -352,7 +352,7 @@ void *QgsAuthMethodRegistry::function( QString const & authMethodKey,

if ( myLib.load() )
{
return myLib.resolve( functionName.toAscii().data() );
return myLib.resolve( functionName.toLatin1().data() );
}
else
{
@@ -685,9 +685,9 @@ bool QextSerialPort::open(OpenMode mode)
if (mode == QIODevice::NotOpen)
return isOpen();
if (!isOpen()) {
qDebug() << "trying to open file" << port.toAscii();
qDebug() << "trying to open file" << port.toLatin1();
//note: linux 2.6.21 seems to ignore O_NDELAY flag
if ((fd = ::open(port.toAscii() ,O_RDWR | O_NOCTTY | O_NDELAY)) != -1) {
if ((fd = ::open(port.toLatin1() ,O_RDWR | O_NOCTTY | O_NDELAY)) != -1) {
qDebug("file opened successfully");

setOpenMode(mode); // Flag the port as opened
@@ -94,7 +94,7 @@ QextSerialEnumerator::~QextSerialEnumerator( )
{
QString port = "\\\\.\\COM" + QString::number(i);

HANDLE hPort = ::CreateFile(port.toAscii(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
HANDLE hPort = ::CreateFile(port.toLatin1(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
if( hPort == INVALID_HANDLE_VALUE )
continue;

@@ -53,7 +53,7 @@ bool QextSerialPort::open(OpenMode mode) {
return isOpen();
if (!isOpen()) {
/*open the port*/
Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
Win_Handle=CreateFileA(port.toLatin1(), GENERIC_READ|GENERIC_WRITE,
0, NULL, OPEN_EXISTING, dwFlagsAndAttributes, NULL);
if (Win_Handle!=INVALID_HANDLE_VALUE) {
QIODevice::open(mode);
@@ -470,7 +470,7 @@ bool QgsCoordinateReferenceSystem::loadFromDb( const QString& db, const QString&
{
OSRDestroySpatialReference( d->mCRS );
d->mCRS = OSRNewSpatialReference( nullptr );
d->mIsValid = OSRSetFromUserInput( d->mCRS, d->mAuthId.toLower().toAscii() ) == OGRERR_NONE;
d->mIsValid = OSRSetFromUserInput( d->mCRS, d->mAuthId.toLower().toLatin1() ) == OGRERR_NONE;
setMapUnits();
}

@@ -1897,9 +1897,9 @@ int QgsCoordinateReferenceSystem::syncDb()
continue;

sql = QString( "SELECT parameters,noupdate FROM tbl_srs WHERE auth_name='EPSG' AND auth_id='%1'" ).arg( it.key() );
if ( sqlite3_prepare( database, sql.toAscii(), sql.size(), &select, &tail ) != SQLITE_OK )
if ( sqlite3_prepare( database, sql.toLatin1(), sql.size(), &select, &tail ) != SQLITE_OK )
{
qCritical( "Could not prepare: %s [%s]\n", sql.toAscii().constData(), sqlite3_errmsg( database ) );
qCritical( "Could not prepare: %s [%s]\n", sql.toLatin1().constData(), sqlite3_errmsg( database ) );
continue;
}

@@ -2007,7 +2007,7 @@ int QgsCoordinateReferenceSystem::syncDb()

#if !defined(PJ_VERSION) || PJ_VERSION!=470
sql = QString( "select auth_name,auth_id,parameters from tbl_srs WHERE auth_name<>'EPSG' AND NOT deprecated AND NOT noupdate" );
if ( sqlite3_prepare( database, sql.toAscii(), sql.size(), &select, &tail ) == SQLITE_OK )
if ( sqlite3_prepare( database, sql.toLatin1(), sql.size(), &select, &tail ) == SQLITE_OK )
{
while ( sqlite3_step( select ) == SQLITE_ROW )
{
@@ -2016,11 +2016,11 @@ int QgsCoordinateReferenceSystem::syncDb()
const char *params = reinterpret_cast< const char * >( sqlite3_column_text( select, 2 ) );

QString input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toLower(), auth_id );
projPJ pj = pj_init_plus( input.toAscii() );
projPJ pj = pj_init_plus( input.toLatin1() );
if ( !pj )
{
input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toUpper(), auth_id );
pj = pj_init_plus( input.toAscii() );
pj = pj_init_plus( input.toLatin1() );
}

if ( pj )
@@ -2259,7 +2259,7 @@ bool QgsCoordinateReferenceSystem::syncDatumTransform( const QString& dbPath )
sqlite3_stmt *stmt;
QString cOpCode;
QString sql = QString( "SELECT coord_op_code FROM tbl_datum_transform WHERE coord_op_code=%1" ).arg( v[ idxid ] );
int prepareRes = sqlite3_prepare( db, sql.toAscii(), sql.size(), &stmt, nullptr );
int prepareRes = sqlite3_prepare( db, sql.toLatin1(), sql.size(), &stmt, nullptr );
if ( prepareRes != SQLITE_OK )
continue;

@@ -682,7 +682,7 @@ void QgsCoordinateTransform::searchDatumTransform( const QString& sql, QList< in
}

sqlite3_stmt* stmt;
int prepareRes = sqlite3_prepare( db, sql.toAscii(), sql.size(), &stmt, nullptr );
int prepareRes = sqlite3_prepare( db, sql.toLatin1(), sql.size(), &stmt, nullptr );
if ( prepareRes != SQLITE_OK )
{
sqlite3_finalize( stmt );
@@ -717,7 +717,7 @@ bool QgsCoordinateTransform::datumTransformCrsInfo( int datumTransform, int& eps

sqlite3_stmt* stmt;
QString sql = QString( "SELECT epsg_nr,source_crs_code,target_crs_code,remarks,scope,preferred,deprecated FROM tbl_datum_transform WHERE coord_op_code=%1" ).arg( datumTransform );
int prepareRes = sqlite3_prepare( db, sql.toAscii(), sql.size(), &stmt, nullptr );
int prepareRes = sqlite3_prepare( db, sql.toLatin1(), sql.size(), &stmt, nullptr );
if ( prepareRes != SQLITE_OK )
{
sqlite3_finalize( stmt );
@@ -244,7 +244,7 @@ class QgsCoordinateTransformPrivate : public QSharedData

sqlite3_stmt* stmt;
QString sql = QString( "SELECT coord_op_method_code,p1,p2,p3,p4,p5,p6,p7 FROM tbl_datum_transform WHERE coord_op_code=%1" ).arg( datumTransform );
int prepareRes = sqlite3_prepare( db, sql.toAscii(), sql.size(), &stmt, nullptr );
int prepareRes = sqlite3_prepare( db, sql.toLatin1(), sql.size(), &stmt, nullptr );
if ( prepareRes != SQLITE_OK )
{
sqlite3_finalize( stmt );
@@ -583,7 +583,7 @@ int QgsDataItem::findItem( QVector<QgsDataItem*> items, QgsDataItem * item )
{
for ( int i = 0; i < items.size(); i++ )
{
Q_ASSERT_X( items[i], "findItem", QString( "item %1 is nullptr" ).arg( i ).toAscii() );
Q_ASSERT_X( items[i], "findItem", QString( "item %1 is nullptr" ).arg( i ).toLatin1() );
QgsDebugMsgLevel( QString::number( i ) + " : " + items[i]->mPath + " x " + item->mPath, 2 );
if ( items[i]->equal( item ) )
return i;
@@ -630,7 +630,7 @@ void QgsDataSourceUri::setEncodedUri( const QByteArray & uri )

void QgsDataSourceUri::setEncodedUri( const QString & uri )
{
setEncodedUri( uri.toAscii() );
setEncodedUri( uri.toLatin1() );
}

QString QgsDataSourceUri::quotedTablename() const
@@ -79,7 +79,7 @@ int QgsGml::getFeatures( const QString& uri, QgsWkbTypes::Type* wkbType, QgsRect
}
else if ( !userName.isNull() || !password.isNull() )
{
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( userName, password ).toAscii().toBase64() );
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( userName, password ).toLatin1().toBase64() );
}
QNetworkReply* reply = QgsNetworkAccessManager::instance()->get( request );

@@ -208,7 +208,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement& layerElement )
}
else if ( provider == "delimitedtext" )
{
QUrl urlSource = QUrl::fromEncoded( mDataSource.toAscii() );
QUrl urlSource = QUrl::fromEncoded( mDataSource.toLatin1() );

if ( !mDataSource.startsWith( "file:" ) )
{
@@ -570,7 +570,7 @@ bool QgsMapLayer::writeLayerXml( QDomElement& layerElement, QDomDocument& docume
}
else if ( vlayer && vlayer->providerType() == "delimitedtext" )
{
QUrl urlSource = QUrl::fromEncoded( src.toAscii() );
QUrl urlSource = QUrl::fromEncoded( src.toLatin1() );
QUrl urlDest = QUrl::fromLocalFile( QgsProject::instance()->writePath( urlSource.toLocalFile(), relativeBasePath ) );
urlDest.setQueryItems( urlSource.queryItems() );
src = QString::fromAscii( urlDest.toEncoded() );
@@ -1298,7 +1298,7 @@ QString QgsMapLayer::saveNamedStyle( const QString &uri, bool &resultFlag )
}
else if ( vlayer && vlayer->providerType() == "delimitedtext" )
{
filename = QUrl::fromEncoded( uri.toAscii() ).toLocalFile();
filename = QUrl::fromEncoded( uri.toLatin1() ).toLocalFile();
// toLocalFile() returns an empty string if theURI is a plain Windows-path, e.g. "C:/style.qml"
if ( filename.isEmpty() )
filename = uri;
@@ -1485,7 +1485,7 @@ QString QgsMapLayer::saveSldStyle( const QString &uri, bool &resultFlag ) const
}
else if ( vlayer->providerType() == "delimitedtext" )
{
filename = QUrl::fromEncoded( uri.toAscii() ).toLocalFile();
filename = QUrl::fromEncoded( uri.toLatin1() ).toLocalFile();
// toLocalFile() returns an empty string if theURI is a plain Windows-path, e.g. "C:/style.qml"
if ( filename.isEmpty() )
filename = uri;
@@ -70,7 +70,7 @@ void QgsMapRendererCustomPainterJob::start()
#ifndef QT_NO_DEBUG
QPaintDevice* thePaintDevice = mPainter->device();
QString errMsg = QString( "pre-set DPI not equal to painter's DPI (%1 vs %2)" ).arg( thePaintDevice->logicalDpiX() ).arg( mSettings.outputDpi() );
Q_ASSERT_X( qgsDoubleNear( thePaintDevice->logicalDpiX(), mSettings.outputDpi() ), "Job::startRender()", errMsg.toAscii().data() );
Q_ASSERT_X( qgsDoubleNear( thePaintDevice->logicalDpiX(), mSettings.outputDpi() ), "Job::startRender()", errMsg.toLatin1().data() );
#endif

delete mLabelingEngineV2;
@@ -66,13 +66,13 @@ QgsNetworkReplyParser::QgsNetworkReplyParser( QNetworkReply *reply )
// Lines should be terminated by CRLF ("\r\n") but any new line combination may appear
QByteArray data = mReply->readAll();
int from, to;
from = data.indexOf( boundary.toAscii(), 0 ) + boundary.length() + 1;
from = data.indexOf( boundary.toLatin1(), 0 ) + boundary.length() + 1;
//QVector<QByteArray> partHeaders;
//QVector<QByteArray> partBodies;
while ( true )
{
// 'to' is not really 'to', but index of the next byte after the end of part
to = data.indexOf( boundary.toAscii(), from );
to = data.indexOf( boundary.toLatin1(), from );
if ( to < 0 )
{
QgsDebugMsg( QString( "No more boundaries, rest size = %1" ).arg( data.size() - from - 1 ) );
@@ -123,7 +123,7 @@ QgsNetworkReplyParser::QgsNetworkReplyParser( QNetworkReply *reply )
{
QgsDebugMsg( "row = " + row );
QStringList kv = row.split( ": " );
headersMap.insert( kv.value( 0 ).toAscii(), kv.value( 1 ).toAscii() );
headersMap.insert( kv.value( 0 ).toLatin1(), kv.value( 1 ).toLatin1() );
}
mHeaders.append( headersMap );

@@ -1779,7 +1779,7 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro
}
else if ( provider == "delimitedtext" )
{
QUrl urlSource( QUrl::fromEncoded( datasource.toAscii() ) );
QUrl urlSource( QUrl::fromEncoded( datasource.toLatin1() ) );

if ( !datasource.startsWith( "file:" ) )
{

0 comments on commit 2233cc1

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