OpenCoverage

qqmllocale_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmllocale_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static_assert(bool(1 == 1), "Required feature " "qml_locale" " for file " __FILE__ " not available.");-
4-
5-
6-
7-
8class QQmlDateExtension-
9{-
10public:-
11 static void registerExtension(QV4::ExecutionEngine *engine);-
12-
13private:-
14 static QV4::ReturnedValue method_toLocaleString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
15 static QV4::ReturnedValue method_toLocaleTimeString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
16 static QV4::ReturnedValue method_toLocaleDateString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
17 static QV4::ReturnedValue method_fromLocaleString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
18 static QV4::ReturnedValue method_fromLocaleTimeString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
19 static QV4::ReturnedValue method_fromLocaleDateString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
20 static QV4::ReturnedValue method_timeZoneUpdated(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
21};-
22-
23-
24class QQmlNumberExtension-
25{-
26public:-
27 static void registerExtension(QV4::ExecutionEngine *engine);-
28-
29private:-
30 static QV4::ReturnedValue method_toLocaleString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
31 static QV4::ReturnedValue method_fromLocaleString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
32 static QV4::ReturnedValue method_toLocaleCurrencyString(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
33};-
34-
35-
36class __attribute__((visibility("default"))) QQmlLocale-
37{-
38 public: static const QMetaObject staticMetaObject; void qt_check_for_QGADGET_macro(); typedef void QtGadgetHelper; private:-
39#pragma GCC diagnostic push-
40 -
41#pragma GCC diagnostic ignored "-Wattributes"-
42 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
43#pragma GCC diagnostic pop-
44 -
45-
46public:-
47 ~QQmlLocale();-
48-
49 enum MeasurementSystem {-
50 MetricSystem = QLocale::MetricSystem,-
51 ImperialSystem = QLocale::ImperialSystem,-
52 ImperialUSSystem = QLocale::ImperialUSSystem,-
53 ImperialUKSystem = QLocale::ImperialUKSystem-
54 };-
55 friend constexpr const QMetaObject *qt_getEnumMetaObject(MeasurementSystem) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(MeasurementSystem) noexcept { return "MeasurementSystem"; }-
56 enum FormatType {-
57 LongFormat = QLocale::LongFormat,-
58 ShortFormat = QLocale::ShortFormat,-
59 NarrowFormat = QLocale::NarrowFormat-
60 };-
61 friend constexpr const QMetaObject *qt_getEnumMetaObject(FormatType) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(FormatType) noexcept { return "FormatType"; }-
62 enum CurrencySymbolFormat {-
63 CurrencyIsoCode = QLocale::CurrencyIsoCode,-
64 CurrencySymbol = QLocale::CurrencySymbol,-
65 CurrencyDisplayName = QLocale::CurrencyDisplayName-
66 };-
67 friend constexpr const QMetaObject *qt_getEnumMetaObject(CurrencySymbolFormat) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(CurrencySymbolFormat) noexcept { return "CurrencySymbolFormat"; }-
68-
69 enum DayOfWeek {-
70 Sunday = 0,-
71 Monday = Qt::Monday,-
72 Tuesday = Qt::Tuesday,-
73 Wednesday = Qt::Wednesday,-
74 Thursday = Qt::Thursday,-
75 Friday = Qt::Friday,-
76 Saturday = Qt::Saturday-
77 };-
78 friend constexpr const QMetaObject *qt_getEnumMetaObject(DayOfWeek) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(DayOfWeek) noexcept { return "DayOfWeek"; }-
79-
80 static QV4::ReturnedValue locale(QV4::ExecutionEngine *engine, const QString &localeName);-
81 static QV4::ReturnedValue wrap(QV4::ExecutionEngine *engine, const QLocale &locale);-
82-
83 static void registerStringLocaleCompare(QV4::ExecutionEngine *engine);-
84-
85private:-
86 QQmlLocale();-
87-
88 static QV4::ReturnedValue method_localeCompare(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
89};-
90-
91namespace QV4 {-
92-
93namespace Heap {-
94-
95struct QQmlLocaleData : Object {-
96 inline void init() { locale = new QLocale; }
executed 2086 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
2086
97 void destroy() {-
98 delete locale;-
99 Object::destroy();-
100 }
executed 2086 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
2086
101 QLocale *locale;-
102};-
103-
104}-
105-
106struct QQmlLocaleData : public QV4::Object-
107{-
108 private: QQmlLocaleData() = delete; QQmlLocaleData(const QQmlLocaleData &) = delete; QQmlLocaleData &operator=(const QQmlLocaleData &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; }
executed 30916 times by 36 tests: end of block
Executed by:
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
typedef QV4::Heap::QQmlLocaleData Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
executed 37278 times by 36 tests: return &static_vtbl;
Executed by:
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
&static_vtbl;
executed 37278 times by 36 tests: return &static_vtbl;
Executed by:
  • tst_examples
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qqmlcomponent
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • ...
} void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
never executed: end of block
QV4::Heap::QQmlLocaleData *d_unchecked() const { return
executed 15952 times by 3 tests: return static_cast<QV4::Heap::QQmlLocaleData *>(m());
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
static_cast<QV4::Heap::QQmlLocaleData *>(m());
executed 15952 times by 3 tests: return static_cast<QV4::Heap::QQmlLocaleData *>(m());
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
} QV4::Heap::QQmlLocaleData *d() const { QV4::Heap::QQmlLocaleData *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
executed 13866 times by 3 tests: return dptr;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
dptr;
executed 13866 times by 3 tests: return dptr;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
} static_assert(bool(std::is_trivial< QV4::Heap::QQmlLocaleData >::value), "std::is_trivial< QV4::Heap::QQmlLocaleData >::value");
0-37278
109 static void virtualDestroy(QV4::Heap::Base *b) { static_cast<Data *>(b)->destroy(); }
executed 2086 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
2086
110-
111 static QLocale *getThisLocale(QV4::Scope &scope, const QV4::Value *thisObject) {-
112 const QV4::Object *o = thisObject->as<Object>();-
113 const QQmlLocaleData *data = o
oDescription
TRUEevaluated 9094 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
FALSEnever evaluated
? o->as<QQmlLocaleData>() : nullptr;
0-9094
114 if (!data
!dataDescription
TRUEnever evaluated
FALSEevaluated 9094 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
) {
0-9094
115 scope.engine->throwTypeError();-
116 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
117 }-
118 return
executed 9094 times by 3 tests: return data->d()->locale;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
data->d()->locale;
executed 9094 times by 3 tests: return data->d()->locale;
Executed by:
  • tst_examples
  • tst_qqmllocale
  • tst_qqmlvaluetypes
9094
119 }-
120-
121 static QV4::ReturnedValue method_currencySymbol(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
122 static QV4::ReturnedValue method_dateTimeFormat(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
123 static QV4::ReturnedValue method_timeFormat(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
124 static QV4::ReturnedValue method_dateFormat(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
125 static QV4::ReturnedValue method_monthName(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
126 static QV4::ReturnedValue method_standaloneMonthName(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
127 static QV4::ReturnedValue method_dayName(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
128 static QV4::ReturnedValue method_standaloneDayName(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
129-
130 static QV4::ReturnedValue method_get_firstDayOfWeek(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
131 static QV4::ReturnedValue method_get_measurementSystem(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
132 static QV4::ReturnedValue method_get_textDirection(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
133 static QV4::ReturnedValue method_get_weekDays(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
134 static QV4::ReturnedValue method_get_uiLanguages(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
135-
136 static QV4::ReturnedValue method_get_name(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
137 static QV4::ReturnedValue method_get_nativeLanguageName(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
138 static QV4::ReturnedValue method_get_nativeCountryName(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
139 static QV4::ReturnedValue method_get_decimalPoint(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
140 static QV4::ReturnedValue method_get_groupSeparator(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
141 static QV4::ReturnedValue method_get_percent(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
142 static QV4::ReturnedValue method_get_zeroDigit(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
143 static QV4::ReturnedValue method_get_negativeSign(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
144 static QV4::ReturnedValue method_get_positiveSign(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
145 static QV4::ReturnedValue method_get_exponential(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
146 static QV4::ReturnedValue method_get_amText(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
147 static QV4::ReturnedValue method_get_pmText(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
148};-
149-
150}-
151-
152-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0