Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmllocale_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | static_assert(bool(1 == 1), "Required feature " "qml_locale" " for file " __FILE__ " not available."); | - | ||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | class QQmlDateExtension | - | ||||||
9 | { | - | ||||||
10 | public: | - | ||||||
11 | static void registerExtension(QV4::ExecutionEngine *engine); | - | ||||||
12 | - | |||||||
13 | private: | - | ||||||
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 | - | |||||||
24 | class QQmlNumberExtension | - | ||||||
25 | { | - | ||||||
26 | public: | - | ||||||
27 | static void registerExtension(QV4::ExecutionEngine *engine); | - | ||||||
28 | - | |||||||
29 | private: | - | ||||||
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 | - | |||||||
36 | class __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 | - | |||||||
46 | public: | - | ||||||
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 | - | |||||||
85 | private: | - | ||||||
86 | QQmlLocale(); | - | ||||||
87 | - | |||||||
88 | static QV4::ReturnedValue method_localeCompare(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc); | - | ||||||
89 | }; | - | ||||||
90 | - | |||||||
91 | namespace QV4 { | - | ||||||
92 | - | |||||||
93 | namespace Heap { | - | ||||||
94 | - | |||||||
95 | struct QQmlLocaleData : Object { | - | ||||||
96 | inline void init() { locale = new QLocale; } executed 2086 times by 3 tests: end of block Executed by:
| 2086 | ||||||
97 | void destroy() { | - | ||||||
98 | delete locale; | - | ||||||
99 | Object::destroy(); | - | ||||||
100 | } executed 2086 times by 3 tests: end of block Executed by:
| 2086 | ||||||
101 | QLocale *locale; | - | ||||||
102 | }; | - | ||||||
103 | - | |||||||
104 | } | - | ||||||
105 | - | |||||||
106 | struct 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: typedef QV4::Heap::QQmlLocaleData Data; typedef Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { returnend of block Executed by:
executed 37278 times by 36 tests: &static_vtbl;return &static_vtbl; Executed by:
executed 37278 times by 36 tests: } void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }return &static_vtbl; Executed by:
never executed: QV4::Heap::QQmlLocaleData *d_unchecked() const { returnend of block executed 15952 times by 3 tests: static_cast<QV4::Heap::QQmlLocaleData *>(m());return static_cast<QV4::Heap::QQmlLocaleData *>(m()); Executed by:
executed 15952 times by 3 tests: } QV4::Heap::QQmlLocaleData *d() const { QV4::Heap::QQmlLocaleData *dptr = d_unchecked(); dptr->_checkIsInitialized(); returnreturn static_cast<QV4::Heap::QQmlLocaleData *>(m()); Executed by:
executed 13866 times by 3 tests: dptr;return dptr; Executed by:
executed 13866 times by 3 tests: } static_assert(bool(std::is_trivial< QV4::Heap::QQmlLocaleData >::value), "std::is_trivial< QV4::Heap::QQmlLocaleData >::value");return dptr; Executed by:
| 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:
| 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
| 0-9094 | ||||||
114 | if (!data
| 0-9094 | ||||||
115 | scope.engine->throwTypeError(); | - | ||||||
116 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||
117 | } | - | ||||||
118 | return executed 9094 times by 3 tests: data->d()->locale;return data->d()->locale; Executed by:
executed 9094 times by 3 tests: return data->d()->locale; Executed by:
| 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 code | Preprocessed file |