From 712ca9d95a92d62eda809c959998313413516aa9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 2 May 2012 16:32:26 +0200 Subject: Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: I38f97ad379deafebef02c75d611343ca15640c8a Reviewed-by: Lars Knoll Reviewed-by: Jędrzej Nowacki --- src/corelib/io/qdir.cpp | 4 ++-- src/corelib/io/qstandardpaths_json.cpp | 2 +- src/corelib/io/qtextstream.cpp | 2 +- src/corelib/kernel/qobject.cpp | 2 +- src/corelib/kernel/qvariant.cpp | 2 +- src/corelib/plugin/qlibrary_unix.cpp | 2 +- src/corelib/plugin/qlibrary_win.cpp | 2 +- src/corelib/tools/qeasingcurve.cpp | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 222192b11c..572295db0d 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -73,10 +73,10 @@ static QString driveSpec(const QString &path) #if defined(Q_OS_WIN) if (path.size() < 2) return QString(); - char c = path.at(0).toAscii(); + char c = path.at(0).toLatin1(); if (c < 'a' && c > 'z' && c < 'A' && c > 'Z') return QString(); - if (path.at(1).toAscii() != ':') + if (path.at(1).toLatin1() != ':') return QString(); return path.mid(0, 2); #else diff --git a/src/corelib/io/qstandardpaths_json.cpp b/src/corelib/io/qstandardpaths_json.cpp index 8542371848..cb4c40a9d3 100644 --- a/src/corelib/io/qstandardpaths_json.cpp +++ b/src/corelib/io/qstandardpaths_json.cpp @@ -200,7 +200,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) QRegExp varRegExp(QLatin1String("\\$\\{([^\\}]*)\\}")); while (value.contains(varRegExp)) { QString replacement = - QFile::decodeName(qgetenv(varRegExp.cap(1).toAscii().data())); + QFile::decodeName(qgetenv(varRegExp.cap(1).toLatin1().data())); value.replace(varRegExp.cap(0), replacement); } } diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index ae40f777d8..c11a0e25f7 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -2341,7 +2341,7 @@ QTextStream &QTextStream::operator<<(char c) { Q_D(QTextStream); CHECK_VALID_STREAM(*this); - d->putString(QString(QChar::fromAscii(c))); + d->putString(QString(QChar::fromLatin1(c))); return *this; } diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 49a9beb298..e324fcb9ba 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -3236,7 +3236,7 @@ void QMetaObject::connectSlotsByName(QObject *o) bool foundIt = false; for(int j = 0; j < list.count(); ++j) { const QObject *co = list.at(j); - QByteArray objName = co->objectName().toAscii(); + QByteArray objName = co->objectName().toLatin1(); int len = objName.length(); if (!len || qstrncmp(slot + 3, objName.data(), len) || slot[len+3] != '_') continue; diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 83d48d9330..0b3e0418d0 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -290,7 +290,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok) break; case QMetaType::Char: case QMetaType::UChar: - *str = QChar::fromAscii(d->data.c); + *str = QChar::fromLatin1(d->data.c); break; case QMetaType::Short: case QMetaType::Long: diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 0ad7a87c97..3700d2ac9c 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -285,7 +285,7 @@ QFunctionPointer QLibraryPrivate::resolve_sys(const char* symbol) #endif if (!address) { errorString = QLibrary::tr("Cannot resolve symbol \"%1\" in %2: %3").arg( - QString::fromAscii(symbol)).arg(fileName).arg(qdlerror()); + QString::fromLatin1(symbol)).arg(fileName).arg(qdlerror()); } else { errorString.clear(); } diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp index 19a8299b7c..1e8ab150b5 100644 --- a/src/corelib/plugin/qlibrary_win.cpp +++ b/src/corelib/plugin/qlibrary_win.cpp @@ -122,7 +122,7 @@ QFunctionPointer QLibraryPrivate::resolve_sys(const char* symbol) #endif if (!address) { errorString = QLibrary::tr("Cannot resolve symbol \"%1\" in %2: %3").arg( - QString::fromAscii(symbol)).arg(fileName).arg(qt_error_string()); + QString::fromLatin1(symbol)).arg(fileName).arg(qt_error_string()); } else { errorString.clear(); } diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index e237b81cfa..c85325a3af 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -1421,9 +1421,9 @@ QDebug operator<<(QDebug debug, const QEasingCurve &item) debug << "type:" << item.d_ptr->type << "func:" << item.d_ptr->func; if (item.d_ptr->config) { - debug << QString::fromAscii("period:%1").arg(item.d_ptr->config->_p, 0, 'f', 20) - << QString::fromAscii("amp:%1").arg(item.d_ptr->config->_a, 0, 'f', 20) - << QString::fromAscii("overshoot:%1").arg(item.d_ptr->config->_o, 0, 'f', 20); + debug << QString::fromLatin1("period:%1").arg(item.d_ptr->config->_p, 0, 'f', 20) + << QString::fromLatin1("amp:%1").arg(item.d_ptr->config->_a, 0, 'f', 20) + << QString::fromLatin1("overshoot:%1").arg(item.d_ptr->config->_o, 0, 'f', 20); } return debug; } -- cgit v1.2.3