diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-11-06 15:13:59 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-06 15:31:39 +0100 |
commit | 74f6c55dc1804d26fb2da2aa30c64fd8d79dfb20 (patch) | |
tree | 487f9c06b1c3110bf25d7260801be537b9ed88f8 /src/qml/jsruntime/qv4objectproto.cpp | |
parent | fe18d98229be80071cb3dde07621d10f3dfc6099 (diff) |
Replace QString::fromUtf8() with QString::fromLatin1() for literals
The literals are all latin1 strings, and fromLatin1() is much faster.
Change-Id: I25af0358a0a4aa2e973349c027cfac50b7589429
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4objectproto.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index c8202a5bad..2f14d8b148 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -405,7 +405,7 @@ ReturnedValue ObjectPrototype::method_toString(SimpleCallContext *ctx) } else { ScopedObject obj(scope, __qmljs_to_object(ctx, ValueRef(&ctx->callData->thisObject))); QString className = obj->className(); - return ctx->engine->newString(QString::fromUtf8("[object %1]").arg(className))->asReturnedValue(); + return ctx->engine->newString(QString::fromLatin1("[object %1]").arg(className))->asReturnedValue(); } } |