diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-20 09:13:42 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-20 09:14:33 +0100 |
commit | d815621963cee5571ed93fb89561c4884a685b6b (patch) | |
tree | 4c60b5f69eff56fd324e4203d006e1df677670ce /src/qml/qml/qqmllocale.cpp | |
parent | 9b25a6f39ee59fe1bb4352a5f2e4ef4a91f1f2c3 (diff) | |
parent | 471645f6dba6a21b85cb6788f0a0a07b6d5a804a (diff) |
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle
Change-Id: I6178a580b4c99aded1a69032a02169cff502b71d
Diffstat (limited to 'src/qml/qml/qqmllocale.cpp')
-rw-r--r-- | src/qml/qml/qqmllocale.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp index e1ac75f5f0..c9ce4773c3 100644 --- a/src/qml/qml/qqmllocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -464,8 +464,11 @@ v8::Handle<v8::Value> QQmlNumberExtension::toLocaleString(const v8::Arguments& a if (!args[1]->IsString()) V8THROW_ERROR("Locale: Number.toLocaleString(): Invalid arguments"); v8::Local<v8::String> fs = args[1]->ToString(); - if (!fs.IsEmpty() && fs->Length()) - format = fs->GetCharacter(0); + if (!fs.IsEmpty() && fs->Length()) { + v8::String::Value value(fs); + Q_ASSERT(*value != NULL); + format = **value; + } } int prec = 2; if (args.Length() > 2) { |