aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativelocale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativelocale.cpp')
-rw-r--r--src/declarative/qml/qdeclarativelocale.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativelocale.cpp b/src/declarative/qml/qdeclarativelocale.cpp
index ae57edb941..9f2116f8fd 100644
--- a/src/declarative/qml/qdeclarativelocale.cpp
+++ b/src/declarative/qml/qdeclarativelocale.cpp
@@ -811,7 +811,10 @@ v8::Handle<v8::Value> QDeclarativeLocale::locale(QV8Engine *v8engine, const QStr
QV8LocaleDataDeletable *d = localeV8Data(v8engine);
v8::Local<v8::Object> v8Value = d->constructor->NewInstance();
QV8LocaleDataResource *r = new QV8LocaleDataResource(v8engine);
- r->locale = QLocale(locale);
+ if (locale.isEmpty())
+ r->locale = QLocale();
+ else
+ r->locale = QLocale(locale);
v8Value->SetExternalResource(r);
return v8Value;