Skip to content

Commit

Permalink
Replace obsolete QString::toAscii with QString::toLatin1
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 17, 2016
1 parent 0269d05 commit 2233cc1
Show file tree
Hide file tree
Showing 48 changed files with 81 additions and 81 deletions.
12 changes: 6 additions & 6 deletions src/analysis/raster/qgsalignraster.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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] );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsabout.cpp
Expand Up @@ -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
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgshandlebadlayers.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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() );
Expand Down
2 changes: 1 addition & 1 deletion src/auth/basic/qgsauthbasicmethod.cpp
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/auth/pkipkcs12/qgsauthpkcs12method.cpp
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/core/auth/qgsauthcertutils.cpp
Expand Up @@ -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" );
Expand Down
6 changes: 3 additions & 3 deletions src/core/auth/qgsauthconfig.cpp
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/core/auth/qgsauthmanager.cpp
Expand Up @@ -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() )
{
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/auth/qgsauthmethodregistry.cpp
Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/gps/qextserialport/posix_qextserialport.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/gps/qextserialport/qextserialenumerator.cpp
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/core/gps/qextserialport/win_qextserialport.cpp
Expand Up @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 )
{
Expand All @@ -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 )
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgscoordinatetransform.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatetransform_p.h
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdataitem.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdatasourceuri.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsgml.cpp
Expand Up @@ -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 );

Expand Down
8 changes: 4 additions & 4 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -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:" ) )
{
Expand Down Expand Up @@ -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() );
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaprenderercustompainterjob.cpp
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsnetworkreplyparser.cpp
Expand Up @@ -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 ) );
Expand Down Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsproject.cpp
Expand Up @@ -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:" ) )
{
Expand Down

0 comments on commit 2233cc1

Please sign in to comment.