summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-07-08 03:10:38 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-07-08 03:10:38 (GMT)
commit3d8db76427efd74e1668b2743381d724453da5d6 (patch)
treedfc830e3ef99d6671d55139355071ad83a476bf7
parent76a1804b0fff9ffd092a551defe448d3e9d4346e (diff)
parentadb496b69a49b2c20eca601fca95839199516962 (diff)
downloadQt-3d8db76427efd74e1668b2743381d724453da5d6.zip
Qt-3d8db76427efd74e1668b2743381d724453da5d6.tar.gz
Qt-3d8db76427efd74e1668b2743381d724453da5d6.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp27
-rw-r--r--tools/qml/qml.pri2
2 files changed, 17 insertions, 12 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 8bf7450..c5ebe7a 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1260,11 +1260,12 @@ QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptE
QDate date = ctxt->argument(0).toDateTime().date();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
if (argCount == 2) {
- if (ctxt->argument(1).isString()) {
- QString format = ctxt->argument(1).toString();
+ QScriptValue formatArg = ctxt->argument(1);
+ if (formatArg.isString()) {
+ QString format = formatArg.toString();
return engine->newVariant(qVariantFromValue(date.toString(format)));
- } else if (ctxt->argument(1).isNumber()) {
- enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
+ } else if (formatArg.isNumber()) {
+ enumFormat = Qt::DateFormat(formatArg.toUInt32());
} else {
return ctxt->throwError(QLatin1String("Qt.formatDate(): Invalid date format"));
}
@@ -1287,11 +1288,12 @@ QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptE
QTime date = ctxt->argument(0).toDateTime().time();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
if (argCount == 2) {
- if (ctxt->argument(1).isString()) {
- QString format = ctxt->argument(1).toString();
+ QScriptValue formatArg = ctxt->argument(1);
+ if (formatArg.isString()) {
+ QString format = formatArg.toString();
return engine->newVariant(qVariantFromValue(date.toString(format)));
- } else if (ctxt->argument(1).isNumber()) {
- enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
+ } else if (formatArg.isNumber()) {
+ enumFormat = Qt::DateFormat(formatArg.toUInt32());
} else {
return ctxt->throwError(QLatin1String("Qt.formatTime(): Invalid time format"));
}
@@ -1377,11 +1379,12 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
QDateTime date = ctxt->argument(0).toDateTime();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
if (argCount == 2) {
- if (ctxt->argument(1).isString()) {
- QString format = ctxt->argument(1).toString();
+ QScriptValue formatArg = ctxt->argument(1);
+ if (formatArg.isString()) {
+ QString format = formatArg.toString();
return engine->newVariant(qVariantFromValue(date.toString(format)));
- } else if (ctxt->argument(1).isNumber()) {
- enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
+ } else if (formatArg.isNumber()) {
+ enumFormat = Qt::DateFormat(formatArg.toUInt32());
} else {
return ctxt->throwError(QLatin1String("Qt.formatDateTime(): Invalid datetime format"));
}
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index 0d01f70..fcd0c33 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -25,6 +25,8 @@ maemo5 {
$$PWD/proxysettings_maemo5.ui
} symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
SOURCES += $$PWD/deviceorientation_symbian.cpp
+ FORMS = $$PWD/recopts.ui \
+ $$PWD/proxysettings.ui
} else {
SOURCES += $$PWD/deviceorientation.cpp
FORMS = $$PWD/recopts.ui \