summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-02 16:32:26 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-04 12:45:47 +0200
commit712ca9d95a92d62eda809c959998313413516aa9 (patch)
tree369870135d815d3db5b5942e32a4604b64bde724 /src/corelib
parent2376a5c4e0ea930d43d9377f4e93738a20659097 (diff)
Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore]
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 <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qdir.cpp4
-rw-r--r--src/corelib/io/qstandardpaths_json.cpp2
-rw-r--r--src/corelib/io/qtextstream.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp2
-rw-r--r--src/corelib/kernel/qvariant.cpp2
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp2
-rw-r--r--src/corelib/plugin/qlibrary_win.cpp2
-rw-r--r--src/corelib/tools/qeasingcurve.cpp6
8 files changed, 11 insertions, 11 deletions
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;
}