diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-03 16:52:19 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-08 02:23:42 +0200 |
commit | f00ee657a579e6a0da34492c221c9ca2059a2db0 (patch) | |
tree | bbf9d132f1b89e4c48a4388a0e8ca845f90eaf78 /src | |
parent | 88b6015918d6b113a45ea514bbd8083873609486 (diff) | |
download | qtlocation-f00ee657a579e6a0da34492c221c9ca2059a2db0.tar.gz |
Change uses of {to,from}Ascii to {to,from}Latin1
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I2e16486d80df6257ab88dc8c3b5d9dd497a19708
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src')
10 files changed, 19 insertions, 19 deletions
diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp index 0a2833ee..628148cc 100644 --- a/src/location/maps/qgeoserviceprovider.cpp +++ b/src/location/maps/qgeoserviceprovider.cpp @@ -182,7 +182,7 @@ Flags QGeoServiceProviderPrivate::features(const char *enumName) && this->metaData.value(QStringLiteral("Features")).isArray()) { QJsonArray features = this->metaData.value(QStringLiteral("Features")).toArray(); foreach (QJsonValue v, features) { - int val = en.keyToValue(v.toString().toAscii().constData()); + int val = en.keyToValue(v.toString().toLatin1().constData()); if (v.isString() && val != -1) { ret |= typename Flags::enum_type(val); } diff --git a/src/location/qlocationutils.cpp b/src/location/qlocationutils.cpp index a0202a36..96481e1a 100644 --- a/src/location/qlocationutils.cpp +++ b/src/location/qlocationutils.cpp @@ -296,7 +296,7 @@ bool QLocationUtils::hasValidNmeaChecksum(const char *data, int size) QString s; s.sprintf("%02x", result); - return s.toAscii() == QByteArray(&data[asteriskIndex+1], 2); + return s.toLatin1() == QByteArray(&data[asteriskIndex+1], 2); } bool QLocationUtils::getNmeaTime(const QByteArray &bytes, QTime *time) diff --git a/src/plugins/geoservices/nokia/placesv1/qplacejsondetailsparser.cpp b/src/plugins/geoservices/nokia/placesv1/qplacejsondetailsparser.cpp index 51a69849..7269b788 100644 --- a/src/plugins/geoservices/nokia/placesv1/qplacejsondetailsparser.cpp +++ b/src/plugins/geoservices/nokia/placesv1/qplacejsondetailsparser.cpp @@ -607,7 +607,7 @@ void QPlaceJSonDetailsParser::processPremiumContent(const QJSValue &content, QPl if (!value.isUndefined() && !value.toString().isEmpty()) { QPlaceIcon icon; QVariantMap iconParams; - iconParams.insert(QPlaceIcon::SingleUrl, QUrl::fromEncoded(value.toString().toAscii())); + iconParams.insert(QPlaceIcon::SingleUrl, QUrl::fromEncoded(value.toString().toLatin1())); icon.setParameters(iconParams); //note: the icon manager is set in QPlaceJSonDetailsParser::buildPlace() supplier.setIcon(icon); diff --git a/src/plugins/geoservices/nokia/placesv1/qplacejsonreviewparser.cpp b/src/plugins/geoservices/nokia/placesv1/qplacejsonreviewparser.cpp index a7c11845..02149c72 100644 --- a/src/plugins/geoservices/nokia/placesv1/qplacejsonreviewparser.cpp +++ b/src/plugins/geoservices/nokia/placesv1/qplacejsonreviewparser.cpp @@ -158,7 +158,7 @@ QPlaceReview QPlaceJSonReviewParser::buildReview(const QJSValue &review, QPlaceM if (!value.isUndefined() && !value.toString().isEmpty()) { QPlaceIcon icon; QVariantMap iconParams; - iconParams.insert(QPlaceIcon::SingleUrl, QUrl::fromEncoded(value.toString().toAscii())); + iconParams.insert(QPlaceIcon::SingleUrl, QUrl::fromEncoded(value.toString().toLatin1())); icon.setParameters(iconParams); icon.setManager(manager); supplier.setIcon(icon); diff --git a/src/plugins/geoservices/nokia/placesv1/qplacerestmanager.cpp b/src/plugins/geoservices/nokia/placesv1/qplacerestmanager.cpp index de9c3e7b..fb44d15c 100644 --- a/src/plugins/geoservices/nokia/placesv1/qplacerestmanager.cpp +++ b/src/plugins/geoservices/nokia/placesv1/qplacerestmanager.cpp @@ -209,7 +209,7 @@ QPlaceRestReply *QPlaceRestManager::postRatingRequest(const QString &placeId, co #if defined(QT_PLACES_LOGGING) qDebug() << "QRestDataProvider::sendGeneralRequest: " + url; #endif - QByteArray data = "{ratings:{rating:[{value:" + QString::number(value).toAscii() + ",type:OVERALL}]}}"; + QByteArray data = "{ratings:{rating:[{value:" + QString::number(value).toLatin1() + ",type:OVERALL}]}}"; return new QPlaceRestReply(mManager->post(request, data)); } diff --git a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp index 1f567906..2f2a4dc4 100644 --- a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp +++ b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp @@ -69,8 +69,8 @@ static bool isValidParameter(const QString ¶m) return false; foreach (QChar c, param) { - if (!c.isLetterOrNumber() && c.toAscii() != '%' && c.toAscii() != '-' && - c.toAscii() != '+' && c.toAscii() != '_') { + if (!c.isLetterOrNumber() && c.toLatin1() != '%' && c.toLatin1() != '-' && + c.toLatin1() != '+' && c.toLatin1() != '_') { return false; } } diff --git a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp index 09e72343..c8ff5ad6 100644 --- a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp +++ b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp @@ -137,7 +137,7 @@ QGeoTiledMapReply* QGeoTileFetcherNokia::getTileImage(const QGeoTileSpec &spec) QString QGeoTileFetcherNokia::getRequestString(const QGeoTileSpec &spec) { - const char subdomain = m_maxSubdomains ? m_firstSubdomain.toAscii() + + const char subdomain = m_maxSubdomains ? m_firstSubdomain.toLatin1() + qrand() % m_maxSubdomains : 0; static const QString http("http://"); static const QString path("/maptiler/v2/maptile/newest/"); @@ -258,7 +258,7 @@ void QGeoTileFetcherNokia::setHost(const QString &host) if (host.length() > 4 && host.at(1) == QChar('-') && host.at(3) == QChar('.')) { QString realHost = host.right(host.length() - 4); m_firstSubdomain = host.at(0); - m_maxSubdomains = host.at(2).toAscii() - host.at(0).toAscii() + 1; + m_maxSubdomains = host.at(2).toLatin1() - host.at(0).toLatin1() + 1; m_host = realHost; } else { m_host = host; diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp index 4da6c5e5..c715acd8 100644 --- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp +++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp @@ -236,7 +236,7 @@ bool QGeoPositionInfoSourceGeoclueMaster::tryGPS() gchar* device_name; client = gconf_client_get_default(); device_name = gconf_client_get_string(client, "/apps/geoclue/master/org.freedesktop.Geoclue.GPSDevice", NULL); - QString deviceName(QString::fromAscii(device_name)); + QString deviceName(QString::fromLatin1(device_name)); g_object_unref(client); g_free(device_name); diff --git a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp index 9cc3a58c..cbfb31ae 100644 --- a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp +++ b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp @@ -232,7 +232,7 @@ int QGeoSatelliteInfoSourceGypsy::init() } device_name = m_engine->eng_gconf_client_get_string(client, "/apps/geoclue/master/org.freedesktop.Geoclue.GPSDevice", NULL); g_object_unref(client); - QString deviceName(QString::fromAscii(device_name)); + QString deviceName(QString::fromLatin1(device_name)); if (deviceName.isEmpty() || (deviceName.trimmed().at(0) == '/' && !QFile::exists(deviceName.trimmed()))) { qWarning ("QGeoSatelliteInfoSourceGypsy Empty/nonexistent GPS device name detected."); diff --git a/src/plugins/position/maemo/dbuscomm_maemo.cpp b/src/plugins/position/maemo/dbuscomm_maemo.cpp index 5f0d0aa0..0aeb2b50 100644 --- a/src/plugins/position/maemo/dbuscomm_maemo.cpp +++ b/src/plugins/position/maemo/dbuscomm_maemo.cpp @@ -160,8 +160,8 @@ void DBusComm::receiveSettings(QGeoPositionInfoSource::PositioningMethod methods bool DBusComm::sendDBusRegister() { QDBusMessage reply = positioningdProxy->call("registerListener", - myService.toAscii().constData(), - myPath.toAscii().constData()); + myService.toLatin1().constData(), + myPath.toLatin1().constData()); if (reply.type() == QDBusMessage::ReplyMessage) { QList<QVariant> values = reply.arguments(); clientId = values.takeFirst().toInt(); @@ -170,8 +170,8 @@ bool DBusComm::sendDBusRegister() minimumUpdateInterval = values.takeFirst().toUInt(); } else { cerr << endl << "DBus error:\n"; - cerr << reply.errorName().toAscii().constData() << endl; - cerr << reply.errorMessage().toAscii().constData() << endl; + cerr << reply.errorName().toLatin1().constData() << endl; + cerr << reply.errorMessage().toLatin1().constData() << endl; return false; } @@ -204,8 +204,8 @@ bool DBusComm::sendConfigRequest(Command command, QGeoPositionInfoSource::Positi int n = reply.value(); } else { cerr << endl << "DBus error:\n"; - cerr << reply.error().name().toAscii().constData() << endl; - cerr << reply.error().message().toAscii().constData() << endl; + cerr << reply.error().name().toLatin1().constData() << endl; + cerr << reply.error().message().toLatin1().constData() << endl; return false; } @@ -226,8 +226,8 @@ QGeoPositionInfo& DBusComm::requestLastKnownPosition(bool satelliteMethodOnly) stream >> update; } else { cerr << endl << "DBus error:\n"; - cerr << reply.error().name().toAscii().constData() << endl; - cerr << reply.error().message().toAscii().constData() << endl; + cerr << reply.error().name().toLatin1().constData() << endl; + cerr << reply.error().message().toLatin1().constData() << endl; update = QGeoPositionInfo(); } |