From: Thiago Macieira Date: Thu, 3 May 2012 13:46:22 +0000 (+0200) Subject: Change uses of {to,from}Ascii to {to,from}Latin1 [other tools] X-Git-Tag: accepted/tizen/20131212.181521~325 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=237032f93332a491b392669fe3a3fb5bd670f46d;p=platform%2Fupstream%2Fqttools.git Change uses of {to,from}Ascii to {to,from}Latin1 [other tools] 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: I1e82285ad996cb2796807260383d1d056b930d0e Reviewed-by: Friedemann Kleint --- diff --git a/src/makeqpf/mainwindow.cpp b/src/makeqpf/mainwindow.cpp index 5d8507b..1da7db9 100644 --- a/src/makeqpf/mainwindow.cpp +++ b/src/makeqpf/mainwindow.cpp @@ -257,7 +257,7 @@ void MainWindow::populateCharacterRanges() ellipsis = QLatin1String("..."); while (!f.atEnd()) { - QString line = QString::fromAscii(f.readLine()); + QString line = QString::fromLatin1(f.readLine()); if (line.endsWith(QLatin1Char('\n'))) line.chop(1); diff --git a/src/runonphone/serenum_unix.cpp b/src/runonphone/serenum_unix.cpp index 5050b07..1a7b9c7 100644 --- a/src/runonphone/serenum_unix.cpp +++ b/src/runonphone/serenum_unix.cpp @@ -124,7 +124,7 @@ QList enumerateSerialPorts(int loglevel) if (loglevel > 1) qDebug() << " can't read manufacturer name, error:" << err; } else { - manufacturerString = QString::fromAscii(buf); + manufacturerString = QString::fromLatin1(buf); if (loglevel > 1) qDebug() << " manufacturer:" << manufacturerString; } @@ -135,7 +135,7 @@ QList enumerateSerialPorts(int loglevel) if (loglevel > 1) qDebug() << " can't read product name, error:" << err; } else { - productString = QString::fromAscii(buf); + productString = QString::fromLatin1(buf); if (loglevel > 1) qDebug() << " product:" << productString; } diff --git a/src/runonphone/symbianutils/launcher.cpp b/src/runonphone/symbianutils/launcher.cpp index 8f22143..f07867d 100644 --- a/src/runonphone/symbianutils/launcher.cpp +++ b/src/runonphone/symbianutils/launcher.cpp @@ -470,9 +470,9 @@ void Launcher::handleResult(const TrkResult &result) const uint tid = result.data.size() >= 10 ? extractShort(result.data.constData() + 6) : 0; Q_UNUSED(tid) const ushort len = result.data.size() > 12 ? extractShort(result.data.constData() + 10) : ushort(0); - const QString name = len ? QString::fromAscii(result.data.mid(12, len)) : QString(); + const QString name = len ? QString::fromLatin1(result.data.mid(12, len)) : QString(); logMessage(QString::fromLatin1("%1 %2 UNLOAD: %3"). - arg(QString::fromAscii(prefix)).arg(itemType ? QLatin1String("LIB") : QLatin1String("PROCESS")). + arg(QString::fromLatin1(prefix)).arg(itemType ? QLatin1String("LIB") : QLatin1String("PROCESS")). arg(name)); d->m_device->sendTrkAck(result.token); if (itemType == kDSOSProcessItem // process diff --git a/src/runonphone/symbianutils/tcftrkdevice.cpp b/src/runonphone/symbianutils/tcftrkdevice.cpp index 4fb100d..1acf6a9 100644 --- a/src/runonphone/symbianutils/tcftrkdevice.cpp +++ b/src/runonphone/symbianutils/tcftrkdevice.cpp @@ -408,7 +408,7 @@ int TcfTrkDevice::parseMessage(const QByteArray &message) // "\3\2{"Time":1276096098255,"Code":3,"Format": "Protocol format error"}" if (message.startsWith("\003\002")) { QByteArray text = message.mid(2); - const QString errorMessage = QString::fromLatin1("Parse error received: %1").arg(QString::fromAscii(text)); + const QString errorMessage = QString::fromLatin1("Parse error received: %1").arg(QString::fromLatin1(text)); emit error(errorMessage); return 0; } diff --git a/src/runonphone/symbianutils/trkdevice.cpp b/src/runonphone/symbianutils/trkdevice.cpp index afd128c..8dd1170 100644 --- a/src/runonphone/symbianutils/trkdevice.cpp +++ b/src/runonphone/symbianutils/trkdevice.cpp @@ -987,7 +987,7 @@ bool TrkDevice::open(QString *errorMessage) struct termios termInfo; if (tcgetattr(d->deviceContext->file.handle(), &termInfo) < 0) { - *errorMessage = QString::fromLatin1("Unable to retrieve terminal settings: %1 %2").arg(errno).arg(QString::fromAscii(strerror(errno))); + *errorMessage = QString::fromLatin1("Unable to retrieve terminal settings: %1 %2").arg(errno).arg(QString::fromLatin1(strerror(errno))); return false; } // Turn off terminal echo as not get messages back, among other things @@ -1002,7 +1002,7 @@ bool TrkDevice::open(QString *errorMessage) termInfo.c_cc[VSTOP] = _POSIX_VDISABLE; termInfo.c_cc[VSUSP] = _POSIX_VDISABLE; if (tcsetattr(d->deviceContext->file.handle(), TCSAFLUSH, &termInfo) < 0) { - *errorMessage = QString::fromLatin1("Unable to apply terminal settings: %1 %2").arg(errno).arg(QString::fromAscii(strerror(errno))); + *errorMessage = QString::fromLatin1("Unable to apply terminal settings: %1 %2").arg(errno).arg(QString::fromLatin1(strerror(errno))); return false; } #endif diff --git a/src/runonphone/symbianutils/trkutils.cpp b/src/runonphone/symbianutils/trkutils.cpp index cafbbaa..16b52f3 100644 --- a/src/runonphone/symbianutils/trkutils.cpp +++ b/src/runonphone/symbianutils/trkutils.cpp @@ -292,7 +292,7 @@ SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen) const int size = maxLen == -1 ? ba.size() : qMin(ba.size(), maxLen); for (int i = 0; i < size; ++i) { const int c = byte(ba.at(i)); - str += QString::fromAscii("%1 ").arg(c, 2, 16, QChar('0')); + str += QString::fromLatin1("%1 ").arg(c, 2, 16, QChar('0')); ascii += QChar(c).isPrint() ? QChar(c) : QChar('.'); } if (size != ba.size()) {