diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-03 15:45:41 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-03 17:31:27 +0200 |
commit | 2ec0a79b1bbaf7a4ecf7d32e78fcfd6a828e80c8 (patch) | |
tree | 5f63fa0a62a1c134b7bdd2dd6c87995b7c93f014 /src/linguist/shared/xliff.cpp | |
parent | fa5db11ff1550b488542fa3430197387fa1c6a7d (diff) | |
download | qttools-2ec0a79b1bbaf7a4ecf7d32e78fcfd6a828e80c8.tar.gz |
Change uses of {to,from}Ascii to {to,from}Latin1 [Linguist]
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: Ibb3c04114e1a311ff70ef649d977524a6dfec0aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/linguist/shared/xliff.cpp')
-rw-r--r-- | src/linguist/shared/xliff.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/linguist/shared/xliff.cpp b/src/linguist/shared/xliff.cpp index fdc96bf86..e951d3d49 100644 --- a/src/linguist/shared/xliff.cpp +++ b/src/linguist/shared/xliff.cpp @@ -80,7 +80,7 @@ static const char *TrollTsNamespaceURI = "urn:trolltech:names:ts:document:1.0"; static QString dataType(const TranslatorMessage &m) { - QByteArray fileName = m.fileName().toAscii(); + QByteArray fileName = m.fileName().toLatin1(); unsigned int extHash = 0; int pos = fileName.count() - 1; for (int pass = 0; pass < 4 && pos >=0; ++pass, --pos) { @@ -147,14 +147,14 @@ static QString numericEntity(int ch, bool makePhs) { // ### This needs to be reviewed, to reflect the updated XLIFF-PO spec. if (!makePhs || ch < 7 || ch > 0x0d) - return QString::fromAscii("&#x%1;").arg(QString::number(ch, 16)); + return QString::fromLatin1("&#x%1;").arg(QString::number(ch, 16)); CharMnemonic cm = charCodeMnemonics[int(ch) - 7]; QString name = QLatin1String(cm.mnemonic); char escapechar = cm.escape; static int id = 0; - return QString::fromAscii("<ph id=\"ph%1\" ctype=\"x-ch-%2\">\\%3</ph>") + return QString::fromLatin1("<ph id=\"ph%1\" ctype=\"x-ch-%2\">\\%3</ph>") .arg(++id) .arg(name) .arg(escapechar); } @@ -251,7 +251,7 @@ static void writeComment(QTextStream &ts, const TranslatorMessage &msg, const QR static void writeTransUnits(QTextStream &ts, const TranslatorMessage &msg, const QRegExp &drops, int indent) { static int msgid; - QString msgidstr = !msg.id().isEmpty() ? msg.id() : QString::fromAscii("_msg%1").arg(++msgid); + QString msgidstr = !msg.id().isEmpty() ? msg.id() : QString::fromLatin1("_msg%1").arg(++msgid); QStringList translns = msg.translations(); QHash<QString, QString>::const_iterator it; @@ -672,7 +672,7 @@ bool XLIFFHandler::characters(const QString &ch) for (int i = 0; i < ch.count(); ++i) { QChar chr = ch.at(i); if (accum.endsWith(QLatin1Char('\\'))) - accum[accum.size() - 1] = QLatin1Char(charFromEscape(chr.toAscii())); + accum[accum.size() - 1] = QLatin1Char(charFromEscape(chr.toLatin1())); else accum.append(chr); } |