summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-03 17:08:10 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-30 20:06:38 +0200
commit938fbcbb74fd23a6135c3379116b0a23a70a7a33 (patch)
tree65e5d93f04765193c61067e2dae5ce85dd2e178a
parent287285aafd0cb34ffc0e4fe150ee59a5e7dabc2d (diff)
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: Ia2fed44c5db997b6fc13a243f5e312d35f8625ad Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
-rw-r--r--examples/ndefeditor/mimeimagerecordeditor.cpp2
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp2
-rw-r--r--src/imports/nfc/qdeclarativendefmimerecord.cpp2
-rw-r--r--src/nfc/qndefnfctextrecord.cpp4
-rw-r--r--tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp4
-rw-r--r--tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/examples/ndefeditor/mimeimagerecordeditor.cpp b/examples/ndefeditor/mimeimagerecordeditor.cpp
index 85be9dc1..637a9820 100644
--- a/examples/ndefeditor/mimeimagerecordeditor.cpp
+++ b/examples/ndefeditor/mimeimagerecordeditor.cpp
@@ -134,6 +134,6 @@ void MimeImageRecordEditor::on_mimeImageOpen_clicked()
ui->mimeImageFile->setText(mimeDataFile);
ui->mimeImageImage->setPixmap(QPixmap::fromImage(image));
- m_record.setType(mimeType.toAscii());
+ m_record.setType(mimeType.toLatin1());
m_record.setPayload(imageData);
}
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
index fe8e24be..e4976967 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
@@ -306,7 +306,7 @@ QVariant QBluetoothServiceDiscoveryAgentPrivate::readAttributeValue(QXmlStreamRe
} else if (xml.name() == QLatin1String("text")) {
QString value = xml.attributes().value(QLatin1String("value")).toString();
if (xml.attributes().value(QLatin1String("encoding")) == QLatin1String("hex"))
- value = QString::fromUtf8(QByteArray::fromHex(value.toAscii()));
+ value = QString::fromUtf8(QByteArray::fromHex(value.toLatin1()));
xml.skipCurrentElement();
return value;
} else if (xml.name() == QLatin1String("sequence")) {
diff --git a/src/imports/nfc/qdeclarativendefmimerecord.cpp b/src/imports/nfc/qdeclarativendefmimerecord.cpp
index 5252d1c3..a7b5fc2b 100644
--- a/src/imports/nfc/qdeclarativendefmimerecord.cpp
+++ b/src/imports/nfc/qdeclarativendefmimerecord.cpp
@@ -96,5 +96,5 @@ QDeclarativeNdefMimeRecord::~QDeclarativeNdefMimeRecord()
QString QDeclarativeNdefMimeRecord::uri() const
{
QByteArray dataUri = "data:" + record().type() + ";base64," + record().payload().toBase64();
- return QString::fromAscii(dataUri.constData(), dataUri.length());
+ return QString::fromLatin1(dataUri.constData(), dataUri.length());
}
diff --git a/src/nfc/qndefnfctextrecord.cpp b/src/nfc/qndefnfctextrecord.cpp
index 8da9d728..e5c9c4cb 100644
--- a/src/nfc/qndefnfctextrecord.cpp
+++ b/src/nfc/qndefnfctextrecord.cpp
@@ -79,7 +79,7 @@ QString QNdefNfcTextRecord::locale() const
quint8 codeLength = status & 0x3f;
- return QString::fromAscii(p.constData() + 1, codeLength);
+ return QString::fromLatin1(p.constData() + 1, codeLength);
}
/*!
@@ -96,7 +96,7 @@ void QNdefNfcTextRecord::setLocale(const QString &locale)
quint8 newStatus = (status & 0xd0) | locale.length();
p[0] = newStatus;
- p.replace(1, codeLength, locale.toAscii());
+ p.replace(1, codeLength, locale.toLatin1());
setPayload(p);
}
diff --git a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
index 512f4d7d..57b92272 100644
--- a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
+++ b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
@@ -133,7 +133,7 @@ void tst_QBluetoothSocket::initTestCase()
QLatin1String t("TESTSERVER");
if (pe.contains(t)){
qDebug() << pe.value(t);
- strcpy(BTADDRESS, pe.value(t).toAscii());
+ strcpy(BTADDRESS, pe.value(t).toLatin1());
}
if (QBluetoothAddress(BTADDRESS).isNull()){
@@ -180,7 +180,7 @@ void tst_QBluetoothSocket::finished()
void tst_QBluetoothSocket::serviceDiscovered(const QBluetoothServiceInfo &info)
{
qDebug() << "Found: " << info.device().name() << info.serviceUuid();
- strcpy(BTADDRESS, info.device().address().toString().toAscii());
+ strcpy(BTADDRESS, info.device().address().toString().toLatin1());
done_discovery = true;
}
diff --git a/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp b/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp
index 8c2e6346..8e223d9e 100644
--- a/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp
+++ b/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp
@@ -154,7 +154,7 @@ void tst_QBluetoothTransferManager::finished()
void tst_QBluetoothTransferManager::serviceDiscovered(const QBluetoothServiceInfo &info)
{
qDebug() << "Found: " << info.device().name() << info.serviceUuid();
- strcpy(BTADDRESS, info.device().address().toString().toAscii());
+ strcpy(BTADDRESS, info.device().address().toString().toLatin1());
done_discovery = true;
}