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);
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;
}
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;
}
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
// "\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;
}
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
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
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()) {