summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-02-19 09:14:07 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-27 16:55:57 +0100
commit8a03159c32943a7f74bbb97f6f4b7998cb8f5916 (patch)
tree890ea7d0f2b5109afdcce106bb3ea561bb625c28
parent3eeaf987123f73ad7a4745745d9e7c70f30942cd (diff)
Fix encoding of localized messages
QDebug::operator<<(const char*) uses QString::fromUtf8(), while qPrintable(str) returns QString::toLocal8Bit(). This messes up e.g. the Russian translations. Task-number: QTBUG-35825 Change-Id: Ib3f0004df677196a0bd17ac48c65f2d51b833044 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeerror.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index a42c6a04..c7fc3865 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1942,7 +1942,7 @@ void QDeclarativeEnginePrivate::sendQuit()
static void dumpwarning(const QDeclarativeError &error)
{
- qWarning().nospace() << qPrintable(error.toString());
+ qWarning("%s", error.toString().toUtf8().constData());
}
static void dumpwarning(const QList<QDeclarativeError> &errors)
diff --git a/src/declarative/qml/qdeclarativeerror.cpp b/src/declarative/qml/qdeclarativeerror.cpp
index 5ec0307d..5dbde6c6 100644
--- a/src/declarative/qml/qdeclarativeerror.cpp
+++ b/src/declarative/qml/qdeclarativeerror.cpp
@@ -240,7 +240,7 @@ QString QDeclarativeError::toString() const
QDebug operator<<(QDebug debug, const QDeclarativeError &error)
{
- debug << qPrintable(error.toString());
+ debug << error.toString().toUtf8().constData();
QUrl url = error.url();