OpenCoverage

qqmllocale.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmllocale.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6using namespace QV4;-
7-
8const QV4::VTable QQmlLocaleData::static_vtbl = { (std::is_same<QQmlLocaleData::SuperClass, Object>::value) ? nullptr : &QQmlLocaleData::SuperClass::static_vtbl, (sizeof(QQmlLocaleData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQmlLocaleData::Data) + (QQmlLocaleData::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQmlLocaleData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQmlLocaleData::IsExecutionContext, QQmlLocaleData::IsString, QQmlLocaleData::IsObject, QQmlLocaleData::IsFunctionObject, QQmlLocaleData::IsErrorObject, QQmlLocaleData::IsArrayData, QQmlLocaleData::IsStringOrSymbol, QQmlLocaleData::MyType, { 0, 0, 0, 0 }, "QQmlLocaleData", QQmlLocaleData::virtualDestroy, QQmlLocaleData::Data::markObjects, QQmlLocaleData::virtualIsEqualTo, QQmlLocaleData::virtualGet, QQmlLocaleData::virtualPut, QQmlLocaleData::virtualDeleteProperty, QQmlLocaleData::virtualHasProperty, QQmlLocaleData::virtualGetOwnProperty, QQmlLocaleData::virtualDefineOwnProperty, QQmlLocaleData::virtualIsExtensible, QQmlLocaleData::virtualPreventExtensions, QQmlLocaleData::virtualGetPrototypeOf, QQmlLocaleData::virtualSetPrototypeOf, QQmlLocaleData::virtualGetLength, QQmlLocaleData::virtualAdvanceIterator, QQmlLocaleData::virtualInstanceOf, QQmlLocaleData::virtualCall, QQmlLocaleData::virtualCallAsConstructor, };-
9static bool isLocaleObject(const QV4::Value &val)-
10{-
11 return
executed 596 times by 2 tests: return val.as<QQmlLocaleData>();
Executed by:
  • tst_examples
  • tst_qqmllocale
val.as<QQmlLocaleData>();
executed 596 times by 2 tests: return val.as<QQmlLocaleData>();
Executed by:
  • tst_examples
  • tst_qqmllocale
596
12}-
13-
14-
15-
16-
17void QQmlDateExtension::registerExtension(QV4::ExecutionEngine *engine)-
18{-
19 engine->datePrototype()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLocaleString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLocaleString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_toLocaleString);
8784
20 engine->datePrototype()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLocaleTimeString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLocaleTimeString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_toLocaleTimeString);
8784
21 engine->datePrototype()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLocaleDateString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLocaleDateString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_toLocaleDateString);
8784
22 engine->dateCtor()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fromLocaleString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fromLocaleString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_fromLocaleString);
8784
23 engine->dateCtor()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fromLocaleTimeString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fromLocaleTimeString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_fromLocaleTimeString);
8784
24 engine->dateCtor()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fromLocaleDateString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fromLocaleDateString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_fromLocaleDateString);
8784
25 engine->dateCtor()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "timeZoneUpdated")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "timeZoneUpdated" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_timeZoneUpdated);
8784
26}
executed 8784 times by 148 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
8784
27-
28ReturnedValue QQmlDateExtension::method_toLocaleString(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
29{-
30 Scope scope(b);-
31 if (argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 204 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-204
32 return
never executed: return QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
0
33-
34 const QV4::DateObject *date = thisObject->as<DateObject>();-
35 if (!date
!dateDescription
TRUEnever evaluated
FALSEevaluated 204 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-204
36 return
never executed: return QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
0
37-
38 QDateTime dt = date->toQDateTime();-
39-
40 if (argc == 0
argc == 0Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 192 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
12-192
41-
42 QLocale locale;-
43 return
executed 12 times by 1 test: return QV4::Encode(scope.engine->newString(locale.toString(dt)));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(locale.toString(dt)));
executed 12 times by 1 test: return QV4::Encode(scope.engine->newString(locale.toString(dt)));
Executed by:
  • tst_qqmllocale
12
44 }-
45-
46 if (!isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 192 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-192
47 return
never executed: return QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleString(b, thisObject, argv, argc);
0
48-
49 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 192 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-192
50-
51 QLocale::FormatType enumFormat = QLocale::LongFormat;-
52 QString formattedDt;-
53 if (argc == 2
argc == 2Description
TRUEevaluated 180 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
12-180
54 if (String *s = argv[1].stringValue()
String *s = ar....stringValue()Description
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
36-144
55 QString format = s->toQString();-
56 formattedDt = r->d()->locale->toString(dt, format);-
57 }
executed 144 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else if (argv[1].isNumber()
argv[1].isNumber()Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-144
58 quint32 intFormat = argv[1].toNumber();-
59 QLocale::FormatType format = QLocale::FormatType(intFormat);-
60 formattedDt = r->d()->locale->toString(dt, format);-
61 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else {
36
62 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.toLocaleString(): Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.toLocaleString(): Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.toLocaleString(): Invalid datetime format"));
} while (false);
0
63 }
never executed: end of block
0
64 } else {-
65 formattedDt = r->d()->locale->toString(dt, enumFormat);-
66 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
12
67-
68 return
executed 192 times by 1 test: return QV4::Encode(scope.engine->newString(formattedDt));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(formattedDt));
executed 192 times by 1 test: return QV4::Encode(scope.engine->newString(formattedDt));
Executed by:
  • tst_qqmllocale
192
69}-
70-
71ReturnedValue QQmlDateExtension::method_toLocaleTimeString(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
72{-
73 Scope scope(b);-
74 if (argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-52
75 return
never executed: return QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
0
76-
77 const QV4::DateObject *date = thisObject->as<DateObject>();-
78 if (!date
!dateDescription
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-52
79 return
never executed: return QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
0
80-
81 QDateTime dt = date->toQDateTime();-
82 QTime time = dt.time();-
83-
84 if (argc == 0
argc == 0Description
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
0-52
85-
86 QLocale locale;-
87 return
never executed: return QV4::Encode(scope.engine->newString(locale.toString(time)));
QV4::Encode(scope.engine->newString(locale.toString(time)));
never executed: return QV4::Encode(scope.engine->newString(locale.toString(time)));
0
88 }-
89-
90 if (!isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-52
91 return
never executed: return QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleTimeString(b, thisObject, argv, argc);
0
92-
93 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-52
94-
95 QLocale::FormatType enumFormat = QLocale::LongFormat;-
96 QString formattedTime;-
97 if (argc == 2
argc == 2Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
16-36
98 if (String *s = argv[1].stringValue()
String *s = ar....stringValue()Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
0-36
99 QString format = s->toQString();-
100 formattedTime = r->d()->locale->toString(time, format);-
101 }
never executed: end of block
else if (argv[1].isNumber()
argv[1].isNumber()Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-36
102 quint32 intFormat = argv[1].toNumber();-
103 QLocale::FormatType format = QLocale::FormatType(intFormat);-
104 formattedTime = r->d()->locale->toString(time, format);-
105 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else {
36
106 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.toLocaleTimeString(): Invalid time format"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.toLocaleTimeString(): Invalid time format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.toLocaleTimeString(): Invalid time format"));
} while (false);
0
107 }
never executed: end of block
0
108 } else {-
109 formattedTime = r->d()->locale->toString(time, enumFormat);-
110 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
16
111-
112 return
executed 52 times by 2 tests: return QV4::Encode(scope.engine->newString(formattedTime));
Executed by:
  • tst_examples
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(formattedTime));
executed 52 times by 2 tests: return QV4::Encode(scope.engine->newString(formattedTime));
Executed by:
  • tst_examples
  • tst_qqmllocale
52
113}-
114-
115ReturnedValue QQmlDateExtension::method_toLocaleDateString(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
116{-
117 Scope scope(b);-
118 if (argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-52
119 return
never executed: return QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
0
120-
121 const QV4::DateObject *dateObj = thisObject->as<DateObject>();-
122 if (!dateObj
!dateObjDescription
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-52
123 return
never executed: return QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
0
124-
125 QDateTime dt = dateObj->toQDateTime();-
126 QDate date = dt.date();-
127-
128 if (argc == 0
argc == 0Description
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
0-52
129-
130 QLocale locale;-
131 return
never executed: return QV4::Encode(scope.engine->newString(locale.toString(date)));
QV4::Encode(scope.engine->newString(locale.toString(date)));
never executed: return QV4::Encode(scope.engine->newString(locale.toString(date)));
0
132 }-
133-
134 if (!isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-52
135 return
never executed: return QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
never executed: return QV4::DatePrototype::method_toLocaleDateString(b, thisObject, argv, argc);
0
136-
137 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-52
138-
139 QLocale::FormatType enumFormat = QLocale::LongFormat;-
140 QString formattedDate;-
141 if (argc == 2
argc == 2Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
16-36
142 if (String *s = argv[1].stringValue()
String *s = ar....stringValue()Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
0-36
143 QString format = s->toQString();-
144 formattedDate = r->d()->locale->toString(date, format);-
145 }
never executed: end of block
else if (argv[1].isNumber()
argv[1].isNumber()Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-36
146 quint32 intFormat = argv[1].toNumber();-
147 QLocale::FormatType format = QLocale::FormatType(intFormat);-
148 formattedDate = r->d()->locale->toString(date, format);-
149 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else {
36
150 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.loLocaleDateString(): Invalid date format"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.loLocaleDateString(): Invalid date format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.loLocaleDateString(): Invalid date format"));
} while (false);
0
151 }
never executed: end of block
0
152 } else {-
153 formattedDate = r->d()->locale->toString(date, enumFormat);-
154 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
16
155-
156 return
executed 52 times by 2 tests: return QV4::Encode(scope.engine->newString(formattedDate));
Executed by:
  • tst_examples
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(formattedDate));
executed 52 times by 2 tests: return QV4::Encode(scope.engine->newString(formattedDate));
Executed by:
  • tst_examples
  • tst_qqmllocale
52
157}-
158-
159ReturnedValue QQmlDateExtension::method_fromLocaleString(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *argv, int argc)-
160{-
161 QV4::Scope scope(b);-
162 QV4::ExecutionEngine * const engine = scope.engine;-
163 if (argc == 1
argc == 1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
0-18
164 if (String *s = argv[0].stringValue()
String *s = ar....stringValue()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
165 QLocale locale;-
166 QString dateString = s->toQString();-
167 QDateTime dt = locale.toDateTime(dateString);-
168 return
never executed: return QV4::Encode(engine->newDateObject(dt));
QV4::Encode(engine->newDateObject(dt));
never executed: return QV4::Encode(engine->newDateObject(dt));
0
169 }-
170 }
never executed: end of block
0
171-
172 if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| argc > 3
argc > 3Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| !isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-18
173 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
174-
175 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-18
176-
177 QLocale::FormatType enumFormat = QLocale::LongFormat;-
178 QDateTime dt;-
179 QString dateString = argv[1].toQStringNoThrow();-
180 if (argc == 3
argc == 3Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-18
181 if (String *s = argv[2].stringValue()
String *s = ar....stringValue()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-18
182 QString format = s->toQString();-
183 dt = r->d()->locale->toDateTime(dateString, format);-
184 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else if (argv[2].isNumber()
argv[2].isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-18
185 quint32 intFormat = argv[2].toNumber();-
186 QLocale::FormatType format = QLocale::FormatType(intFormat);-
187 dt = r->d()->locale->toDateTime(dateString, format);-
188 }
never executed: end of block
else {
0
189 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleString(): Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleString(): Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleString(): Invalid datetime format"));
} while (false);
0
190 }
never executed: end of block
0
191 } else {-
192 dt = r->d()->locale->toDateTime(dateString, enumFormat);-
193 }
never executed: end of block
0
194-
195 return
executed 18 times by 1 test: return QV4::Encode(engine->newDateObject(dt));
Executed by:
  • tst_qqmllocale
QV4::Encode(engine->newDateObject(dt));
executed 18 times by 1 test: return QV4::Encode(engine->newDateObject(dt));
Executed by:
  • tst_qqmllocale
18
196}-
197-
198ReturnedValue QQmlDateExtension::method_fromLocaleTimeString(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *argv, int argc)-
199{-
200 QV4::Scope scope(b);-
201 QV4::ExecutionEngine * const engine = scope.engine;-
202-
203 if (argc == 1
argc == 1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
0-18
204 if (String *s = argv[0].stringValue()
String *s = ar....stringValue()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
205 QLocale locale;-
206 QString timeString = s->toQString();-
207 QTime time = locale.toTime(timeString);-
208 QDateTime dt = QDateTime::currentDateTime();-
209 dt.setTime(time);-
210 return
never executed: return QV4::Encode(engine->newDateObject(dt));
QV4::Encode(engine->newDateObject(dt));
never executed: return QV4::Encode(engine->newDateObject(dt));
0
211 }-
212 }
never executed: end of block
0
213-
214 if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| argc > 3
argc > 3Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| !isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-18
215 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleTimeString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleTimeString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleTimeString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
216-
217 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-18
218-
219 QLocale::FormatType enumFormat = QLocale::LongFormat;-
220 QTime tm;-
221 QString dateString = argv[1].toQStringNoThrow();-
222 if (argc == 3
argc == 3Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-18
223 if (String *s = argv[2].stringValue()
String *s = ar....stringValue()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-18
224 QString format = s->toQString();-
225 tm = r->d()->locale->toTime(dateString, format);-
226 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else if (argv[2].isNumber()
argv[2].isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-18
227 quint32 intFormat = argv[2].toNumber();-
228 QLocale::FormatType format = QLocale::FormatType(intFormat);-
229 tm = r->d()->locale->toTime(dateString, format);-
230 }
never executed: end of block
else {
0
231 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleTimeString(): Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleTimeString(): Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleTimeString(): Invalid datetime format"));
} while (false);
0
232 }
never executed: end of block
0
233 } else {-
234 tm = r->d()->locale->toTime(dateString, enumFormat);-
235 }
never executed: end of block
0
236-
237 QDateTime dt;-
238 if (tm.isValid()
tm.isValid()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
6-12
239 dt = QDateTime::currentDateTime();-
240 dt.setTime(tm);-
241 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
6
242-
243 return
executed 18 times by 1 test: return QV4::Encode(engine->newDateObject(dt));
Executed by:
  • tst_qqmllocale
QV4::Encode(engine->newDateObject(dt));
executed 18 times by 1 test: return QV4::Encode(engine->newDateObject(dt));
Executed by:
  • tst_qqmllocale
18
244}-
245-
246ReturnedValue QQmlDateExtension::method_fromLocaleDateString(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *argv, int argc)-
247{-
248 QV4::Scope scope(b);-
249 QV4::ExecutionEngine * const engine = scope.engine;-
250-
251 if (argc == 1
argc == 1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
) {
0-18
252 if (String *s = argv[0].stringValue()
String *s = ar....stringValue()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
253 QLocale locale;-
254 QString dateString = s->toQString();-
255 QDate date = locale.toDate(dateString);-
256 return
never executed: return QV4::Encode(engine->newDateObject(QDateTime(date)));
QV4::Encode(engine->newDateObject(QDateTime(date)));
never executed: return QV4::Encode(engine->newDateObject(QDateTime(date)));
0
257 }-
258 }
never executed: end of block
0
259-
260 if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| argc > 3
argc > 3Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| !isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-18
261 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleDateString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleDateString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleDateString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
262-
263 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-18
264-
265 QLocale::FormatType enumFormat = QLocale::LongFormat;-
266 QDate dt;-
267 QString dateString = argv[1].toQStringNoThrow();-
268 if (argc == 3
argc == 3Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-18
269 if (String *s = argv[2].stringValue()
String *s = ar....stringValue()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-18
270 QString format = s->toQString();-
271 dt = r->d()->locale->toDate(dateString, format);-
272 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else if (argv[2].isNumber()
argv[2].isNumber()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-18
273 quint32 intFormat = argv[2].toNumber();-
274 QLocale::FormatType format = QLocale::FormatType(intFormat);-
275 dt = r->d()->locale->toDate(dateString, format);-
276 }
never executed: end of block
else {
0
277 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleDateString(): Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleDateString(): Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.fromLocaleDateString(): Invalid datetime format"));
} while (false);
0
278 }
never executed: end of block
0
279 } else {-
280 dt = r->d()->locale->toDate(dateString, enumFormat);-
281 }
never executed: end of block
0
282-
283 return
executed 18 times by 1 test: return QV4::Encode(engine->newDateObject(QDateTime(dt)));
Executed by:
  • tst_qqmllocale
QV4::Encode(engine->newDateObject(QDateTime(dt)));
executed 18 times by 1 test: return QV4::Encode(engine->newDateObject(QDateTime(dt)));
Executed by:
  • tst_qqmllocale
18
284}-
285-
286ReturnedValue QQmlDateExtension::method_timeZoneUpdated(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *, int argc)-
287{-
288 QV4::Scope scope(b);-
289 if (argc != 0
argc != 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-4
290 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.timeZoneUpdated(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Date.timeZoneUpdated(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Date.timeZoneUpdated(): Invalid arguments"));
}
never executed: end of block
while (false);
0
291-
292 QV4::DatePrototype::timezoneUpdated(scope.engine);-
293-
294 return
executed 4 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_qqmllocale
QV4::Encode::undefined();
executed 4 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_qqmllocale
4
295}-
296-
297-
298-
299-
300void QQmlNumberExtension::registerExtension(QV4::ExecutionEngine *engine)-
301{-
302 engine->numberPrototype()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLocaleString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLocaleString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_toLocaleString);
8784
303 engine->numberPrototype()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLocaleCurrencyString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLocaleCurrencyString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_toLocaleCurrencyString);
8784
304 engine->numberCtor()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fromLocaleString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fromLocaleString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_fromLocaleString);
8784
305}
executed 8784 times by 148 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
8784
306-
307QV4::ReturnedValue QQmlNumberExtension::method_toLocaleString(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
308{-
309 QV4::Scope scope(b);-
310 if (argc > 3
argc > 3Description
TRUEnever evaluated
FALSEevaluated 212 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-212
311 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
312-
313 double number = thisObject->toNumber();-
314-
315 if (argc == 0
argc == 0Description
TRUEnever evaluated
FALSEevaluated 212 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
0-212
316-
317 QLocale locale;-
318 return
never executed: return QV4::Encode(scope.engine->newString(locale.toString(number)));
QV4::Encode(scope.engine->newString(locale.toString(number)));
never executed: return QV4::Encode(scope.engine->newString(locale.toString(number)));
0
319 }-
320-
321 if (!isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 212 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-212
322 return
never executed: return QV4::NumberPrototype::method_toLocaleString(b, thisObject, argv, argc);
QV4::NumberPrototype::method_toLocaleString(b, thisObject, argv, argc);
never executed: return QV4::NumberPrototype::method_toLocaleString(b, thisObject, argv, argc);
0
323-
324 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 212 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-212
325-
326 quint16 format = 'f';-
327 if (argc > 1
argc > 1Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 196 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
16-196
328 if (!argv[1].isString()
!argv[1].isString()Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-16
329 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
330 QString fs = argv[1].toQString();-
331 if (fs.length()
fs.length()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
)
0-16
332 format = fs.at(0).unicode();
executed 16 times by 1 test: format = fs.at(0).unicode();
Executed by:
  • tst_qqmllocale
16
333 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
16
334 int prec = 2;-
335 if (argc > 2
argc > 2Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 198 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
14-198
336 if (!argv[2].isNumber()
!argv[2].isNumber()Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-14
337 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
338 prec = argv[2].toInt32();-
339 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
14
340-
341 return
executed 212 times by 2 tests: return QV4::Encode(scope.engine->newString(r->d()->locale->toString(number, (char)format, prec)));
Executed by:
  • tst_examples
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(r->d()->locale->toString(number, (char)format, prec)));
executed 212 times by 2 tests: return QV4::Encode(scope.engine->newString(r->d()->locale->toString(number, (char)format, prec)));
Executed by:
  • tst_examples
  • tst_qqmllocale
212
342}-
343-
344ReturnedValue QQmlNumberExtension::method_toLocaleCurrencyString(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
345{-
346 QV4::Scope scope(b);-
347 if (argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-18
348 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleCurrencyString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleCurrencyString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleCurrencyString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
349-
350 double number = thisObject->toNumber();-
351-
352 if (argc == 0
argc == 0Description
TRUEnever evaluated
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
0-18
353-
354 QLocale locale;-
355 return
never executed: return QV4::Encode(scope.engine->newString(locale.toString(number)));
QV4::Encode(scope.engine->newString(locale.toString(number)));
never executed: return QV4::Encode(scope.engine->newString(locale.toString(number)));
0
356 }-
357-
358 if (!isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
0-18
359 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleCurrencyString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleCurrencyString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleCurrencyString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
360-
361 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-18
362-
363 QString symbol;-
364 if (argc > 1
argc > 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) {
2-16
365 if (!argv[1].isString()
!argv[1].isString()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-2
366 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.toLocaleString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
367 symbol = argv[1].toQStringNoThrow();-
368 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
2
369-
370 return
executed 18 times by 2 tests: return QV4::Encode(scope.engine->newString(r->d()->locale->toCurrencyString(number, symbol)));
Executed by:
  • tst_examples
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(r->d()->locale->toCurrencyString(number, symbol)));
executed 18 times by 2 tests: return QV4::Encode(scope.engine->newString(r->d()->locale->toCurrencyString(number, symbol)));
Executed by:
  • tst_examples
  • tst_qqmllocale
18
371}-
372-
373ReturnedValue QQmlNumberExtension::method_fromLocaleString(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *argv, int argc)-
374{-
375 QV4::Scope scope(b);-
376 if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-16
377 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
378-
379 int numberIdx = 0;-
380 QLocale locale;-
381-
382 if (argc == 2
argc == 2Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-16
383 if (!isLocaleObject(argv[0])
!isLocaleObject(argv[0])Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-16
384 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid arguments"));
}
never executed: end of block
while (false);
0
385-
386 QV4::Scoped<QQmlLocaleData> r(scope, argv[0].as<QQmlLocaleData>()); if (!r
!rDescription
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a valid Locale object"));
}
never executed: end of block
while (false);
0-16
387 locale = *r->d()->locale;-
388-
389 numberIdx = 1;-
390 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
16
391-
392 QString ns = argv[numberIdx].toQString();-
393 if (!ns.length()
!ns.length()Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-16
394 return
never executed: return QV4::Encode(QV4::Encode((::qQNaN())));
QV4::Encode(QV4::Encode((::qQNaN())));
never executed: return QV4::Encode(QV4::Encode((::qQNaN())));
0
395-
396 bool ok = false;-
397 double val = locale.toDouble(ns, &ok);-
398-
399 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-16
400 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid format"));
scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Number.fromLocaleString(): Invalid format"));
}
never executed: end of block
while (false);
0
401-
402 return
executed 16 times by 1 test: return QV4::Encode(QV4::Encode(val));
Executed by:
  • tst_qqmllocale
QV4::Encode(QV4::Encode(val));
executed 16 times by 1 test: return QV4::Encode(QV4::Encode(val));
Executed by:
  • tst_qqmllocale
16
403}-
404-
405-
406-
407-
408ReturnedValue QQmlLocaleData::method_get_firstDayOfWeek(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
409{-
410 QV4::Scope scope(b);-
411 const QLocale *locale = getThisLocale(scope, thisObject);-
412 if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 416 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
)
0-416
413 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
414 int fdow = int(locale->firstDayOfWeek());-
415 if (fdow == 7
fdow == 7Description
TRUEevaluated 382 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
34-382
416 fdow = 0;
executed 382 times by 3 tests: fdow = 0;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
382
417 return
executed 416 times by 3 tests: return QV4::Encode(fdow);
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(fdow);
executed 416 times by 3 tests: return QV4::Encode(fdow);
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
416
418}-
419-
420ReturnedValue QQmlLocaleData::method_get_measurementSystem(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
421{-
422 QV4::Scope scope(b);-
423 const QLocale *locale = getThisLocale(scope, thisObject);-
424 if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
)
0-412
425 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
426 return
executed 412 times by 2 tests: return QV4::Encode(locale->measurementSystem());
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(locale->measurementSystem());
executed 412 times by 2 tests: return QV4::Encode(locale->measurementSystem());
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
412
427}-
428-
429ReturnedValue QQmlLocaleData::method_get_textDirection(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
430{-
431 QV4::Scope scope(b);-
432 const QLocale *locale = getThisLocale(scope, thisObject);-
433 if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
)
0-412
434 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
435-
436 return
executed 412 times by 2 tests: return QV4::Encode(locale->textDirection());
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(locale->textDirection());
executed 412 times by 2 tests: return QV4::Encode(locale->textDirection());
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
412
437}-
438-
439ReturnedValue QQmlLocaleData::method_get_weekDays(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
440{-
441 QV4::Scope scope(b);-
442 const QLocale *locale = getThisLocale(scope, thisObject);-
443 if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
)
0-412
444 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
445-
446 QList<Qt::DayOfWeek> days = locale->weekdays();-
447-
448 QV4::ScopedArrayObject result(scope, scope.engine->newArrayObject());-
449 result->arrayReserve(days.size());-
450 for (int i = 0; i < days.size()
i < days.size()Description
TRUEevaluated 2094 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
; ++i) {
412-2094
451 int day = days.at(i);-
452 if (day == 7
day == 7Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 2060 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
)
34-2060
453 day = 0;
executed 34 times by 1 test: day = 0;
Executed by:
  • tst_qqmllocale
34
454 result->arrayPut(i, QV4::Primitive::fromInt32(day));-
455 }
executed 2094 times by 2 tests: end of block
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
2094
456 result->setArrayLengthUnchecked(days.size());-
457-
458 return
executed 412 times by 2 tests: return result.asReturnedValue();
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
result.asReturnedValue();
executed 412 times by 2 tests: return result.asReturnedValue();
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
412
459}-
460-
461ReturnedValue QQmlLocaleData::method_get_uiLanguages(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
462{-
463 QV4::Scope scope(b);-
464 const QLocale *locale = getThisLocale(scope, thisObject);-
465 if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
)
0-412
466 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
467-
468 QStringList langs = locale->uiLanguages();-
469 QV4::ScopedArrayObject result(scope, scope.engine->newArrayObject());-
470 result->arrayReserve(langs.size());-
471 QV4::ScopedValue v(scope);-
472 for (int i = 0; i < langs.size()
i < langs.size()Description
TRUEevaluated 994 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
; ++i)
412-994
473 result->arrayPut(i, (v = scope.engine->newString(langs.at(i))));
executed 994 times by 2 tests: result->arrayPut(i, (v = scope.engine->newString(langs.at(i))));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
994
474-
475 result->setArrayLengthUnchecked(langs.size());-
476-
477 return
executed 412 times by 2 tests: return result.asReturnedValue();
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
result.asReturnedValue();
executed 412 times by 2 tests: return result.asReturnedValue();
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
412
478}-
479-
480ReturnedValue QQmlLocaleData::method_currencySymbol(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
481{-
482 QV4::Scope scope(b);-
483 const QLocale *locale = getThisLocale(scope, thisObject);-
484 if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-48
485 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
486-
487 if (argc > 1
argc > 1Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
)
0-48
488 do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: currencySymbol(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: currencySymbol(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: currencySymbol(): Invalid arguments"));
}
never executed: end of block
while (false);
0
489-
490 QLocale::CurrencySymbolFormat format = QLocale::CurrencySymbol;-
491 if (argc == 1
argc == 1Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) {
0-48
492 quint32 intFormat = argv[0].toNumber();-
493 format = QLocale::CurrencySymbolFormat(intFormat);-
494 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
48
495-
496 return
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale->currencySymbol(format)));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(locale->currencySymbol(format)));
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale->currencySymbol(format)));
Executed by:
  • tst_qqmllocale
48
497}-
498ReturnedValue QQmlLocaleData::method_dateTimeFormat (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc) { QV4::Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
if (argc > 1
argc > 1Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "dateTimeFormat" "(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: " "dateTimeFormat" "(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "dateTimeFormat" "(): Invalid arguments"));
}
never executed: end of block
while (false); QLocale::FormatType format = QLocale::LongFormat; if (argc == 1
argc == 1Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmllocale
) { quint32 intFormat = argv[0].toUInt32(); format = QLocale::FormatType(intFormat); }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
return
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale-> dateTimeFormat (format)));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(locale-> dateTimeFormat (format)));
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale-> dateTimeFormat (format)));
Executed by:
  • tst_qqmllocale
}
0-48
499ReturnedValue QQmlLocaleData::method_timeFormat (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc) { QV4::Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
if (argc > 1
argc > 1Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "timeFormat" "(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: " "timeFormat" "(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "timeFormat" "(): Invalid arguments"));
}
never executed: end of block
while (false); QLocale::FormatType format = QLocale::LongFormat; if (argc == 1
argc == 1Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmllocale
) { quint32 intFormat = argv[0].toUInt32(); format = QLocale::FormatType(intFormat); }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
return
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale-> timeFormat (format)));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(locale-> timeFormat (format)));
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale-> timeFormat (format)));
Executed by:
  • tst_qqmllocale
}
0-48
500ReturnedValue QQmlLocaleData::method_dateFormat (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc) { QV4::Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
if (argc > 1
argc > 1Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "dateFormat" "(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: " "dateFormat" "(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "dateFormat" "(): Invalid arguments"));
}
never executed: end of block
while (false); QLocale::FormatType format = QLocale::LongFormat; if (argc == 1
argc == 1Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmllocale
) { quint32 intFormat = argv[0].toUInt32(); format = QLocale::FormatType(intFormat); }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
return
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale-> dateFormat (format)));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(locale-> dateFormat (format)));
executed 48 times by 1 test: return QV4::Encode(scope.engine->newString(locale-> dateFormat (format)));
Executed by:
  • tst_qqmllocale
}
0-48
501ReturnedValue QQmlLocaleData::method_monthName (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "monthName" "(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: " "monthName" "(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "monthName" "(): Invalid arguments"));
}
never executed: end of block
while (false); QLocale::FormatType enumFormat = QLocale::LongFormat; int idx = argv[0].toInt32() + 1; if (idx < 1
idx < 1Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| idx > 12
idx > 12Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid month"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid month"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid month"));
}
never executed: end of block
while (false); QString name; if (argc == 2
argc == 2Description
TRUEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) { if (argv[1].isNumber()
argv[1].isNumber()Description
TRUEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) { quint32 intFormat = argv[1].toUInt32(); QLocale::FormatType format = QLocale::FormatType(intFormat); name = locale-> monthName(idx, format); }
executed 576 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else { do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
} while (false); }
never executed: end of block
} else { name = locale-> monthName(idx, enumFormat); }
never executed: end of block
return
executed 576 times by 1 test: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(name));
executed 576 times by 1 test: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_qqmllocale
}
0-576
502ReturnedValue QQmlLocaleData::method_standaloneMonthName (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "standaloneMonthName" "(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: " "standaloneMonthName" "(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "standaloneMonthName" "(): Invalid arguments"));
}
never executed: end of block
while (false); QLocale::FormatType enumFormat = QLocale::LongFormat; int idx = argv[0].toInt32() + 1; if (idx < 1
idx < 1Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| idx > 12
idx > 12Description
TRUEnever evaluated
FALSEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid month"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid month"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid month"));
}
never executed: end of block
while (false); QString name; if (argc == 2
argc == 2Description
TRUEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) { if (argv[1].isNumber()
argv[1].isNumber()Description
TRUEevaluated 576 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) { quint32 intFormat = argv[1].toUInt32(); QLocale::FormatType format = QLocale::FormatType(intFormat); name = locale-> standaloneMonthName(idx, format); }
executed 576 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else { do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
} while (false); }
never executed: end of block
} else { name = locale-> standaloneMonthName(idx, enumFormat); }
never executed: end of block
return
executed 576 times by 1 test: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(name));
executed 576 times by 1 test: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_qqmllocale
}
0-576
503ReturnedValue QQmlLocaleData::method_dayName (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "dayName" "(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: " "dayName" "(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "dayName" "(): Invalid arguments"));
}
never executed: end of block
while (false); QLocale::FormatType enumFormat = QLocale::LongFormat; int idx = argv[0].toInt32(); if (idx < 0
idx < 0Description
TRUEnever evaluated
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| idx > 7
idx > 7Description
TRUEnever evaluated
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid day"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid day"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid day"));
}
never executed: end of block
while (false); if (idx == 0
idx == 0Description
TRUEnever evaluated
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
) idx = 7;
never executed: idx = 7;
QString name; if (argc == 2
argc == 2Description
TRUEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) { if (argv[1].isNumber()
argv[1].isNumber()Description
TRUEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) { quint32 intFormat = argv[1].toUInt32(); QLocale::FormatType format = QLocale::FormatType(intFormat); name = locale-> dayName(idx, format); }
executed 336 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else { do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
} while (false); }
never executed: end of block
} else { name = locale-> dayName(idx, enumFormat); }
never executed: end of block
return
executed 336 times by 1 test: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(name));
executed 336 times by 1 test: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_qqmllocale
}
0-336
504ReturnedValue QQmlLocaleData::method_standaloneDayName (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 340 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
if (argc < 1
argc < 1Description
TRUEnever evaluated
FALSEevaluated 340 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
|| argc > 2
argc > 2Description
TRUEnever evaluated
FALSEevaluated 340 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "standaloneDayName" "(): Invalid arguments"));
scope.engine->throwError(QString::fromUtf8("Locale: " "standaloneDayName" "(): Invalid arguments"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: " "standaloneDayName" "(): Invalid arguments"));
}
never executed: end of block
while (false); QLocale::FormatType enumFormat = QLocale::LongFormat; int idx = argv[0].toInt32(); if (idx < 0
idx < 0Description
TRUEnever evaluated
FALSEevaluated 340 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
|| idx > 7
idx > 7Description
TRUEnever evaluated
FALSEevaluated 340 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
) do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid day"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid day"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid day"));
}
never executed: end of block
while (false); if (idx == 0
idx == 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
) idx = 7;
executed 4 times by 1 test: idx = 7;
Executed by:
  • tst_examples
QString name; if (argc == 2
argc == 2Description
TRUEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
) { if (argv[1].isNumber()
argv[1].isNumber()Description
TRUEevaluated 336 times by 1 test
Evaluated by:
  • tst_qqmllocale
FALSEnever evaluated
) { quint32 intFormat = argv[1].toUInt32(); QLocale::FormatType format = QLocale::FormatType(intFormat); name = locale-> standaloneDayName(idx, format); }
executed 336 times by 1 test: end of block
Executed by:
  • tst_qqmllocale
else { do { return
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
never executed: return scope.engine->throwError(QString::fromUtf8("Locale: Invalid datetime format"));
} while (false); }
never executed: end of block
} else { name = locale-> standaloneDayName(idx, enumFormat); }
executed 4 times by 1 test: end of block
Executed by:
  • tst_examples
return
executed 340 times by 2 tests: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_examples
  • tst_qqmllocale
QV4::Encode(scope.engine->newString(name));
executed 340 times by 2 tests: return QV4::Encode(scope.engine->newString(name));
Executed by:
  • tst_examples
  • tst_qqmllocale
}
0-340
505ReturnedValue QQmlLocaleData::method_get_name (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 434 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 434 times by 3 tests: return QV4::Encode(scope.engine->newString(locale-> name()));
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> name()));
executed 434 times by 3 tests: return QV4::Encode(scope.engine->newString(locale-> name()));
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-434
506ReturnedValue QQmlLocaleData::method_get_nativeLanguageName (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 434 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 434 times by 3 tests: return QV4::Encode(scope.engine->newString(locale-> nativeLanguageName()));
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> nativeLanguageName()));
executed 434 times by 3 tests: return QV4::Encode(scope.engine->newString(locale-> nativeLanguageName()));
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-434
507ReturnedValue QQmlLocaleData::method_get_nativeCountryName (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 434 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 434 times by 3 tests: return QV4::Encode(scope.engine->newString(locale-> nativeCountryName()));
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> nativeCountryName()));
executed 434 times by 3 tests: return QV4::Encode(scope.engine->newString(locale-> nativeCountryName()));
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-434
508ReturnedValue QQmlLocaleData::method_get_decimalPoint (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> decimalPoint()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> decimalPoint()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> decimalPoint()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
509ReturnedValue QQmlLocaleData::method_get_groupSeparator (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> groupSeparator()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> groupSeparator()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> groupSeparator()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
510ReturnedValue QQmlLocaleData::method_get_percent (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> percent()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> percent()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> percent()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
511ReturnedValue QQmlLocaleData::method_get_zeroDigit (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> zeroDigit()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> zeroDigit()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> zeroDigit()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
512ReturnedValue QQmlLocaleData::method_get_negativeSign (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> negativeSign()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> negativeSign()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> negativeSign()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
513ReturnedValue QQmlLocaleData::method_get_positiveSign (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> positiveSign()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> positiveSign()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> positiveSign()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
514ReturnedValue QQmlLocaleData::method_get_exponential (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> exponential()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> exponential()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> exponential()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
515ReturnedValue QQmlLocaleData::method_get_amText (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> amText()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> amText()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> amText()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
516ReturnedValue QQmlLocaleData::method_get_pmText (const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int) { Scope scope(b); const QLocale *locale = getThisLocale(scope, thisObject); if (!locale
!localeDescription
TRUEnever evaluated
FALSEevaluated 412 times by 2 tests
Evaluated by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
return
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> pmText()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4::Encode(scope.engine->newString(locale-> pmText()));
executed 412 times by 2 tests: return QV4::Encode(scope.engine->newString(locale-> pmText()));
Executed by:
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}
0-412
517-
518class QV4LocaleDataDeletable : public QV8Engine::Deletable-
519{-
520public:-
521 QV4LocaleDataDeletable(QV4::ExecutionEngine *engine);-
522 ~QV4LocaleDataDeletable();-
523-
524 QV4::PersistentValue prototype;-
525};-
526-
527QV4LocaleDataDeletable::QV4LocaleDataDeletable(QV4::ExecutionEngine *engine)-
528{-
529 QV4::Scope scope(engine);-
530 QV4::Scoped<QV4::Object> o(scope, engine->newObject());-
531-
532 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "dateFormat")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dateFormat" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_dateFormat, 0);
6
533 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "standaloneDayName")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "standaloneDayName" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_standaloneDayName, 0);
6
534 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "standaloneMonthName")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "standaloneMonthName" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_standaloneMonthName, 0);
6
535 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "dayName")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dayName" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_dayName, 0);
6
536 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "timeFormat")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "timeFormat" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_timeFormat, 0);
6
537 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "monthName")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "monthName" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_monthName, 0);
6
538 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "currencySymbol")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "currencySymbol" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_currencySymbol, 0);
6
539 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "dateTimeFormat")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dateTimeFormat" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_dateTimeFormat, 0);
6
540 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "name")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "name" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_name, nullptr);
6
541 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "positiveSign")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "positiveSign" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_positiveSign, nullptr);
6
542 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "uiLanguages")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "uiLanguages" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_uiLanguages, nullptr);
6
543 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "firstDayOfWeek")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "firstDayOfWeek" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_firstDayOfWeek, nullptr);
6
544 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "pmText")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "pmText" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_pmText, nullptr);
6
545 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "percent")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "percent" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_percent, nullptr);
6
546 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "textDirection")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "textDirection" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_textDirection, nullptr);
6
547 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "weekDays")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "weekDays" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_weekDays, nullptr);
6
548 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "negativeSign")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "negativeSign" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_negativeSign, nullptr);
6
549 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "groupSeparator")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "groupSeparator" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_groupSeparator, nullptr);
6
550 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "decimalPoint")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "decimalPoint" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_decimalPoint, nullptr);
6
551 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "nativeLanguageName")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "nativeLanguageName" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_nativeLanguageName, nullptr);
6
552 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "nativeCountryName")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "nativeCountryName" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_nativeCountryName, nullptr);
6
553 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "zeroDigit")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "zeroDigit" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_zeroDigit, nullptr);
6
554 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "amText")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "amText" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_amText, nullptr);
6
555 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "measurementSystem")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "measurementSystem" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_measurementSystem, nullptr);
6
556 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "exponential")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "exponential" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
qstring_literal_temp;
executed 6 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
}()), QQmlLocaleData::method_get_exponential, nullptr);
6
557-
558 prototype.set(engine, o);-
559}
executed 6 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
6
560-
561QV4LocaleDataDeletable::~QV4LocaleDataDeletable()-
562{-
563}-
564-
565static inline QV4LocaleDataDeletable *localeV4Data(QV4::ExecutionEngine *engine) { static int extensionId = -1; if (extensionId == -1
extensionId == -1Description
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
FALSEevaluated 2080 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) { QV8Engine::registrationMutex()->lock(); if (extensionId == -1
extensionId == -1Description
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
FALSEnever evaluated
) extensionId = QV8Engine::registerExtension();
executed 6 times by 3 tests: extensionId = QV8Engine::registerExtension();
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV8Engine::registrationMutex()->unlock(); }
executed 6 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
QV4LocaleDataDeletable *rv = (QV4LocaleDataDeletable *)engine->v8Engine->extensionData(extensionId); if (!rv
!rvDescription
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
FALSEevaluated 2080 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) { rv = new QV4LocaleDataDeletable(engine); engine->v8Engine->setExtensionData(extensionId, rv); }
executed 6 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
return
executed 2086 times by 3 tests: return rv;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
rv;
executed 2086 times by 3 tests: return rv;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
};
0-2086
566QQmlLocale::QQmlLocale()-
567{-
568}-
569-
570QQmlLocale::~QQmlLocale()-
571{-
572}-
573-
574QV4::ReturnedValue QQmlLocale::locale(ExecutionEngine *engine, const QString &localeName)-
575{-
576 QLocale qlocale;-
577 if (!localeName.isEmpty()
!localeName.isEmpty()Description
TRUEevaluated 1058 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
FALSEevaluated 992 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
)
992-1058
578 qlocale = localeName;
executed 1058 times by 2 tests: qlocale = localeName;
Executed by:
  • tst_examples
  • tst_qqmllocale
1058
579 return
executed 2050 times by 2 tests: return wrap(engine, qlocale);
Executed by:
  • tst_examples
  • tst_qqmllocale
wrap(engine, qlocale);
executed 2050 times by 2 tests: return wrap(engine, qlocale);
Executed by:
  • tst_examples
  • tst_qqmllocale
2050
580}-
581-
582QV4::ReturnedValue QQmlLocale::wrap(ExecutionEngine *v4, const QLocale &locale)-
583{-
584 QV4::Scope scope(v4);-
585 QV4LocaleDataDeletable *d = localeV4Data(scope.engine);-
586 QV4::Scoped<QQmlLocaleData> wrapper(scope, v4->memoryManager->allocate<QQmlLocaleData>());-
587 *wrapper->d()->locale = locale;-
588 QV4::ScopedObject p(scope, d->prototype.value());-
589 wrapper->setPrototypeOf(p);-
590 return
executed 2086 times by 3 tests: return wrapper.asReturnedValue();
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
wrapper.asReturnedValue();
executed 2086 times by 3 tests: return wrapper.asReturnedValue();
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
2086
591}-
592-
593void QQmlLocale::registerStringLocaleCompare(QV4::ExecutionEngine *engine)-
594{-
595 engine->stringPrototype()->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "localeCompare")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "localeCompare" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
qstring_literal_temp;
executed 8784 times by 148 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
}()), method_localeCompare);
8784
596}
executed 8784 times by 148 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • ...
8784
597-
598ReturnedValue QQmlLocale::method_localeCompare(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
599{-
600 if (argc != 1
argc != 1Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_qqmllocale
|| (!argv[0].isString()
!argv[0].isString()Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_qqmllocale
&& !argv[0].as<StringObject>()
!argv[0].as<StringObject>()Description
TRUEnever evaluated
FALSEnever evaluated
))
0-52
601 return
never executed: return QV4::StringPrototype::method_localeCompare(b, thisObject, argv, argc);
QV4::StringPrototype::method_localeCompare(b, thisObject, argv, argc);
never executed: return QV4::StringPrototype::method_localeCompare(b, thisObject, argv, argc);
0
602-
603 if (!thisObject->isString()
!thisObject->isString()Description
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_qqmllocale
&& !thisObject->as<StringObject>()
!thisObject->a...tringObject>()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
604 return
never executed: return QV4::StringPrototype::method_localeCompare(b, thisObject, argv, argc);
QV4::StringPrototype::method_localeCompare(b, thisObject, argv, argc);
never executed: return QV4::StringPrototype::method_localeCompare(b, thisObject, argv, argc);
0
605-
606 QString thisString = thisObject->toQStringNoThrow();-
607 QString thatString = argv[0].toQStringNoThrow();-
608-
609 return
executed 52 times by 1 test: return QV4::Encode(QString::localeAwareCompare(thisString, thatString));
Executed by:
  • tst_qqmllocale
QV4::Encode(QString::localeAwareCompare(thisString, thatString));
executed 52 times by 1 test: return QV4::Encode(QString::localeAwareCompare(thisString, thatString));
Executed by:
  • tst_qqmllocale
52
610}-
611-
612-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0