qlocale.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qlocale.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11static QSystemLocale *_systemLocale = 0;-
12class QSystemLocaleSingleton: public QSystemLocale-
13{-
14public:-
15 QSystemLocaleSingleton() : QSystemLocale(true) {}-
16};-
17-
18namespace { namespace Q_QGS_QSystemLocale_globalSystemLocale { typedef QSystemLocaleSingleton Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized) guard.store(QtGlobalStatic::Destroyed); } }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } } static QGlobalStatic<QSystemLocaleSingleton, Q_QGS_QSystemLocale_globalSystemLocale::innerFunction, Q_QGS_QSystemLocale_globalSystemLocale::guard> QSystemLocale_globalSystemLocale;-
19static QLocaleData *system_data = 0;-
namespace { namespace Q_QGS_globalLocaleData { typedef QLocaleData Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized) guard.store(QtGlobalStatic::Destroyed); } }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } }static QGlobalStatic<QLocaleData , Q_QGS_globalLocaleData::innerFunction, Q_QGS_globalLocaleData::guard>globalLocaleData;
21-
22-
23-
24-
25-
26-
27-
28-
29-
30QLocale::Language QLocalePrivate::codeToLanguage(const QString &code)-
{QChar *code, int len= code.length();) noexcept
31{-
32 if (len != 2
len != 2Description
TRUEnever evaluated
FALSEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
&& len != 3
len != 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0-2372
33 return
never executed: return QLocale::C;
QLocale::C;
never executed: return QLocale::C;
0
34 ushort uc1 = code[0].toLower().unicode();-
35 ushort uc2 = code[1].toLower().unicode();-
36 ushort uc3 = len > 2
len > 2Description
TRUEnever evaluated
FALSEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
? code[2].toLower().unicode() : 0;
0-2372
37-
38 const unsigned char *c = language_code_list;-
39 for (; *
*c != 0Description
TRUEevaluated 80935 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
c != 0
*c != 0Description
TRUEevaluated 80935 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
; c += 3) {
7-80935
40 if (uc1 == c[0]
uc1 == c[0]Description
TRUEevaluated 5202 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 75733 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
&& uc2 == c[1]
uc2 == c[1]Description
TRUEevaluated 2379 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 2823 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
&& uc3 == c[2]
uc3 == c[2]Description
TRUEevaluated 2365 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
)
14-75733
41 return
executed 2365 times by 25 tests: return QLocale::Language((c - language_code_list)/3);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
QLocale::Language((c - language_code_list)/3);
executed 2365 times by 25 tests: return QLocale::Language((c - language_code_list)/3);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2365
42 }
executed 78570 times by 25 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
78570
43-
44-
45 if (uc1 == 'n'
uc1 == 'n'Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
&& uc2 == 'o'
uc2 == 'o'Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
&& uc3 == 0
uc3 == 0Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
) {
0-7
46 static_assert(bool(QLocale::Norwegian == QLocale::NorwegianBokmal), "QLocale::Norwegian == QLocale::NorwegianBokmal");-
47 return
executed 7 times by 2 tests: return QLocale::Norwegian;
Executed by:
  • tst_QCollator
  • tst_QDateTimeEdit
QLocale::Norwegian;
executed 7 times by 2 tests: return QLocale::Norwegian;
Executed by:
  • tst_QCollator
  • tst_QDateTimeEdit
7
48 }-
49 if (uc1 == 't'
uc1 == 't'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc2 == 'l'
uc2 == 'l'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc3 == 0
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
50 static_assert(bool(QLocale::Tagalog == QLocale::Filipino), "QLocale::Tagalog == QLocale::Filipino");-
51 return
never executed: return QLocale::Tagalog;
QLocale::Tagalog;
never executed: return QLocale::Tagalog;
0
52 }-
53 if (uc1 == 's'
uc1 == 's'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc2 == 'h'
uc2 == 'h'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc3 == 0
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
54 static_assert(bool(QLocale::SerboCroatian == QLocale::Serbian), "QLocale::SerboCroatian == QLocale::Serbian");-
55 return
never executed: return QLocale::SerboCroatian;
QLocale::SerboCroatian;
never executed: return QLocale::SerboCroatian;
0
56 }-
57 if (uc1 == 'm'
uc1 == 'm'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc2 == 'o'
uc2 == 'o'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc3 == 0
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
58 static_assert(bool(QLocale::Moldavian == QLocale::Romanian), "QLocale::Moldavian == QLocale::Romanian");-
59 return
never executed: return QLocale::Moldavian;
QLocale::Moldavian;
never executed: return QLocale::Moldavian;
0
60 }-
61-
62 if (uc1 == 'i'
uc1 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc2 == 'w'
uc2 == 'w'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc3 == 0
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
63 return
never executed: return QLocale::Hebrew;
QLocale::Hebrew;
never executed: return QLocale::Hebrew;
0
64 if (uc1 == 'i'
uc1 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc2 == 'n'
uc2 == 'n'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc3 == 0
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
65 return
never executed: return QLocale::Indonesian;
QLocale::Indonesian;
never executed: return QLocale::Indonesian;
0
66 if (uc1 == 'j'
uc1 == 'j'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc2 == 'i'
uc2 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
&& uc3 == 0
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
67 return
never executed: return QLocale::Yiddish;
QLocale::Yiddish;
never executed: return QLocale::Yiddish;
0
68-
69 return
never executed: return QLocale::C;
QLocale::C;
never executed: return QLocale::C;
0
70}-
71-
72QLocale::Script QLocalePrivate::codeToScript(const QString &code)-
{QChar *code, int len= code.length();) noexcept
73{-
74 if (len != 4
len != 4Description
TRUEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
)
0-2372
75 return
executed 2372 times by 25 tests: return QLocale::AnyScript;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
QLocale::AnyScript;
executed 2372 times by 25 tests: return QLocale::AnyScript;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2372
76-
77-
78 unsigned char c0 = code.at([0).].toUpper().toLatin1();-
79 unsigned char c1 = code.at([1).].toLower().toLatin1();-
80 unsigned char c2 = code.at([2).].toLower().toLatin1();-
81 unsigned char c3 = code.at([3).].toLower().toLatin1();-
82-
83 const unsigned char *c = script_code_list;-
84 for (int i = 0; i < QLocale::LastScript
i < QLocale::LastScriptDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i, c += 4) {
0
85 if (c0 == c[0]
c0 == c[0]Description
TRUEnever evaluated
FALSEnever evaluated
&& c1 == c[1]
c1 == c[1]Description
TRUEnever evaluated
FALSEnever evaluated
&& c2 == c[2]
c2 == c[2]Description
TRUEnever evaluated
FALSEnever evaluated
&& c3 == c[3]
c3 == c[3]Description
TRUEnever evaluated
FALSEnever evaluated
)
0
86 return
never executed: return QLocale::Script(i);
QLocale::Script(i);
never executed: return QLocale::Script(i);
0
87 }
never executed: end of block
0
88 return
never executed: return QLocale::AnyScript;
QLocale::AnyScript;
never executed: return QLocale::AnyScript;
0
89}-
90-
91QLocale::Country QLocalePrivate::codeToCountry(const QString &code)-
{QChar *code, int len= code.length();) noexcept
92{-
93 if (len != 2
len != 2Description
TRUEevaluated 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEevaluated 2717 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
&& len != 3
len != 3Description
TRUEevaluated 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEnever evaluated
)
0-2717
94 return
executed 76 times by 6 tests: return QLocale::AnyCountry;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
QLocale::AnyCountry;
executed 76 times by 6 tests: return QLocale::AnyCountry;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
76
95 ushort uc1 = code[0].toUpper().unicode();-
96 ushort uc2 = code[1].toUpper().unicode();-
97 ushort uc3 = len > 2
len > 2Description
TRUEnever evaluated
FALSEevaluated 2717 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
? code[2].toUpper().unicode() : 0;
0-2717
98-
99 const unsigned char *c = country_code_list;-
100 for (; *
*c != 0Description
TRUEevaluated 550758 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
c != 0
*c != 0Description
TRUEevaluated 550758 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
; c += 3) {
0-550758
101 if (uc1 == c[0]
uc1 == c[0]Description
TRUEevaluated 10533 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 540225 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
&& uc2 == c[1]
uc2 == c[1]Description
TRUEevaluated 2716 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 7817 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
&& uc3 == c[2]
uc3 == c[2]Description
TRUEevaluated 2716 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
)
0-540225
102 return
executed 2716 times by 22 tests: return QLocale::Country((c - country_code_list)/3);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
QLocale::Country((c - country_code_list)/3);
executed 2716 times by 22 tests: return QLocale::Country((c - country_code_list)/3);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2716
103 }
executed 548042 times by 22 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
548042
104-
105 return
never executed: return QLocale::AnyCountry;
QLocale::AnyCountry;
never executed: return QLocale::AnyCountry;
0
106}-
107-
108QString QLocalePrivate::languageToCode(QLocale::Language language)-
109{-
110 if (language == QLocale::AnyLanguage)-
111 return QString();-
112 if (language == QLocale::C)-
113 return QLatin1String("C");-
114-
115 const unsigned char *c = language_code_list + 3*(uint(language));-
116-
117 QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);-
118-
119 code[0] = ushort(c[0]);-
120 code[1] = ushort(c[1]);-
121 if (c[2] != 0)-
122 code[2] = ushort(c[2]);-
123-
124 return code;-
125}-
126-
127QString QLocalePrivate::scriptToCode(QLocale::Script script)-
128{-
129 if (script == QLocale::AnyScript || script > QLocale::LastScript)-
130 return QString();-
131 const unsigned char *c = script_code_list + 4*(uint(script));-
132 return QString::fromLatin1((const char *)c, 4);-
133}-
134-
135QString QLocalePrivate::countryToCode(QLocale::Country country)-
136{-
137 if (country == QLocale::AnyCountry)-
138 return QString();-
139-
140 const unsigned char *c = country_code_list + 3*(uint(country));-
141-
142 QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);-
143-
144 code[0] = ushort(c[0]);-
145 code[1] = ushort(c[1]);-
146 if (c[2] != 0)-
147 code[2] = ushort(c[2]);-
148-
149 return code;-
150}-
151-
152-
153static bool addLikelySubtags(QLocaleId &localeId)-
154{-
155-
156 const int likely_subtags_count = sizeof(likely_subtags) / sizeof(likely_subtags[0]);-
157 const QLocaleId *p = likely_subtags;-
158 const QLocaleId *const e = p + likely_subtags_count;-
159 for ( ; p < e; p += 2) {-
160 if (localeId == p[0]) {-
161 localeId = p[1];-
162 return true;-
163 }-
164 }-
165 return false;-
166}-
167-
168QLocaleId QLocaleId::withLikelySubtagsAdded() const-
169{-
170-
171 if (language_id || script_id || country_id) {-
172 QLocaleId id = QLocaleId::fromIds(language_id, script_id, country_id);-
173 if (addLikelySubtags(id))-
174 return id;-
175 }-
176-
177 if (country_id) {-
178 QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);-
179 if (addLikelySubtags(id)) {-
180 id.country_id = country_id;-
181 return id;-
182 }-
183 }-
184-
185 if (script_id) {-
186 QLocaleId id = QLocaleId::fromIds(language_id, 0, country_id);-
187 if (addLikelySubtags(id)) {-
188 id.script_id = script_id;-
189 return id;-
190 }-
191 }-
192-
193 if (script_id && country_id) {-
194 QLocaleId id = QLocaleId::fromIds(language_id, 0, 0);-
195 if (addLikelySubtags(id)) {-
196 id.script_id = script_id;-
197 id.country_id = country_id;-
198 return id;-
199 }-
200 }-
201 return *this;-
202}-
203-
204QLocaleId QLocaleId::withLikelySubtagsRemoved() const-
205{-
206 QLocaleId max = withLikelySubtagsAdded();-
207-
208 {-
209 QLocaleId id = QLocaleId::fromIds(language_id, 0, 0);-
210 if (id.withLikelySubtagsAdded() == max)-
211 return id;-
212 }-
213-
214 if (country_id) {-
215 QLocaleId id = QLocaleId::fromIds(language_id, 0, country_id);-
216 if (id.withLikelySubtagsAdded() == max)-
217 return id;-
218 }-
219-
220 if (script_id) {-
221 QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);-
222 if (id.withLikelySubtagsAdded() == max)-
223 return id;-
224 }-
225 return max;-
226}-
227-
228QByteArray QLocaleId::name(char separator) const-
229{-
230 if (language_id == QLocale::AnyLanguage)-
231 return QByteArray();-
232 if (language_id == QLocale::C)-
233 return ([]() -> QByteArray { enum { Size = sizeof("C") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "C" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }());-
234-
235 const unsigned char *lang = language_code_list + 3 * language_id;-
236 const unsigned char *script =-
237 (script_id != QLocale::AnyScript ? script_code_list + 4 * script_id : 0);-
238 const unsigned char *country =-
239 (country_id != QLocale::AnyCountry ? country_code_list + 3 * country_id : 0);-
240 char len = (lang[2] != 0 ? 3 : 2) + (script ? 4+1 : 0) + (country ? (country[2] != 0 ? 3 : 2)+1 : 0);-
241 QByteArray name(len, Qt::Uninitialized);-
242 char *uc = name.data();-
243 *uc++ = lang[0];-
244 *uc++ = lang[1];-
245 if (lang[2] != 0)-
246 *uc++ = lang[2];-
247 if (script) {-
248 *uc++ = separator;-
249 *uc++ = script[0];-
250 *uc++ = script[1];-
251 *uc++ = script[2];-
252 *uc++ = script[3];-
253 }-
254 if (country) {-
255 *uc++ = separator;-
256 *uc++ = country[0];-
257 *uc++ = country[1];-
258 if (country[2] != 0)-
259 *uc++ = country[2];-
260 }-
261 return name;-
262}-
263-
264QByteArray QLocalePrivate::bcp47Name(char separator) const-
265{-
266 if (m_data->m_language_id == QLocale::AnyLanguage)-
267 return QByteArray();-
268 if (m_data->m_language_id == QLocale::C)-
269 return ([]() -> QByteArray { enum { Size = sizeof("C") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "C" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }());-
270-
271 QLocaleId localeId = QLocaleId::fromIds(m_data->m_language_id, m_data->m_script_id, m_data->m_country_id);-
272 return localeId.withLikelySubtagsRemoved().name(separator);-
273}-
274-
275const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLocale::Script script, QLocale::Country country)-
276{-
277 QLocaleId localeId = QLocaleId::fromIds(language, script, country);-
278 localeId = localeId.withLikelySubtagsAdded();-
279-
280 uint idx = locale_index[localeId.language_id];-
281-
282 const QLocaleData *data = locale_data + idx;-
283-
284 if (idx == 0)-
285 return data;-
286-
287 ((!(data->m_language_id == localeId.language_id)) ? qt_assert("data->m_language_id == localeId.language_id",__FILE__,347350) : qt_noop());-
288-
289 if (localeId.script_id != QLocale::AnyScript && localeId.country_id != QLocale::AnyCountry) {-
290-
291 do {-
292 if (data->m_script_id == localeId.script_id && data->m_country_id == localeId.country_id)-
293 return data;-
294 ++data;-
295 } while (data->m_language_id == localeId.language_id);-
296-
297-
298 localeId.script_id = QLocale::AnyScript;-
299 data = locale_data + idx;-
300 }-
301-
302 if (localeId.script_id == QLocale::AnyScript && localeId.country_id == QLocale::AnyCountry)-
303 return data;-
304-
305 if (localeId.script_id == QLocale::AnyScript) {-
306 do {-
307 if (data->m_country_id == localeId.country_id)-
308 return data;-
309 ++data;-
310 } while (data->m_language_id == localeId.language_id);-
311 } else if (localeId.country_id == QLocale::AnyCountry) {-
312 do {-
313 if (data->m_script_id == localeId.script_id)-
314 return data;-
315 ++data;-
316 } while (data->m_language_id == localeId.language_id);-
317 }-
318-
319 return locale_data + idx;-
320}-
321-
322static bool parse_locale_tag(const QString &input, int &i, QString *result, const QString &separators)-
323{-
324 *result = QString(8, Qt::Uninitialized);-
325 QChar *pch = result->data();-
326 const QChar *uc = input.data() + i;-
327 const int l = input.length();-
328 int size = 0;-
329 for (; i < l && size < 8; ++i, ++size) {-
330 if (separators.contains(*uc))-
331 break;-
332 if (! ((uc->unicode() >= 'a' && uc->unicode() <= 'z') ||-
333 (uc->unicode() >= 'A' && uc->unicode() <= 'Z') ||-
334 (uc->unicode() >= '0' && uc->unicode() <= '9')) )-
335 return false;-
336 *pch++ = *uc++;-
337 }-
338 result->truncate(size);-
339 return true;-
340}-
341-
342bool qt_splitLocaleName(const QString &name, QString &lang, QString &script, QString &cntry)-
343{-
344 const int length = name.length();-
345-
346 lang = script = cntry = QString();-
347-
348 const QString separators = ([]() -> QString { enum { Size = sizeof(u"" "_-.@")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "_-.@" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
349 enum ParserState { NoState, LangState, ScriptState, CountryState };-
350 ParserState state = LangState;-
351 for (int i = 0; i < length && state != NoState; ) {-
352 QString value;-
353 if (!parse_locale_tag(name, i, &value, separators) ||value.isEmpty())-
354 break;-
355 QChar sep = i < length ? name.at(i) : QChar();-
356 switch (state) {-
357 case LangState:-
358 if (!sep.isNull() && !separators.contains(sep)) {-
359 state = NoState;-
360 break;-
361 }-
362 lang = value;-
363 if (i == length) {-
364-
365 state = NoState;-
366 break;-
367 }-
368 state = ScriptState;-
369 break;-
370 case ScriptState: {-
371 QString scripts = QString::fromLatin1((const char *)script_code_list, sizeof(script_code_list) - 1);-
372 if (value.length() == 4 && scripts.indexOf(value) % 4 == 0) {-
373-
374 script = value;-
375 state = CountryState;-
376 } else {-
377-
378 cntry = value;-
379 state = NoState;-
380 }-
381 break;-
382 }-
383 case CountryState:-
384 cntry = value;-
385 state = NoState;-
386 break;-
387 case NoState:-
388-
389 QMessageLogger(__FILE__, 449452, __PRETTY_FUNCTION__).warning("QLocale: This should never happen");-
390 break;-
391 }-
392 ++i;-
393 }-
394 return lang.length() == 2 || lang.length() == 3;-
395}-
396-
397void QLocalePrivate::getLangAndCountry(const QString &name, QLocale::Language &lang,-
398 QLocale::Script &script, QLocale::Country &cntry)-
399{-
400 lang = QLocale::C;-
401 script = QLocale::AnyScript;-
402 cntry = QLocale::AnyCountry;-
403-
404 QString lang_code;-
405 QString script_code;-
406 QString cntry_code;-
407 if (!qt_splitLocaleName(name, lang_code, script_code, cntry_code))-
408 return;-
409-
410 lang = QLocalePrivate::codeToLanguage(lang_code);-
411 if (lang == QLocale::C)-
412 return;-
413 script = QLocalePrivate::codeToScript(script_code);-
414 cntry = QLocalePrivate::codeToCountry(cntry_code);-
415}-
416-
417static const QLocaleData *findLocaleData(const QString &name)-
418{-
419 QLocale::Language lang;-
420 QLocale::Script script;-
421 QLocale::Country cntry;-
422 QLocalePrivate::getLangAndCountry(name, lang, script, cntry);-
423-
424 return QLocaleData::findLocaleData(lang, script, cntry);-
425}-
426-
427QString qt_readEscapedFormatString(const QString &format, int *idx)-
428{-
429 int &i = *idx;-
430-
431 ((!(format.at(i) == QLatin1Char('\''))) ? qt_assert("format.at(i) == QLatin1Char('\\'')",__FILE__,491494) : qt_noop());-
432 ++i;-
433 if (i == format.size())-
434 return QString();-
435 if (format.at(i).unicode() == '\'') {-
436 ++i;-
437 return QLatin1String("'");-
438 }-
439-
440 QString result;-
441-
442 while (i < format.size()) {-
443 if (format.at(i).unicode() == '\'') {-
444 if (i + 1 < format.size() && format.at(i + 1).unicode() == '\'') {-
445-
446 result.append(QLatin1Char('\''));-
447 i += 2;-
448 } else {-
449 break;-
450 }-
451 } else {-
452 result.append(format.at(i++));-
453 }-
454 }-
455 if (i < format.size())-
456 ++i;-
457-
458 return result;-
459}-
460-
461int qt_repeatCount(const QString &s, int i)-
462{-
463 QChar c = s.at(i);-
464 int j = i + 1;-
465 while (j < s.size() && s.at(j) == c)-
466 ++j;-
467 return j - i;-
468}-
469-
470static const QLocaleData *default_data = 0;-
471static uintQLocale::NumberOptions default_number_options = 0QLocale::DefaultNumberOptions;-
472-
473static const QLocaleData *const c_data = locale_data;-
474static QLocalePrivate *c_private()-
475{-
476 static QLocalePrivate c_locale = { c_data, { 1 }, QLocale::OmitGroupSeparator };-
477 return &c_locale;-
478}-
479QSystemLocale::QSystemLocale()-
480{-
481 delete _systemLocale;-
482 _systemLocale = this;-
483-
484 if (system_data)-
485 system_data->m_language_id = 0;-
486}-
487-
488-
489-
490-
491QSystemLocale::QSystemLocale(bool)-
492{ }-
493-
494-
495-
496-
497QSystemLocale::~QSystemLocale()-
498{-
499 if (_systemLocale == this) {-
500 _systemLocale = 0;-
501-
502 if (system_data)-
503 system_data->m_language_id = 0;-
504 }-
505}-
506-
507static const QSystemLocale *systemLocale()-
508{-
509 if (_systemLocale)-
510 return _systemLocale;-
511 return QSystemLocale_globalSystemLocale();-
512}-
513-
514void QLocalePrivate::updateSystemPrivate()-
515{-
516 const QSystemLocale *sys_locale = systemLocale();-
517 if (!system_data
!system_dataDescription
TRUEevaluated 1016 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-1016
518 system_data = globalLocaleData();&globalLocaleData;
executed 1016 times by 12 tests: system_data = &globalLocaleData;
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1016
519-
520-
521 sys_locale->query(QSystemLocale::LocaleChanged, QVariant());-
522-
523 *system_data = *sys_locale->fallbackUiLocale().d->m_data;-
524-
525 QVariant res = sys_locale->query(QSystemLocale::LanguageId, QVariant());-
526 if (!res.isNull()
!res.isNull()Description
TRUEnever evaluated
FALSEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
) {
0-1015
527 system_data->m_language_id = res.toInt();-
528 system_data->m_script_id = QLocale::AnyScript;-
529 }
never executed: end of block
0
530 res = sys_locale->query(QSystemLocale::CountryId, QVariant());-
531 if (!res.isNull()
!res.isNull()Description
TRUEnever evaluated
FALSEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
) {
0-1015
532 system_data->m_country_id = res.toInt();-
533 system_data->m_script_id = QLocale::AnyScript;-
534 }
never executed: end of block
0
535 res = sys_locale->query(QSystemLocale::ScriptId, QVariant());-
536 if (!res.isNull()
!res.isNull()Description
TRUEnever evaluated
FALSEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
)
0-1015
537 system_data->m_script_id = res.toInt();
never executed: system_data->m_script_id = res.toInt();
0
538-
539 res = sys_locale->query(QSystemLocale::DecimalPoint, QVariant());-
540 if (!res.isNull()
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-1015
541 system_data->m_decimal = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_decimal = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
542-
543 res = sys_locale->query(QSystemLocale::GroupSeparator, QVariant());-
544 if (!res.isNull()
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-1015
545 system_data->m_group = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_group = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
546-
547 res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant());-
548 if (!res.isNull()
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-1015
549 system_data->m_zero = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_zero = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
550-
551 res = sys_locale->query(QSystemLocale::NegativeSign, QVariant());-
552 if (!res.isNull()
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-1015
553 system_data->m_minus = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_minus = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
554-
555 res = sys_locale->query(QSystemLocale::PositiveSign, QVariant());-
556 if (!res.isNull()
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-1015
557 system_data->m_plus = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_plus = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
558}
executed 1015 times by 12 tests: end of block
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
559-
560-
561static const QLocaleData *systemData()-
562{-
563-
564-
565 if (!system_data || system_data->m_language_id == 0)-
566 QLocalePrivate::updateSystemPrivate();-
567-
568 return system_data;-
569-
570-
571-
572}-
573-
574static const QLocaleData *defaultData()-
575{-
576 if (!default_data)-
577 default_data = systemData();-
578 return default_data;-
579}-
580-
581const QLocaleData *QLocaleData::c()-
582{-
583 ((!(locale_index[QLocale::C] == 0)) ? qt_assert("locale_index[QLocale::C] == 0",__FILE__,656659) : qt_noop());-
584 return c_data;-
585}-
586-
587static inline QString getLocaleData(const ushort *data, int size)-
588{-
589 return size > 0 ? QString::fromRawData(reinterpret_cast<const QChar *>(data), size) : QString();-
590}-
591-
592static QString getLocaleListData(const ushort *data, int size, int index)-
593{-
594 static const ushort separator = ';';-
595 while (index && size > 0) {-
596 while (*data != separator)-
597 ++data, --size;-
598 --index;-
599 ++data;-
600 --size;-
601 }-
602 const ushort *end = data;-
603 while (size > 0 && *end != separator)-
604 ++end, --size;-
605 return getLocaleData(data, end - data);-
606}-
607-
608-
609-
610QDataStream &operator<<(QDataStream &ds, const QLocale &l)-
611{-
612 ds << l.name();-
613 return ds;-
614}-
615-
616QDataStream &operator>>(QDataStream &ds, QLocale &l)-
617{-
618 QString s;-
619 ds >> s;-
620 l = QLocale(s);-
621 return ds;-
622}-
623-
624-
625-
626static const int locale_data_size = sizeof(locale_data)/sizeof(QLocaleData) - 1;-
627-
628namespace { namespace Q_QGS_defaultLocalePrivate { typedef QSharedDataPointer<QLocalePrivate> Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized) guard.store(QtGlobalStatic::Destroyed); } }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (QLocalePrivate::create(defaultData(), default_number_options)))) : value (QLocalePrivate::create(defaultData(), default_number_options)) { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } } static QGlobalStatic<QSharedDataPointer<QLocalePrivate>, Q_QGS_defaultLocalePrivate::innerFunction, Q_QGS_defaultLocalePrivate::guard> defaultLocalePrivate;-
629-
630-
631static QLocalePrivate *localePrivateByName(const QString &name)-
632{-
633 if (name == QLatin1String("C")
name == QLatin1String("C")Description
TRUEevaluated 7883 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_selftests - unknown status
FALSEevaluated 3171 times by 26 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
)
3171-7883
634 return
executed 7883 times by 6 tests: return c_private();
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_selftests - unknown status
c_private();
executed 7883 times by 6 tests: return c_private();
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_selftests - unknown status
7883
635 const QLocaleData *data = findLocaleData(name);-
636 return
executed 3170 times by 26 tests: return QLocalePrivate::create(data, data->m_language_id == QLocale::C ? QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
QLocalePrivate::create(data, data->m_language_id == QLocale::C ?
executed 3170 times by 26 tests: return QLocalePrivate::create(data, data->m_language_id == QLocale::C ? QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3170
637 QLocale::OmitGroupSeparator : 0QLocale::DefaultNumberOptions);
executed 3170 times by 26 tests: return QLocalePrivate::create(data, data->m_language_id == QLocale::C ? QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3170
638}-
639-
640static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Script script,-
641 QLocale::Country country)-
642{-
643 if (language == QLocale::C
language == QLocale::CDescription
TRUEevaluated 131284 times by 117 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QColumnView
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
FALSEevaluated 64 times by 12 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QTime
  • tst_QWidget
)
64-131284
644 return
executed 131284 times by 117 tests: return c_private();
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QColumnView
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
c_private();
executed 131284 times by 117 tests: return c_private();
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QColumnView
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
131284
645-
646 const QLocaleData *data = QLocaleData::findLocaleData(language, script, country);-
647-
648 intQLocale::NumberOptions numberOptions = 0QLocale::DefaultNumberOptions;-
649-
650-
651 if (data->m_language_id == QLocale::C
data->m_langua... == QLocale::CDescription
TRUEnever evaluated
FALSEevaluated 64 times by 12 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QTime
  • tst_QWidget
&& language != QLocale::C
language != QLocale::CDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-64
652 numberOptions = default_number_options;-
653 data = defaultData();-
654 }
never executed: end of block
0
655 return
executed 64 times by 12 tests: return QLocalePrivate::create(data, numberOptions);
Executed by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QTime
  • tst_QWidget
QLocalePrivate::create(data, numberOptions);
executed 64 times by 12 tests: return QLocalePrivate::create(data, numberOptions);
Executed by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QTime
  • tst_QWidget
64
656}-
657-
658-
659-
660-
661-
662QLocale::QLocale(QLocalePrivate &dd)-
663 : d(&dd)-
664{}-
665QLocale::QLocale(const QString &name)-
666 : d(localePrivateByName(name))-
667{-
668}-
669QLocale::QLocale()-
670 : d(*defaultLocalePrivate)-
671{-
672}-
673QLocale::QLocale(Language language, Country country)-
674 : d(findLocalePrivate(language, QLocale::AnyScript, country))-
675{-
676}-
677QLocale::QLocale(Language language, Script script, Country country)-
678 : d(findLocalePrivate(language, script, country))-
679{-
680}-
681-
682-
683-
684-
685-
686QLocale::QLocale(const QLocale &other)-
687{-
688 d = other.d;-
689}-
690-
691-
692-
693-
694-
695QLocale::~QLocale()-
696{-
697}-
698-
699-
700-
701-
702-
703-
704QLocale &QLocale::operator=(const QLocale &other)-
705{-
706 d = other.d;-
707 return *this;-
708}-
709-
710bool QLocale::operator==(const QLocale &other) const-
711{-
712 return d->m_data == other.d->m_data && d->m_numberOptions == other.d->m_numberOptions;-
713}-
714-
715bool QLocale::operator!=(const QLocale &other) const-
716{-
717 return d->m_data != other.d->m_data || d->m_numberOptions != other.d->m_numberOptions;-
718}-
719uint qHash(const QLocale &key, uint seed) noexcept-
720{-
721 QtPrivate::QHashCombine hash;-
722 seed = hash(seed, key.d->m_data);-
723 seed = hash(seed, key.d->m_numberOptions);-
724 return
never executed: return seed;
seed;
never executed: return seed;
0
725}-
726-
727-
728-
729-
730-
731-
732-
733void QLocale::setNumberOptions(NumberOptions options)-
734{-
735 d->m_numberOptions = options;-
736}-
737QLocale::NumberOptions QLocale::numberOptions() const-
738{-
739 return
executed 3878 times by 30 tests: return static_cast<NumberOptions>(d->m_numberOptions);
Executed by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGuiVariant
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QListView
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QOpenGlConfig
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • ...
static_cast<NumberOptionNumberOptions>(d->m_numberOptions);
executed 3878 times by 30 tests: return static_cast<NumberOptions>(d->m_numberOptions);
Executed by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGuiVariant
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QListView
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QOpenGlConfig
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • ...
3878
740}-
741-
742-
743-
744-
745-
746-
747-
748QString QLocale::quoteString(const QString &str, QuotationStyle style) const-
749{-
750 return quoteString(&str, style);-
751}-
752-
753-
754-
755-
756-
757-
758QString QLocale::quoteString(const QStringRef &str, QuotationStyle style) const-
759{-
760-
761 if (d->m_data == systemData()) {-
762 QVariant res;-
763 if (style == QLocale::AlternateQuotation)-
764 res = systemLocale()->query(QSystemLocale::StringToAlternateQuotation, QVariant::fromValue(str));-
765 if (res.isNull() || style == QLocale::StandardQuotation)-
766 res = systemLocale()->query(QSystemLocale::StringToStandardQuotation, QVariant::fromValue(str));-
767 if (!res.isNull())-
768 return res.toString();-
769 }-
770-
771-
772 if (style == QLocale::StandardQuotation)-
773 return QChar(d->m_data->m_quotation_start) % str % QChar(d->m_data->m_quotation_end);-
774 else-
775 return QChar(d->m_data->m_alternate_quotation_start) % str % QChar(d->m_data->m_alternate_quotation_end);-
776}-
777-
778-
779-
780-
781-
782-
783-
784QString QLocale::createSeparatedList(const QStringList &list) const-
785{-
786-
787 if (d->m_data == systemData()) {-
788 QVariant res;-
789 res = systemLocale()->query(QSystemLocale::ListToSeparatedString, QVariant::fromValue(list));-
790-
791 if (!res.isNull())-
792 return res.toString();-
793 }-
794-
795-
796 const int size = list.size();-
797 if (size == 1) {-
798 return list.at(0);-
799 } else if (size == 2) {-
800 QString format = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_two_idx, d->m_data->m_list_pattern_part_two_size);-
801 return format.arg(list.at(0), list.at(1));-
802 } else if (size > 2) {-
803 QString formatStart = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_start_idx, d->m_data->m_list_pattern_part_start_size);-
804 QString formatMid = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_mid_idx, d->m_data->m_list_pattern_part_mid_size);-
805 QString formatEnd = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_end_idx, d->m_data->m_list_pattern_part_end_size);-
806 QString result = formatStart.arg(list.at(0), list.at(1));-
807 for (int i = 2; i < size - 1; ++i)-
808 result = formatMid.arg(result, list.at(i));-
809 result = formatEnd.arg(result, list.at(size - 1));-
810 return result;-
811 }-
812-
813 return QString();-
814}-
815void QLocale::setDefault(const QLocale &locale)-
816{-
817 default_data = locale.d->m_data;-
818 default_number_options = locale.numberOptions();-
819-
820 if (defaultLocalePrivate.exists()) {-
821-
822 *defaultLocalePrivate = locale.d;-
823 }-
824}-
825-
826-
827-
828-
829-
830-
831QLocale::Language QLocale::language() const-
832{-
833 return Language(d->languageId());-
834}-
835QLocale::Script QLocale::script() const-
836{-
837 return Script(d->m_data->m_script_id);-
838}-
839-
840-
841-
842-
843-
844-
845QLocale::Country QLocale::country() const-
846{-
847 return Country(d->countryId());-
848}-
849QString QLocale::name() const-
850{-
851 Language l = language();-
852-
853 QString result = d->languageCode();-
854-
855 if (l == C)-
856 return result;-
857-
858 Country c = country();-
859 if (c == AnyCountry)-
860 return result;-
861-
862 result.append(QLatin1Char('_'));-
863 result.append(d->countryCode());-
864-
865 return result;-
866}-
867-
868static qlonglong toIntegral_helper(const QLocaleData *d, const QChar *data, int len, bool *ok,-
869 QLocaleDataQLocale::GroupSeparatorModeNumberOptions mode, qlonglong)-
870{-
871 return
executed 1226 times by 16 tests: return d->stringToLongLong(data, len, 10, ok, mode);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
d->stringToLongLong(data, len, 10, ok, mode);
executed 1226 times by 16 tests: return d->stringToLongLong(data, len, 10, ok, mode);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
1226
872}-
873-
874static qulonglong toIntegral_helper(const QLocaleData *d, const QChar *data, int len, bool *ok,-
875 QLocaleDataQLocale::GroupSeparatorModeNumberOptions mode, qulonglong)-
876{-
877 return
executed 15675 times by 11 tests: return d->stringToUnsLongLong(data, len, 10, ok, mode);
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
d->stringToUnsLongLong(data, len, 10, ok, mode);
executed 15675 times by 11 tests: return d->stringToUnsLongLong(data, len, 10, ok, mode);
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
15675
878}-
879-
880template <typename T> static inline-
881T toIntegral_helper(const QLocalePrivate *d, const QChar *data, int len, bool *ok)-
882{-
883-
884 const bool isUnsigned = T(0) < T(-1);-
885 typedef typename QtPrivate::QConditional<isUnsigned, qulonglong, qlonglong>::Type Int64;-
QLocaleData::GroupSeparatorMode mode
= d->m_numberOptions & QLocale::RejectGroupSeparator
? QLocaleData::FailOnGroupSeparators
: QLocaleData::ParseGroupSeparators;
886-
887-
888 Int64 val = toIntegral_helper(d->m_data, data, len, ok, moded->m_numberOptions, Int64());-
889 if (T(val) != val
T(val) != valDescription
TRUEnever evaluated
FALSEevaluated 16901 times by 23 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
) {
0-16901
890 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
891 *
never executed: *ok = false;
ok = false;
never executed: *ok = false;
0
892 val = 0;-
893 }
never executed: end of block
0
894 return
executed 16901 times by 23 tests: return T(val);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
T(val);
executed 16901 times by 23 tests: return T(val);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
16901
895}-
896QString QLocale::bcp47Name() const-
897{-
898 return QString::fromLatin1(d->bcp47Name());-
899}-
900-
901-
902-
903-
904-
905-
906-
907QString QLocale::languageToString(Language language)-
908{-
909 if (uint(language) > uint(QLocale::LastLanguage))-
910 return QLatin1String("Unknown");-
911 return QLatin1String(language_name_list + language_name_index[language]);-
912}-
913-
914-
915-
916-
917-
918-
919-
920QString QLocale::countryToString(Country country)-
921{-
922 if (uint(country) > uint(QLocale::LastCountry))-
923 return QLatin1String("Unknown");-
924 return QLatin1String(country_name_list + country_name_index[country]);-
925}-
926QString QLocale::scriptToString(QLocale::Script script)-
927{-
928 if (uint(script) > uint(QLocale::LastScript))-
929 return QLatin1String("Unknown");-
930 return QLatin1String(script_name_list + script_name_index[script]);-
931}-
932short QLocale::toShort(const QString &s, bool *ok) const-
933{-
934 return toIntegral_helper<short>(d, s.constData(), s.size(), ok);-
935}-
936ushort QLocale::toUShort(const QString &s, bool *ok) const-
937{-
938 return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);-
939}-
940int QLocale::toInt(const QString &s, bool *ok) const-
941{-
942 return toIntegral_helper<int>(d, s.constData(), s.size(), ok);-
943}-
944uint QLocale::toUInt(const QString &s, bool *ok) const-
945{-
946 return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);-
947}-
948qlonglong QLocale::toLongLong(const QString &s, bool *ok) const-
949{-
950 return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);-
951}-
952qulonglong QLocale::toULongLong(const QString &s, bool *ok) const-
953{-
954 return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);-
955}-
956float QLocale::toFloat(const QString &s, bool *ok) const-
957{-
958 return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);-
959}-
960double QLocale::toDouble(const QString &s, bool *ok) const-
961{-
962 QLocaleData::GroupSeparatorMode mode1212
= d->m_numberOptions & RejectGroupSeparator
? QLocaleData::FailOnGroupSeparators
: QLocaleData::ParseGroupSeparators;return
executed 1212 times by 7 tests: return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
d->m_data->stringToDouble(s.constData(), s.size(), ok, moded->m_numberOptions);
executed 1212 times by 7 tests: return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
963}-
964short QLocale::toShort(const QStringRef &s, bool *ok) const-
965{-
966 return toIntegral_helper<short>(d, s.constData(), s.size(), ok);-
967}-
968ushort QLocale::toUShort(const QStringRef &s, bool *ok) const-
969{-
970 return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);-
971}-
972int QLocale::toInt(const QStringRef &s, bool *ok) const-
973{-
974 return toIntegral_helper<int>(d, s.constData(), s.size(), ok);-
975}-
976uint QLocale::toUInt(const QStringRef &s, bool *ok) const-
977{-
978 return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);-
979}-
980qlonglong QLocale::toLongLong(const QStringRef &s, bool *ok) const-
981{-
982 return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);-
983}-
984qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const-
985{-
986 return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);-
987}-
988float QLocale::toFloat(const QStringRef &s, bool *ok) const-
989{-
990 return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);-
991}-
992double QLocale::toDouble(const QStringRef &s, bool *ok) const-
993{-
994 QLocaleData::GroupSeparatorMode mode0
= d->m_numberOptions & RejectGroupSeparator
? QLocaleData::FailOnGroupSeparators
: QLocaleData::ParseGroupSeparators;return
never executed: return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
d->m_data->stringToDouble(s.constData(), s.size(), ok, moded->m_numberOptions);
never executed: return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
995}-
996QString QLocale::toString(qlonglong i) const-
997{-
998 int flags = d->m_numberOptions & OmitGroupSeparator-
999 ? 0-
1000 : QLocaleData::ThousandsGroup;-
1001-
1002 return d->m_data->longLongToString(i, -1, 10, -1, flags);-
1003}-
1004-
1005-
1006-
1007-
1008-
1009-
1010-
1011QString QLocale::toString(qulonglong i) const-
1012{-
1013 int flags = d->m_numberOptions & OmitGroupSeparator-
1014 ? 0-
1015 : QLocaleData::ThousandsGroup;-
1016-
1017 return d->m_data->unsLongLongToString(i, -1, 10, -1, flags);-
1018}-
1019-
1020-
1021-
1022-
1023-
1024-
1025-
1026QString QLocale::toString(const QDate &date, const QString &format) const-
1027{-
1028 return d->dateTimeToString(format, QDateTime(), date, QTime(), this);-
1029}-
1030-
1031-
1032-
1033-
1034-
1035-
1036QString QLocale::toString(const QDate &date, FormatType format) const-
1037{-
1038 if (!date.isValid())-
1039 return QString();-
1040-
1041-
1042 if (d->m_data == systemData()) {-
1043 QVariant res = systemLocale()->query(format == LongFormat-
1044 ? QSystemLocale::DateToStringLong : QSystemLocale::DateToStringShort,-
1045 date);-
1046 if (!res.isNull())-
1047 return res.toString();-
1048 }-
1049-
1050-
1051 QString format_str = dateFormat(format);-
1052 return toString(date, format_str);-
1053}-
1054-
1055static bool timeFormatContainsAP(const QString &format)-
1056{-
1057 int i = 0;-
1058 while (i < format.size()) {-
1059 if (format.at(i).unicode() == '\'') {-
1060 qt_readEscapedFormatString(format, &i);-
1061 continue;-
1062 }-
1063-
1064 if (format.at(i).toLower().unicode() == 'a')-
1065 return true;-
1066-
1067 ++i;-
1068 }-
1069 return false;-
1070}-
1071-
1072-
1073-
1074-
1075-
1076-
1077QString QLocale::toString(const QTime &time, const QString &format) const-
1078{-
1079 return d->dateTimeToString(format, QDateTime(), QDate(), time, this);-
1080}-
1081QString QLocale::toString(const QDateTime &dateTime, const QString &format) const-
1082{-
1083 return d->dateTimeToString(format, dateTime, QDate(), QTime(), this);-
1084}-
1085QString QLocale::toString(const QDateTime &dateTime, FormatType format) const-
1086{-
1087 if (!dateTime.isValid())-
1088 return QString();-
1089-
1090-
1091 if (d->m_data == systemData()) {-
1092 QVariant res = systemLocale()->query(format == LongFormat-
1093 ? QSystemLocale::DateTimeToStringLong-
1094 : QSystemLocale::DateTimeToStringShort,-
1095 dateTime);-
1096 if (!res.isNull())-
1097 return res.toString();-
1098 }-
1099-
1100-
1101 const QString format_str = dateTimeFormat(format);-
1102 return toString(dateTime, format_str);-
1103}-
1104-
1105-
1106-
1107-
1108-
1109-
1110-
1111QString QLocale::toString(const QTime &time, FormatType format) const-
1112{-
1113 if (!time.isValid())-
1114 return QString();-
1115-
1116-
1117 if (d->m_data == systemData()) {-
1118 QVariant res = systemLocale()->query(format == LongFormat-
1119 ? QSystemLocale::TimeToStringLong : QSystemLocale::TimeToStringShort,-
1120 time);-
1121 if (!res.isNull())-
1122 return res.toString();-
1123 }-
1124-
1125-
1126 QString format_str = timeFormat(format);-
1127 return toString(time, format_str);-
1128}-
1129QString QLocale::dateFormat(FormatType format) const-
1130{-
1131-
1132 if (d->m_data == systemData()) {-
1133 QVariant res = systemLocale()->query(format == LongFormat-
1134 ? QSystemLocale::DateFormatLong : QSystemLocale::DateFormatShort,-
1135 QVariant());-
1136 if (!res.isNull())-
1137 return res.toString();-
1138 }-
1139-
1140-
1141 quint32 idx, size;-
1142 switch (format) {-
1143 case LongFormat:-
1144 idx = d->m_data->m_long_date_format_idx;-
1145 size = d->m_data->m_long_date_format_size;-
1146 break;-
1147 default:-
1148 idx = d->m_data->m_short_date_format_idx;-
1149 size = d->m_data->m_short_date_format_size;-
1150 break;-
1151 }-
1152 return getLocaleData(date_format_data + idx, size);-
1153}-
1154QString QLocale::timeFormat(FormatType format) const-
1155{-
1156-
1157 if (d->m_data == systemData()) {-
1158 QVariant res = systemLocale()->query(format == LongFormat-
1159 ? QSystemLocale::TimeFormatLong : QSystemLocale::TimeFormatShort,-
1160 QVariant());-
1161 if (!res.isNull())-
1162 return res.toString();-
1163 }-
1164-
1165-
1166 quint32 idx, size;-
1167 switch (format) {-
1168 case LongFormat:-
1169 idx = d->m_data->m_long_time_format_idx;-
1170 size = d->m_data->m_long_time_format_size;-
1171 break;-
1172 default:-
1173 idx = d->m_data->m_short_time_format_idx;-
1174 size = d->m_data->m_short_time_format_size;-
1175 break;-
1176 }-
1177 return getLocaleData(time_format_data + idx, size);-
1178}-
1179QString QLocale::dateTimeFormat(FormatType format) const-
1180{-
1181-
1182 if (d->m_data == systemData()) {-
1183 QVariant res = systemLocale()->query(format == LongFormat-
1184 ? QSystemLocale::DateTimeFormatLong-
1185 : QSystemLocale::DateTimeFormatShort,-
1186 QVariant());-
1187 if (!res.isNull()) {-
1188 return res.toString();-
1189 }-
1190 }-
1191-
1192 return dateFormat(format) + QLatin1Char(' ') + timeFormat(format);-
1193}-
1194QTime QLocale::toTime(const QString &string, FormatType format) const-
1195{-
1196 return toTime(string, timeFormat(format));-
1197}-
1198QDate QLocale::toDate(const QString &string, FormatType format) const-
1199{-
1200 return toDate(string, dateFormat(format));-
1201}-
1202QDateTime QLocale::toDateTime(const QString &string, FormatType format) const-
1203{-
1204 return toDateTime(string, dateTimeFormat(format));-
1205}-
1206QTime QLocale::toTime(const QString &string, const QString &format) const-
1207{-
1208 QTime time;-
1209-
1210 QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString);-
1211 dt.setDefaultLocale(*this);-
1212 if (dt.parseFormat(format))-
1213 dt.fromString(string, 0, &time);-
1214-
1215-
1216-
1217-
1218 return time;-
1219}-
1220QDate QLocale::toDate(const QString &string, const QString &format) const-
1221{-
1222 QDate date;-
1223-
1224 QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString);-
1225 dt.setDefaultLocale(*this);-
1226 if (dt.parseFormat(format))-
1227 dt.fromString(string, &date, 0);-
1228-
1229-
1230-
1231-
1232 return date;-
1233}-
1234QDateTime QLocale::toDateTime(const QString &string, const QString &format) const-
1235{-
1236-
1237 QTime time;-
1238 QDate date;-
1239-
1240 QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString);-
1241 dt.setDefaultLocale(*this);-
1242 if (dt.parseFormat(format) && dt.fromString(string, &date, &time))-
1243 return QDateTime(date, time);-
1244-
1245-
1246-
1247-
1248 return QDateTime(QDate(), QTime(-1, -1, -1));-
1249}-
1250QChar QLocale::decimalPoint() const-
1251{-
1252 return d->decimal();-
1253}-
1254-
1255-
1256-
1257-
1258-
1259-
1260QChar QLocale::groupSeparator() const-
1261{-
1262 return d->group();-
1263}-
1264-
1265-
1266-
1267-
1268-
1269-
1270QChar QLocale::percent() const-
1271{-
1272 return d->percent();-
1273}-
1274-
1275-
1276-
1277-
1278-
1279-
1280QChar QLocale::zeroDigit() const-
1281{-
1282 return d->zero();-
1283}-
1284-
1285-
1286-
1287-
1288-
1289-
1290QChar QLocale::negativeSign() const-
1291{-
1292 return d->minus();-
1293}-
1294-
1295-
1296-
1297-
1298-
1299-
1300QChar QLocale::positiveSign() const-
1301{-
1302 return d->plus();-
1303}-
1304-
1305-
1306-
1307-
1308-
1309-
1310QChar QLocale::exponential() const-
1311{-
1312 return d->exponential();-
1313}-
1314-
1315static bool qIsUpper(char c)-
1316{-
1317 return c >= 'A' && c <= 'Z';-
1318}-
1319-
1320static char qToLower(char c)-
1321{-
1322 if (c >= 'A' && c <= 'Z')-
1323 return c - 'A' + 'a';-
1324 else-
1325 return c;-
1326}-
1327QString QLocale::toString(double i, char f, int prec) const-
1328{-
1329 QLocaleData::DoubleForm form = QLocaleData::DFDecimal;-
1330 uint flags = 0;-
1331-
1332 if (qIsUpper(f)
qIsUpper(f)Description
TRUEnever evaluated
FALSEevaluated 1272 times by 10 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
)
0-1272
1333 flags = QLocaleData::CapitalEorX;
never executed: flags = QLocaleData::CapitalEorX;
0
1334 f = qToLower(f);-
1335-
1336 switch (f) {-
1337 case
executed 1197 times by 10 tests: case 'f':
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
'f':
executed 1197 times by 10 tests: case 'f':
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
1197
1338 form = QLocaleData::DFDecimal;-
1339 break;
executed 1197 times by 10 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
1197
1340 case
never executed: case 'e':
'e':
never executed: case 'e':
0
1341 form = QLocaleData::DFExponent;-
1342 break;
never executed: break;
0
1343 case
executed 75 times by 3 tests: case 'g':
Executed by:
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
'g':
executed 75 times by 3 tests: case 'g':
Executed by:
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
75
1344 form = QLocaleData::DFSignificantDigits;-
1345 break;
executed 75 times by 3 tests: break;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
75
1346 default
never executed: default:
:
never executed: default:
0
1347 break;
never executed: break;
0
1348 }-
1349-
1350 if (!(d->m_numberOptions & OmitGroupSeparator)
!(d->m_numberO...roupSeparator)Description
TRUEevaluated 587 times by 9 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
FALSEevaluated 685 times by 3 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QSpinBox
)
587-685
1351 flags |= QLocaleData::ThousandsGroup;
executed 587 times by 9 tests: flags |= QLocaleData::ThousandsGroup;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
587
1352 if (!(d->m_numberOptions & OmitLeadingZeroInExponent)
!(d->m_numberO...eroInExponent)Description
TRUEevaluated 1272 times by 10 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
FALSEnever evaluated
)
0-1272
1353 flags |= QLocaleData::ZeroPadExponent
executed 1272 times by 10 tests: flags |= QLocaleData::ZeroPadExponent;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
executed 1272 times by 10 tests: flags |= QLocaleData::ZeroPadExponent;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
;
executed 1272 times by 10 tests: flags |= QLocaleData::ZeroPadExponent;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
1272
1354 return
executed 1272 times by 10 tests: return d->m_data->doubleToString(i, prec, form, -1, flags);
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
d->m_data->doubleToString(i, prec, form, -1, flags);
executed 1272 times by 10 tests: return d->m_data->doubleToString(i, prec, form, -1, flags);
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
1272
1355}-
1356QLocale QLocale::system()-
1357{-
1358 return QLocale(*QLocalePrivate::create(systemData()));-
1359}-
1360QList<QLocale> QLocale::matchingLocales(QLocale::Language language,-
1361 QLocale::Script script,-
1362 QLocale::Country country)-
1363{-
1364 if (uint(language) > QLocale::LastLanguage || uint(script) > QLocale::LastScript ||-
1365 uint(country) > QLocale::LastCountry)-
1366 return QList<QLocale>();-
1367-
1368 if (language == QLocale::C)-
1369 return QList<QLocale>() << QLocale(QLocale::C);-
1370-
1371 QList<QLocale> result;-
1372 if (language == QLocale::AnyLanguage && script == QLocale::AnyScript && country == QLocale::AnyCountry)-
1373 result.reserve(locale_data_size);-
1374 const QLocaleData *data = locale_data + locale_index[language];-
1375 while ( (data != locale_data + locale_data_size)-
1376 && (language == QLocale::AnyLanguage || data->m_language_id == uint(language))) {-
1377 if ((script == QLocale::AnyScript || data->m_script_id == uint(script))-
1378 && (country == QLocale::AnyCountry || data->m_country_id == uint(country))) {-
1379 QLocale locale(*QLocalePrivate::create(data));-
1380 result.append(locale);-
1381 }-
1382 ++data;-
1383 }-
1384 return result;-
1385}-
1386QList<QLocale::Country> QLocale::countriesForLanguage(Language language)-
1387{-
1388 QList<Country> result;-
1389 if (language == C) {-
1390 result << AnyCountry;-
1391 return result;-
1392 }-
1393-
1394 unsigned language_id = language;-
1395 const QLocaleData *data = locale_data + locale_index[language_id];-
1396 while (data->m_language_id == language_id) {-
1397 const QLocale::Country country = static_cast<Country>(data->m_country_id);-
1398 if (!result.contains(country))-
1399 result.append(country);-
1400 ++data;-
1401 }-
1402-
1403 return result;-
1404}-
1405QString QLocale::monthName(int month, FormatType type) const-
1406{-
1407 if (month < 1 || month > 12)-
1408 return QString();-
1409-
1410-
1411 if (d->m_data == systemData()) {-
1412 QVariant res = systemLocale()->query(type == LongFormat-
1413 ? QSystemLocale::MonthNameLong : QSystemLocale::MonthNameShort,-
1414 month);-
1415 if (!res.isNull())-
1416 return res.toString();-
1417 }-
1418-
1419-
1420 quint32 idx, size;-
1421 switch (type) {-
1422 case QLocale::LongFormat:-
1423 idx = d->m_data->m_long_month_names_idx;-
1424 size = d->m_data->m_long_month_names_size;-
1425 break;-
1426 case QLocale::ShortFormat:-
1427 idx = d->m_data->m_short_month_names_idx;-
1428 size = d->m_data->m_short_month_names_size;-
1429 break;-
1430 case QLocale::NarrowFormat:-
1431 idx = d->m_data->m_narrow_month_names_idx;-
1432 size = d->m_data->m_narrow_month_names_size;-
1433 break;-
1434 default:-
1435 return QString();-
1436 }-
1437 return getLocaleListData(months_data + idx, size, month - 1);-
1438}-
1439QString QLocale::standaloneMonthName(int month, FormatType type) const-
1440{-
1441 if (month < 1 || month > 12)-
1442 return QString();-
1443-
1444-
1445 if (d->m_data == systemData()) {-
1446 QVariant res = systemLocale()->query(type == LongFormat-
1447 ? QSystemLocale::StandaloneMonthNameLong : QSystemLocale::StandaloneMonthNameShort,-
1448 month);-
1449 if (!res.isNull())-
1450 return res.toString();-
1451 }-
1452-
1453-
1454 quint32 idx, size;-
1455 switch (type) {-
1456 case QLocale::LongFormat:-
1457 idx = d->m_data->m_standalone_long_month_names_idx;-
1458 size = d->m_data->m_standalone_long_month_names_size;-
1459 break;-
1460 case QLocale::ShortFormat:-
1461 idx = d->m_data->m_standalone_short_month_names_idx;-
1462 size = d->m_data->m_standalone_short_month_names_size;-
1463 break;-
1464 case QLocale::NarrowFormat:-
1465 idx = d->m_data->m_standalone_narrow_month_names_idx;-
1466 size = d->m_data->m_standalone_narrow_month_names_size;-
1467 break;-
1468 default:-
1469 return QString();-
1470 }-
1471 QString name = getLocaleListData(months_data + idx, size, month - 1);-
1472 if (name.isEmpty())-
1473 return monthName(month, type);-
1474 return name;-
1475}-
1476QString QLocale::dayName(int day, FormatType type) const-
1477{-
1478 if (day < 1 || day > 7)-
1479 return QString();-
1480-
1481-
1482 if (d->m_data == systemData()) {-
1483 QVariant res = systemLocale()->query(type == LongFormat-
1484 ? QSystemLocale::DayNameLong : QSystemLocale::DayNameShort,-
1485 day);-
1486 if (!res.isNull())-
1487 return res.toString();-
1488 }-
1489-
1490 if (day == 7)-
1491 day = 0;-
1492-
1493 quint32 idx, size;-
1494 switch (type) {-
1495 case QLocale::LongFormat:-
1496 idx = d->m_data->m_long_day_names_idx;-
1497 size = d->m_data->m_long_day_names_size;-
1498 break;-
1499 case QLocale::ShortFormat:-
1500 idx = d->m_data->m_short_day_names_idx;-
1501 size = d->m_data->m_short_day_names_size;-
1502 break;-
1503 case QLocale::NarrowFormat:-
1504 idx = d->m_data->m_narrow_day_names_idx;-
1505 size = d->m_data->m_narrow_day_names_size;-
1506 break;-
1507 default:-
1508 return QString();-
1509 }-
1510 return getLocaleListData(days_data + idx, size, day);-
1511}-
1512QString QLocale::standaloneDayName(int day, FormatType type) const-
1513{-
1514 if (day < 1 || day > 7)-
1515 return QString();-
1516-
1517-
1518 if (d->m_data == systemData()) {-
1519 QVariant res = systemLocale()->query(type == LongFormat-
1520 ? QSystemLocale::DayNameLong : QSystemLocale::DayNameShort,-
1521 day);-
1522 if (!res.isNull())-
1523 return res.toString();-
1524 }-
1525-
1526 if (day == 7)-
1527 day = 0;-
1528-
1529 quint32 idx, size;-
1530 switch (type) {-
1531 case QLocale::LongFormat:-
1532 idx = d->m_data->m_standalone_long_day_names_idx;-
1533 size = d->m_data->m_standalone_long_day_names_size;-
1534 break;-
1535 case QLocale::ShortFormat:-
1536 idx = d->m_data->m_standalone_short_day_names_idx;-
1537 size = d->m_data->m_standalone_short_day_names_size;-
1538 break;-
1539 case QLocale::NarrowFormat:-
1540 idx = d->m_data->m_standalone_narrow_day_names_idx;-
1541 size = d->m_data->m_standalone_narrow_day_names_size;-
1542 break;-
1543 default:-
1544 return QString();-
1545 }-
1546 QString name = getLocaleListData(days_data + idx, size, day);-
1547 if (name.isEmpty())-
1548 return dayName(day == 0 ? 7 : day, type);-
1549 return name;-
1550}-
1551-
1552-
1553-
1554-
1555-
1556-
1557Qt::DayOfWeek QLocale::firstDayOfWeek() const-
1558{-
1559-
1560 if (d->m_data == systemData()) {-
1561 QVariant res = systemLocale()->query(QSystemLocale::FirstDayOfWeek, QVariant());-
1562 if (!res.isNull())-
1563 return static_cast<Qt::DayOfWeek>(res.toUInt());-
1564 }-
1565-
1566 return static_cast<Qt::DayOfWeek>(d->m_data->m_first_day_of_week);-
1567}-
1568-
1569QLocale::MeasurementSystem QLocalePrivate::measurementSystem() const-
1570{-
1571 for (int i = 0; i < ImperialMeasurementSystemsCount; ++i) {-
1572 if (ImperialMeasurementSystems[i].languageId == m_data->m_language_id-
1573 && ImperialMeasurementSystems[i].countryId == m_data->m_country_id) {-
1574 return ImperialMeasurementSystems[i].system;-
1575 }-
1576 }-
1577 return QLocale::MetricSystem;-
1578}-
1579-
1580-
1581-
1582-
1583-
1584-
1585QList<Qt::DayOfWeek> QLocale::weekdays() const-
1586{-
1587-
1588 if (d->m_data == systemData()) {-
1589 QVariant res = systemLocale()->query(QSystemLocale::Weekdays, QVariant());-
1590 if (!res.isNull())-
1591 return static_cast<QList<Qt::DayOfWeek> >(res.value<QList<Qt::DayOfWeek> >());-
1592 }-
1593-
1594 QList<Qt::DayOfWeek> weekdays;-
1595 quint16 weekendStart = d->m_data->m_weekend_start;-
1596 quint16 weekendEnd = d->m_data->m_weekend_end;-
1597 for (int day = Qt::Monday; day <= Qt::Sunday; day++) {-
1598 if ((weekendEnd >= weekendStart && (day < weekendStart || day > weekendEnd)) ||-
1599 (weekendEnd < weekendStart && (day > weekendEnd && day < weekendStart)))-
1600 weekdays << static_cast<Qt::DayOfWeek>(day);-
1601 }-
1602 return weekdays;-
1603}-
1604-
1605-
1606-
1607-
1608-
1609-
1610QLocale::MeasurementSystem QLocale::measurementSystem() const-
1611{-
1612-
1613 if (d->m_data == systemData()) {-
1614 QVariant res = systemLocale()->query(QSystemLocale::MeasurementSystem, QVariant());-
1615 if (!res.isNull())-
1616 return MeasurementSystem(res.toInt());-
1617 }-
1618-
1619-
1620 return d->measurementSystem();-
1621}-
1622-
1623-
1624-
1625-
1626-
1627-
1628Qt::LayoutDirection QLocale::textDirection() const-
1629{-
1630 switch (script()) {-
1631 case
never executed: case QLocale::AdlamScript:
never executed: case QLocale::AdlamScript:
QLocale::AdlamScript:
never executed: case QLocale::AdlamScript:
0
1632 case
never executed: case QLocale::ArabicScript:
QLocale::ArabicScript:
never executed: case QLocale::ArabicScript:
0
1633 case
never executed: case QLocale::AvestanScript:
QLocale::AvestanScript:
never executed: case QLocale::AvestanScript:
0
1634 case
never executed: case QLocale::CypriotScript:
QLocale::CypriotScript:
never executed: case QLocale::CypriotScript:
0
1635 case
never executed: case QLocale::HatranScript:
QLocale::HatranScript
never executed: case QLocale::HatranScript:
:
never executed: case QLocale::HatranScript:
0
1636 case
never executed: case QLocale::HebrewScript:
QLocale::HebrewScript:
never executed: case QLocale::HebrewScript:
0
1637 case
never executed: case QLocale::ImperialAramaicScript:
QLocale::ImperialAramaicScript:
never executed: case QLocale::ImperialAramaicScript:
0
1638 case
never executed: case QLocale::InscriptionalPahlaviScript:
QLocale::InscriptionalPahlaviScript:
never executed: case QLocale::InscriptionalPahlaviScript:
0
1639 case
never executed: case QLocale::InscriptionalParthianScript:
QLocale::InscriptionalParthianScript:
never executed: case QLocale::InscriptionalParthianScript:
0
1640 case
never executed: case QLocale::KharoshthiScript:
QLocale::KharoshthiScript:
never executed: case QLocale::KharoshthiScript:
0
1641 case
never executed: case QLocale::LydianScript:
QLocale::LydianScript:
never executed: case QLocale::LydianScript:
0
1642 case
never executed: case QLocale::MandaeanScript:
QLocale::MandaeanScript:
never executed: case QLocale::MandaeanScript:
0
1643 case
never executed: case QLocale::ManichaeanScript:
QLocale::ManichaeanScript:
never executed: case QLocale::ManichaeanScript:
0
1644 case
never executed: case QLocale::MendeKikakuiScript:
QLocale::MendeKikakuiScript:
never executed: case QLocale::MendeKikakuiScript:
0
1645 case
never executed: case QLocale::MeroiticCursiveScript:
QLocale::MeroiticCursiveScript:
never executed: case QLocale::MeroiticCursiveScript:
0
1646 case
never executed: case QLocale::MeroiticScript:
QLocale::MeroiticScript:
never executed: case QLocale::MeroiticScript:
0
1647 case
never executed: case QLocale::NabataeanScript:
QLocale::NabataeanScript:
never executed: case QLocale::NabataeanScript:
0
1648 case
never executed: case QLocale::NkoScript:
QLocale::NkoScript:
never executed: case QLocale::NkoScript:
0
1649 case
never executed: case QLocale::OldHungarianScript:
QLocale::OldHungarianScript
never executed: case QLocale::OldHungarianScript:
:
never executed: case QLocale::OldHungarianScript:
0
1650 case
never executed: case QLocale::OldNorthArabianScript:
QLocale::OldNorthArabianScript:
never executed: case QLocale::OldNorthArabianScript:
0
1651 case
never executed: case QLocale::OldSouthArabianScript:
QLocale::OldSouthArabianScript:
never executed: case QLocale::OldSouthArabianScript:
0
1652 case
never executed: case QLocale::OrkhonScript:
QLocale::OrkhonScript:
never executed: case QLocale::OrkhonScript:
0
1653 case
never executed: case QLocale::PalmyreneScript:
QLocale::PalmyreneScript:
never executed: case QLocale::PalmyreneScript:
0
1654 case
never executed: case QLocale::PhoenicianScript:
QLocale::PhoenicianScript:
never executed: case QLocale::PhoenicianScript:
0
1655 case
never executed: case QLocale::PsalterPahlaviScript:
QLocale::PsalterPahlaviScript:
never executed: case QLocale::PsalterPahlaviScript:
0
1656 case
never executed: case QLocale::SamaritanScript:
QLocale::SamaritanScript:
never executed: case QLocale::SamaritanScript:
0
1657 case
never executed: case QLocale::SyriacScript:
QLocale::SyriacScript:
never executed: case QLocale::SyriacScript:
0
1658 case
never executed: case QLocale::ThaanaScript:
QLocale::ThaanaScript:
never executed: case QLocale::ThaanaScript:
0
1659 return
never executed: return Qt::RightToLeft;
Qt::RightToLeft;
never executed: return Qt::RightToLeft;
0
1660 default
executed 34 times by 34 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QRadioButton
  • ...
:
executed 34 times by 34 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QRadioButton
  • ...
34
1661 break;
executed 34 times by 34 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QRadioButton
  • ...
34
1662 }-
1663 return
executed 34 times by 34 tests: return Qt::LeftToRight;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QRadioButton
  • ...
Qt::LeftToRight;
executed 34 times by 34 tests: return Qt::LeftToRight;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QRadioButton
  • ...
34
1664}-
1665QString QLocale::toUpper(const QString &str) const-
1666{-
1667-
1668 bool ok = true;-
1669 QString result = QIcu::toUpper(d->bcp47Name('_'), str, &ok);-
1670 if (ok)-
1671 return result;-
1672-
1673-
1674 return str.toUpper();-
1675}-
1676QString QLocale::toLower(const QString &str) const-
1677{-
1678-
1679 bool ok = true;-
1680 const QString result = QIcu::toLower(d->bcp47Name('_'), str, &ok);-
1681 if (ok)-
1682 return result;-
1683-
1684-
1685 return str.toLower();-
1686}-
1687QString QLocale::amText() const-
1688{-
1689-
1690 if (d->m_data == systemData()) {-
1691 QVariant res = systemLocale()->query(QSystemLocale::AMText, QVariant());-
1692 if (!res.isNull())-
1693 return res.toString();-
1694 }-
1695-
1696 return getLocaleData(am_data + d->m_data->m_am_idx, d->m_data->m_am_size);-
1697}-
1698QString QLocale::pmText() const-
1699{-
1700-
1701 if (d->m_data == systemData()) {-
1702 QVariant res = systemLocale()->query(QSystemLocale::PMText, QVariant());-
1703 if (!res.isNull())-
1704 return res.toString();-
1705 }-
1706-
1707 return getLocaleData(pm_data + d->m_data->m_pm_idx, d->m_data->m_pm_size);-
1708}-
1709-
1710-
1711QString QLocalePrivate::dateTimeToString(const QString &format, const QDateTime &datetime,-
1712 const QDate &dateOnly, const QTime &timeOnly,-
1713 const QLocale *q) const-
1714{-
1715 QDate date;-
1716 QTime time;-
1717 bool formatDate = false;-
1718 bool formatTime = false;-
1719 if (datetime.isValid()) {-
1720 date = datetime.date();-
1721 time = datetime.time();-
1722 formatDate = true;-
1723 formatTime = true;-
1724 } else if (dateOnly.isValid()) {-
1725 date = dateOnly;-
1726 formatDate = true;-
1727 } else if (timeOnly.isValid()) {-
1728 time = timeOnly;-
1729 formatTime = true;-
1730 } else {-
1731 return QString();-
1732 }-
1733-
1734 QString result;-
1735-
1736 int i = 0;-
1737 while (i < format.size()) {-
1738 if (format.at(i).unicode() == '\'') {-
1739 result.append(qt_readEscapedFormatString(format, &i));-
1740 continue;-
1741 }-
1742-
1743 const QChar c = format.at(i);-
1744 int repeat = qt_repeatCount(format, i);-
1745 bool used = false;-
1746 if (formatDate) {-
1747 switch (c.unicode()) {-
1748 case 'y':-
1749 used = true;-
1750 if (repeat >= 4)-
1751 repeat = 4;-
1752 else if (repeat >= 2)-
1753 repeat = 2;-
1754-
1755 switch (repeat) {-
1756 case 4: {-
1757 const int yr = date.year();-
1758 const int len = (yr < 0) ? 5 : 4;-
1759 result.append(m_data->longLongToString(yr, -1, 10, len, QLocaleData::ZeroPadded));-
1760 break;-
1761 }-
1762 case 2:-
1763 result.append(m_data->longLongToString(date.year() % 100, -1, 10, 2,-
1764 QLocaleData::ZeroPadded));-
1765 break;-
1766 default:-
1767 repeat = 1;-
1768 result.append(c);-
1769 break;-
1770 }-
1771 break;-
1772-
1773 case 'M':-
1774 used = true;-
1775 repeat = qMin(repeat, 4);-
1776 switch (repeat) {-
1777 case 1:-
1778 result.append(m_data->longLongToString(date.month()));-
1779 break;-
1780 case 2:-
1781 result.append(m_data->longLongToString(date.month(), -1, 10, 2, QLocaleData::ZeroPadded));-
1782 break;-
1783 case 3:-
1784 result.append(q->monthName(date.month(), QLocale::ShortFormat));-
1785 break;-
1786 case 4:-
1787 result.append(q->monthName(date.month(), QLocale::LongFormat));-
1788 break;-
1789 }-
1790 break;-
1791-
1792 case 'd':-
1793 used = true;-
1794 repeat = qMin(repeat, 4);-
1795 switch (repeat) {-
1796 case 1:-
1797 result.append(m_data->longLongToString(date.day()));-
1798 break;-
1799 case 2:-
1800 result.append(m_data->longLongToString(date.day(), -1, 10, 2, QLocaleData::ZeroPadded));-
1801 break;-
1802 case 3:-
1803 result.append(q->dayName(date.dayOfWeek(), QLocale::ShortFormat));-
1804 break;-
1805 case 4:-
1806 result.append(q->dayName(date.dayOfWeek(), QLocale::LongFormat));-
1807 break;-
1808 }-
1809 break;-
1810-
1811 default:-
1812 break;-
1813 }-
1814 }-
1815 if (!used && formatTime) {-
1816 switch (c.unicode()) {-
1817 case 'h': {-
1818 used = true;-
1819 repeat = qMin(repeat, 2);-
1820 int hour = time.hour();-
1821 if (timeFormatContainsAP(format)) {-
1822 if (hour > 12)-
1823 hour -= 12;-
1824 else if (hour == 0)-
1825 hour = 12;-
1826 }-
1827-
1828 switch (repeat) {-
1829 case 1:-
1830 result.append(m_data->longLongToString(hour));-
1831 break;-
1832 case 2:-
1833 result.append(m_data->longLongToString(hour, -1, 10, 2, QLocaleData::ZeroPadded));-
1834 break;-
1835 }-
1836 break;-
1837 }-
1838 case 'H':-
1839 used = true;-
1840 repeat = qMin(repeat, 2);-
1841 switch (repeat) {-
1842 case 1:-
1843 result.append(m_data->longLongToString(time.hour()));-
1844 break;-
1845 case 2:-
1846 result.append(m_data->longLongToString(time.hour(), -1, 10, 2, QLocaleData::ZeroPadded));-
1847 break;-
1848 }-
1849 break;-
1850-
1851 case 'm':-
1852 used = true;-
1853 repeat = qMin(repeat, 2);-
1854 switch (repeat) {-
1855 case 1:-
1856 result.append(m_data->longLongToString(time.minute()));-
1857 break;-
1858 case 2:-
1859 result.append(m_data->longLongToString(time.minute(), -1, 10, 2, QLocaleData::ZeroPadded));-
1860 break;-
1861 }-
1862 break;-
1863-
1864 case 's':-
1865 used = true;-
1866 repeat = qMin(repeat, 2);-
1867 switch (repeat) {-
1868 case 1:-
1869 result.append(m_data->longLongToString(time.second()));-
1870 break;-
1871 case 2:-
1872 result.append(m_data->longLongToString(time.second(), -1, 10, 2, QLocaleData::ZeroPadded));-
1873 break;-
1874 }-
1875 break;-
1876-
1877 case 'a':-
1878 used = true;-
1879 if (i + 1 < format.length() && format.at(i + 1).unicode() == 'p') {-
1880 repeat = 2;-
1881 } else {-
1882 repeat = 1;-
1883 }-
1884 result.append(time.hour() < 12 ? q->amText().toLower() : q->pmText().toLower());-
1885 break;-
1886-
1887 case 'A':-
1888 used = true;-
1889 if (i + 1 < format.length() && format.at(i + 1).unicode() == 'P') {-
1890 repeat = 2;-
1891 } else {-
1892 repeat = 1;-
1893 }-
1894 result.append(time.hour() < 12 ? q->amText().toUpper() : q->pmText().toUpper());-
1895 break;-
1896-
1897 case 'z':-
1898 used = true;-
1899 if (repeat >= 3) {-
1900 repeat = 3;-
1901 } else {-
1902 repeat = 1;-
1903 }-
1904 switch (repeat) {-
1905 case 1:-
1906 result.append(m_data->longLongToString(time.msec()));-
1907 break;-
1908 case 3:-
1909 result.append(m_data->longLongToString(time.msec(), -1, 10, 3, QLocaleData::ZeroPadded));-
1910 break;-
1911 }-
1912 break;-
1913-
1914 case 't':-
1915 used = true;-
1916 repeat = 1;-
1917-
1918 if (formatDate) {-
1919 result.append(datetime.timeZoneAbbreviation());-
1920 } else {-
1921 result.append(QDateTime::currentDateTime().timeZoneAbbreviation());-
1922 }-
1923 break;-
1924-
1925 default:-
1926 break;-
1927 }-
1928 }-
1929 if (!used) {-
1930 result.append(QString(repeat, c));-
1931 }-
1932 i += repeat;-
1933 }-
1934-
1935 return result;-
1936}-
1937-
1938QString QLocaleData::doubleToString(double d, int precision, DoubleForm form,-
1939 int width, unsigned flags) const-
1940{-
1941 return doubleToString(m_zero, m_plus, m_minus, m_exponential, m_group, m_decimal,-
1942 d, precision, form, width, flags);-
1943}-
1944-
1945QString QLocaleData::doubleToString(const QChar _zero, const QChar plus, const QChar minus,-
1946 const QChar exponential, const QChar group, const QChar decimal,-
1947 double d, int precision, DoubleForm form, int width, unsigned flags)-
1948{-
1949 if (precision != QLocale::FloatingPointShortest
precision != Q...gPointShortestDescription
TRUEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
FALSEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
&&
precision < 0
precision < 0Description
TRUEevaluated 97694 times by 9 tests
Evaluated by:
  • tst_QColor
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QPageSize
  • tst_QPdfWriter
  • tst_QPrinter
  • tst_QString
  • tst_QToolButton
FALSEevaluated 12784 times by 41 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPainter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
)
168-110478
1950 precision = 6;
executed 97694 times by 9 tests: precision = 6;
Executed by:
  • tst_QColor
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QPageSize
  • tst_QPdfWriter
  • tst_QPrinter
  • tst_QString
  • tst_QToolButton
97694
1951 if (width < 0
width < 0Description
TRUEevaluated 7345 times by 49 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QMetaType
  • ...
FALSEevaluated 103301 times by 8 tests
Evaluated by:
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QLCDNumber
  • tst_QPageSize
  • tst_QPdfWriter
  • tst_QPrinter
  • tst_QString
  • tst_QToolButton
)
7345-103301
1952 width = 0;
executed 7345 times by 49 tests: width = 0;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QMetaType
  • ...
7345
1953-
1954 bool negative = false;-
bool special_number= false;
1955 QString num_str;-
1956-
1957 if (qt_is_inf(d)) {-
num_str = QString::fromLatin1("inf");
special_number = trueint decpt;
1958 negativeint bufSize = d < 01;-
1959 } elseif (qt_is_nan(d)) {168-110478
num_str = QStringprecision == QLocale
precision == Q...gPointShortestDescription
TRUEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
::fromLatin1("nan");
precision == Q...gPointShortestDescription
TRUEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
special_number = true;
precision == Q...gPointShortestDescription
TRUEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
}
precision == Q...gPointShortestDescription
TRUEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
if (!special_number
precision == Q...gPointShortestDescription
TRUEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
precision == Q...gPointShortestDescription
TRUEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
FloatingPointShortest
precision == Q...gPointShortestDescription
TRUEevaluated 168 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 110478 times by 48 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLCDNumber
  • tst_QLabel
  • ...
)
1960 {168
int decpt, sign;
QString digits;
int modebufSize += DoubleMaxSignificant
executed 168 times by 13 tests: bufSize += DoubleMaxSignificant;
Executed by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
;
executed 168 times by 13 tests: bufSize += DoubleMaxSignificant;
Executed by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
1961 else if (form == DFDecimal
form == DFDecimalDescription
TRUEevaluated 2237 times by 20 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
FALSEevaluated 108241 times by 36 tests
Evaluated by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
)
2237-108241
1962 mode = 3bufSize += ((d > (1 << 19)
d > (1 << 19)Description
TRUEevaluated 64 times by 2 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
FALSEevaluated 2173 times by 20 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
|| d < -(1 << 19)
d < -(1 << 19)Description
TRUEevaluated 35 times by 2 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
FALSEevaluated 2138 times by 20 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
) ? DoubleMaxDigitsBeforeDecimal : 6) +
executed 2237 times by 20 tests: bufSize += ((d > (1 << 19) || d < -(1 << 19)) ? DoubleMaxDigitsBeforeDecimal : 6) + precision;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
35-2237
1963 precision
executed 2237 times by 20 tests: bufSize += ((d > (1 << 19) || d < -(1 << 19)) ? DoubleMaxDigitsBeforeDecimal : 6) + precision;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
executed 2237 times by 20 tests: bufSize += ((d > (1 << 19) || d < -(1 << 19)) ? DoubleMaxDigitsBeforeDecimal : 6) + precision;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
;
executed 2237 times by 20 tests: bufSize += ((d > (1 << 19) || d < -(1 << 19)) ? DoubleMaxDigitsBeforeDecimal : 6) + precision;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
2237
1964 else-
1965 mode =bufSize += qMax(
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
2;
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
108241
int pr =
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
, precision;
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
if (form == DFExponent
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
) ++pr;
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
char *rve = 0
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
+ 1;
executed 108241 times by 36 tests: bufSize += qMax(2, precision) + 1;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • ...
1966-
1967 QVarLengthArray<char*buff = 0;-
try {
digits = QLatin1String> buf(qdtoabufSize);
1968 int length;-
1969-
1970 doubleToAscii(d, modeform, prprecision, &decptbuf.data(), bufSize, &signnegative, &rvelength, &buff));-
} catch (...) {decpt);
1971-
1972 if (buff !=qstrncmp(buf.data(), "inf", 3) ==
qstrncmp(buf.d..."inf", 3) == 0Description
TRUEevaluated 550 times by 4 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QString
  • tst_QTextStream
  • tst_QVariant
FALSEevaluated 110096 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
0
qstrncmp(buf.d..."inf", 3) == 0Description
TRUEevaluated 550 times by 4 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QString
  • tst_QTextStream
  • tst_QVariant
FALSEevaluated 110096 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
|| qstrncmp(buf.data(), "nan", 3
qstrncmp(buf.d..."nan", 3) == 0Description
TRUEevaluated 262 times by 3 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QString
  • tst_QTextStream
FALSEevaluated 109834 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
) free== 0
qstrncmp(buf.d..."nan", 3) == 0Description
TRUEevaluated 262 times by 3 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QString
  • tst_QTextStream
FALSEevaluated 109834 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
) {
262-110096
1973 num_str = QString::fromLatin1(buffbuf.data(), length);-
1974 throw;}
executed 812 times by 4 tests: end of block
Executed by:
  • tst_QDBusMarshall
  • tst_QString
  • tst_QTextStream
  • tst_QVariant
if (buff != 0)
812
freeelse {
1975 QString digits = QString::fromLatin1(buffbuf.data(), length);-
1976-
1977 if (_zero.unicode() != '0'
_zero.unicode() != '0'Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 109833 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
) {
1-109833
1978 ushort z = _zero.unicode() - '0';-
1979 for (int i = 0; i < digits.length()
i < digits.length()Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QString
; ++i)
1-7
1980 reinterpret_cast<
executed 7 times by 1 test: reinterpret_cast<ushort *>(digits.data())[i] += z;
Executed by:
  • tst_QString
ushort *>(digits.data())[i] += z;
executed 7 times by 1 test: reinterpret_cast<ushort *>(digits.data())[i] += z;
Executed by:
  • tst_QString
7
1981 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QString
1
1982-
1983 bool always_show_decpt = (flags & Alternate
flags & AlternateDescription
TRUEevaluated 4614 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QTextStream
FALSEevaluated 105220 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
|| flags & ForcePoint
flags & ForcePointDescription
TRUEnever evaluated
FALSEevaluated 105220 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
);
0-105220
1984 switch (form) {-
1985 case
executed 17 times by 3 tests: case DFExponent:
Executed by:
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
DFExponent:
executed 17 times by 3 tests: case DFExponent:
Executed by:
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
{
17
1986 num_str = exponentForm(_zero, decimal, exponential, group, plus, minus,-
1987 digits, decpt, precision, PMDecimalDigits,-
1988 always_show_decpt, flags & ZeroPadExponent);-
1989 break;
executed 17 times by 3 tests: break;
Executed by:
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
17
1990 }-
1991 case
executed 2237 times by 20 tests: case DFDecimal:
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
DFDecimal:
executed 2237 times by 20 tests: case DFDecimal:
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
{
2237
1992 num_str = decimalForm(_zero, decimal, group,-
1993 digits, decpt, precision, PMDecimalDigits,-
1994 always_show_decpt, flags & ThousandsGroup);-
1995 break;
executed 2237 times by 20 tests: break;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QByteDataBuffer
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItemAnimation
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_selftests - unknown status
2237
1996 }-
1997 case
executed 107580 times by 42 tests: case DFSignificantDigits:
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
DFSignificantDigits:
executed 107580 times by 42 tests: case DFSignificantDigits:
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
{
107580
1998 PrecisionMode mode = (
(flags & Alternate)Description
TRUEevaluated 4610 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QTextStream
FALSEevaluated 102970 times by 42 tests
Evaluated by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
flags & Alternate)
(flags & Alternate)Description
TRUEevaluated 4610 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QTextStream
FALSEevaluated 102970 times by 42 tests
Evaluated by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
?
4610-102970
1999 PMSignificantDigits : PMChopTrailingZeros;-
2000-
2001 int cutoff = precision < 0
precision < 0Description
TRUEevaluated 144 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 107436 times by 35 tests
Evaluated by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • ...
? 6 : precision;
144-107436
2002-
2003 if (precision == QLocale::FloatingPointShortest
precision == Q...gPointShortestDescription
TRUEevaluated 144 times by 13 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTreeWidget
  • tst_QVariant
FALSEevaluated 107436 times by 35 tests
Evaluated by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • ...
&& decpt > 0
decpt > 0Description
TRUEevaluated 143 times by 12 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QVariant
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTreeWidget
) {
1-107436
2004 cutoff = digits.length() + 4;-
2005 if (decpt <= 10
decpt <= 10Description
TRUEevaluated 143 times by 12 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QVariant
FALSEnever evaluated
) {
0-143
2006 ++cutoff;-
2007 }
executed 143 times by 12 tests: end of block
Executed by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QVariant
else {
143
2008 cutoff += decpt > 100
decpt > 100Description
TRUEnever evaluated
FALSEnever evaluated
? 2 : 1;
0
2009 }
never executed: end of block
0
2010 if (!always_show_decpt
!always_show_decptDescription
TRUEevaluated 143 times by 12 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QVariant
FALSEnever evaluated
&& digits.length() > decpt
digits.length() > decptDescription
TRUEevaluated 56 times by 6 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QMetaType
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QVariant
FALSEevaluated 87 times by 8 tests
Evaluated by:
  • tst_QCssParser
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QPropertyAnimation
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QVariant
)
0-143
2011 ++
executed 56 times by 6 tests: ++cutoff;
Executed by:
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QMetaType
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QVariant
cutoff
executed 56 times by 6 tests: ++cutoff;
Executed by:
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QMetaType
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QVariant
executed 56 times by 6 tests: ++cutoff;
Executed by:
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QMetaType
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QVariant
;
executed 56 times by 6 tests: ++cutoff;
Executed by:
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QMetaType
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QVariant
56
2012 }
executed 143 times by 12 tests: end of block
Executed by:
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QVariant
143
2013-
2014 if (decpt != digits.length()
decpt != digits.length()Description
TRUEevaluated 54011 times by 31 tests
Evaluated by:
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QString
  • tst_QTextDocument
  • ...
FALSEevaluated 53569 times by 35 tests
Evaluated by:
  • tst_QBrush
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • ...
&& (decpt <= -4
decpt <= -4Description
TRUEevaluated 4438 times by 3 tests
Evaluated by:
  • tst_QByteArray
  • tst_QGraphicsTransform
  • tst_QString
FALSEevaluated 49573 times by 31 tests
Evaluated by:
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QString
  • tst_QTextDocument
  • ...
|| decpt > precisioncutoff
decpt > cutoffDescription
TRUEevaluated 1897 times by 3 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QString
  • tst_QTextStream
FALSEevaluated 47676 times by 31 tests
Evaluated by:
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QString
  • tst_QTextDocument
  • ...
))
1897-54011
2015 num_str = exponentForm(_zero, decimal, exponential, group, plus, minus,
executed 6335 times by 5 tests: num_str = exponentForm(_zero, decimal, exponential, group, plus, minus, digits, decpt, precision, mode, always_show_decpt, flags & ZeroPadExponent);
Executed by:
  • tst_QByteArray
  • tst_QDoubleSpinBox
  • tst_QGraphicsTransform
  • tst_QString
  • tst_QTextStream
6335
2016 digits, decpt, precision, mode,
executed 6335 times by 5 tests: num_str = exponentForm(_zero, decimal, exponential, group, plus, minus, digits, decpt, precision, mode, always_show_decpt, flags & ZeroPadExponent);
Executed by:
  • tst_QByteArray
  • tst_QDoubleSpinBox
  • tst_QGraphicsTransform
  • tst_QString
  • tst_QTextStream
6335
2017 always_show_decpt, flags & ZeroPadExponent);
executed 6335 times by 5 tests: num_str = exponentForm(_zero, decimal, exponential, group, plus, minus, digits, decpt, precision, mode, always_show_decpt, flags & ZeroPadExponent);
Executed by:
  • tst_QByteArray
  • tst_QDoubleSpinBox
  • tst_QGraphicsTransform
  • tst_QString
  • tst_QTextStream
6335
2018 else-
2019 num_str = decimalForm(_zero, decimal, group,
executed 101245 times by 42 tests: num_str = decimalForm(_zero, decimal, group, digits, decpt, precision, mode, always_show_decpt, flags & ThousandsGroup);
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
101245
2020 digits, decpt, precision, mode,
executed 101245 times by 42 tests: num_str = decimalForm(_zero, decimal, group, digits, decpt, precision, mode, always_show_decpt, flags & ThousandsGroup);
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
101245
2021 always_show_decpt, flags & ThousandsGroup);
executed 101245 times by 42 tests: num_str = decimalForm(_zero, decimal, group, digits, decpt, precision, mode, always_show_decpt, flags & ThousandsGroup);
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
101245
2022 break;
executed 107580 times by 42 tests: break;
Executed by:
  • tst_QBrush
  • tst_QByteArray
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QLabel
  • tst_QMetaType
  • tst_QOpenGlConfig
  • tst_QPageSize
  • tst_QPainter
  • tst_QPdfWriter
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
107580
2023 }-
2024 }-
2025-
2026 negative = sign != 0 && !if (isZero(d);
isZero(d)Description
TRUEevaluated 38415 times by 24 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QDoubleSpinBox
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSpinBox
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextList
  • tst_QTextStream
  • tst_QToolButton
  • tst_QVariant
  • tst_selftests - unknown status
FALSEevaluated 71419 times by 53 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
38415-71419
}
isZero(d)Description
TRUEevaluated 38415 times by 24 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QDoubleSpinBox
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSpinBox
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextList
  • tst_QTextStream
  • tst_QToolButton
  • tst_QVariant
  • tst_selftests - unknown status
FALSEevaluated 71419 times by 53 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
isZero(d)Description
TRUEevaluated 38415 times by 24 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QDoubleSpinBox
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSpinBox
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextList
  • tst_QTextStream
  • tst_QToolButton
  • tst_QVariant
  • tst_selftests - unknown status
FALSEevaluated 71419 times by 53 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
)
isZero(d)Description
TRUEevaluated 38415 times by 24 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QDoubleSpinBox
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSpinBox
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextList
  • tst_QTextStream
  • tst_QToolButton
  • tst_QVariant
  • tst_selftests - unknown status
FALSEevaluated 71419 times by 53 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
)
2027 negative = false;
executed 38415 times by 24 tests: negative = false;
Executed by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QDoubleSpinBox
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsTransform
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLCDNumber
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPropertyAnimation
  • tst_QSpinBox
  • tst_QString
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextList
  • tst_QTextStream
  • tst_QToolButton
  • tst_QVariant
  • tst_selftests - unknown status
38415
2028-
2029-
2030-
2031 if (flags & QLocaleData::ZeroPadded
flags & QLocal...ta::ZeroPaddedDescription
TRUEevaluated 4613 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 105221 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
&& !(flags & QLocaleData::LeftAdjusted)
!(flags & QLoc...:LeftAdjusted)Description
TRUEevaluated 2309 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 2304 times by 1 test
Evaluated by:
  • tst_QString
2304-105221
&& !special_number)
!(flags & QLoc...:LeftAdjusted)Description
TRUEevaluated 2309 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 2304 times by 1 test
Evaluated by:
  • tst_QString
!(flags & QLoc...:LeftAdjusted)Description
TRUEevaluated 2309 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 2304 times by 1 test
Evaluated by:
  • tst_QString
)
!(flags & QLoc...:LeftAdjusted)Description
TRUEevaluated 2309 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 2304 times by 1 test
Evaluated by:
  • tst_QString
) {
2032 int num_pad_chars = width - num_str.length();-
2033-
2034 if (negative
negativeDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 2243 times by 1 test
Evaluated by:
  • tst_QString
66-2243
2035 || flags & QLocaleData::AlwaysShowSign
flags & QLocal...AlwaysShowSignDescription
TRUEevaluated 1120 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 1123 times by 1 test
Evaluated by:
  • tst_QString
1120-1123
2036 || flags & QLocaleData::BlankBeforePositive
flags & QLocal...BeforePositiveDescription
TRUEevaluated 560 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 563 times by 1 test
Evaluated by:
  • tst_QString
)
560-563
2037 --
executed 1746 times by 1 test: --num_pad_chars;
Executed by:
  • tst_QString
num_pad_chars;
executed 1746 times by 1 test: --num_pad_chars;
Executed by:
  • tst_QString
1746
2038-
2039 for (int i = 0; i < num_pad_chars
i < num_pad_charsDescription
TRUEevaluated 23653 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 2309 times by 1 test
Evaluated by:
  • tst_QString
; ++i)
2309-23653
2040 num_str.prepend(_zero);
executed 23653 times by 1 test: num_str.prepend(_zero);
Executed by:
  • tst_QString
23653
2041 }
executed 2309 times by 1 test: end of block
Executed by:
  • tst_QString
2309
2042 }
executed 109834 times by 55 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
109834
2043-
2044-
2045 if (negative
negativeDescription
TRUEevaluated 22427 times by 15 tests
Evaluated by:
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsTransform
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QVariant
FALSEevaluated 88219 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
)
22427-88219
2046 num_str.prepend(minus);
executed 22427 times by 15 tests: num_str.prepend(minus);
Executed by:
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDoubleSpinBox
  • tst_QFont
  • tst_QGraphicsTransform
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QVariant
22427
2047 else if (flags & QLocaleData::AlwaysShowSign
flags & QLocal...AlwaysShowSignDescription
TRUEevaluated 4738 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QTextStream
FALSEevaluated 83481 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
)
4738-83481
2048 num_str.prepend(plus);
executed 4738 times by 2 tests: num_str.prepend(plus);
Executed by:
  • tst_QString
  • tst_QTextStream
4738
2049 else if (flags & QLocaleData::BlankBeforePositive
flags & QLocal...BeforePositiveDescription
TRUEevaluated 2368 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 81113 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
)
2368-81113
2050 num_str.prepend(QLatin1Char(' '));
executed 2368 times by 1 test: num_str.prepend(QLatin1Char(' '));
Executed by:
  • tst_QString
2368
2051-
2052 if (flags & QLocaleData::CapitalEorX
flags & QLocal...a::CapitalEorXDescription
TRUEevaluated 4999 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QTextStream
FALSEevaluated 105647 times by 55 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
)
4999-105647
2053 num_str = num_str.toUpper();
executed 4999 times by 2 tests: num_str = num_str.toUpper();
Executed by:
  • tst_QString
  • tst_QTextStream
4999
2054-
2055 return
executed 110646 times by 55 tests: return num_str;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
num_str;
executed 110646 times by 55 tests: return num_str;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QBrush
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QColor
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsTransform
  • tst_QGraphicsView
  • tst_QGuiVariant
  • tst_QHttpSocketEngine
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
110646
2056}-
2057-
2058QString QLocaleData::longLongToString(qlonglong l, int precision,-
2059 int base, int width,-
2060 unsigned flags) const-
2061{-
2062 return longLongToString(m_zero, m_group, m_plus, m_minus,-
2063 l, precision, base, width, flags);-
2064}-
2065-
2066QString QLocaleData::longLongToString(const QChar zero, const QChar group,-
2067 const QChar plus, const QChar minus,-
2068 qlonglong l, int precision,-
2069 int base, int width,-
2070 unsigned flags)-
2071{-
2072 bool precision_not_specified = false;-
2073 if (precision == -1) {-
2074 precision_not_specified = true;-
2075 precision = 1;-
2076 }-
2077-
2078 bool negative = l < 0;-
2079 if (base != 10) {-
2080-
2081 flags &= ~AlwaysShowSign;-
2082 flags &= ~BlankBeforePositive;-
2083 negative = false;-
2084 }-
2085-
2086 QString num_str;-
2087 if (base == 10)-
2088 num_str = qlltoa(l, base, zero);-
2089 else-
2090 num_str = qulltoa(l, base, zero);-
2091-
2092 uint cnt_thousand_sep = 0;-
2093 if (flags & ThousandsGroup && base == 10) {-
2094 for (int i = num_str.length() - 3; i > 0; i -= 3) {-
2095 num_str.insert(i, group);-
2096 ++cnt_thousand_sep;-
2097 }-
2098 }-
2099-
2100 for (int i = num_str.length() ; i < precision; ++i)-
2101 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));-
2102-
2103 if ((flags & Alternate || flags & ShowBase)-
2104 && base == 8-
2105 && (num_str.isEmpty() || num_str[0].unicode() != QLatin1Char('0')))-
2106 num_str.prepend(QLatin1Char('0'));-
2107-
2108-
2109-
2110 bool zero_padded = flags & ZeroPadded-
2111 && !(flags & LeftAdjusted)-
2112 && precision_not_specified;-
2113-
2114 if (zero_padded) {-
2115 int num_pad_chars = width - num_str.length();-
2116-
2117-
2118 if (negative-
2119 || flags & AlwaysShowSign-
2120 || flags & BlankBeforePositive)-
2121 --num_pad_chars;-
2122-
2123-
2124 if (base == 16 && (flags & Alternate || flags & ShowBase))-
2125 num_pad_chars -= 2;-
2126-
2127 else if (base == 2 && (flags & Alternate || flags & ShowBase))-
2128 num_pad_chars -= 2;-
2129-
2130 for (int i = 0; i < num_pad_chars; ++i)-
2131 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));-
2132 }-
2133-
2134 if (flags & CapitalEorX)-
2135 num_str = num_str.toUpper();-
2136-
2137 if (base == 16 && (flags & Alternate || flags & ShowBase))-
2138 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0X" : "0x"));-
2139 if (base == 2 && (flags & Alternate || flags & ShowBase))-
2140 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0B" : "0b"));-
2141-
2142-
2143 if (negative)-
2144 num_str.prepend(minus);-
2145 else if (flags & AlwaysShowSign)-
2146 num_str.prepend(plus);-
2147 else if (flags & BlankBeforePositive)-
2148 num_str.prepend(QLatin1Char(' '));-
2149-
2150 return num_str;-
2151}-
2152-
2153QString QLocaleData::unsLongLongToString(qulonglong l, int precision,-
2154 int base, int width,-
2155 unsigned flags) const-
2156{-
2157 return unsLongLongToString(m_zero, m_group, m_plus,-
2158 l, precision, base, width, flags);-
2159}-
2160-
2161QString QLocaleData::unsLongLongToString(const QChar zero, const QChar group,-
2162 const QChar plus,-
2163 qulonglong l, int precision,-
2164 int base, int width,-
2165 unsigned flags)-
2166{-
2167 bool precision_not_specified = false;-
2168 if (precision == -1) {-
2169 precision_not_specified = true;-
2170 precision = 1;-
2171 }-
2172-
2173 QString num_str = qulltoa(l, base, zero);-
2174-
2175 uint cnt_thousand_sep = 0;-
2176 if (flags & ThousandsGroup && base == 10) {-
2177 for (int i = num_str.length() - 3; i > 0; i -=3) {-
2178 num_str.insert(i, group);-
2179 ++cnt_thousand_sep;-
2180 }-
2181 }-
2182-
2183 for (int i = num_str.length() ; i < precision; ++i)-
2184 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));-
2185-
2186 if ((flags & Alternate || flags & ShowBase)-
2187 && base == 8-
2188 && (num_str.isEmpty() || num_str[0].unicode() != QLatin1Char('0')))-
2189 num_str.prepend(QLatin1Char('0'));-
2190-
2191-
2192-
2193 bool zero_padded = flags & ZeroPadded-
2194 && !(flags & LeftAdjusted)-
2195 && precision_not_specified;-
2196-
2197 if (zero_padded) {-
2198 int num_pad_chars = width - num_str.length();-
2199-
2200-
2201 if (base == 16 && flags & Alternate)-
2202 num_pad_chars -= 2;-
2203-
2204 else if (base == 2 && flags & Alternate)-
2205 num_pad_chars -= 2;-
2206-
2207 for (int i = 0; i < num_pad_chars; ++i)-
2208 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));-
2209 }-
2210-
2211 if (flags & CapitalEorX)-
2212 num_str = num_str.toUpper();-
2213-
2214 if (base == 16 && (flags & Alternate || flags & ShowBase))-
2215 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0X" : "0x"));-
2216 else if (base == 2 && (flags & Alternate || flags & ShowBase))-
2217 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0B" : "0b"));-
2218-
2219-
2220 if (flags & AlwaysShowSign)-
2221 num_str.prepend(plus);-
2222 else if (flags & BlankBeforePositive)-
2223 num_str.prepend(QLatin1Char(' '));-
2224-
2225 return num_str;-
2226}-
2227bool QLocaleData::numberToCLocale(const QChar *str, int len, GroupSeparatorMode group_sep_modeQLocale::NumberOptions number_options,-
2228 CharBuff *result) const-
2229{-
2230 const QChar *uc = str;-
2231 int l = len;-
2232 int idx = 0;-
2233-
2234-
2235 while (idx < l
idx < lDescription
TRUEevaluated 177012 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
FALSEevaluated 4310 times by 11 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QHostAddress
  • tst_QMimeDatabase
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
&& uc[idx].isSpace()
uc[idx].isSpace()Description
TRUEevaluated 268 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QString
  • tst_QStringRef
  • tst_QXmlInputSource
FALSEevaluated 176744 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
)
268-177012
2236 ++
executed 268 times by 4 tests: ++idx;
Executed by:
  • tst_QHostAddress
  • tst_QString
  • tst_QStringRef
  • tst_QXmlInputSource
idx;
executed 268 times by 4 tests: ++idx;
Executed by:
  • tst_QHostAddress
  • tst_QString
  • tst_QStringRef
  • tst_QXmlInputSource
268
2237 if (idx == l
idx == lDescription
TRUEevaluated 4310 times by 11 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QHostAddress
  • tst_QMimeDatabase
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
FALSEevaluated 176744 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
)
4310-176744
2238 return
executed 4310 times by 11 tests: return false;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QHostAddress
  • tst_QMimeDatabase
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
false;
executed 4310 times by 11 tests: return false;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QHostAddress
  • tst_QMimeDatabase
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
4310
2239-
2240-
2241 for (; idx < l
idx < lDescription
TRUEevaluated 176919 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
FALSEnever evaluated
; --l) {
0-176919
2242 if (!uc[l - 1].isSpace()
!uc[l - 1].isSpace()Description
TRUEevaluated 176744 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
FALSEevaluated 175 times by 5 tests
Evaluated by:
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_QXmlInputSource
)
175-176744
2243 break;
executed 176744 times by 92 tests: break;
Executed by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
176744
2244 }
executed 175 times by 5 tests: end of block
Executed by:
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_QXmlInputSource
175
2245-
2246 int group_cnt = 0;-
2247 int decpt_idx = -1;-
2248 int last_separator_idx = -1;-
2249 int start_of_digits_idx = -1;-
2250 int exponent_idx = -1;-
2251-
2252 while (idx < l
idx < lDescription
TRUEevaluated 545999 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
FALSEevaluated 175786 times by 91 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • ...
) {
175786-545999
2253 const QChar in = uc[idx];-
2254-
2255 char out = digitToCLocale(in);-
2256 if (out == 0
out == 0Description
TRUEevaluated 209926 times by 35 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTcpServer
  • tst_QTextBoundaryFinder
  • tst_QTextDocument
  • ...
FALSEevaluated 336073 times by 91 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
) {
209926-336073
2257 if (in == m_list
in == m_listDescription
TRUEnever evaluated
FALSEevaluated 209926 times by 35 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTcpServer
  • tst_QTextBoundaryFinder
  • tst_QTextDocument
  • ...
)
0-209926
2258 out = ';';
never executed: out = ';';
0
2259 else if (in == m_percent
in == m_percentDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QTextDocument
  • tst_QTextDocumentFragment
FALSEevaluated 209922 times by 33 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTcpServer
  • tst_QTextBoundaryFinder
  • tst_QTime
  • ...
)
4-209922
2260 out = '%';
executed 4 times by 2 tests: out = '%';
Executed by:
  • tst_QTextDocument
  • tst_QTextDocumentFragment
4
2261-
2262 else if (in.unicode() >= 'A'
in.unicode() >= 'A'Description
TRUEevaluated 208995 times by 30 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTextBoundaryFinder
  • tst_QTime
  • tst_QTreeWidget
  • tst_QUdpSocket
  • tst_QVariant
  • ...
FALSEevaluated 927 times by 14 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_qmakelib
&& in.unicode() <= 'Z'
in.unicode() <= 'Z'Description
TRUEevaluated 207440 times by 15 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTextBoundaryFinder
  • tst_QTime
  • tst_QVariant
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
FALSEevaluated 1555 times by 27 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTreeWidget
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • ...
)
927-208995
2263 out = in.toLower().toLatin1();
executed 207440 times by 15 tests: out = in.toLower().toLatin1();
Executed by:
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTextBoundaryFinder
  • tst_QTime
  • tst_QVariant
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
207440
2264 else if (in.unicode() >= 'a'
in.unicode() >= 'a'Description
TRUEevaluated 1535 times by 27 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTreeWidget
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • ...
FALSEevaluated 947 times by 15 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_qmakelib
&& in.unicode() <= 'z'
in.unicode() <= 'z'Description
TRUEevaluated 1530 times by 27 tests
Evaluated by:
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTreeWidget
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • ...
FALSEevaluated 5 times by 3 tests
Evaluated by:
  • tst_QString
  • tst_QStringRef
  • tst_QXmlStream
)
5-1535
2265 out = in.toLatin1();
executed 1530 times by 27 tests: out = in.toLatin1();
Executed by:
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QInputDialog
  • tst_QMetaType
  • tst_QNetworkInterface
  • tst_QNetworkSession
  • tst_QObject
  • tst_QOpenGlConfig
  • tst_QPlugin
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTreeWidget
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • ...
1530
2266 else-
2267 break;
executed 952 times by 16 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
  • tst_qmakelib
952
2268 }-
2269-
2270 if (group_sep_modenumber_options & QLocale::RejectLeadingZeroInExponent
number_options...ZeroInExponentDescription
TRUEnever evaluated
FALSEevaluated 545047 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
) {
0-545047
2271 if (out
out == 'e'Description
TRUEnever evaluated
FALSEnever evaluated
out == 'e'Description
TRUEnever evaluated
FALSEnever evaluated
== ParseGroupSeparators'e'
out == 'e'Description
TRUEnever evaluated
FALSEnever evaluated
|| out == 'E'
out == 'E'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2272 exponent_idx = idx;-
2273 }
never executed: end of block
else if (exponent_idx != -1
exponent_idx != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2274 if (out >= '1'
out >= '1'Description
TRUEnever evaluated
FALSEnever evaluated
&& out <= '9'
out <= '9'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2275 exponent_idx = -1;
never executed: exponent_idx = -1;
0
2276 else if (out == '0'
out == '0'Description
TRUEnever evaluated
FALSEnever evaluated
&& idx < l - 1
idx < l - 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2277 return
never executed: return false;
never executed: return false;
false;
never executed: return false;
0
2278 }
never executed: end of block
0
2279 }
never executed: end of block
0
2280-
2281 if (!(number_options & QLocale::RejectGroupSeparator)
!(number_optio...roupSeparator)Description
TRUEevaluated 43490 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
FALSEevaluated 501557 times by 88 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • ...
)
{
43490-501557
2282 if (start_of_digits_idx == -1
start_of_digits_idx == -1Description
TRUEevaluated 18400 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
FALSEevaluated 25090 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
&& out >= '0'
out >= '0'Description
TRUEevaluated 18051 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
FALSEevaluated 349 times by 8 tests
Evaluated by:
  • tst_QDate
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QSpinBox
  • tst_QTextStream
&& out <= '9'
out <= '9'Description
TRUEevaluated 17820 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
FALSEevaluated 231 times by 3 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QSpinBox
) {
231-25090
2283 start_of_digits_idx = idx;-
2284 }
executed 17820 times by 25 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
else if (out == ','
out == ','Description
TRUEevaluated 54 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
FALSEevaluated 25616 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
) {
54-25616
2285-
2286 if (decpt_idx != -1
decpt_idx != -1Description
TRUEnever evaluated
FALSEevaluated 54 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
)
0-54
2287 return
never executed: return false;
false;
never executed: return false;
0
2288-
2289-
2290-
2291 if (last_separator_idx != -1
last_separator_idx != -1Description
TRUEevaluated 10 times by 3 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QSpinBox
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
&& idx - last_separator_idx != 4
idx - last_separator_idx != 4Description
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QSpinBox
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QSpinBox
)
3-44
2292 return
executed 3 times by 3 tests: return false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QSpinBox
false;
executed 3 times by 3 tests: return false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QSpinBox
3
2293 if (last_separator_idx == -1
last_separator_idx == -1Description
TRUEevaluated 44 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QSpinBox
&& (start_of_digits_idx == -1
start_of_digits_idx == -1Description
TRUEnever evaluated
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
|| idx - start_of_digits_idx > 3
idx - start_of_digits_idx > 3Description
TRUEnever evaluated
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
))
0-44
2294 return
never executed: return false;
false;
never executed: return false;
0
2295-
2296 last_separator_idx = idx;-
2297 ++group_cnt;-
2298-
2299-
2300 ++idx;-
2301 continue;
executed 51 times by 4 tests: continue;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
51
2302 } else if (out == '.'
out == '.'Description
TRUEevaluated 850 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
FALSEevaluated 24766 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
|| out == 'e'
out == 'e'Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 24758 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
|| out == 'E'
out == 'E'Description
TRUEnever evaluated
FALSEevaluated 24758 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
) {
0-24766
2303-
2304 if (out == '.'
out == '.'Description
TRUEevaluated 850 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QTextStream
&& decpt_idx != -1
decpt_idx != -1Description
TRUEnever evaluated
FALSEevaluated 850 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
)
0-850
2305 return
never executed: return false;
false;
never executed: return false;
0
2306 if (decpt_idx == -1
decpt_idx == -1Description
TRUEevaluated 858 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
FALSEnever evaluated
)
0-858
2307 decpt_idx = idx;
executed 858 times by 8 tests: decpt_idx = idx;
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
858
2308-
2309-
2310-
2311 if (last_separator_idx != -1
last_separator_idx != -1Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
FALSEevaluated 840 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
&& idx - last_separator_idx != 4
idx - last_separator_idx != 4Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QDoubleSpinBox
)
3-840
2312 return
executed 3 times by 2 tests: return false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
false;
executed 3 times by 2 tests: return false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
3
2313-
2314-
2315 last_separator_idx = -1;-
2316 }
executed 855 times by 8 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
855
2317 }
executed 43433 times by 25 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
43433
2318-
2319 result->append(out);-
2320-
2321 ++idx;-
2322 }
executed 544990 times by 92 tests: end of block
Executed by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
544990
2323-
2324 if (group_sep_mode == ParseGroupSeparators)(!(number_options & QLocale::RejectGroupSeparator)
!(number_optio...roupSeparator)Description
TRUEevaluated 18106 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
FALSEevaluated 158632 times by 88 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • ...
)
{
18106-158632
2325-
2326-
2327 if (last_separator_idx + 1 == idx
last_separator_idx + 1 == idxDescription
TRUEevaluated 67 times by 3 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
FALSEevaluated 18039 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
)
67-18039
2328 return
executed 67 times by 3 tests: return false;
Executed by:
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
false;
executed 67 times by 3 tests: return false;
Executed by:
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
67
2329-
2330 if (last_separator_idx != -1
last_separator_idx != -1Description
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QSpinBox
FALSEevaluated 18019 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
&& idx - last_separator_idx != 4
idx - last_separator_idx != 4Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDoubleSpinBox
FALSEevaluated 17 times by 3 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QSpinBox
)
3-18019
2331 return
executed 3 times by 1 test: return false;
Executed by:
  • tst_QDoubleSpinBox
false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_QDoubleSpinBox
3
2332 }
executed 18036 times by 25 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_QTime
  • tst_languageChange
18036
2333-
2334 result->append('\0');-
2335 return
executed 176668 times by 92 tests: return idx == l;
Executed by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
idx == l;
executed 176668 times by 92 tests: return idx == l;
Executed by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • ...
176668
2336}-
2337-
2338bool QLocaleData::validateChars(const QString &str, NumberMode numMode, QByteArray *buff,-
2339 int decDigits, bool rejectGroupSeparatorsQLocale::NumberOptions number_options) const-
2340{-
2341 buff->clear();-
2342 buff->reserve(str.length());-
2343-
2344 const bool scientific = numMode == DoubleScientificMode;-
2345 bool lastWasE = false;-
2346 bool lastWasDigit = false;-
2347 int eCnt = 0;-
2348 int decPointCnt = 0;-
2349 bool dec = false;-
2350 int decDigitCnt = 0;-
2351-
2352 for (int i = 0; i < str.length()
i < str.length()Description
TRUEevaluated 1769 times by 6 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
FALSEevaluated 416 times by 5 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
; ++i) {
416-1769
2353 char c = digitToCLocale(str.at(i));-
2354-
2355 if (c >= '0'
c >= '0'Description
TRUEevaluated 1453 times by 5 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
FALSEevaluated 316 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
&& c <= '9'
c <= '9'Description
TRUEevaluated 1329 times by 5 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
) {
124-1453
2356 if (numMode != IntegerMode
numMode != IntegerModeDescription
TRUEevaluated 800 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
FALSEevaluated 529 times by 4 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
) {
529-800
2357-
2358 if (dec
decDescription
TRUEevaluated 106 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
FALSEevaluated 694 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
&& decDigits != -1
decDigits != -1Description
TRUEevaluated 106 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
FALSEnever evaluated
&& decDigits < ++decDigitCnt
decDigits < ++decDigitCntDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEevaluated 94 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
)
0-694
2359 return
executed 12 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
false;
executed 12 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
12
2360 }
executed 788 times by 2 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QPrinter
788
2361-
2362-
2363-
2364 if ((number_options & QLocale::RejectLeadingZeroInExponent) && c == '0'
c == '0'Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
&& eCnt > 0
eCnt > 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEnever evaluated
&&
0-34
2365 !lastWasDigit
!lastWasDigitDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEnever evaluated
)
0-5
2366 return
executed 5 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
false;
executed 5 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
5
2367-
2368 lastWasDigit = true;-
2369 }
executed 1312 times by 5 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
else {
1312
2370 switch (c) {-
2371 case
executed 74 times by 4 tests: case '.':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
'.':
executed 74 times by 4 tests: case '.':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
74
2372 if (numMode == IntegerMode
numMode == IntegerModeDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QIntValidator
  • tst_QLineEdit
FALSEevaluated 68 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
) {
6-68
2373-
2374 return
executed 6 times by 2 tests: return false;
Executed by:
  • tst_QIntValidator
  • tst_QLineEdit
false;
executed 6 times by 2 tests: return false;
Executed by:
  • tst_QIntValidator
  • tst_QLineEdit
6
2375 } else {-
2376-
2377 if (++
++decPointCnt > 1Description
TRUEnever evaluated
FALSEevaluated 68 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
decPointCnt > 1
++decPointCnt > 1Description
TRUEnever evaluated
FALSEevaluated 68 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
)
0-68
2378 return
never executed: return false;
false;
never executed: return false;
0
2379-
2380-
2381-
2382-
2383-
2384-
2385-
2386 dec = true;-
2387 }
executed 68 times by 2 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QPrinter
68
2388 break;
executed 68 times by 2 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QPrinter
68
2389-
2390 case
executed 45 times by 2 tests: case '+':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
'+':
executed 45 times by 2 tests: case '+':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
45
2391 case
executed 135 times by 3 tests: case '-':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
'-':
executed 135 times by 3 tests: case '-':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
135
2392 if (scientific
scientificDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEevaluated 108 times by 3 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
) {
72-108
2393-
2394-
2395 if (i != 0
i != 0Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
&& !lastWasE
!lastWasEDescription
TRUEnever evaluated
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
)
0-58
2396 return
never executed: return false;
false;
never executed: return false;
0
2397 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_QDoubleValidator
else {
72
2398-
2399-
2400 if (i != 0
i != 0Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
FALSEevaluated 104 times by 3 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
)
4-104
2401 return
executed 4 times by 2 tests: return false;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
false;
executed 4 times by 2 tests: return false;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
4
2402 }
executed 104 times by 3 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
104
2403 break;
executed 176 times by 3 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
176
2404-
2405 case
executed 19 times by 2 tests: case ',':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
',':
executed 19 times by 2 tests: case ',':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
19
2406-
2407 if (rejectGroupSeparators((number_options & QLocale::RejectGroupSeparator) || !lastWasDigit
!lastWasDigitDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
||
2-15
2408 decPointCnt > 0
decPointCnt > 0Description
TRUEnever evaluated
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
)
0-15
2409 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
4
2410 break;
executed 15 times by 2 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
15
2411-
2412 case
executed 124 times by 1 test: case 'e':
Executed by:
  • tst_QDoubleValidator
'e':
executed 124 times by 1 test: case 'e':
Executed by:
  • tst_QDoubleValidator
124
2413 if (scientific
scientificDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
) {
52-72
2414-
2415 if (++
++eCnt > 1Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
eCnt > 1
++eCnt > 1Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
)
0-72
2416 return
never executed: return false;
false;
never executed: return false;
0
2417 dec = false;-
2418 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_QDoubleValidator
else {
72
2419-
2420 return
executed 52 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
false;
executed 52 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
52
2421 }-
2422 break;
executed 72 times by 1 test: break;
Executed by:
  • tst_QDoubleValidator
72
2423-
2424 default
executed 43 times by 4 tests: default:
Executed by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
:
executed 43 times by 4 tests: default:
Executed by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
43
2425-
2426 return
executed 43 times by 4 tests: return false;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
false;
executed 43 times by 4 tests: return false;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
43
2427 }-
2428 lastWasDigit = false;-
2429 }
executed 331 times by 4 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
331
2430-
2431 lastWasE = c == 'e';-
2432 if (c != ','
c != ','Description
TRUEevaluated 1628 times by 5 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
)
15-1628
2433 buff->append(c);
executed 1628 times by 5 tests: buff->append(c);
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
1628
2434 }
executed 1643 times by 5 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
1643
2435-
2436 return
executed 416 times by 5 tests: return true;
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
true;
executed 416 times by 5 tests: return true;
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
416
2437}-
2438-
2439double QLocaleData::stringToDouble(const QChar *begin, int len, bool *ok,-
2440 GroupSeparatorMode group_sep_modeQLocale::NumberOptions number_options) const-
2441{-
2442 CharBuff buff;-
2443 if (!numberToCLocale(begin, len, group_sep_modenumber_options, &buff)
!numberToCLoca...ptions, &buff)Description
TRUEevaluated 49 times by 5 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
FALSEevaluated 4014 times by 27 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCssParser
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QObject
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QSqlDatabase
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QTextStream
  • tst_QVariant
  • ...
) {
49-4014
2444 if (ok != 0
ok != 0Description
TRUEevaluated 49 times by 5 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
FALSEnever evaluated
)
0-49
2445 *
executed 49 times by 5 tests: *ok = false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
ok = false;
executed 49 times by 5 tests: *ok = false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
49
2446 return
executed 49 times by 5 tests: return 0.0;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
0.0;
executed 49 times by 5 tests: return 0.0;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
49
2447 }-
2448 return bytearrayToDoubleint processed = 0;-
2449 bool nonNullOk = false;-
2450 double d = asciiToDouble(buff.constData(), okbuff.length() - 1, nonNullOk, processed);-
2451 if (ok
okDescription
TRUEevaluated 2855 times by 21 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCssParser
  • tst_QDoubleSpinBox
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QObject
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QTextStream
  • tst_QVariant
  • tst_Selftests
FALSEevaluated 1159 times by 20 tests
Evaluated by:
  • tst_QComboBox
  • tst_QCssParser
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMainWindow
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QSqlDatabase
  • tst_QString
  • tst_QStyleSheetStyle
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QWidget
)
1159-2855
2452 *
executed 2855 times by 21 tests: *ok = nonNullOk;
Executed by:
  • tst_QAccessibility
  • tst_QCssParser
  • tst_QDoubleSpinBox
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QObject
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QTextStream
  • tst_QVariant
  • tst_Selftests
ok = nonNullOk;
executed 2855 times by 21 tests: *ok = nonNullOk;
Executed by:
  • tst_QAccessibility
  • tst_QCssParser
  • tst_QDoubleSpinBox
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QObject
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QTextStream
  • tst_QVariant
  • tst_Selftests
2855
2453 return
executed 4014 times by 27 tests: return d;
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCssParser
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QObject
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QSqlDatabase
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QTextStream
  • tst_QVariant
  • ...
d;
executed 4014 times by 27 tests: return d;
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCssParser
  • tst_QDoubleSpinBox
  • tst_QEasingCurve
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QMainWindow
  • tst_QMetaType
  • tst_QObject
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QSqlDatabase
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QTextStream
  • tst_QVariant
  • ...
4014
2454}-
2455-
2456qlonglong QLocaleData::stringToLongLong(const QChar *begin, int len, int base, bool *ok,-
2457 GroupSeparatorMode group_sep_modeQLocale::NumberOptions number_options) const-
2458{-
2459 CharBuff buff;-
2460 if (!numberToCLocale(begin, len, group_sep_modenumber_options, &buff)
!numberToCLoca...ptions, &buff)Description
TRUEevaluated 4267 times by 13 tests
Evaluated by:
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
FALSEevaluated 153149 times by 71 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QInputDialog
  • tst_QIntValidator
  • ...
) {
4267-153149
2461 if (ok != 0
ok != 0Description
TRUEevaluated 74 times by 8 tests
Evaluated by:
  • tst_QDataWidgetMapper
  • tst_QIntValidator
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
FALSEevaluated 4193 times by 9 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QMimeDatabase
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
)
74-4193
2462 *
executed 74 times by 8 tests: *ok = false;
Executed by:
  • tst_QDataWidgetMapper
  • tst_QIntValidator
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
ok = false;
executed 74 times by 8 tests: *ok = false;
Executed by:
  • tst_QDataWidgetMapper
  • tst_QIntValidator
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
74
2463 return
executed 4267 times by 13 tests: return 0;
Executed by:
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
0;
executed 4267 times by 13 tests: return 0;
Executed by:
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QObject
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
4267
2464 }-
2465-
2466 return
executed 153149 times by 71 tests: return bytearrayToLongLong(buff.constData(), base, ok);
Executed by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QInputDialog
  • tst_QIntValidator
  • ...
bytearrayToLongLong(buff.constData(), base, ok);
executed 153149 times by 71 tests: return bytearrayToLongLong(buff.constData(), base, ok);
Executed by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QInputDialog
  • tst_QIntValidator
  • ...
153149
2467}-
2468-
2469qulonglong QLocaleData::stringToUnsLongLong(const QChar *begin, int len, int base, bool *ok,-
2470 GroupSeparatorMode group_sep_modeQLocale::NumberOptions number_options) const-
2471{-
2472 CharBuff buff;-
2473 if (!numberToCLocale(begin, len, group_sep_modenumber_options, &buff)
!numberToCLoca...ptions, &buff)Description
TRUEevaluated 958 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
FALSEevaluated 18617 times by 29 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNetworkSession
  • tst_QOpenGlConfig
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTime
  • tst_QUdpSocket
  • tst_QVariant
  • ...
) {
958-18617
2474 if (ok != 0
ok != 0Description
TRUEevaluated 950 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringRef
)
8-950
2475 *
executed 950 times by 11 tests: *ok = false;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
ok = false;
executed 950 times by 11 tests: *ok = false;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
950
2476 return
executed 958 times by 11 tests: return 0;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
0;
executed 958 times by 11 tests: return 0;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
958
2477 }-
2478-
2479 return
executed 18617 times by 29 tests: return bytearrayToUnsLongLong(buff.constData(), base, ok);
Executed by:
  • tst_QAccessibility
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNetworkSession
  • tst_QOpenGlConfig
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTime
  • tst_QUdpSocket
  • tst_QVariant
  • ...
bytearrayToUnsLongLong(buff.constData(), base, ok);
executed 18617 times by 29 tests: return bytearrayToUnsLongLong(buff.constData(), base, ok);
Executed by:
  • tst_QAccessibility
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNetworkSession
  • tst_QOpenGlConfig
  • tst_QString
  • tst_QStringRef
  • tst_QStyleSheetStyle
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QTextDocumentFragment
  • tst_QTextList
  • tst_QTime
  • tst_QUdpSocket
  • tst_QVariant
  • ...
18617
2480}-
2481-
2482double QLocaleData::bytearrayToDouble(const char *num, bool *ok, bool *overflow)-
2483{-
2484 if (ok != 0)-
*ok = true;
if (overflow != 0)
*overflowbool nonNullOk = false;
2485 if (*num == '\0') {-
if (ok != 0)
*okint len = false;
return 0.0;
}
if (qstrcmpstatic_cast<int>(strlen(num, "nan") ==));
2486 ((!(len >= 0)-
return qt_snan();
if (qstrcmp)) ? qt_assert(num,"len "+inf") == 0 || qstrcmp(num,>= "inf") == 0)
return qt_inf();
if (qstrcmp(num0", "-inf"__FILE__,3301) ==: qt_noop());
2487 int processed = 0)-
return -qt_inf();
bool _ok;
const char *endptr;
2488 double d = qstrtodasciiToDouble(num, &endptrlen, &_oknonNullOk, processed);-
2489 if (!_ok) {0
if (ok != 0)
*ok = false;
if (overflow != 0)
*overflow = *endptr != '\0';
return 0.0;
}
if (*endptr != '\0') {
if (ok != 0)
*ok = false;
if (overflow != 0)
*overflow = false;
return 0.0;
}if (ok!= 0
okDescription
TRUEnever evaluated
FALSEnever evaluated
)
2490 *
never executed: *ok = nonNullOk;
ok = truenonNullOk;
never executed: *ok = nonNullOk;
0
2491 if (overflow!= 0
overflowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2492 *
never executed: *overflow = processed < len;
overflow = falseprocessed < len;
never executed: *overflow = processed < len;
0
2493 return
never executed: return d;
d;
never executed: return d;
0
2494}-
2495-
2496qlonglong QLocaleData::bytearrayToLongLong(const char *num, int base, bool *ok, bool *overflow)-
2497{-
2498 bool _ok;-
2499 const char *endptr;-
2500-
2501 if (*num == '\0') {-
2502 if (ok != 0)-
2503 *ok = false;-
2504 if (overflow != 0)-
2505 *overflow = false;-
2506 return 0;-
2507 }-
2508-
2509 qlonglong l = qstrtoll(num, &endptr, base, &_ok);-
2510-
2511 if (!_ok) {-
2512 if (ok != 0)-
2513 *ok = false;-
2514 if (overflow != 0) {-
2515-
2516-
2517 *overflow = *endptr != '\0';-
2518 }-
2519 return 0;-
2520 }-
2521-
2522 if (*endptr != '\0') {-
2523-
2524 if (ok != 0)-
2525 *ok = false;-
2526 if (overflow != 0)-
2527 *overflow = false;-
2528 return 0;-
2529 }-
2530-
2531 if (ok != 0)-
2532 *ok = true;-
2533 if (overflow != 0)-
2534 *overflow = false;-
2535 return l;-
2536}-
2537-
2538qulonglong QLocaleData::bytearrayToUnsLongLong(const char *num, int base, bool *ok)-
2539{-
2540 bool _ok;-
2541 const char *endptr;-
2542 qulonglong l = qstrtoull(num, &endptr, base, &_ok);-
2543-
2544 if (!_ok || *endptr != '\0') {-
2545 if (ok != 0)-
2546 *ok = false;-
2547 return 0;-
2548 }-
2549-
2550 if (ok != 0)-
2551 *ok = true;-
2552 return l;-
2553}-
2554QString QLocale::currencySymbol(QLocale::CurrencySymbolFormat format) const-
2555{-
2556-
2557 if (d->m_data == systemData()) {-
2558 QVariant res = systemLocale()->query(QSystemLocale::CurrencySymbol, format);-
2559 if (!res.isNull())-
2560 return res.toString();-
2561 }-
2562-
2563 quint32 idx, size;-
2564 switch (format) {-
2565 case CurrencySymbol:-
2566 idx = d->m_data->m_currency_symbol_idx;-
2567 size = d->m_data->m_currency_symbol_size;-
2568 return getLocaleData(currency_symbol_data + idx, size);-
2569 case CurrencyDisplayName:-
2570 idx = d->m_data->m_currency_display_name_idx;-
2571 size = d->m_data->m_currency_display_name_size;-
2572 return getLocaleListData(currency_display_name_data + idx, size, 0);-
2573 case CurrencyIsoCode: {-
2574 int len = 0;-
2575 const QLocaleData *data = this->d->m_data;-
2576 for (; len < 3; ++len)-
2577 if (!data->m_currency_iso_code[len])-
2578 break;-
2579 return len ? QString::fromLatin1(data->m_currency_iso_code, len) : QString();-
2580 }-
2581 }-
2582 return QString();-
2583}-
2584QString QLocale::toCurrencyString(qlonglong value, const QString &symbol) const-
2585{-
2586-
2587 if (d->m_data == systemData()) {-
2588 QSystemLocale::CurrencyToStringArgument arg(value, symbol);-
2589 QVariant res = systemLocale()->query(QSystemLocale::CurrencyToString, QVariant::fromValue(arg));-
2590 if (!res.isNull())-
2591 return res.toString();-
2592 }-
2593-
2594 const QLocalePrivate *d = this->d;-
2595 quint8 idx = d->m_data->m_currency_format_idx;-
2596 quint8 size = d->m_data->m_currency_format_size;-
2597 if (d->m_data->m_currency_negative_format_size && value < 0) {-
2598 idx = d->m_data->m_currency_negative_format_idx;-
2599 size = d->m_data->m_currency_negative_format_size;-
2600 value = -value;-
2601 }-
2602 QString str = toString(value);-
2603 QString sym = symbol.isNull() ? currencySymbol() : symbol;-
2604 if (sym.isEmpty())-
2605 sym = currencySymbol(QLocale::CurrencyIsoCode);-
2606 QString format = getLocaleData(currency_format_data + idx, size);-
2607 return format.arg(str, sym);-
2608}-
2609-
2610-
2611-
2612-
2613-
2614QString QLocale::toCurrencyString(qulonglong value, const QString &symbol) const-
2615{-
2616-
2617 if (d->m_data == systemData()) {-
2618 QSystemLocale::CurrencyToStringArgument arg(value, symbol);-
2619 QVariant res = systemLocale()->query(QSystemLocale::CurrencyToString, QVariant::fromValue(arg));-
2620 if (!res.isNull())-
2621 return res.toString();-
2622 }-
2623-
2624 const QLocaleData *data = this->d->m_data;-
2625 quint8 idx = data->m_currency_format_idx;-
2626 quint8 size = data->m_currency_format_size;-
2627 QString str = toString(value);-
2628 QString sym = symbol.isNull() ? currencySymbol() : symbol;-
2629 if (sym.isEmpty())-
2630 sym = currencySymbol(QLocale::CurrencyIsoCode);-
2631 QString format = getLocaleData(currency_format_data + idx, size);-
2632 return format.arg(str, sym);-
2633}-
2634-
2635-
2636-
2637-
2638-
2639-
2640QString QLocale::toCurrencyString(double value, const QString &symbol) const-
2641{-
2642 return
never executed: return toCurrencyString(value, symbol, d->m_data->m_currency_digits);
toCurrencyString(value, symbol, d->m_data->m_currency_digits
never executed: return toCurrencyString(value, symbol, d->m_data->m_currency_digits);
never executed: return toCurrencyString(value, symbol, d->m_data->m_currency_digits);
);
never executed: return toCurrencyString(value, symbol, d->m_data->m_currency_digits);
0
2643}-
2644QString QLocale::toCurrencyString(double value, const QString &symbol, int precision) const-
2645{-
2646-
2647 if (d->m_data == systemData()
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2648 QSystemLocale::CurrencyToStringArgument arg(value, symbol);-
2649 QVariant res = systemLocale()->query(QSystemLocale::CurrencyToString, QVariant::fromValue(arg));-
2650 if (!res.isNull()
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2651 return
never executed: return res.toString();
res.toString();
never executed: return res.toString();
0
2652 }
never executed: end of block
0
2653-
2654 const QLocaleData *data = this->d->m_data;-
2655 quint8 idx = data->m_currency_format_idx;-
2656 quint8 size = data->m_currency_format_size;-
2657 if (data->m_currency_negative_format_size
data->m_curren...ve_format_sizeDescription
TRUEnever evaluated
FALSEnever evaluated
&& value < 0
value < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2658 idx = data->m_currency_negative_format_idx;-
2659 size = data->m_currency_negative_format_size;-
2660 value = -value;-
2661 }
never executed: end of block
0
2662 QString str = toString(value, 'f', precision == -1 ? d->m_data->m_currency_digits : precision);-
2663 QString sym = symbol.isNull()
symbol.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
? currencySymbol() : symbol;
0
2664 if (sym.isEmpty()
sym.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2665 sym = currencySymbol(QLocale::CurrencyIsoCode);
never executed: sym = currencySymbol(QLocale::CurrencyIsoCode);
0
2666 QString format = getLocaleData(currency_format_data + idx, size);-
2667 return
never executed: return format.arg(str, sym);
format.arg(str, sym);
never executed: return format.arg(str, sym);
0
2668}-
2669QStringList QLocale::uiLanguages() const-
2670{-
2671-
2672 if (d->m_data == systemData()) {-
2673 QVariant res = systemLocale()->query(QSystemLocale::UILanguages, QVariant());-
2674 if (!res.isNull()) {-
2675 QStringList result = res.toStringList();-
2676 if (!result.isEmpty())-
2677 return result;-
2678 }-
2679 }-
2680-
2681 QLocaleId id = QLocaleId::fromIds(d->m_data->m_language_id, d->m_data->m_script_id, d->m_data->m_country_id);-
2682 const QLocaleId max = id.withLikelySubtagsAdded();-
2683 const QLocaleId min = max.withLikelySubtagsRemoved();-
2684-
2685 QStringList uiLanguages;-
2686 uiLanguages.append(QString::fromLatin1(min.name()));-
2687 if (id.script_id) {-
2688 id.script_id = 0;-
2689 if (id != min && id.withLikelySubtagsAdded() == max)-
2690 uiLanguages.append(QString::fromLatin1(id.name()));-
2691 }-
2692 if (max != min && max != id)-
2693 uiLanguages.append(QString::fromLatin1(max.name()));-
2694 return uiLanguages;-
2695}-
2696QString QLocale::nativeLanguageName() const-
2697{-
2698-
2699 if (d->m_data == systemData()) {-
2700 QVariant res = systemLocale()->query(QSystemLocale::NativeLanguageName, QVariant());-
2701 if (!res.isNull())-
2702 return res.toString();-
2703 }-
2704-
2705 return getLocaleData(endonyms_data + d->m_data->m_language_endonym_idx, d->m_data->m_language_endonym_size);-
2706}-
2707QString QLocale::nativeCountryName() const-
2708{-
2709-
2710 if (d->m_data == systemData()) {-
2711 QVariant res = systemLocale()->query(QSystemLocale::NativeCountryName, QVariant());-
2712 if (!res.isNull())-
2713 return res.toString();-
2714 }-
2715-
2716 return getLocaleData(endonyms_data + d->m_data->m_country_endonym_idx, d->m_data->m_country_endonym_size);-
2717}-
2718-
2719-
2720QDebug operator<<(QDebug dbg, const QLocale &l)-
2721{-
2722 QDebugStateSaver saver(dbg);-
2723 dbg.nospace().noquote()-
2724 << "QLocale(" << QLocale::languageToString(l.language())-
2725 << ", " << QLocale::scriptToString(l.script())-
2726 << ", " << QLocale::countryToString(l.country()) << ')';-
2727 return dbg;-
2728}-
2729-
2730-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9