From 8a03159c32943a7f74bbb97f6f4b7998cb8f5916 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 19 Feb 2014 09:14:07 +0100 Subject: 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 Reviewed-by: Alan Alpert --- src/declarative/qml/qdeclarativeengine.cpp | 2 +- src/declarative/qml/qdeclarativeerror.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/declarative') 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 &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(); -- cgit v1.2.3 From 9aac83d22ddbebc22fb1360d710263d349c2fdda Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 4 Mar 2014 20:25:54 +0100 Subject: Fix typos in comments and documentation Change-Id: Ie7c4d63d632bf32ee583ddcd807252225ddde3fd Reviewed-by: Mitch Curtis --- src/declarative/graphicsitems/qdeclarativeflickable.cpp | 2 +- src/declarative/qml/qdeclarativecomponent.cpp | 2 +- src/declarative/util/qdeclarativeanimation.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/declarative') diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 64ae2094..3042dc14 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1331,7 +1331,7 @@ void QDeclarativeFlickable::setBoundsBehavior(BoundsBehavior b) \snippet doc/src/snippets/declarative/flickable.qml document - In some cases, the the content dimensions can be automatically set + In some cases, the content dimensions can be automatically set using the \l {Item::childrenRect.width}{childrenRect.width} and \l {Item::childrenRect.height}{childrenRect.height} properties. */ diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index f2596cc1..cbf23fa6 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -782,7 +782,7 @@ QObject *QDeclarativeComponent::create(QDeclarativeContext *context) When QDeclarativeComponent constructs an instance, it occurs in three steps: \list 1 \li The object hierarchy is created, and constant values are assigned. - \li Property bindings are evaluated for the the first time. + \li Property bindings are evaluated for the first time. \li If applicable, QDeclarativeParserStatus::componentComplete() is called on objects. \endlist QDeclarativeComponent::beginCreate() differs from QDeclarativeComponent::create() in that it diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index a72df77a..9f0c73ac 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -791,7 +791,7 @@ void QDeclarativeScriptAction::setScript(const QDeclarativeScriptString &script) /*! \qmlproperty string ScriptAction::scriptName - This property holds the the name of the StateChangeScript to run. + This property holds the name of the StateChangeScript to run. This property is only valid when ScriptAction is used as part of a transition. If both script and scriptName are set, scriptName will be used. -- cgit v1.2.3