OpenCoverage

qlocale.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qlocale.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#if !defined(QWS) && defined(Q_OS_MAC)-
42# include "private/qcore_mac_p.h"-
43# include <CoreFoundation/CoreFoundation.h>-
44#endif-
45-
46#include "qglobal.h"-
47-
48#include "qplatformdefs.h"-
49-
50#include "qdatastream.h"-
51#include "qdebug.h"-
52#include "qhashfunctions.h"-
53#include "qstring.h"-
54#include "qlocale.h"-
55#include "qlocale_p.h"-
56#include "qlocale_tools_p.h"-
57#include "qdatetimeparser_p.h"-
58#include "qnamespace.h"-
59#include "qdatetime.h"-
60#include "qstringlist.h"-
61#include "qvariant.h"-
62#include "qstringbuilder.h"-
63#include "private/qnumeric_p.h"-
64#include "private/qsystemlibrary_p.h"-
65#ifdef Q_OS_WIN-
66# include <qt_windows.h>-
67# include <time.h>-
68#endif-
69-
70QT_BEGIN_NAMESPACE-
71-
72#ifndef QT_NO_SYSTEMLOCALE-
73static QSystemLocale *_systemLocale = 0;-
74class QSystemLocaleSingleton: public QSystemLocale-
75{-
76public:-
77 QSystemLocaleSingleton() : QSystemLocale(true) {}
executed 1016 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
1016
78};-
79-
80Q_GLOBAL_STATIC(QSystemLocaleSingleton, QSystemLocale_globalSystemLocale)
executed 1435 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 1435 times by 508 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 18413 times by 30 tests: return &holder.value;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
  • 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_qmakelib
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 1435 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEnever evaluated
0-18413
81static QLocaleData *system_data = 0;-
82static QLocaleData globalLocaleData;-
83#endif-
84-
85/******************************************************************************-
86** Helpers for accessing Qt locale database-
87*/-
88-
89QT_BEGIN_INCLUDE_NAMESPACE-
90#include "qlocale_data_p.h"-
91QT_END_INCLUDE_NAMESPACE-
92-
93QLocale::Language QLocalePrivate::codeToLanguage(const QChar *code, int len) Q_DECL_NOTHROW-
94{-
95 if (len != 2 && len != 3)
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 != 3Description
TRUEnever evaluated
FALSEnever evaluated
0-2372
96 return QLocale::C;
never executed: return QLocale::C;
0
97 ushort uc1 = code[0].toLower().unicode();-
98 ushort uc2 = code[1].toLower().unicode();-
99 ushort uc3 = len > 2 ? code[2].toLower().unicode() : 0;
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
0-2372
100-
101 const unsigned char *c = language_code_list;-
102 for (; *c != 0; c += 3) {
*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
7-80935
103 if (uc1 == c[0] && uc2 == c[1] && uc3 == c[2])
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]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]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
104 return 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
105 }
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
106-
107 // legacy codes-
108 if (uc1 == 'n' && uc2 == 'o' && uc3 == 0) { // no -> nb
uc1 == 'n'Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
uc2 == 'o'Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
uc3 == 0Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
0-7
109 Q_STATIC_ASSERT(QLocale::Norwegian == QLocale::NorwegianBokmal);-
110 return QLocale::Norwegian;
executed 7 times by 2 tests: return QLocale::Norwegian;
Executed by:
  • tst_QCollator
  • tst_QDateTimeEdit
7
111 }-
112 if (uc1 == 't' && uc2 == 'l' && uc3 == 0) { // tl -> fil
uc1 == 't'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'l'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
113 Q_STATIC_ASSERT(QLocale::Tagalog == QLocale::Filipino);-
114 return QLocale::Tagalog;
never executed: return QLocale::Tagalog;
0
115 }-
116 if (uc1 == 's' && uc2 == 'h' && uc3 == 0) { // sh -> sr[_Latn]
uc1 == 's'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'h'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
117 Q_STATIC_ASSERT(QLocale::SerboCroatian == QLocale::Serbian);-
118 return QLocale::SerboCroatian;
never executed: return QLocale::SerboCroatian;
0
119 }-
120 if (uc1 == 'm' && uc2 == 'o' && uc3 == 0) { // mo -> ro
uc1 == 'm'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'o'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
121 Q_STATIC_ASSERT(QLocale::Moldavian == QLocale::Romanian);-
122 return QLocale::Moldavian;
never executed: return QLocale::Moldavian;
0
123 }-
124 // Android uses the following deprecated codes-
125 if (uc1 == 'i' && uc2 == 'w' && uc3 == 0) // iw -> he
uc1 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'w'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
126 return QLocale::Hebrew;
never executed: return QLocale::Hebrew;
0
127 if (uc1 == 'i' && uc2 == 'n' && uc3 == 0) // in -> id
uc1 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'n'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
128 return QLocale::Indonesian;
never executed: return QLocale::Indonesian;
0
129 if (uc1 == 'j' && uc2 == 'i' && uc3 == 0) // ji -> yi
uc1 == 'j'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
130 return QLocale::Yiddish;
never executed: return QLocale::Yiddish;
0
131-
132 return QLocale::C;
never executed: return QLocale::C;
0
133}-
134-
135QLocale::Script QLocalePrivate::codeToScript(const QChar *code, int len) Q_DECL_NOTHROW-
136{-
137 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
138 return 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
139-
140 // script is titlecased in our data-
141 unsigned char c0 = code[0].toUpper().toLatin1();-
142 unsigned char c1 = code[1].toLower().toLatin1();-
143 unsigned char c2 = code[2].toLower().toLatin1();-
144 unsigned char c3 = code[3].toLower().toLatin1();-
145-
146 const unsigned char *c = script_code_list;-
147 for (int i = 0; i < QLocale::LastScript; ++i, c += 4) {
i < QLocale::LastScriptDescription
TRUEnever evaluated
FALSEnever evaluated
0
148 if (c0 == c[0] && c1 == c[1] && c2 == c[2] && c3 == c[3])
c0 == c[0]Description
TRUEnever evaluated
FALSEnever evaluated
c1 == c[1]Description
TRUEnever evaluated
FALSEnever evaluated
c2 == c[2]Description
TRUEnever evaluated
FALSEnever evaluated
c3 == c[3]Description
TRUEnever evaluated
FALSEnever evaluated
0
149 return QLocale::Script(i);
never executed: return QLocale::Script(i);
0
150 }
never executed: end of block
0
151 return QLocale::AnyScript;
never executed: return QLocale::AnyScript;
0
152}-
153-
154QLocale::Country QLocalePrivate::codeToCountry(const QChar *code, int len) Q_DECL_NOTHROW-
155{-
156 if (len != 2 && len != 3)
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 != 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
157 return 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
158 ushort uc1 = code[0].toUpper().unicode();-
159 ushort uc2 = code[1].toUpper().unicode();-
160 ushort uc3 = len > 2 ? code[2].toUpper().unicode() : 0;
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
0-2717
161-
162 const unsigned char *c = country_code_list;-
163 for (; *c != 0; c += 3) {
*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
0-550758
164 if (uc1 == c[0] && uc2 == c[1] && uc3 == c[2])
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]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]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
165 return 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
166 }
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
167-
168 return QLocale::AnyCountry;
never executed: return QLocale::AnyCountry;
0
169}-
170-
171QString QLocalePrivate::languageToCode(QLocale::Language language)-
172{-
173 if (language == QLocale::AnyLanguage)
language == QL...e::AnyLanguageDescription
TRUEnever evaluated
FALSEevaluated 3310 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3310
174 return QString();
never executed: return QString();
0
175 if (language == QLocale::C)
language == QLocale::CDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTimeZone
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
18-3292
176 return QLatin1String("C");
executed 18 times by 2 tests: return QLatin1String("C");
Executed by:
  • tst_QMimeDatabase
  • tst_QTimeZone
18
177-
178 const unsigned char *c = language_code_list + 3*(uint(language));-
179-
180 QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);-
181-
182 code[0] = ushort(c[0]);-
183 code[1] = ushort(c[1]);-
184 if (c[2] != 0)
c[2] != 0Description
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
185 code[2] = ushort(c[2]);
never executed: code[2] = ushort(c[2]);
0
186-
187 return code;
executed 3292 times by 13 tests: return code;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
3292
188}-
189-
190QString QLocalePrivate::scriptToCode(QLocale::Script script)-
191{-
192 if (script == QLocale::AnyScript || script > QLocale::LastScript)
script == QLocale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
script > QLocale::LastScriptDescription
TRUEnever evaluated
FALSEnever evaluated
0
193 return QString();
never executed: return QString();
0
194 const unsigned char *c = script_code_list + 4*(uint(script));-
195 return QString::fromLatin1((const char *)c, 4);
never executed: return QString::fromLatin1((const char *)c, 4);
0
196}-
197-
198QString QLocalePrivate::countryToCode(QLocale::Country country)-
199{-
200 if (country == QLocale::AnyCountry)
country == QLocale::AnyCountryDescription
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
201 return QString();
never executed: return QString();
0
202-
203 const unsigned char *c = country_code_list + 3*(uint(country));-
204-
205 QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);-
206-
207 code[0] = ushort(c[0]);-
208 code[1] = ushort(c[1]);-
209 if (c[2] != 0)
c[2] != 0Description
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
210 code[2] = ushort(c[2]);
never executed: code[2] = ushort(c[2]);
0
211-
212 return code;
executed 3292 times by 13 tests: return code;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
3292
213}-
214-
215// http://www.unicode.org/reports/tr35/#Likely_Subtags-
216static bool addLikelySubtags(QLocaleId &localeId)-
217{-
218 // ### optimize with bsearch-
219 const int likely_subtags_count = sizeof(likely_subtags) / sizeof(likely_subtags[0]);-
220 const QLocaleId *p = likely_subtags;-
221 const QLocaleId *const e = p + likely_subtags_count;-
222 for ( ; p < e; p += 2) {
p < eDescription
TRUEevaluated 3641376 times by 44 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
FALSEevaluated 4217 times by 39 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
4217-3641376
223 if (localeId == p[0]) {
localeId == p[0]Description
TRUEevaluated 3140 times by 43 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
FALSEevaluated 3638236 times by 44 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
3140-3638236
224 localeId = p[1];-
225 return true;
executed 3140 times by 43 tests: return true;
Executed by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
3140
226 }-
227 }
executed 3638236 times by 44 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
3638236
228 return false;
executed 4217 times by 39 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
4217
229}-
230-
231QLocaleId QLocaleId::withLikelySubtagsAdded() const-
232{-
233 // language_script_region-
234 if (language_id || script_id || country_id) {
language_idDescription
TRUEevaluated 3981 times by 44 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
FALSEnever evaluated
script_idDescription
TRUEnever evaluated
FALSEnever evaluated
country_idDescription
TRUEnever evaluated
FALSEnever evaluated
0-3981
235 QLocaleId id = QLocaleId::fromIds(language_id, script_id, country_id);-
236 if (addLikelySubtags(id))
addLikelySubtags(id)Description
TRUEevaluated 468 times by 25 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTime
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QWidget
  • tst_languageChange
  • tst_rcc
FALSEevaluated 3513 times by 39 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
468-3513
237 return id;
executed 468 times by 25 tests: return id;
Executed by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTime
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QWidget
  • tst_languageChange
  • tst_rcc
468
238 }
executed 3513 times by 39 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
3513
239 // language_script-
240 if (country_id) {
country_idDescription
TRUEevaluated 2672 times by 38 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
FALSEevaluated 841 times by 4 tests
Evaluated by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
841-2672
241 QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);-
242 if (addLikelySubtags(id)) {
addLikelySubtags(id)Description
TRUEevaluated 2320 times by 27 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • 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
  • ...
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352-2320
243 id.country_id = country_id;-
244 return id;
executed 2320 times by 27 tests: return id;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • 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
  • ...
2320
245 }-
246 }
executed 352 times by 15 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352
247 // language_region-
248 if (script_id) {
script_idDescription
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEevaluated 841 times by 4 tests
Evaluated by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
352-841
249 QLocaleId id = QLocaleId::fromIds(language_id, 0, country_id);-
250 if (addLikelySubtags(id)) {
addLikelySubtags(id)Description
TRUEnever evaluated
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-352
251 id.script_id = script_id;-
252 return id;
never executed: return id;
0
253 }-
254 }
executed 352 times by 15 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352
255 // language-
256 if (script_id && country_id) {
script_idDescription
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEevaluated 841 times by 4 tests
Evaluated by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
country_idDescription
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEnever evaluated
0-841
257 QLocaleId id = QLocaleId::fromIds(language_id, 0, 0);-
258 if (addLikelySubtags(id)) {
addLikelySubtags(id)Description
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEnever evaluated
0-352
259 id.script_id = script_id;-
260 id.country_id = country_id;-
261 return id;
executed 352 times by 15 tests: return id;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352
262 }-
263 }
never executed: end of block
0
264 return *this;
executed 841 times by 4 tests: return *this;
Executed by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
841
265}-
266-
267QLocaleId QLocaleId::withLikelySubtagsRemoved() const-
268{-
269 QLocaleId max = withLikelySubtagsAdded();-
270 // language-
271 {-
272 QLocaleId id = QLocaleId::fromIds(language_id, 0, 0);-
273 if (id.withLikelySubtagsAdded() == max)
id.withLikelyS...Added() == maxDescription
TRUEevaluated 361 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QCollator
1-361
274 return id;
executed 361 times by 15 tests: return id;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
361
275 }-
276 // language_region-
277 if (country_id) {
country_idDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QCollator
FALSEnever evaluated
0-1
278 QLocaleId id = QLocaleId::fromIds(language_id, 0, country_id);-
279 if (id.withLikelySubtagsAdded() == max)
id.withLikelyS...Added() == maxDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QCollator
FALSEnever evaluated
0-1
280 return id;
executed 1 time by 1 test: return id;
Executed by:
  • tst_QCollator
1
281 }
never executed: end of block
0
282 // language_script-
283 if (script_id) {
script_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
284 QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);-
285 if (id.withLikelySubtagsAdded() == max)
id.withLikelyS...Added() == maxDescription
TRUEnever evaluated
FALSEnever evaluated
0
286 return id;
never executed: return id;
0
287 }
never executed: end of block
0
288 return max;
never executed: return max;
0
289}-
290-
291QByteArray QLocaleId::name(char separator) const-
292{-
293 if (language_id == QLocale::AnyLanguage)
language_id ==...e::AnyLanguageDescription
TRUEnever evaluated
FALSEevaluated 370 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-370
294 return QByteArray();
never executed: return QByteArray();
0
295 if (language_id == QLocale::C)
language_id == QLocale::CDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 356 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
14-356
296 return QByteArrayLiteral("C");
executed 14 times by 1 test: 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; }());
Executed by:
  • tst_QMimeDatabase
executed 14 times by 1 test: return ba;
Executed by:
  • tst_QMimeDatabase
14
297-
298 const unsigned char *lang = language_code_list + 3 * language_id;-
299 const unsigned char *script =-
300 (script_id != QLocale::AnyScript ? script_code_list + 4 * script_id : 0);
script_id != Q...ale::AnyScriptDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
4-352
301 const unsigned char *country =-
302 (country_id != QLocale::AnyCountry ? country_code_list + 3 * country_id : 0);
country_id != ...le::AnyCountryDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
FALSEevaluated 347 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
9-347
303 char len = (lang[2] != 0 ? 3 : 2) + (script ? 4+1 : 0) + (country ? (country[2] != 0 ? 3 : 2)+1 : 0);
lang[2] != 0Description
TRUEnever evaluated
FALSEevaluated 356 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
scriptDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
countryDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
FALSEevaluated 347 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
country[2] != 0Description
TRUEnever evaluated
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
0-356
304 QByteArray name(len, Qt::Uninitialized);-
305 char *uc = name.data();-
306 *uc++ = lang[0];-
307 *uc++ = lang[1];-
308 if (lang[2] != 0)
lang[2] != 0Description
TRUEnever evaluated
FALSEevaluated 356 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-356
309 *uc++ = lang[2];
never executed: *uc++ = lang[2];
0
310 if (script) {
scriptDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
4-352
311 *uc++ = separator;-
312 *uc++ = script[0];-
313 *uc++ = script[1];-
314 *uc++ = script[2];-
315 *uc++ = script[3];-
316 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
4
317 if (country) {
countryDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
FALSEevaluated 347 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
9-347
318 *uc++ = separator;-
319 *uc++ = country[0];-
320 *uc++ = country[1];-
321 if (country[2] != 0)
country[2] != 0Description
TRUEnever evaluated
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
0-9
322 *uc++ = country[2];
never executed: *uc++ = country[2];
0
323 }
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QMimeDatabase
9
324 return name;
executed 356 times by 15 tests: return name;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
356
325}-
326-
327QByteArray QLocalePrivate::bcp47Name(char separator) const-
328{-
329 if (m_data->m_language_id == QLocale::AnyLanguage)
m_data->m_lang...e::AnyLanguageDescription
TRUEnever evaluated
FALSEevaluated 344 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-344
330 return QByteArray();
never executed: return QByteArray();
0
331 if (m_data->m_language_id == QLocale::C)
m_data->m_lang... == QLocale::CDescription
TRUEnever evaluated
FALSEevaluated 344 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-344
332 return QByteArrayLiteral("C");
never executed: 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; }());
never executed: return ba;
0
333-
334 QLocaleId localeId = QLocaleId::fromIds(m_data->m_language_id, m_data->m_script_id, m_data->m_country_id);-
335 return localeId.withLikelySubtagsRemoved().name(separator);
executed 344 times by 14 tests: return localeId.withLikelySubtagsRemoved().name(separator);
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
344
336}-
337-
338const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLocale::Script script, QLocale::Country country)-
339{-
340 QLocaleId localeId = QLocaleId::fromIds(language, script, country);-
341 localeId = localeId.withLikelySubtagsAdded();-
342-
343 uint idx = locale_index[localeId.language_id];-
344-
345 const QLocaleData *data = locale_data + idx;-
346-
347 if (idx == 0) // default language has no associated country
idx == 0Description
TRUEevaluated 799 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
FALSEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
799-2435
348 return data;
executed 799 times by 3 tests: return data;
Executed by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
799
349-
350 Q_ASSERT(data->m_language_id == localeId.language_id);-
351-
352 if (localeId.script_id != QLocale::AnyScript && localeId.country_id != QLocale::AnyCountry) {
localeId.scrip...ale::AnyScriptDescription
TRUEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEnever evaluated
localeId.count...le::AnyCountryDescription
TRUEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEnever evaluated
0-2435
353 // both script and country are explicitly specified-
354 do {-
355 if (data->m_script_id == localeId.script_id && data->m_country_id == localeId.country_id)
data->m_script...leId.script_idDescription
TRUEevaluated 2583 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QString
data->m_countr...eId.country_idDescription
TRUEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEevaluated 148 times by 6 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
  • tst_QIntValidator
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
2-2583
356 return data;
executed 2435 times by 32 tests: return data;
Executed by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
2435
357 ++data;-
358 } while (data->m_language_id == localeId.language_id);
executed 150 times by 6 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTimeEdit
  • tst_QIntValidator
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
data->m_langua...Id.language_idDescription
TRUEevaluated 150 times by 6 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
  • tst_QIntValidator
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEnever evaluated
0-150
359-
360 // no match; try again with default script-
361 localeId.script_id = QLocale::AnyScript;-
362 data = locale_data + idx;-
363 }
never executed: end of block
0
364-
365 if (localeId.script_id == QLocale::AnyScript && localeId.country_id == QLocale::AnyCountry)
localeId.scrip...ale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
localeId.count...le::AnyCountryDescription
TRUEnever evaluated
FALSEnever evaluated
0
366 return data;
never executed: return data;
0
367-
368 if (localeId.script_id == QLocale::AnyScript) {
localeId.scrip...ale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
0
369 do {-
370 if (data->m_country_id == localeId.country_id)
data->m_countr...eId.country_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
371 return data;
never executed: return data;
0
372 ++data;-
373 } while (data->m_language_id == localeId.language_id);
never executed: end of block
data->m_langua...Id.language_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
374 } else if (localeId.country_id == QLocale::AnyCountry) {
never executed: end of block
localeId.count...le::AnyCountryDescription
TRUEnever evaluated
FALSEnever evaluated
0
375 do {-
376 if (data->m_script_id == localeId.script_id)
data->m_script...leId.script_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
377 return data;
never executed: return data;
0
378 ++data;-
379 } while (data->m_language_id == localeId.language_id);
never executed: end of block
data->m_langua...Id.language_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
380 }
never executed: end of block
0
381-
382 return locale_data + idx;
never executed: return locale_data + idx;
0
383}-
384-
385static bool parse_locale_tag(const QString &input, int &i, QString *result, const QString &separators)-
386{-
387 *result = QString(8, Qt::Uninitialized); // worst case according to BCP47-
388 QChar *pch = result->data();-
389 const QChar *uc = input.data() + i;-
390 const int l = input.length();-
391 int size = 0;-
392 for (; i < l && size < 8; ++i, ++size) {
i < lDescription
TRUEevaluated 13443 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 561 times by 24 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • 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
size < 8Description
TRUEevaluated 13443 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-13443
393 if (separators.contains(*uc))
separators.contains(*uc)Description
TRUEevaluated 4107 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 9336 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
4107-9336
394 break;
executed 4107 times by 22 tests: break;
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
4107
395 if (! ((uc->unicode() >= 'a' && uc->unicode() <= 'z') ||
uc->unicode() >= 'a'Description
TRUEevaluated 4744 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 4592 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
uc->unicode() <= 'z'Description
TRUEevaluated 4744 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-4744
396 (uc->unicode() >= 'A' && uc->unicode() <= 'Z') ||
uc->unicode() >= 'A'Description
TRUEevaluated 4592 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
uc->unicode() <= 'Z'Description
TRUEevaluated 4592 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-4592
397 (uc->unicode() >= '0' && uc->unicode() <= '9')) ) // latin only
uc->unicode() >= '0'Description
TRUEnever evaluated
FALSEnever evaluated
uc->unicode() <= '9'Description
TRUEnever evaluated
FALSEnever evaluated
0
398 return false;
never executed: return false;
0
399 *pch++ = *uc++;-
400 }
executed 9336 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
9336
401 result->truncate(size);-
402 return true;
executed 4668 times by 25 tests: return true;
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
4668
403}-
404-
405bool qt_splitLocaleName(const QString &name, QString &lang, QString &script, QString &cntry)-
406{-
407 const int length = name.length();-
408-
409 lang = script = cntry = QString();-
410-
411 const QString separators = QStringLiteral("_-.@");
executed 3171 times by 26 tests: return qstring_literal_temp;
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
  • ...
3171
412 enum ParserState { NoState, LangState, ScriptState, CountryState };-
413 ParserState state = LangState;-
414 for (int i = 0; i < length && state != NoState; ) {
i < lengthDescription
TRUEevaluated 6479 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 1360 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • 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
  • tst_selftests - unknown status
state != NoStateDescription
TRUEevaluated 4668 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 1811 times by 12 tests
Evaluated by:
  • tst_QPrinter
  • 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
1360-6479
415 QString value;-
416 if (!parse_locale_tag(name, i, &value, separators) ||value.isEmpty())
!parse_locale_...e, separators)Description
TRUEnever evaluated
FALSEevaluated 4668 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
value.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4668 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
0-4668
417 break;
never executed: break;
0
418 QChar sep = i < length ? name.at(i) : QChar();
i < lengthDescription
TRUEevaluated 4107 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 561 times by 24 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • 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
561-4107
419 switch (state) {-
420 case LangState:
executed 2372 times by 25 tests: case LangState:
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
421 if (!sep.isNull() && !separators.contains(sep)) {
!sep.isNull()Description
TRUEevaluated 2296 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 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
!separators.contains(sep)Description
TRUEnever evaluated
FALSEevaluated 2296 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
0-2296
422 state = NoState;-
423 break;
never executed: break;
0
424 }-
425 lang = value;-
426 if (i == length) {
i == lengthDescription
TRUEevaluated 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEevaluated 2296 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
76-2296
427 // just language was specified-
428 state = NoState;-
429 break;
executed 76 times by 6 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
76
430 }-
431 state = ScriptState;-
432 break;
executed 2296 times by 22 tests: break;
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
2296
433 case ScriptState: {
executed 2296 times by 22 tests: case ScriptState:
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
2296
434 QString scripts = QString::fromLatin1((const char *)script_code_list, sizeof(script_code_list) - 1);-
435 if (value.length() == 4 && scripts.indexOf(value) % 4 == 0) {
value.length() == 4Description
TRUEnever evaluated
FALSEevaluated 2296 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
scripts.indexO...alue) % 4 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0-2296
436 // script name is always 4 characters-
437 script = value;-
438 state = CountryState;-
439 } else {
never executed: end of block
0
440 // it wasn't a script, maybe it is a country then?-
441 cntry = value;-
442 state = NoState;-
443 }
executed 2296 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
2296
444 break;
executed 2296 times by 22 tests: break;
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
2296
445 }-
446 case CountryState:
never executed: case CountryState:
0
447 cntry = value;-
448 state = NoState;-
449 break;
never executed: break;
0
450 case NoState:
never executed: case NoState:
0
451 // shouldn't happen-
452 qWarning("QLocale: This should never happen");-
453 break;
never executed: break;
0
454 }-
455 ++i;-
456 }
executed 4668 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
4668
457 return lang.length() == 2 || lang.length() == 3;
executed 3171 times by 26 tests: return lang.length() == 2 || lang.length() == 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
  • ...
3171
458}-
459-
460void QLocalePrivate::getLangAndCountry(const QString &name, QLocale::Language &lang,-
461 QLocale::Script &script, QLocale::Country &cntry)-
462{-
463 lang = QLocale::C;-
464 script = QLocale::AnyScript;-
465 cntry = QLocale::AnyCountry;-
466-
467 QString lang_code;-
468 QString script_code;-
469 QString cntry_code;-
470 if (!qt_splitLocaleName(name, lang_code, script_code, cntry_code))
!qt_splitLocal...e, cntry_code)Description
TRUEevaluated 799 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
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
799-2372
471 return;
executed 799 times by 3 tests: return;
Executed by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
799
472-
473 lang = QLocalePrivate::codeToLanguage(lang_code);-
474 if (lang == QLocale::C)
lang == QLocale::CDescription
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
0-2372
475 return;
never executed: return;
0
476 script = QLocalePrivate::codeToScript(script_code);-
477 cntry = QLocalePrivate::codeToCountry(cntry_code);-
478}
executed 2371 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
2371
479-
480static const QLocaleData *findLocaleData(const QString &name)-
481{-
482 QLocale::Language lang;-
483 QLocale::Script script;-
484 QLocale::Country cntry;-
485 QLocalePrivate::getLangAndCountry(name, lang, script, cntry);-
486-
487 return QLocaleData::findLocaleData(lang, script, cntry);
executed 3170 times by 26 tests: return QLocaleData::findLocaleData(lang, script, cntry);
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
488}-
489-
490QString qt_readEscapedFormatString(const QString &format, int *idx)-
491{-
492 int &i = *idx;-
493-
494 Q_ASSERT(format.at(i) == QLatin1Char('\''));-
495 ++i;-
496 if (i == format.size())
i == format.size()Description
TRUEnever evaluated
FALSEevaluated 1421 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
0-1421
497 return QString();
never executed: return QString();
0
498 if (format.at(i).unicode() == '\'') { // "''" outside of a quoted stirng
format.at(i).unicode() == '\''Description
TRUEnever evaluated
FALSEevaluated 1421 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
0-1421
499 ++i;-
500 return QLatin1String("'");
never executed: return QLatin1String("'");
0
501 }-
502-
503 QString result;-
504-
505 while (i < format.size()) {
i < format.size()Description
TRUEevaluated 4537 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 1210 times by 1 test
Evaluated by:
  • tst_QNetworkCookie
1210-4537
506 if (format.at(i).unicode() == '\'') {
format.at(i).unicode() == '\''Description
TRUEevaluated 211 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 4326 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
211-4326
507 if (i + 1 < format.size() && format.at(i + 1).unicode() == '\'') {
i + 1 < format.size()Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTimeEdit
FALSEevaluated 198 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
format.at(i + ...code() == '\''Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTimeEdit
0-198
508 // "''" inside of a quoted string-
509 result.append(QLatin1Char('\''));-
510 i += 2;-
511 } else {
never executed: end of block
0
512 break;
executed 211 times by 5 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
211
513 }-
514 } else {-
515 result.append(format.at(i++));-
516 }
executed 4326 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
4326
517 }-
518 if (i < format.size())
i < format.size()Description
TRUEevaluated 211 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 1210 times by 1 test
Evaluated by:
  • tst_QNetworkCookie
211-1210
519 ++i;
executed 211 times by 5 tests: ++i;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
211
520-
521 return result;
executed 1421 times by 6 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
1421
522}-
523-
524int qt_repeatCount(const QString &s, int i)-
525{-
526 QChar c = s.at(i);-
527 int j = i + 1;-
528 while (j < s.size() && s.at(j) == c)
j < s.size()Description
TRUEevaluated 443503 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 34921 times by 22 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QVariant
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
s.at(j) == cDescription
TRUEevaluated 200024 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 243479 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
34921-443503
529 ++j;
executed 200024 times by 33 tests: ++j;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
200024
530 return j - i;
executed 278400 times by 33 tests: return j - i;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
278400
531}-
532-
533static const QLocaleData *default_data = 0;-
534static QLocale::NumberOptions default_number_options = QLocale::DefaultNumberOptions;-
535-
536static const QLocaleData *const c_data = locale_data;-
537static QLocalePrivate *c_private()-
538{-
539 static QLocalePrivate c_locale = { c_data, Q_BASIC_ATOMIC_INITIALIZER(1), QLocale::OmitGroupSeparator };-
540 return &c_locale;
executed 139167 times by 118 tests: return &c_locale;
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
  • ...
139167
541}-
542-
543#ifndef QT_NO_SYSTEMLOCALE-
544-
545-
546/******************************************************************************-
547** Default system locale behavior-
548*/-
549-
550/*!-
551 Constructs a QSystemLocale object. The constructor will automatically-
552 install this object as the system locale and remove any earlier installed-
553 system locales.-
554*/-
555QSystemLocale::QSystemLocale()-
556{-
557 delete _systemLocale;-
558 _systemLocale = this;-
559-
560 if (system_data)
system_dataDescription
TRUEnever evaluated
FALSEnever evaluated
0
561 system_data->m_language_id = 0;
never executed: system_data->m_language_id = 0;
0
562}
never executed: end of block
0
563-
564/*!-
565 \internal-
566*/-
567QSystemLocale::QSystemLocale(bool)-
568{ }-
569-
570/*!-
571 Deletes the object.-
572*/-
573QSystemLocale::~QSystemLocale()-
574{-
575 if (_systemLocale == this) {
_systemLocale == thisDescription
TRUEnever evaluated
FALSEevaluated 1435 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
0-1435
576 _systemLocale = 0;-
577-
578 if (system_data)
system_dataDescription
TRUEnever evaluated
FALSEnever evaluated
0
579 system_data->m_language_id = 0;
never executed: system_data->m_language_id = 0;
0
580 }
never executed: end of block
0
581}
executed 1435 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1435
582-
583static const QSystemLocale *systemLocale()-
584{-
585 if (_systemLocale)
_systemLocaleDescription
TRUEnever evaluated
FALSEevaluated 18413 times by 30 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
  • 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_qmakelib
  • ...
0-18413
586 return _systemLocale;
never executed: return _systemLocale;
0
587 return QSystemLocale_globalSystemLocale();
executed 18413 times by 30 tests: return QSystemLocale_globalSystemLocale();
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
  • 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_qmakelib
  • ...
18413
588}-
589-
590void QLocalePrivate::updateSystemPrivate()-
591{-
592 const QSystemLocale *sys_locale = systemLocale();-
593 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
594 system_data = &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
595-
596 // tell the object that the system locale has changed.-
597 sys_locale->query(QSystemLocale::LocaleChanged, QVariant());-
598-
599 *system_data = *sys_locale->fallbackUiLocale().d->m_data;-
600-
601 QVariant res = sys_locale->query(QSystemLocale::LanguageId, QVariant());-
602 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
603 system_data->m_language_id = res.toInt();-
604 system_data->m_script_id = QLocale::AnyScript; // default for compatibility-
605 }
never executed: end of block
0
606 res = sys_locale->query(QSystemLocale::CountryId, QVariant());-
607 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
608 system_data->m_country_id = res.toInt();-
609 system_data->m_script_id = QLocale::AnyScript; // default for compatibility-
610 }
never executed: end of block
0
611 res = sys_locale->query(QSystemLocale::ScriptId, QVariant());-
612 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
613 system_data->m_script_id = res.toInt();
never executed: system_data->m_script_id = res.toInt();
0
614-
615 res = sys_locale->query(QSystemLocale::DecimalPoint, QVariant());-
616 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
617 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
618-
619 res = sys_locale->query(QSystemLocale::GroupSeparator, QVariant());-
620 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
621 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
622-
623 res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant());-
624 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
625 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
626-
627 res = sys_locale->query(QSystemLocale::NegativeSign, QVariant());-
628 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
629 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
630-
631 res = sys_locale->query(QSystemLocale::PositiveSign, QVariant());-
632 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
633 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
634}
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
635#endif-
636-
637static const QLocaleData *systemData()-
638{-
639#ifndef QT_NO_SYSTEMLOCALE-
640 // copy over the information from the fallback locale and modify-
641 if (!system_data || system_data->m_language_id == 0)
!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
FALSEevaluated 105070 times by 71 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
system_data->m...nguage_id == 0Description
TRUEnever evaluated
FALSEevaluated 105070 times by 71 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
0-105070
642 QLocalePrivate::updateSystemPrivate();
executed 1016 times by 12 tests: QLocalePrivate::updateSystemPrivate();
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
643-
644 return system_data;
executed 106085 times by 81 tests: return system_data;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
106085
645#else-
646 return locale_data;-
647#endif-
648}-
649-
650static const QLocaleData *defaultData()-
651{-
652 if (!default_data)
!default_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
653 default_data = systemData();
executed 1016 times by 12 tests: default_data = systemData();
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
654 return default_data;
executed 1015 times by 12 tests: return default_data;
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
655}-
656-
657const QLocaleData *QLocaleData::c()-
658{-
659 Q_ASSERT(locale_index[QLocale::C] == 0);-
660 return c_data;
executed 5075198 times by 459 tests: return c_data;
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
5075198
661}-
662-
663static inline QString getLocaleData(const ushort *data, int size)-
664{-
665 return size > 0 ? QString::fromRawData(reinterpret_cast<const QChar *>(data), size) : QString();
executed 44365 times by 23 tests: return size > 0 ? QString::fromRawData(reinterpret_cast<const QChar *>(data), size) : QString();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QXmlStream
  • tst_languageChange
  • tst_qmakelib
44365
666}-
667-
668static QString getLocaleListData(const ushort *data, int size, int index)-
669{-
670 static const ushort separator = ';';-
671 while (index && size > 0) {
indexDescription
TRUEevaluated 150127 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEevaluated 34587 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
size > 0Description
TRUEevaluated 150127 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEnever evaluated
0-150127
672 while (*data != separator)
*data != separatorDescription
TRUEevaluated 585528 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEevaluated 150127 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
150127-585528
673 ++data, --size;
executed 585528 times by 14 tests: ++data, --size;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
585528
674 --index;-
675 ++data;-
676 --size;-
677 }
executed 150127 times by 14 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
150127
678 const ushort *end = data;-
679 while (size > 0 && *end != separator)
size > 0Description
TRUEevaluated 179244 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEnever evaluated
*end != separatorDescription
TRUEevaluated 144657 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEevaluated 34587 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
0-179244
680 ++end, --size;
executed 144657 times by 14 tests: ++end, --size;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
144657
681 return getLocaleData(data, end - data);
executed 34587 times by 14 tests: return getLocaleData(data, end - data);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
34587
682}-
683-
684-
685#ifndef QT_NO_DATASTREAM-
686QDataStream &operator<<(QDataStream &ds, const QLocale &l)-
687{-
688 ds << l.name();-
689 return ds;
executed 3 times by 2 tests: return ds;
Executed by:
  • tst_QMetaType
  • tst_QVariant
3
690}-
691-
692QDataStream &operator>>(QDataStream &ds, QLocale &l)-
693{-
694 QString s;-
695 ds >> s;-
696 l = QLocale(s);-
697 return ds;
executed 7 times by 2 tests: return ds;
Executed by:
  • tst_QMetaType
  • tst_QVariant
7
698}-
699#endif // QT_NO_DATASTREAM-
700-
701-
702static const int locale_data_size = sizeof(locale_data)/sizeof(QLocaleData) - 1;-
703-
704Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer<QLocalePrivate>, defaultLocalePrivate,
executed 1438 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 1438 times by 508 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 459209 times by 201 tests: return &holder.value;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 1438 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEnever evaluated
0-459209
705 (QLocalePrivate::create(defaultData(), default_number_options)))-
706-
707static QLocalePrivate *localePrivateByName(const QString &name)-
708{-
709 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
710 return 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
711 const QLocaleData *data = findLocaleData(name);-
712 return 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
713 QLocale::OmitGroupSeparator : QLocale::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
714}-
715-
716static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Script script,-
717 QLocale::Country country)-
718{-
719 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
720 return 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
721-
722 const QLocaleData *data = QLocaleData::findLocaleData(language, script, country);-
723-
724 QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions;-
725-
726 // If not found, should default to system-
727 if (data->m_language_id == QLocale::C && language != 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::CDescription
TRUEnever evaluated
FALSEnever evaluated
0-64
728 numberOptions = default_number_options;-
729 data = defaultData();-
730 }
never executed: end of block
0
731 return 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
732}-
733-
734-
735/*!-
736 \internal-
737*/-
738QLocale::QLocale(QLocalePrivate &dd)-
739 : d(&dd)-
740{}
executed 37515 times by 68 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
37515
741-
742-
743/*!-
744 Constructs a QLocale object with the specified \a name,-
745 which has the format-
746 "language[_script][_country][.codeset][@modifier]" or "C", where:-
747-
748 \list-
749 \li language is a lowercase, two-letter, ISO 639 language code (also some three-letter codes),-
750 \li script is a titlecase, four-letter, ISO 15924 script code,-
751 \li country is an uppercase, two-letter, ISO 3166 country code (also "419" as defined by United Nations),-
752 \li and codeset and modifier are ignored.-
753 \endlist-
754-
755 The separator can be either underscore or a minus sign.-
756-
757 If the string violates the locale format, or language is not-
758 a valid ISO 639 code, the "C" locale is used instead. If country-
759 is not present, or is not a valid ISO 3166 code, the most-
760 appropriate country is chosen for the specified language.-
761-
762 The language, script and country codes are converted to their respective-
763 \c Language, \c Script and \c Country enums. After this conversion is-
764 performed, the constructor behaves exactly like QLocale(Country, Script,-
765 Language).-
766-
767 This constructor is much slower than QLocale(Country, Script, Language).-
768-
769 \sa bcp47Name()-
770*/-
771-
772QLocale::QLocale(const QString &name)-
773 : d(localePrivateByName(name))-
774{-
775}
executed 11053 times by 27 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_QStringRef
  • 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
  • ...
11053
776-
777/*!-
778 Constructs a QLocale object initialized with the default locale. If-
779 no default locale was set using setDefault(), this locale will-
780 be the same as the one returned by system().-
781-
782 \sa setDefault()-
783*/-
784-
785QLocale::QLocale()-
786 : d(*defaultLocalePrivate)-
787{-
788}
executed 456748 times by 200 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
456748
789-
790/*!-
791 Constructs a QLocale object with the specified \a language and \a-
792 country.-
793-
794 \list-
795 \li If the language/country pair is found in the database, it is used.-
796 \li If the language is found but the country is not, or if the country-
797 is \c AnyCountry, the language is used with the most-
798 appropriate available country (for example, Germany for German),-
799 \li If neither the language nor the country are found, QLocale-
800 defaults to the default locale (see setDefault()).-
801 \endlist-
802-
803 The language and country that are actually used can be queried-
804 using language() and country().-
805-
806 \sa setDefault(), language(), country()-
807*/-
808-
809QLocale::QLocale(Language language, Country country)-
810 : d(findLocalePrivate(language, QLocale::AnyScript, country))-
811{-
812}
executed 131348 times by 121 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QCalendarWidget
  • tst_QCollator
  • 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
  • ...
131348
813-
814/*!-
815 \since 4.8-
816-
817 Constructs a QLocale object with the specified \a language, \a script and-
818 \a country.-
819-
820 \list-
821 \li If the language/script/country is found in the database, it is used.-
822 \li If both \a script is AnyScript and \a country is AnyCountry, the-
823 language is used with the most appropriate available script and country-
824 (for example, Germany for German),-
825 \li If either \a script is AnyScript or \a country is AnyCountry, the-
826 language is used with the first locale that matches the given \a script-
827 and \a country.-
828 \li If neither the language nor the country are found, QLocale-
829 defaults to the default locale (see setDefault()).-
830 \endlist-
831-
832 The language, script and country that are actually used can be queried-
833 using language(), script() and country().-
834-
835 \sa setDefault(), language(), script(), country()-
836*/-
837-
838QLocale::QLocale(Language language, Script script, Country country)-
839 : d(findLocalePrivate(language, script, country))-
840{-
841}
never executed: end of block
0
842-
843/*!-
844 Constructs a QLocale object as a copy of \a other.-
845*/-
846-
847QLocale::QLocale(const QLocale &other)-
848{-
849 d = other.d;-
850}
executed 119582 times by 138 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
119582
851-
852/*!-
853 Destructor-
854*/-
855-
856QLocale::~QLocale()-
857{-
858}-
859-
860/*!-
861 Assigns \a other to this QLocale object and returns a reference-
862 to this QLocale object.-
863*/-
864-
865QLocale &QLocale::operator=(const QLocale &other)-
866{-
867 d = other.d;-
868 return *this;
executed 277365 times by 127 tests: return *this;
Executed by:
  • tst_ModelTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • ...
277365
869}-
870-
871bool QLocale::operator==(const QLocale &other) const-
872{-
873 return d->m_data == other.d->m_data && d->m_numberOptions == other.d->m_numberOptions;
executed 57140 times by 121 tests: return d->m_data == other.d->m_data && d->m_numberOptions == other.d->m_numberOptions;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
57140
874}-
875-
876bool QLocale::operator!=(const QLocale &other) const-
877{-
878 return d->m_data != other.d->m_data || d->m_numberOptions != other.d->m_numberOptions;
executed 46051 times by 51 tests: return d->m_data != other.d->m_data || d->m_numberOptions != other.d->m_numberOptions;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QBrush
  • tst_QColumnView
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QIntValidator
  • ...
46051
879}-
880-
881/*!-
882 \fn void QLocale::swap(QLocale &other)-
883 \since 5.6-
884-
885 Swaps locale \a other with this locale. This operation is very fast and-
886 never fails.-
887*/-
888-
889/*!-
890 \since 5.6-
891 \relates QLocale-
892-
893 Returns the hash value for \a key, using-
894 \a seed to seed the calculation.-
895*/-
896uint qHash(const QLocale &key, uint seed) Q_DECL_NOTHROW-
897{-
898 QtPrivate::QHashCombine hash;-
899 seed = hash(seed, key.d->m_data);-
900 seed = hash(seed, key.d->m_numberOptions);-
901 return seed;
never executed: return seed;
0
902}-
903-
904/*!-
905 \since 4.2-
906-
907 Sets the \a options related to number conversions for this-
908 QLocale instance.-
909*/-
910void QLocale::setNumberOptions(NumberOptions options)-
911{-
912 d->m_numberOptions = options;-
913}
executed 48162 times by 36 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSplitter
  • ...
48162
914-
915/*!-
916 \since 4.2-
917-
918 Returns the options related to number conversions for this-
919 QLocale instance.-
920-
921 By default, no options are set for the standard locales.-
922*/-
923QLocale::NumberOptions QLocale::numberOptions() const-
924{-
925 return static_cast<NumberOptions>(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
926}-
927-
928/*!-
929 \since 4.8-
930-
931 Returns \a str quoted according to the current locale using the given-
932 quotation \a style.-
933*/-
934QString QLocale::quoteString(const QString &str, QuotationStyle style) const-
935{-
936 return quoteString(&str, style);
never executed: return quoteString(&str, style);
0
937}-
938-
939/*!-
940 \since 4.8-
941-
942 \overload-
943*/-
944QString QLocale::quoteString(const QStringRef &str, QuotationStyle style) const-
945{-
946#ifndef QT_NO_SYSTEMLOCALE-
947 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
948 QVariant res;-
949 if (style == QLocale::AlternateQuotation)
style == QLoca...rnateQuotationDescription
TRUEnever evaluated
FALSEnever evaluated
0
950 res = systemLocale()->query(QSystemLocale::StringToAlternateQuotation, QVariant::fromValue(str));
never executed: res = systemLocale()->query(QSystemLocale::StringToAlternateQuotation, QVariant::fromValue(str));
0
951 if (res.isNull() || style == QLocale::StandardQuotation)
res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
style == QLoca...ndardQuotationDescription
TRUEnever evaluated
FALSEnever evaluated
0
952 res = systemLocale()->query(QSystemLocale::StringToStandardQuotation, QVariant::fromValue(str));
never executed: res = systemLocale()->query(QSystemLocale::StringToStandardQuotation, QVariant::fromValue(str));
0
953 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
954 return res.toString();
never executed: return res.toString();
0
955 }
never executed: end of block
0
956#endif-
957-
958 if (style == QLocale::StandardQuotation)
style == QLoca...ndardQuotationDescription
TRUEnever evaluated
FALSEnever evaluated
0
959 return QChar(d->m_data->m_quotation_start) % str % QChar(d->m_data->m_quotation_end);
never executed: return QChar(d->m_data->m_quotation_start) % str % QChar(d->m_data->m_quotation_end);
0
960 else-
961 return QChar(d->m_data->m_alternate_quotation_start) % str % QChar(d->m_data->m_alternate_quotation_end);
never executed: return QChar(d->m_data->m_alternate_quotation_start) % str % QChar(d->m_data->m_alternate_quotation_end);
0
962}-
963-
964/*!-
965 \since 4.8-
966-
967 Returns a string that represents a join of a given \a list of strings with-
968 a separator defined by the locale.-
969*/-
970QString QLocale::createSeparatedList(const QStringList &list) const-
971{-
972#ifndef QT_NO_SYSTEMLOCALE-
973 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
974 QVariant res;-
975 res = systemLocale()->query(QSystemLocale::ListToSeparatedString, QVariant::fromValue(list));-
976-
977 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
978 return res.toString();
never executed: return res.toString();
0
979 }
never executed: end of block
0
980#endif-
981-
982 const int size = list.size();-
983 if (size == 1) {
size == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
984 return list.at(0);
never executed: return list.at(0);
0
985 } else if (size == 2) {
size == 2Description
TRUEnever evaluated
FALSEnever evaluated
0
986 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);-
987 return format.arg(list.at(0), list.at(1));
never executed: return format.arg(list.at(0), list.at(1));
0
988 } else if (size > 2) {
size > 2Description
TRUEnever evaluated
FALSEnever evaluated
0
989 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);-
990 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);-
991 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);-
992 QString result = formatStart.arg(list.at(0), list.at(1));-
993 for (int i = 2; i < size - 1; ++i)
i < size - 1Description
TRUEnever evaluated
FALSEnever evaluated
0
994 result = formatMid.arg(result, list.at(i));
never executed: result = formatMid.arg(result, list.at(i));
0
995 result = formatEnd.arg(result, list.at(size - 1));-
996 return result;
never executed: return result;
0
997 }-
998-
999 return QString();
never executed: return QString();
0
1000}-
1001-
1002/*!-
1003 \nonreentrant-
1004-
1005 Sets the global default locale to \a locale. These-
1006 values are used when a QLocale object is constructed with-
1007 no arguments. If this function is not called, the system's-
1008 locale is used.-
1009-
1010 \warning In a multithreaded application, the default locale-
1011 should be set at application startup, before any non-GUI threads-
1012 are created.-
1013-
1014 \sa system(), c()-
1015*/-
1016-
1017void QLocale::setDefault(const QLocale &locale)-
1018{-
1019 default_data = locale.d->m_data;-
1020 default_number_options = locale.numberOptions();-
1021-
1022 if (defaultLocalePrivate.exists()) {
defaultLocalePrivate.exists()Description
TRUEevaluated 2461 times by 14 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_rcc
FALSEnever evaluated
0-2461
1023 // update the cached private-
1024 *defaultLocalePrivate = locale.d;-
1025 }
executed 2461 times by 14 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_rcc
2461
1026}
executed 2461 times by 14 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_rcc
2461
1027-
1028/*!-
1029 Returns the language of this locale.-
1030-
1031 \sa script(), country(), languageToString(), bcp47Name()-
1032*/-
1033QLocale::Language QLocale::language() const-
1034{-
1035 return Language(d->languageId());
executed 22225 times by 95 tests: return Language(d->languageId());
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
22225
1036}-
1037-
1038/*!-
1039 \since 4.8-
1040-
1041 Returns the script of this locale.-
1042-
1043 \sa language(), country(), languageToString(), scriptToString(), bcp47Name()-
1044*/-
1045QLocale::Script QLocale::script() const-
1046{-
1047 return Script(d->m_data->m_script_id);
executed 35 times by 35 tests: return Script(d->m_data->m_script_id);
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
  • ...
35
1048}-
1049-
1050/*!-
1051 Returns the country of this locale.-
1052-
1053 \sa language(), script(), countryToString(), bcp47Name()-
1054*/-
1055QLocale::Country QLocale::country() const-
1056{-
1057 return Country(d->countryId());
executed 22216 times by 94 tests: return Country(d->countryId());
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
22216
1058}-
1059-
1060/*!-
1061 Returns the language and country of this locale as a-
1062 string of the form "language_country", where-
1063 language is a lowercase, two-letter ISO 639 language code,-
1064 and country is an uppercase, two- or three-letter ISO 3166 country code.-
1065-
1066 Note that even if QLocale object was constructed with an explicit script,-
1067 name() will not contain it for compatibility reasons. Use bcp47Name() instead-
1068 if you need a full locale name.-
1069-
1070 \sa QLocale(), language(), script(), country(), bcp47Name()-
1071*/-
1072-
1073QString QLocale::name() const-
1074{-
1075 Language l = language();-
1076-
1077 QString result = d->languageCode();-
1078-
1079 if (l == C)
l == CDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTimeZone
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
18-3292
1080 return result;
executed 18 times by 2 tests: return result;
Executed by:
  • tst_QMimeDatabase
  • tst_QTimeZone
18
1081-
1082 Country c = country();-
1083 if (c == AnyCountry)
c == AnyCountryDescription
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
1084 return result;
never executed: return result;
0
1085-
1086 result.append(QLatin1Char('_'));-
1087 result.append(d->countryCode());-
1088-
1089 return result;
executed 3292 times by 13 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
3292
1090}-
1091-
1092static qlonglong toIntegral_helper(const QLocaleData *d, const QChar *data, int len, bool *ok,-
1093 QLocale::NumberOptions mode, qlonglong)-
1094{-
1095 return 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
1096}-
1097-
1098static qulonglong toIntegral_helper(const QLocaleData *d, const QChar *data, int len, bool *ok,-
1099 QLocale::NumberOptions mode, qulonglong)-
1100{-
1101 return 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
1102}-
1103-
1104template <typename T> static inline-
1105T toIntegral_helper(const QLocalePrivate *d, const QChar *data, int len, bool *ok)-
1106{-
1107 // ### Qt6: use std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type-
1108 const bool isUnsigned = T(0) < T(-1);-
1109 typedef typename QtPrivate::QConditional<isUnsigned, qulonglong, qlonglong>::Type Int64;-
1110-
1111 // we select the right overload by the last, unused parameter-
1112 Int64 val = toIntegral_helper(d->m_data, data, len, ok, d->m_numberOptions, Int64());-
1113 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
1114 if (ok)
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
1115 *ok = false;
never executed: *ok = false;
0
1116 val = 0;-
1117 }
never executed: end of block
0
1118 return 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
1119}-
1120-
1121-
1122/*!-
1123 \since 4.8-
1124-
1125 Returns the dash-separated language, script and country (and possibly other BCP47 fields)-
1126 of this locale as a string.-
1127-
1128 Unlike the uiLanguages() the returned value of the bcp47Name() represents-
1129 the locale name of the QLocale data but not the language the user-interface-
1130 should be in.-
1131-
1132 This function tries to conform the locale name to BCP47.-
1133-
1134 \sa language(), country(), script(), uiLanguages()-
1135*/-
1136QString QLocale::bcp47Name() const-
1137{-
1138 return QString::fromLatin1(d->bcp47Name());
executed 336 times by 13 tests: return QString::fromLatin1(d->bcp47Name());
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
336
1139}-
1140-
1141/*!-
1142 Returns a QString containing the name of \a language.-
1143-
1144 \sa countryToString(), scriptToString(), bcp47Name()-
1145*/-
1146-
1147QString QLocale::languageToString(Language language)-
1148{-
1149 if (uint(language) > uint(QLocale::LastLanguage))
uint(language)...:LastLanguage)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
0-1
1150 return QLatin1String("Unknown");
never executed: return QLatin1String("Unknown");
0
1151 return QLatin1String(language_name_list + language_name_index[language]);
executed 1 time by 1 test: return QLatin1String(language_name_list + language_name_index[language]);
Executed by:
  • tst_QVariant
1
1152}-
1153-
1154/*!-
1155 Returns a QString containing the name of \a country.-
1156-
1157 \sa languageToString(), scriptToString(), country(), bcp47Name()-
1158*/-
1159-
1160QString QLocale::countryToString(Country country)-
1161{-
1162 if (uint(country) > uint(QLocale::LastCountry))
uint(country) ...::LastCountry)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
0-1
1163 return QLatin1String("Unknown");
never executed: return QLatin1String("Unknown");
0
1164 return QLatin1String(country_name_list + country_name_index[country]);
executed 1 time by 1 test: return QLatin1String(country_name_list + country_name_index[country]);
Executed by:
  • tst_QVariant
1
1165}-
1166-
1167/*!-
1168 \since 4.8-
1169-
1170 Returns a QString containing the name of \a script.-
1171-
1172 \sa languageToString(), countryToString(), script(), bcp47Name()-
1173*/-
1174QString QLocale::scriptToString(QLocale::Script script)-
1175{-
1176 if (uint(script) > uint(QLocale::LastScript))
uint(script) >...e::LastScript)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
0-1
1177 return QLatin1String("Unknown");
never executed: return QLatin1String("Unknown");
0
1178 return QLatin1String(script_name_list + script_name_index[script]);
executed 1 time by 1 test: return QLatin1String(script_name_list + script_name_index[script]);
Executed by:
  • tst_QVariant
1
1179}-
1180-
1181/*!-
1182 Returns the short int represented by the localized string \a s.-
1183-
1184 If the conversion fails the function returns 0.-
1185-
1186 If \a ok is not 0, failure is reported by setting *ok to false, and-
1187 success by setting *ok to true.-
1188-
1189 This function ignores leading and trailing whitespace.-
1190-
1191 \sa toUShort(), toString()-
1192*/-
1193-
1194short QLocale::toShort(const QString &s, bool *ok) const-
1195{-
1196 return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
0
1197}-
1198-
1199/*!-
1200 Returns the unsigned short int represented by the localized string \a s.-
1201-
1202 If the conversion fails the function returns 0.-
1203-
1204 If \a ok is not 0, failure is reported by setting *ok to false, and-
1205 success by setting *ok to true.-
1206-
1207 This function ignores leading and trailing whitespace.-
1208-
1209 \sa toShort(), toString()-
1210*/-
1211-
1212ushort QLocale::toUShort(const QString &s, bool *ok) const-
1213{-
1214 return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
0
1215}-
1216-
1217/*!-
1218 Returns the int represented by the localized string \a s.-
1219-
1220 If the conversion fails the function returns 0.-
1221-
1222 If \a ok is not 0, failure is reported by setting *ok to false, and-
1223 success by setting *ok to true.-
1224-
1225 This function ignores leading and trailing whitespace.-
1226-
1227 \sa toUInt(), toString()-
1228*/-
1229-
1230int QLocale::toInt(const QString &s, bool *ok) const-
1231{-
1232 return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
executed 1226 times by 16 tests: return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
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
1233}-
1234-
1235/*!-
1236 Returns the unsigned int represented by the localized string \a s.-
1237-
1238 If the conversion fails the function returns 0.-
1239-
1240 If \a ok is not 0, failure is reported by setting *ok to false, and-
1241 success by setting *ok to true.-
1242-
1243 This function ignores leading and trailing whitespace.-
1244-
1245 \sa toInt(), toString()-
1246*/-
1247-
1248uint QLocale::toUInt(const QString &s, bool *ok) const-
1249{-
1250 return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
0
1251}-
1252-
1253/*!-
1254 Returns the long long int represented by the localized string \a s.-
1255-
1256 If the conversion fails the function returns 0.-
1257-
1258 If \a ok is not 0, failure is reported by setting *ok to false, and-
1259 success by setting *ok to true.-
1260-
1261 This function ignores leading and trailing whitespace.-
1262-
1263 \sa toInt(), toULongLong(), toDouble(), toString()-
1264*/-
1265-
1266-
1267qlonglong QLocale::toLongLong(const QString &s, bool *ok) const-
1268{-
1269 return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
0
1270}-
1271-
1272/*!-
1273 Returns the unsigned long long int represented by the localized-
1274 string \a s.-
1275-
1276 If the conversion fails the function returns 0.-
1277-
1278 If \a ok is not 0, failure is reported by setting *ok to false, and-
1279 success by setting *ok to true.-
1280-
1281 This function ignores leading and trailing whitespace.-
1282-
1283 \sa toLongLong(), toInt(), toDouble(), toString()-
1284*/-
1285-
1286qulonglong QLocale::toULongLong(const QString &s, bool *ok) const-
1287{-
1288 return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
0
1289}-
1290-
1291/*!-
1292 Returns the float represented by the localized string \a s, or 0.0-
1293 if the conversion failed.-
1294-
1295 If \a ok is not 0, reports failure by setting-
1296 *ok to false and success by setting *ok to true.-
1297-
1298 This function ignores leading and trailing whitespace.-
1299-
1300 \sa toDouble(), toInt(), toString()-
1301*/-
1302-
1303float QLocale::toFloat(const QString &s, bool *ok) const-
1304{-
1305 return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
never executed: return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
0
1306}-
1307-
1308/*!-
1309 Returns the double represented by the localized string \a s, or-
1310 0.0 if the conversion failed.-
1311-
1312 If \a ok is not 0, reports failure by setting-
1313 *ok to false and success by setting *ok to true.-
1314-
1315 Unlike QString::toDouble(), this function does not fall back to-
1316 the "C" locale if the string cannot be interpreted in this-
1317 locale.-
1318-
1319 \snippet code/src_corelib_tools_qlocale.cpp 3-
1320-
1321 Notice that the last conversion returns 1234.0, because '.' is the-
1322 thousands group separator in the German locale.-
1323-
1324 This function ignores leading and trailing whitespace.-
1325-
1326 \sa toFloat(), toInt(), toString()-
1327*/-
1328-
1329double QLocale::toDouble(const QString &s, bool *ok) const-
1330{-
1331 return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->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
1212
1332}-
1333-
1334/*!-
1335 Returns the short int represented by the localized string \a s.-
1336-
1337 If the conversion fails the function returns 0.-
1338-
1339 If \a ok is not null, failure is reported by setting *ok to false, and-
1340 success by setting *ok to true.-
1341-
1342 This function ignores leading and trailing whitespace.-
1343-
1344 \sa toUShort(), toString()-
1345-
1346 \since 5.1-
1347*/-
1348-
1349short QLocale::toShort(const QStringRef &s, bool *ok) const-
1350{-
1351 return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
0
1352}-
1353-
1354/*!-
1355 Returns the unsigned short int represented by the localized string \a s.-
1356-
1357 If the conversion fails the function returns 0.-
1358-
1359 If \a ok is not null, failure is reported by setting *ok to false, and-
1360 success by setting *ok to true.-
1361-
1362 This function ignores leading and trailing whitespace.-
1363-
1364 \sa toShort(), toString()-
1365-
1366 \since 5.1-
1367*/-
1368-
1369ushort QLocale::toUShort(const QStringRef &s, bool *ok) const-
1370{-
1371 return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
0
1372}-
1373-
1374/*!-
1375 Returns the int represented by the localized string \a s.-
1376-
1377 If the conversion fails the function returns 0.-
1378-
1379 If \a ok is not null, failure is reported by setting *ok to false, and-
1380 success by setting *ok to true.-
1381-
1382 This function ignores leading and trailing whitespace.-
1383-
1384 \sa toUInt(), toString()-
1385-
1386 \since 5.1-
1387*/-
1388-
1389int QLocale::toInt(const QStringRef &s, bool *ok) const-
1390{-
1391 return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
0
1392}-
1393-
1394/*!-
1395 Returns the unsigned int represented by the localized string \a s.-
1396-
1397 If the conversion fails the function returns 0.-
1398-
1399 If \a ok is not null, failure is reported by setting *ok to false, and-
1400 success by setting *ok to true.-
1401-
1402 This function ignores leading and trailing whitespace.-
1403-
1404 \sa toInt(), toString()-
1405-
1406 \since 5.1-
1407*/-
1408-
1409uint QLocale::toUInt(const QStringRef &s, bool *ok) const-
1410{-
1411 return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
executed 15675 times by 11 tests: return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
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
1412}-
1413-
1414/*!-
1415 Returns the long long int represented by the localized string \a s.-
1416-
1417 If the conversion fails the function returns 0.-
1418-
1419 If \a ok is not null, failure is reported by setting *ok to false, and-
1420 success by setting *ok to true.-
1421-
1422 This function ignores leading and trailing whitespace.-
1423-
1424 \sa toInt(), toULongLong(), toDouble(), toString()-
1425-
1426 \since 5.1-
1427*/-
1428-
1429-
1430qlonglong QLocale::toLongLong(const QStringRef &s, bool *ok) const-
1431{-
1432 return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
0
1433}-
1434-
1435/*!-
1436 Returns the unsigned long long int represented by the localized-
1437 string \a s.-
1438-
1439 If the conversion fails the function returns 0.-
1440-
1441 If \a ok is not null, failure is reported by setting *ok to false, and-
1442 success by setting *ok to true.-
1443-
1444 This function ignores leading and trailing whitespace.-
1445-
1446 \sa toLongLong(), toInt(), toDouble(), toString()-
1447-
1448 \since 5.1-
1449*/-
1450-
1451qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const-
1452{-
1453 return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
0
1454}-
1455-
1456/*!-
1457 Returns the float represented by the localized string \a s, or 0.0-
1458 if the conversion failed.-
1459-
1460 If \a ok is not null, reports failure by setting-
1461 *ok to false and success by setting *ok to true.-
1462-
1463 This function ignores leading and trailing whitespace.-
1464-
1465 \sa toDouble(), toInt(), toString()-
1466-
1467 \since 5.1-
1468*/-
1469-
1470float QLocale::toFloat(const QStringRef &s, bool *ok) const-
1471{-
1472 return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
never executed: return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
0
1473}-
1474-
1475/*!-
1476 Returns the double represented by the localized string \a s, or-
1477 0.0 if the conversion failed.-
1478-
1479 If \a ok is not null, reports failure by setting-
1480 *ok to false and success by setting *ok to true.-
1481-
1482 Unlike QString::toDouble(), this function does not fall back to-
1483 the "C" locale if the string cannot be interpreted in this-
1484 locale.-
1485-
1486 \snippet code/src_corelib_tools_qlocale.cpp 3-
1487-
1488 Notice that the last conversion returns 1234.0, because '.' is the-
1489 thousands group separator in the German locale.-
1490-
1491 This function ignores leading and trailing whitespace.-
1492-
1493 \sa toFloat(), toInt(), toString()-
1494-
1495 \since 5.1-
1496*/-
1497-
1498double QLocale::toDouble(const QStringRef &s, bool *ok) const-
1499{-
1500 return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
never executed: return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
0
1501}-
1502-
1503-
1504/*!-
1505 Returns a localized string representation of \a i.-
1506-
1507 \sa toLongLong()-
1508*/-
1509-
1510QString QLocale::toString(qlonglong i) const-
1511{-
1512 int flags = d->m_numberOptions & OmitGroupSeparator
d->m_numberOpt...GroupSeparatorDescription
TRUEevaluated 11586 times by 12 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QSortFilterProxyModel
  • tst_QSpinBox
  • tst_QTableView
  • tst_QTreeView
FALSEevaluated 1655 times by 20 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
1655-11586
1513 ? 0-
1514 : QLocaleData::ThousandsGroup;-
1515-
1516 return d->m_data->longLongToString(i, -1, 10, -1, flags);
executed 13241 times by 26 tests: return d->m_data->longLongToString(i, -1, 10, -1, flags);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QSortFilterProxyModel
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTreeView
  • ...
13241
1517}-
1518-
1519/*!-
1520 \overload-
1521-
1522 \sa toULongLong()-
1523*/-
1524-
1525QString QLocale::toString(qulonglong i) const-
1526{-
1527 int flags = d->m_numberOptions & OmitGroupSeparator
d->m_numberOpt...GroupSeparatorDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QItemDelegate
FALSEevaluated 290 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QItemModel
12-290
1528 ? 0-
1529 : QLocaleData::ThousandsGroup;-
1530-
1531 return d->m_data->unsLongLongToString(i, -1, 10, -1, flags);
executed 302 times by 2 tests: return d->m_data->unsLongLongToString(i, -1, 10, -1, flags);
Executed by:
  • tst_QItemDelegate
  • tst_QItemModel
302
1532}-
1533-
1534/*!-
1535 Returns a localized string representation of the given \a date in the-
1536 specified \a format.-
1537 If \a format is an empty string, an empty string is returned.-
1538*/-
1539-
1540QString QLocale::toString(const QDate &date, const QString &format) const-
1541{-
1542 return d->dateTimeToString(format, QDateTime(), date, QTime(), this);
executed 14106 times by 8 tests: return d->dateTimeToString(format, QDateTime(), date, QTime(), this);
Executed by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QVariant
14106
1543}-
1544-
1545/*!-
1546 Returns a localized string representation of the given \a date according-
1547 to the specified \a format.-
1548*/-
1549-
1550QString QLocale::toString(const QDate &date, FormatType format) const-
1551{-
1552 if (!date.isValid())
!date.isValid()Description
TRUEnever evaluated
FALSEevaluated 204 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
0-204
1553 return QString();
never executed: return QString();
0
1554-
1555#ifndef QT_NO_SYSTEMLOCALE-
1556 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
FALSEevaluated 128 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
76-128
1557 QVariant res = systemLocale()->query(format == LongFormat-
1558 ? QSystemLocale::DateToStringLong : QSystemLocale::DateToStringShort,-
1559 date);-
1560 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
FALSEnever evaluated
0-76
1561 return res.toString();
executed 76 times by 2 tests: return res.toString();
Executed by:
  • tst_QDate
  • tst_QItemDelegate
76
1562 }
never executed: end of block
0
1563#endif-
1564-
1565 QString format_str = dateFormat(format);-
1566 return toString(date, format_str);
executed 128 times by 2 tests: return toString(date, format_str);
Executed by:
  • tst_QDate
  • tst_QItemDelegate
128
1567}-
1568-
1569static bool timeFormatContainsAP(const QString &format)-
1570{-
1571 int i = 0;-
1572 while (i < format.size()) {
i < format.size()Description
TRUEevaluated 312089 times by 27 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
FALSEevaluated 18727 times by 19 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
18727-312089
1573 if (format.at(i).unicode() == '\'') {
format.at(i).unicode() == '\''Description
TRUEevaluated 694 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 311395 times by 27 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
694-311395
1574 qt_readEscapedFormatString(format, &i);-
1575 continue;
executed 694 times by 6 tests: continue;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
694
1576 }-
1577-
1578 if (format.at(i).toLower().unicode() == 'a')
format.at(i).t...icode() == 'a'Description
TRUEevaluated 3524 times by 12 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
FALSEevaluated 307871 times by 27 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
3524-307871
1579 return true;
executed 3524 times by 12 tests: return true;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
3524
1580-
1581 ++i;-
1582 }
executed 307871 times by 27 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
307871
1583 return false;
executed 18727 times by 19 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
18727
1584}-
1585-
1586/*!-
1587 Returns a localized string representation of the given \a time according-
1588 to the specified \a format.-
1589 If \a format is an empty string, an empty string is returned.-
1590*/-
1591QString QLocale::toString(const QTime &time, const QString &format) const-
1592{-
1593 return d->dateTimeToString(format, QDateTime(), QDate(), time, this);
executed 14816 times by 7 tests: return d->dateTimeToString(format, QDateTime(), QDate(), time, this);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
14816
1594}-
1595-
1596/*!-
1597 \since 4.4-
1598-
1599 Returns a localized string representation of the given \a dateTime according-
1600 to the specified \a format.-
1601 If \a format is an empty string, an empty string is returned.-
1602*/-
1603-
1604QString QLocale::toString(const QDateTime &dateTime, const QString &format) const-
1605{-
1606 return d->dateTimeToString(format, dateTime, QDate(), QTime(), this);
executed 10235 times by 30 tests: return d->dateTimeToString(format, dateTime, QDate(), QTime(), this);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QVariant
  • ...
10235
1607}-
1608-
1609/*!-
1610 \since 4.4-
1611-
1612 Returns a localized string representation of the given \a dateTime according-
1613 to the specified \a format.-
1614*/-
1615-
1616QString QLocale::toString(const QDateTime &dateTime, FormatType format) const-
1617{-
1618 if (!dateTime.isValid())
!dateTime.isValid()Description
TRUEnever evaluated
FALSEevaluated 5449 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
0-5449
1619 return QString();
never executed: return QString();
0
1620-
1621#ifndef QT_NO_SYSTEMLOCALE-
1622 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 2723 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
FALSEevaluated 2726 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2723-2726
1623 QVariant res = systemLocale()->query(format == LongFormat-
1624 ? QSystemLocale::DateTimeToStringLong-
1625 : QSystemLocale::DateTimeToStringShort,-
1626 dateTime);-
1627 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 2723 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
FALSEnever evaluated
0-2723
1628 return res.toString();
executed 2723 times by 8 tests: return res.toString();
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2723
1629 }
never executed: end of block
0
1630#endif-
1631-
1632 const QString format_str = dateTimeFormat(format);-
1633 return toString(dateTime, format_str);
executed 2726 times by 8 tests: return toString(dateTime, format_str);
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2726
1634}-
1635-
1636-
1637/*!-
1638 Returns a localized string representation of the given \a time in the-
1639 specified \a format.-
1640*/-
1641-
1642QString QLocale::toString(const QTime &time, FormatType format) const-
1643{-
1644 if (!time.isValid())
!time.isValid()Description
TRUEnever evaluated
FALSEevaluated 64 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
0-64
1645 return QString();
never executed: return QString();
0
1646-
1647#ifndef QT_NO_SYSTEMLOCALE-
1648 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
30-34
1649 QVariant res = systemLocale()->query(format == LongFormat-
1650 ? QSystemLocale::TimeToStringLong : QSystemLocale::TimeToStringShort,-
1651 time);-
1652 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
FALSEnever evaluated
0-30
1653 return res.toString();
executed 30 times by 2 tests: return res.toString();
Executed by:
  • tst_QItemDelegate
  • tst_QTime
30
1654 }
never executed: end of block
0
1655#endif-
1656-
1657 QString format_str = timeFormat(format);-
1658 return toString(time, format_str);
executed 34 times by 2 tests: return toString(time, format_str);
Executed by:
  • tst_QItemDelegate
  • tst_QTime
34
1659}-
1660-
1661/*!-
1662 \since 4.1-
1663-
1664 Returns the date format used for the current locale.-
1665-
1666 If \a format is LongFormat the format will be a long version.-
1667 Otherwise it uses a shorter version.-
1668-
1669 \sa QDate::toString(), QDate::fromString()-
1670*/-
1671-
1672QString QLocale::dateFormat(FormatType format) const-
1673{-
1674#ifndef QT_NO_SYSTEMLOCALE-
1675 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 11 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEevaluated 3092 times by 13 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
11-3092
1676 QVariant res = systemLocale()->query(format == LongFormat-
1677 ? QSystemLocale::DateFormatLong : QSystemLocale::DateFormatShort,-
1678 QVariant());-
1679 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 11 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEnever evaluated
0-11
1680 return res.toString();
executed 11 times by 4 tests: return res.toString();
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
11
1681 }
never executed: end of block
0
1682#endif-
1683-
1684 quint32 idx, size;-
1685 switch (format) {-
1686 case LongFormat:
executed 63 times by 3 tests: case LongFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QItemDelegate
63
1687 idx = d->m_data->m_long_date_format_idx;-
1688 size = d->m_data->m_long_date_format_size;-
1689 break;
executed 63 times by 3 tests: break;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QItemDelegate
63
1690 default:
executed 3029 times by 13 tests: default:
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
3029
1691 idx = d->m_data->m_short_date_format_idx;-
1692 size = d->m_data->m_short_date_format_size;-
1693 break;
executed 3029 times by 13 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
3029
1694 }-
1695 return getLocaleData(date_format_data + idx, size);
executed 3092 times by 13 tests: return getLocaleData(date_format_data + idx, size);
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
3092
1696}-
1697-
1698/*!-
1699 \since 4.1-
1700-
1701 Returns the time format used for the current locale.-
1702-
1703 If \a format is LongFormat the format will be a long version.-
1704 Otherwise it uses a shorter version.-
1705-
1706 \sa QTime::toString(), QTime::fromString()-
1707*/-
1708-
1709QString QLocale::timeFormat(FormatType format) const-
1710{-
1711#ifndef QT_NO_SYSTEMLOCALE-
1712 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 11 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEevaluated 2998 times by 13 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
11-2998
1713 QVariant res = systemLocale()->query(format == LongFormat-
1714 ? QSystemLocale::TimeFormatLong : QSystemLocale::TimeFormatShort,-
1715 QVariant());-
1716 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 11 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEnever evaluated
0-11
1717 return res.toString();
executed 11 times by 4 tests: return res.toString();
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
11
1718 }
never executed: end of block
0
1719#endif-
1720-
1721 quint32 idx, size;-
1722 switch (format) {-
1723 case LongFormat:
executed 15 times by 3 tests: case LongFormat:
Executed by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QTime
15
1724 idx = d->m_data->m_long_time_format_idx;-
1725 size = d->m_data->m_long_time_format_size;-
1726 break;
executed 15 times by 3 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QTime
15
1727 default:
executed 2983 times by 13 tests: default:
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
2983
1728 idx = d->m_data->m_short_time_format_idx;-
1729 size = d->m_data->m_short_time_format_size;-
1730 break;
executed 2983 times by 13 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
2983
1731 }-
1732 return getLocaleData(time_format_data + idx, size);
executed 2998 times by 13 tests: return getLocaleData(time_format_data + idx, size);
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
2998
1733}-
1734-
1735/*!-
1736 \since 4.4-
1737-
1738 Returns the date time format used for the current locale.-
1739-
1740 If \a format is ShortFormat the format will be a short version.-
1741 Otherwise it uses a longer version.-
1742-
1743 \sa QDateTime::toString(), QDateTime::fromString()-
1744*/-
1745-
1746QString QLocale::dateTimeFormat(FormatType format) const-
1747{-
1748#ifndef QT_NO_SYSTEMLOCALE-
1749 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 14 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEevaluated 2848 times by 12 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
14-2848
1750 QVariant res = systemLocale()->query(format == LongFormat-
1751 ? QSystemLocale::DateTimeFormatLong-
1752 : QSystemLocale::DateTimeFormatShort,-
1753 QVariant());-
1754 if (!res.isNull()) {
!res.isNull()Description
TRUEevaluated 14 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEnever evaluated
0-14
1755 return res.toString();
executed 14 times by 5 tests: return res.toString();
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
14
1756 }-
1757 }
never executed: end of block
0
1758#endif-
1759 return dateFormat(format) + QLatin1Char(' ') + timeFormat(format);
executed 2848 times by 12 tests: return dateFormat(format) + QLatin1Char(' ') + timeFormat(format);
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
2848
1760}-
1761-
1762/*!-
1763 \since 4.4-
1764-
1765 Parses the time string given in \a string and returns the-
1766 time. The format of the time string is chosen according to the-
1767 \a format parameter (see timeFormat()).-
1768-
1769 If the time could not be parsed, returns an invalid time.-
1770-
1771 \sa timeFormat(), toDate(), toDateTime(), QTime::fromString()-
1772*/-
1773#ifndef QT_NO_DATESTRING-
1774QTime QLocale::toTime(const QString &string, FormatType format) const-
1775{-
1776 return toTime(string, timeFormat(format));
never executed: return toTime(string, timeFormat(format));
0
1777}-
1778#endif-
1779-
1780/*!-
1781 \since 4.4-
1782-
1783 Parses the date string given in \a string and returns the-
1784 date. The format of the date string is chosen according to the-
1785 \a format parameter (see dateFormat()).-
1786-
1787 If the date could not be parsed, returns an invalid date.-
1788-
1789 \sa dateFormat(), toTime(), toDateTime(), QDate::fromString()-
1790*/-
1791#ifndef QT_NO_DATESTRING-
1792QDate QLocale::toDate(const QString &string, FormatType format) const-
1793{-
1794 return toDate(string, dateFormat(format));
never executed: return toDate(string, dateFormat(format));
0
1795}-
1796#endif-
1797-
1798/*!-
1799 \since 4.4-
1800-
1801 Parses the date/time string given in \a string and returns the-
1802 time. The format of the date/time string is chosen according to the-
1803 \a format parameter (see dateTimeFormat()).-
1804-
1805 If the string could not be parsed, returns an invalid QDateTime.-
1806-
1807 \sa dateTimeFormat(), toTime(), toDate(), QDateTime::fromString()-
1808*/-
1809-
1810#ifndef QT_NO_DATESTRING-
1811QDateTime QLocale::toDateTime(const QString &string, FormatType format) const-
1812{-
1813 return toDateTime(string, dateTimeFormat(format));
executed 6 times by 1 test: return toDateTime(string, dateTimeFormat(format));
Executed by:
  • tst_QDateTime
6
1814}-
1815#endif-
1816-
1817/*!-
1818 \since 4.4-
1819-
1820 Parses the time string given in \a string and returns the-
1821 time. See QTime::fromString() for information on what is a valid-
1822 format string.-
1823-
1824 If the time could not be parsed, returns an invalid time.-
1825-
1826 \sa timeFormat(), toDate(), toDateTime(), QTime::fromString()-
1827*/-
1828#ifndef QT_NO_DATESTRING-
1829QTime QLocale::toTime(const QString &string, const QString &format) const-
1830{-
1831 QTime time;-
1832#ifndef QT_BOOTSTRAPPED-
1833 QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString);-
1834 dt.setDefaultLocale(*this);-
1835 if (dt.parseFormat(format))
dt.parseFormat(format)Description
TRUEnever evaluated
FALSEnever evaluated
0
1836 dt.fromString(string, 0, &time);
never executed: dt.fromString(string, 0, &time);
0
1837#else-
1838 Q_UNUSED(string);-
1839 Q_UNUSED(format);-
1840#endif-
1841 return time;
never executed: return time;
0
1842}-
1843#endif-
1844-
1845/*!-
1846 \since 4.4-
1847-
1848 Parses the date string given in \a string and returns the-
1849 date. See QDate::fromString() for information on the expressions-
1850 that can be used with this function.-
1851-
1852 This function searches month names and the names of the days of-
1853 the week in the current locale.-
1854-
1855 If the date could not be parsed, returns an invalid date.-
1856-
1857 \sa dateFormat(), toTime(), toDateTime(), QDate::fromString()-
1858*/-
1859#ifndef QT_NO_DATESTRING-
1860QDate QLocale::toDate(const QString &string, const QString &format) const-
1861{-
1862 QDate date;-
1863#ifndef QT_BOOTSTRAPPED-
1864 QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString);-
1865 dt.setDefaultLocale(*this);-
1866 if (dt.parseFormat(format))
dt.parseFormat(format)Description
TRUEnever evaluated
FALSEnever evaluated
0
1867 dt.fromString(string, &date, 0);
never executed: dt.fromString(string, &date, 0);
0
1868#else-
1869 Q_UNUSED(string);-
1870 Q_UNUSED(format);-
1871#endif-
1872 return date;
never executed: return date;
0
1873}-
1874#endif-
1875-
1876/*!-
1877 \since 4.4-
1878-
1879 Parses the date/time string given in \a string and returns the-
1880 time. See QDateTime::fromString() for information on the expressions-
1881 that can be used with this function.-
1882-
1883 \note The month and day names used must be given in the user's local-
1884 language.-
1885-
1886 If the string could not be parsed, returns an invalid QDateTime.-
1887-
1888 \sa dateTimeFormat(), toTime(), toDate(), QDateTime::fromString()-
1889*/-
1890#ifndef QT_NO_DATESTRING-
1891QDateTime QLocale::toDateTime(const QString &string, const QString &format) const-
1892{-
1893#ifndef QT_BOOTSTRAPPED-
1894 QTime time;-
1895 QDate date;-
1896-
1897 QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString);-
1898 dt.setDefaultLocale(*this);-
1899 if (dt.parseFormat(format) && dt.fromString(string, &date, &time))
dt.parseFormat(format)Description
TRUEevaluated 503 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QFtp
  • tst_QNetworkRequest
FALSEnever evaluated
dt.fromString(... &date, &time)Description
TRUEevaluated 377 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QFtp
  • tst_QNetworkRequest
FALSEevaluated 126 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QFtp
0-503
1900 return QDateTime(date, time);
executed 377 times by 3 tests: return QDateTime(date, time);
Executed by:
  • tst_QDateTime
  • tst_QFtp
  • tst_QNetworkRequest
377
1901#else-
1902 Q_UNUSED(string);-
1903 Q_UNUSED(format);-
1904#endif-
1905 return QDateTime(QDate(), QTime(-1, -1, -1));
executed 126 times by 2 tests: return QDateTime(QDate(), QTime(-1, -1, -1));
Executed by:
  • tst_QDateTime
  • tst_QFtp
126
1906}-
1907#endif-
1908-
1909-
1910/*!-
1911 \since 4.1-
1912-
1913 Returns the decimal point character of this locale.-
1914*/-
1915QChar QLocale::decimalPoint() const-
1916{-
1917 return d->decimal();
executed 3097 times by 19 tests: return d->decimal();
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
  • 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
3097
1918}-
1919-
1920/*!-
1921 \since 4.1-
1922-
1923 Returns the group separator character of this locale.-
1924*/-
1925QChar QLocale::groupSeparator() const-
1926{-
1927 return d->group();
executed 7034 times by 23 tests: return d->group();
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_languageChange
  • 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
7034
1928}-
1929-
1930/*!-
1931 \since 4.1-
1932-
1933 Returns the percent character of this locale.-
1934*/-
1935QChar QLocale::percent() const-
1936{-
1937 return d->percent();
executed 44 times by 6 tests: return d->percent();
Executed by:
  • tst_QAccessibility
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QStyle
  • tst_QStyleSheetStyle
44
1938}-
1939-
1940/*!-
1941 \since 4.1-
1942-
1943 Returns the zero digit character of this locale.-
1944*/-
1945QChar QLocale::zeroDigit() const-
1946{-
1947 return d->zero();
executed 1015 times by 12 tests: return d->zero();
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
1948}-
1949-
1950/*!-
1951 \since 4.1-
1952-
1953 Returns the negative sign character of this locale.-
1954*/-
1955QChar QLocale::negativeSign() const-
1956{-
1957 return d->minus();
executed 58073 times by 15 tests: return d->minus();
Executed by:
  • tst_QSplitter
  • tst_QString
  • tst_QTextStream
  • 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
58073
1958}-
1959-
1960/*!-
1961 \since 4.5-
1962-
1963 Returns the positive sign character of this locale.-
1964*/-
1965QChar QLocale::positiveSign() const-
1966{-
1967 return d->plus();
executed 36690 times by 15 tests: return d->plus();
Executed by:
  • tst_QSplitter
  • tst_QString
  • tst_QTextStream
  • 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
36690
1968}-
1969-
1970/*!-
1971 \since 4.1-
1972-
1973 Returns the exponential character of this locale.-
1974*/-
1975QChar QLocale::exponential() const-
1976{-
1977 return d->exponential();
executed 81 times by 1 test: return d->exponential();
Executed by:
  • tst_QTextStream
81
1978}-
1979-
1980static bool qIsUpper(char c)-
1981{-
1982 return c >= 'A' && c <= 'Z';
executed 1272 times by 10 tests: return c >= 'A' && c <= 'Z';
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
1272
1983}-
1984-
1985static char qToLower(char c)-
1986{-
1987 if (c >= 'A' && c <= 'Z')
c >= 'A'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
c <= 'Z'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
1988 return c - 'A' + 'a';
never executed: return c - 'A' + 'a';
0
1989 else-
1990 return c;
executed 1272 times by 10 tests: return c;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QPrinter
  • tst_QSpinBox
1272
1991}-
1992-
1993/*!-
1994 \overload-
1995-
1996 \a f and \a prec have the same meaning as in QString::number(double, char, int).-
1997-
1998 \sa toDouble()-
1999*/-
2000-
2001QString QLocale::toString(double i, char f, int prec) const-
2002{-
2003 QLocaleData::DoubleForm form = QLocaleData::DFDecimal;-
2004 uint flags = 0;-
2005-
2006 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
2007 flags = QLocaleData::CapitalEorX;
never executed: flags = QLocaleData::CapitalEorX;
0
2008 f = qToLower(f);-
2009-
2010 switch (f) {-
2011 case '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
2012 form = QLocaleData::DFDecimal;-
2013 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
2014 case 'e':
never executed: case 'e':
0
2015 form = QLocaleData::DFExponent;-
2016 break;
never executed: break;
0
2017 case 'g':
executed 75 times by 3 tests: case 'g':
Executed by:
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
75
2018 form = QLocaleData::DFSignificantDigits;-
2019 break;
executed 75 times by 3 tests: break;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
75
2020 default:
never executed: default:
0
2021 break;
never executed: break;
0
2022 }-
2023-
2024 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
2025 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
2026 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
2027 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
1272
2028 return 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
2029}-
2030-
2031/*!-
2032 \fn QLocale QLocale::c()-
2033-
2034 Returns a QLocale object initialized to the "C" locale.-
2035-
2036 \sa system()-
2037*/-
2038-
2039/*!-
2040 Returns a QLocale object initialized to the system locale.-
2041-
2042 On Windows and Mac, this locale will use the decimal/grouping characters and date/time-
2043 formats specified in the system configuration panel.-
2044-
2045 \sa c()-
2046*/-
2047-
2048QLocale QLocale::system()-
2049{-
2050 return QLocale(*QLocalePrivate::create(systemData()));
executed 37515 times by 68 tests: return QLocale(*QLocalePrivate::create(systemData()));
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
37515
2051}-
2052-
2053-
2054/*!-
2055 \since 4.8-
2056-
2057 Returns a list of valid locale objects that match the given \a language, \a-
2058 script and \a country.-
2059-
2060 Getting a list of all locales:-
2061 QList<QLocale> allLocales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry);-
2062-
2063 Getting a list of locales suitable for Russia:-
2064 QList<QLocale> locales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::Russia);-
2065*/-
2066QList<QLocale> QLocale::matchingLocales(QLocale::Language language,-
2067 QLocale::Script script,-
2068 QLocale::Country country)-
2069{-
2070 if (uint(language) > QLocale::LastLanguage || uint(script) > QLocale::LastScript ||
uint(language)...::LastLanguageDescription
TRUEnever evaluated
FALSEnever evaluated
uint(script) >...le::LastScriptDescription
TRUEnever evaluated
FALSEnever evaluated
0
2071 uint(country) > QLocale::LastCountry)
uint(country) ...e::LastCountryDescription
TRUEnever evaluated
FALSEnever evaluated
0
2072 return QList<QLocale>();
never executed: return QList<QLocale>();
0
2073-
2074 if (language == QLocale::C)
language == QLocale::CDescription
TRUEnever evaluated
FALSEnever evaluated
0
2075 return QList<QLocale>() << QLocale(QLocale::C);
never executed: return QList<QLocale>() << QLocale(QLocale::C);
0
2076-
2077 QList<QLocale> result;-
2078 if (language == QLocale::AnyLanguage && script == QLocale::AnyScript && country == QLocale::AnyCountry)
language == QL...e::AnyLanguageDescription
TRUEnever evaluated
FALSEnever evaluated
script == QLocale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
country == QLocale::AnyCountryDescription
TRUEnever evaluated
FALSEnever evaluated
0
2079 result.reserve(locale_data_size);
never executed: result.reserve(locale_data_size);
0
2080 const QLocaleData *data = locale_data + locale_index[language];-
2081 while ( (data != locale_data + locale_data_size)
(data != local...ale_data_size)Description
TRUEnever evaluated
FALSEnever evaluated
0
2082 && (language == QLocale::AnyLanguage || data->m_language_id == uint(language))) {
language == QL...e::AnyLanguageDescription
TRUEnever evaluated
FALSEnever evaluated
data->m_langua...uint(language)Description
TRUEnever evaluated
FALSEnever evaluated
0
2083 if ((script == QLocale::AnyScript || data->m_script_id == uint(script))
script == QLocale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
data->m_script...= uint(script)Description
TRUEnever evaluated
FALSEnever evaluated
0
2084 && (country == QLocale::AnyCountry || data->m_country_id == uint(country))) {
country == QLocale::AnyCountryDescription
TRUEnever evaluated
FALSEnever evaluated
data->m_countr... uint(country)Description
TRUEnever evaluated
FALSEnever evaluated
0
2085 QLocale locale(*QLocalePrivate::create(data));-
2086 result.append(locale);-
2087 }
never executed: end of block
0
2088 ++data;-
2089 }
never executed: end of block
0
2090 return result;
never executed: return result;
0
2091}-
2092-
2093/*!-
2094 \obsolete-
2095 \since 4.3-
2096-
2097 Returns the list of countries that have entries for \a language in Qt's locale-
2098 database. If the result is an empty list, then \a language is not represented in-
2099 Qt's locale database.-
2100-
2101 \sa matchingLocales()-
2102*/-
2103QList<QLocale::Country> QLocale::countriesForLanguage(Language language)-
2104{-
2105 QList<Country> result;-
2106 if (language == C) {
language == CDescription
TRUEnever evaluated
FALSEnever evaluated
0
2107 result << AnyCountry;-
2108 return result;
never executed: return result;
0
2109 }-
2110-
2111 unsigned language_id = language;-
2112 const QLocaleData *data = locale_data + locale_index[language_id];-
2113 while (data->m_language_id == language_id) {
data->m_langua...== language_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
2114 const QLocale::Country country = static_cast<Country>(data->m_country_id);-
2115 if (!result.contains(country))
!result.contains(country)Description
TRUEnever evaluated
FALSEnever evaluated
0
2116 result.append(country);
never executed: result.append(country);
0
2117 ++data;-
2118 }
never executed: end of block
0
2119-
2120 return result;
never executed: return result;
0
2121}-
2122-
2123/*!-
2124 \since 4.2-
2125-
2126 Returns the localized name of \a month, in the format specified-
2127 by \a type.-
2128-
2129 \sa dayName(), standaloneMonthName()-
2130*/-
2131QString QLocale::monthName(int month, FormatType type) const-
2132{-
2133 if (month < 1 || month > 12)
month < 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 37968 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
month > 12Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 37967 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
1-37968
2134 return QString();
executed 2 times by 1 test: return QString();
Executed by:
  • tst_QDate
2
2135-
2136#ifndef QT_NO_SYSTEMLOCALE-
2137 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 11862 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_qmakelib
FALSEevaluated 26105 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
11862-26105
2138 QVariant res = systemLocale()->query(type == LongFormat-
2139 ? QSystemLocale::MonthNameLong : QSystemLocale::MonthNameShort,-
2140 month);-
2141 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 11862 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_qmakelib
FALSEnever evaluated
0-11862
2142 return res.toString();
executed 11862 times by 5 tests: return res.toString();
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_qmakelib
11862
2143 }
never executed: end of block
0
2144#endif-
2145-
2146 quint32 idx, size;-
2147 switch (type) {-
2148 case QLocale::LongFormat:
executed 4115 times by 4 tests: case QLocale::LongFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
4115
2149 idx = d->m_data->m_long_month_names_idx;-
2150 size = d->m_data->m_long_month_names_size;-
2151 break;
executed 4115 times by 4 tests: break;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
4115
2152 case QLocale::ShortFormat:
executed 21990 times by 11 tests: case QLocale::ShortFormat:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
21990
2153 idx = d->m_data->m_short_month_names_idx;-
2154 size = d->m_data->m_short_month_names_size;-
2155 break;
executed 21990 times by 11 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
21990
2156 case QLocale::NarrowFormat:
never executed: case QLocale::NarrowFormat:
0
2157 idx = d->m_data->m_narrow_month_names_idx;-
2158 size = d->m_data->m_narrow_month_names_size;-
2159 break;
never executed: break;
0
2160 default:
never executed: default:
0
2161 return QString();
never executed: return QString();
0
2162 }-
2163 return getLocaleListData(months_data + idx, size, month - 1);
executed 26105 times by 12 tests: return getLocaleListData(months_data + idx, size, month - 1);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
26105
2164}-
2165-
2166/*!-
2167 \since 4.5-
2168-
2169 Returns the localized name of \a month that is used as a-
2170 standalone text, in the format specified by \a type.-
2171-
2172 If the locale information doesn't specify the standalone month-
2173 name then return value is the same as in monthName().-
2174-
2175 \sa monthName(), standaloneDayName()-
2176*/-
2177QString QLocale::standaloneMonthName(int month, FormatType type) const-
2178{-
2179 if (month < 1 || month > 12)
month < 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 1773 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
month > 12Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 1772 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
1-1773
2180 return QString();
executed 2 times by 1 test: return QString();
Executed by:
  • tst_QDate
2
2181-
2182#ifndef QT_NO_SYSTEMLOCALE-
2183 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 537 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
FALSEevaluated 1235 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
537-1235
2184 QVariant res = systemLocale()->query(type == LongFormat-
2185 ? QSystemLocale::StandaloneMonthNameLong : QSystemLocale::StandaloneMonthNameShort,-
2186 month);-
2187 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 537 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
FALSEnever evaluated
0-537
2188 return res.toString();
executed 537 times by 3 tests: return res.toString();
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
537
2189 }
never executed: end of block
0
2190#endif-
2191-
2192 quint32 idx, size;-
2193 switch (type) {-
2194 case QLocale::LongFormat:
executed 1211 times by 4 tests: case QLocale::LongFormat:
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
1211
2195 idx = d->m_data->m_standalone_long_month_names_idx;-
2196 size = d->m_data->m_standalone_long_month_names_size;-
2197 break;
executed 1211 times by 4 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
1211
2198 case QLocale::ShortFormat:
executed 24 times by 1 test: case QLocale::ShortFormat:
Executed by:
  • tst_QDate
24
2199 idx = d->m_data->m_standalone_short_month_names_idx;-
2200 size = d->m_data->m_standalone_short_month_names_size;-
2201 break;
executed 24 times by 1 test: break;
Executed by:
  • tst_QDate
24
2202 case QLocale::NarrowFormat:
never executed: case QLocale::NarrowFormat:
0
2203 idx = d->m_data->m_standalone_narrow_month_names_idx;-
2204 size = d->m_data->m_standalone_narrow_month_names_size;-
2205 break;
never executed: break;
0
2206 default:
never executed: default:
0
2207 return QString();
never executed: return QString();
0
2208 }-
2209 QString name = getLocaleListData(months_data + idx, size, month - 1);-
2210 if (name.isEmpty())
name.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 1235 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
0-1235
2211 return monthName(month, type);
never executed: return monthName(month, type);
0
2212 return name;
executed 1235 times by 4 tests: return name;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
1235
2213}-
2214-
2215/*!-
2216 \since 4.2-
2217-
2218 Returns the localized name of the \a day (where 1 represents-
2219 Monday, 2 represents Tuesday and so on), in the format specified-
2220 by \a type.-
2221-
2222 \sa monthName(), standaloneDayName()-
2223*/-
2224QString QLocale::dayName(int day, FormatType type) const-
2225{-
2226 if (day < 1 || day > 7)
day < 1Description
TRUEnever evaluated
FALSEevaluated 8406 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
day > 7Description
TRUEnever evaluated
FALSEevaluated 8406 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
0-8406
2227 return QString();
never executed: return QString();
0
2228-
2229#ifndef QT_NO_SYSTEMLOCALE-
2230 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 1159 times by 6 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
FALSEevaluated 7247 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
1159-7247
2231 QVariant res = systemLocale()->query(type == LongFormat-
2232 ? QSystemLocale::DayNameLong : QSystemLocale::DayNameShort,-
2233 day);-
2234 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 1159 times by 6 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
FALSEnever evaluated
0-1159
2235 return res.toString();
executed 1159 times by 6 tests: return res.toString();
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
1159
2236 }
never executed: end of block
0
2237#endif-
2238 if (day == 7)
day == 7Description
TRUEevaluated 840 times by 6 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
FALSEevaluated 6407 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
840-6407
2239 day = 0;
executed 840 times by 6 tests: day = 0;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
840
2240-
2241 quint32 idx, size;-
2242 switch (type) {-
2243 case QLocale::LongFormat:
executed 5180 times by 4 tests: case QLocale::LongFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
5180
2244 idx = d->m_data->m_long_day_names_idx;-
2245 size = d->m_data->m_long_day_names_size;-
2246 break;
executed 5180 times by 4 tests: break;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
5180
2247 case QLocale::ShortFormat:
executed 2067 times by 11 tests: case QLocale::ShortFormat:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
2067
2248 idx = d->m_data->m_short_day_names_idx;-
2249 size = d->m_data->m_short_day_names_size;-
2250 break;
executed 2067 times by 11 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
2067
2251 case QLocale::NarrowFormat:
never executed: case QLocale::NarrowFormat:
0
2252 idx = d->m_data->m_narrow_day_names_idx;-
2253 size = d->m_data->m_narrow_day_names_size;-
2254 break;
never executed: break;
0
2255 default:
never executed: default:
0
2256 return QString();
never executed: return QString();
0
2257 }-
2258 return getLocaleListData(days_data + idx, size, day);
executed 7247 times by 12 tests: return getLocaleListData(days_data + idx, size, day);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
7247
2259}-
2260-
2261/*!-
2262 \since 4.5-
2263-
2264 Returns the localized name of the \a day (where 1 represents-
2265 Monday, 2 represents Tuesday and so on) that is used as a-
2266 standalone text, in the format specified by \a type.-
2267-
2268 If the locale information does not specify the standalone day-
2269 name then return value is the same as in dayName().-
2270-
2271 \sa dayName(), standaloneMonthName()-
2272*/-
2273QString QLocale::standaloneDayName(int day, FormatType type) const-
2274{-
2275 if (day < 1 || day > 7)
day < 1Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDate
day > 7Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDate
0-28
2276 return QString();
never executed: return QString();
0
2277-
2278#ifndef QT_NO_SYSTEMLOCALE-
2279 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDate
FALSEnever evaluated
0-28
2280 QVariant res = systemLocale()->query(type == LongFormat-
2281 ? QSystemLocale::DayNameLong : QSystemLocale::DayNameShort,-
2282 day);-
2283 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_QDate
FALSEnever evaluated
0-28
2284 return res.toString();
executed 28 times by 1 test: return res.toString();
Executed by:
  • tst_QDate
28
2285 }
never executed: end of block
0
2286#endif-
2287 if (day == 7)
day == 7Description
TRUEnever evaluated
FALSEnever evaluated
0
2288 day = 0;
never executed: day = 0;
0
2289-
2290 quint32 idx, size;-
2291 switch (type) {-
2292 case QLocale::LongFormat:
never executed: case QLocale::LongFormat:
0
2293 idx = d->m_data->m_standalone_long_day_names_idx;-
2294 size = d->m_data->m_standalone_long_day_names_size;-
2295 break;
never executed: break;
0
2296 case QLocale::ShortFormat:
never executed: case QLocale::ShortFormat:
0
2297 idx = d->m_data->m_standalone_short_day_names_idx;-
2298 size = d->m_data->m_standalone_short_day_names_size;-
2299 break;
never executed: break;
0
2300 case QLocale::NarrowFormat:
never executed: case QLocale::NarrowFormat:
0
2301 idx = d->m_data->m_standalone_narrow_day_names_idx;-
2302 size = d->m_data->m_standalone_narrow_day_names_size;-
2303 break;
never executed: break;
0
2304 default:
never executed: default:
0
2305 return QString();
never executed: return QString();
0
2306 }-
2307 QString name = getLocaleListData(days_data + idx, size, day);-
2308 if (name.isEmpty())
name.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
2309 return dayName(day == 0 ? 7 : day, type);
never executed: return dayName(day == 0 ? 7 : day, type);
0
2310 return name;
never executed: return name;
0
2311}-
2312-
2313/*!-
2314 \since 4.8-
2315-
2316 Returns the first day of the week according to the current locale.-
2317*/-
2318Qt::DayOfWeek QLocale::firstDayOfWeek() const-
2319{-
2320#ifndef QT_NO_SYSTEMLOCALE-
2321 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
FALSEevaluated 37 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
22-37
2322 QVariant res = systemLocale()->query(QSystemLocale::FirstDayOfWeek, QVariant());-
2323 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
FALSEnever evaluated
0-22
2324 return static_cast<Qt::DayOfWeek>(res.toUInt());
executed 22 times by 2 tests: return static_cast<Qt::DayOfWeek>(res.toUInt());
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
22
2325 }
never executed: end of block
0
2326#endif-
2327 return static_cast<Qt::DayOfWeek>(d->m_data->m_first_day_of_week);
executed 37 times by 3 tests: return static_cast<Qt::DayOfWeek>(d->m_data->m_first_day_of_week);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
37
2328}-
2329-
2330QLocale::MeasurementSystem QLocalePrivate::measurementSystem() const-
2331{-
2332 for (int i = 0; i < ImperialMeasurementSystemsCount; ++i) {
i < ImperialMe...ntSystemsCountDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
FALSEnever evaluated
0-2
2333 if (ImperialMeasurementSystems[i].languageId == m_data->m_language_id
ImperialMeasur...>m_language_idDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
FALSEnever evaluated
0-2
2334 && ImperialMeasurementSystems[i].countryId == m_data->m_country_id) {
ImperialMeasur...->m_country_idDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
FALSEnever evaluated
0-2
2335 return ImperialMeasurementSystems[i].system;
executed 2 times by 1 test: return ImperialMeasurementSystems[i].system;
Executed by:
  • tst_QPrinter
2
2336 }-
2337 }
never executed: end of block
0
2338 return QLocale::MetricSystem;
never executed: return QLocale::MetricSystem;
0
2339}-
2340-
2341/*!-
2342 \since 4.8-
2343-
2344 Returns a list of days that are considered weekdays according to the current locale.-
2345*/-
2346QList<Qt::DayOfWeek> QLocale::weekdays() const-
2347{-
2348#ifndef QT_NO_SYSTEMLOCALE-
2349 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
2350 QVariant res = systemLocale()->query(QSystemLocale::Weekdays, QVariant());-
2351 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
2352 return static_cast<QList<Qt::DayOfWeek> >(res.value<QList<Qt::DayOfWeek> >());
never executed: return static_cast<QList<Qt::DayOfWeek> >(res.value<QList<Qt::DayOfWeek> >());
0
2353 }
never executed: end of block
0
2354#endif-
2355 QList<Qt::DayOfWeek> weekdays;-
2356 quint16 weekendStart = d->m_data->m_weekend_start;-
2357 quint16 weekendEnd = d->m_data->m_weekend_end;-
2358 for (int day = Qt::Monday; day <= Qt::Sunday; day++) {
day <= Qt::SundayDescription
TRUEnever evaluated
FALSEnever evaluated
0
2359 if ((weekendEnd >= weekendStart && (day < weekendStart || day > weekendEnd)) ||
weekendEnd >= weekendStartDescription
TRUEnever evaluated
FALSEnever evaluated
day < weekendStartDescription
TRUEnever evaluated
FALSEnever evaluated
day > weekendEndDescription
TRUEnever evaluated
FALSEnever evaluated
0
2360 (weekendEnd < weekendStart && (day > weekendEnd && day < weekendStart)))
weekendEnd < weekendStartDescription
TRUEnever evaluated
FALSEnever evaluated
day > weekendEndDescription
TRUEnever evaluated
FALSEnever evaluated
day < weekendStartDescription
TRUEnever evaluated
FALSEnever evaluated
0
2361 weekdays << static_cast<Qt::DayOfWeek>(day);
never executed: weekdays << static_cast<Qt::DayOfWeek>(day);
0
2362 }
never executed: end of block
0
2363 return weekdays;
never executed: return weekdays;
0
2364}-
2365-
2366/*!-
2367 \since 4.4-
2368-
2369 Returns the measurement system for the locale.-
2370*/-
2371QLocale::MeasurementSystem QLocale::measurementSystem() const-
2372{-
2373#ifndef QT_NO_SYSTEMLOCALE-
2374 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
2
2375 QVariant res = systemLocale()->query(QSystemLocale::MeasurementSystem, QVariant());-
2376 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
FALSEnever evaluated
0-2
2377 return MeasurementSystem(res.toInt());
executed 2 times by 1 test: return MeasurementSystem(res.toInt());
Executed by:
  • tst_QPrinter
2
2378 }
never executed: end of block
0
2379#endif-
2380-
2381 return d->measurementSystem();
executed 2 times by 1 test: return d->measurementSystem();
Executed by:
  • tst_QPrinter
2
2382}-
2383-
2384/*!-
2385 \since 4.7-
2386-
2387 Returns the text direction of the language.-
2388*/-
2389Qt::LayoutDirection QLocale::textDirection() const-
2390{-
2391 switch (script()) {-
2392 case QLocale::AdlamScript:
never executed: case QLocale::AdlamScript:
0
2393 case QLocale::ArabicScript:
never executed: case QLocale::ArabicScript:
0
2394 case QLocale::AvestanScript:
never executed: case QLocale::AvestanScript:
0
2395 case QLocale::CypriotScript:
never executed: case QLocale::CypriotScript:
0
2396 case QLocale::HatranScript:
never executed: case QLocale::HatranScript:
0
2397 case QLocale::HebrewScript:
never executed: case QLocale::HebrewScript:
0
2398 case QLocale::ImperialAramaicScript:
never executed: case QLocale::ImperialAramaicScript:
0
2399 case QLocale::InscriptionalPahlaviScript:
never executed: case QLocale::InscriptionalPahlaviScript:
0
2400 case QLocale::InscriptionalParthianScript:
never executed: case QLocale::InscriptionalParthianScript:
0
2401 case QLocale::KharoshthiScript:
never executed: case QLocale::KharoshthiScript:
0
2402 case QLocale::LydianScript:
never executed: case QLocale::LydianScript:
0
2403 case QLocale::MandaeanScript:
never executed: case QLocale::MandaeanScript:
0
2404 case QLocale::ManichaeanScript:
never executed: case QLocale::ManichaeanScript:
0
2405 case QLocale::MendeKikakuiScript:
never executed: case QLocale::MendeKikakuiScript:
0
2406 case QLocale::MeroiticCursiveScript:
never executed: case QLocale::MeroiticCursiveScript:
0
2407 case QLocale::MeroiticScript:
never executed: case QLocale::MeroiticScript:
0
2408 case QLocale::NabataeanScript:
never executed: case QLocale::NabataeanScript:
0
2409 case QLocale::NkoScript:
never executed: case QLocale::NkoScript:
0
2410 case QLocale::OldHungarianScript:
never executed: case QLocale::OldHungarianScript:
0
2411 case QLocale::OldNorthArabianScript:
never executed: case QLocale::OldNorthArabianScript:
0
2412 case QLocale::OldSouthArabianScript:
never executed: case QLocale::OldSouthArabianScript:
0
2413 case QLocale::OrkhonScript:
never executed: case QLocale::OrkhonScript:
0
2414 case QLocale::PalmyreneScript:
never executed: case QLocale::PalmyreneScript:
0
2415 case QLocale::PhoenicianScript:
never executed: case QLocale::PhoenicianScript:
0
2416 case QLocale::PsalterPahlaviScript:
never executed: case QLocale::PsalterPahlaviScript:
0
2417 case QLocale::SamaritanScript:
never executed: case QLocale::SamaritanScript:
0
2418 case QLocale::SyriacScript:
never executed: case QLocale::SyriacScript:
0
2419 case QLocale::ThaanaScript:
never executed: case QLocale::ThaanaScript:
0
2420 return Qt::RightToLeft;
never executed: return Qt::RightToLeft;
0
2421 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
  • ...
34
2422 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
2423 }-
2424 return 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
2425}-
2426-
2427/*!-
2428 \since 4.8-
2429-
2430 Returns an uppercase copy of \a str.-
2431-
2432 If Qt Core is using the ICU libraries, they will be used to perform-
2433 the transformation according to the rules of the current locale.-
2434 Otherwise the conversion may be done in a platform-dependent manner,-
2435 with QString::toUpper() as a generic fallback.-
2436-
2437 \sa QString::toUpper()-
2438*/-
2439QString QLocale::toUpper(const QString &str) const-
2440{-
2441#ifdef QT_USE_ICU-
2442 bool ok = true;-
2443 QString result = QIcu::toUpper(d->bcp47Name('_'), str, &ok);-
2444 if (ok)
okDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QString
FALSEnever evaluated
0-3
2445 return result;
executed 3 times by 1 test: return result;
Executed by:
  • tst_QString
3
2446 // else fall through and use Qt's toUpper-
2447#endif-
2448 return str.toUpper();
never executed: return str.toUpper();
0
2449}-
2450-
2451/*!-
2452 \since 4.8-
2453-
2454 Returns a lowercase copy of \a str.-
2455-
2456 If Qt Core is using the ICU libraries, they will be used to perform-
2457 the transformation according to the rules of the current locale.-
2458 Otherwise the conversion may be done in a platform-dependent manner,-
2459 with QString::toLower() as a generic fallback.-
2460-
2461 \sa QString::toLower()-
2462*/-
2463QString QLocale::toLower(const QString &str) const-
2464{-
2465#ifdef QT_USE_ICU-
2466 bool ok = true;-
2467 const QString result = QIcu::toLower(d->bcp47Name('_'), str, &ok);-
2468 if (ok)
okDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QString
FALSEnever evaluated
0-5
2469 return result;
executed 5 times by 1 test: return result;
Executed by:
  • tst_QString
5
2470 // else fall through and use Qt's toUpper-
2471#endif-
2472 return str.toLower();
never executed: return str.toLower();
0
2473}-
2474-
2475-
2476/*!-
2477 \since 4.5-
2478-
2479 Returns the localized name of the "AM" suffix for times specified using-
2480 the conventions of the 12-hour clock.-
2481-
2482 \sa pmText()-
2483*/-
2484QString QLocale::amText() const-
2485{-
2486#ifndef QT_NO_SYSTEMLOCALE-
2487 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 744 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QTime
FALSEevaluated 2491 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
744-2491
2488 QVariant res = systemLocale()->query(QSystemLocale::AMText, QVariant());-
2489 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 744 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QTime
FALSEnever evaluated
0-744
2490 return res.toString();
executed 744 times by 5 tests: return res.toString();
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QTime
744
2491 }
never executed: end of block
0
2492#endif-
2493 return getLocaleData(am_data + d->m_data->m_am_idx, d->m_data->m_am_size);
executed 2491 times by 11 tests: return getLocaleData(am_data + d->m_data->m_am_idx, d->m_data->m_am_size);
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
2491
2494}-
2495-
2496/*!-
2497 \since 4.5-
2498-
2499 Returns the localized name of the "PM" suffix for times specified using-
2500 the conventions of the 12-hour clock.-
2501-
2502 \sa amText()-
2503*/-
2504QString QLocale::pmText() const-
2505{-
2506#ifndef QT_NO_SYSTEMLOCALE-
2507 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 178 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
FALSEevaluated 1197 times by 10 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
178-1197
2508 QVariant res = systemLocale()->query(QSystemLocale::PMText, QVariant());-
2509 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 178 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
FALSEnever evaluated
0-178
2510 return res.toString();
executed 178 times by 4 tests: return res.toString();
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
178
2511 }
never executed: end of block
0
2512#endif-
2513 return getLocaleData(pm_data + d->m_data->m_pm_idx, d->m_data->m_pm_size);
executed 1197 times by 10 tests: return getLocaleData(pm_data + d->m_data->m_pm_idx, d->m_data->m_pm_size);
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
1197
2514}-
2515-
2516-
2517QString QLocalePrivate::dateTimeToString(const QString &format, const QDateTime &datetime,-
2518 const QDate &dateOnly, const QTime &timeOnly,-
2519 const QLocale *q) const-
2520{-
2521 QDate date;-
2522 QTime time;-
2523 bool formatDate = false;-
2524 bool formatTime = false;-
2525 if (datetime.isValid()) {
datetime.isValid()Description
TRUEevaluated 10234 times by 30 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QVariant
  • ...
FALSEevaluated 28923 times by 9 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
10234-28923
2526 date = datetime.date();-
2527 time = datetime.time();-
2528 formatDate = true;-
2529 formatTime = true;-
2530 } else if (dateOnly.isValid()) {
executed 10234 times by 30 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QVariant
  • ...
dateOnly.isValid()Description
TRUEevaluated 14105 times by 8 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QVariant
FALSEevaluated 14818 times by 8 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
10234-14818
2531 date = dateOnly;-
2532 formatDate = true;-
2533 } else if (timeOnly.isValid()) {
executed 14105 times by 8 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QVariant
timeOnly.isValid()Description
TRUEevaluated 14814 times by 7 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QTime
  • tst_QVariant
4-14814
2534 time = timeOnly;-
2535 formatTime = true;-
2536 } else {
executed 14814 times by 7 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
14814
2537 return QString();
executed 4 times by 3 tests: return QString();
Executed by:
  • tst_QDate
  • tst_QTime
  • tst_QVariant
4
2538 }-
2539-
2540 QString result;-
2541-
2542 int i = 0;-
2543 while (i < format.size()) {
i < format.size()Description
TRUEevaluated 279127 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 39153 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
39153-279127
2544 if (format.at(i).unicode() == '\'') {
format.at(i).unicode() == '\''Description
TRUEevaluated 727 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 278400 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
727-278400
2545 result.append(qt_readEscapedFormatString(format, &i));-
2546 continue;
executed 727 times by 6 tests: continue;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
727
2547 }-
2548-
2549 const QChar c = format.at(i);-
2550 int repeat = qt_repeatCount(format, i);-
2551 bool used = false;-
2552 if (formatDate) {
formatDateDescription
TRUEevaluated 174740 times by 32 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 103660 times by 7 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
103660-174740
2553 switch (c.unicode()) {-
2554 case 'y':
executed 22809 times by 32 tests: case 'y':
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
22809
2555 used = true;-
2556 if (repeat >= 4)
repeat >= 4Description
TRUEevaluated 19102 times by 23 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_QXmlStream
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
FALSEevaluated 3707 times by 16 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qlogging - unknown status
  • tst_qmessagehandler
3707-19102
2557 repeat = 4;
executed 19102 times by 23 tests: repeat = 4;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_QXmlStream
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
19102
2558 else if (repeat >= 2)
repeat >= 2Description
TRUEevaluated 3707 times by 16 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qlogging - unknown status
  • tst_qmessagehandler
FALSEnever evaluated
0-3707
2559 repeat = 2;
executed 3707 times by 16 tests: repeat = 2;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qlogging - unknown status
  • tst_qmessagehandler
3707
2560-
2561 switch (repeat) {-
2562 case 4: {
executed 19102 times by 23 tests: case 4:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_QXmlStream
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
19102
2563 const int yr = date.year();-
2564 const int len = (yr < 0) ? 5 : 4;
(yr < 0)Description
TRUEevaluated 440 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 18662 times by 23 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_QXmlStream
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
440-18662
2565 result.append(m_data->longLongToString(yr, -1, 10, len, QLocaleData::ZeroPadded));-
2566 break;
executed 19102 times by 23 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_QXmlStream
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
19102
2567 }-
2568 case 2:
executed 3707 times by 16 tests: case 2:
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qlogging - unknown status
  • tst_qmessagehandler
3707
2569 result.append(m_data->longLongToString(date.year() % 100, -1, 10, 2,-
2570 QLocaleData::ZeroPadded));-
2571 break;
executed 3707 times by 16 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qlogging - unknown status
  • tst_qmessagehandler
3707
2572 default:
never executed: default:
0
2573 repeat = 1;-
2574 result.append(c);-
2575 break;
never executed: break;
0
2576 }-
2577 break;
executed 22809 times by 32 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
22809
2578-
2579 case 'M':
executed 22876 times by 32 tests: case 'M':
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
22876
2580 used = true;-
2581 repeat = qMin(repeat, 4);-
2582 switch (repeat) {-
2583 case 1:
executed 3215 times by 13 tests: case 1:
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
3215
2584 result.append(m_data->longLongToString(date.month()));-
2585 break;
executed 3215 times by 13 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
3215
2586 case 2:
executed 17933 times by 20 tests: case 2:
Executed by:
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
17933
2587 result.append(m_data->longLongToString(date.month(), -1, 10, 2, QLocaleData::ZeroPadded));-
2588 break;
executed 17933 times by 20 tests: break;
Executed by:
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
17933
2589 case 3:
executed 1611 times by 8 tests: case 3:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
1611
2590 result.append(q->monthName(date.month(), QLocale::ShortFormat));-
2591 break;
executed 1611 times by 8 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
1611
2592 case 4:
executed 117 times by 4 tests: case 4:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
117
2593 result.append(q->monthName(date.month(), QLocale::LongFormat));-
2594 break;
executed 117 times by 4 tests: break;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
117
2595 }-
2596 break;
executed 22876 times by 32 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
22876
2597-
2598 case 'd':
executed 23624 times by 32 tests: case 'd':
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
23624
2599 used = true;-
2600 repeat = qMin(repeat, 4);-
2601 switch (repeat) {-
2602 case 1:
executed 3439 times by 15 tests: case 1:
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qlogging - unknown status
  • tst_qmessagehandler
3439
2603 result.append(m_data->longLongToString(date.day()));-
2604 break;
executed 3439 times by 15 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qlogging - unknown status
  • tst_qmessagehandler
3439
2605 case 2:
executed 18976 times by 23 tests: case 2:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_QXmlStream
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
18976
2606 result.append(m_data->longLongToString(date.day(), -1, 10, 2, QLocaleData::ZeroPadded));-
2607 break;
executed 18976 times by 23 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_QXmlStream
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
18976
2608 case 3:
executed 727 times by 6 tests: case 3:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
727
2609 result.append(q->dayName(date.dayOfWeek(), QLocale::ShortFormat));-
2610 break;
executed 727 times by 6 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
727
2611 case 4:
executed 482 times by 4 tests: case 4:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
482
2612 result.append(q->dayName(date.dayOfWeek(), QLocale::LongFormat));-
2613 break;
executed 482 times by 4 tests: break;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
482
2614 }-
2615 break;
executed 23624 times by 32 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
23624
2616-
2617 default:
executed 105431 times by 32 tests: default:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
105431
2618 break;
executed 105431 times by 32 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
105431
2619 }-
2620 }-
2621 if (!used && formatTime) {
!usedDescription
TRUEevaluated 209091 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 69309 times by 32 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
formatTimeDescription
TRUEevaluated 180713 times by 31 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
  • ...
FALSEevaluated 28378 times by 8 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QVariant
28378-209091
2622 switch (c.unicode()) {-
2623 case 'h': {
executed 22251 times by 27 tests: case 'h':
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
22251
2624 used = true;-
2625 repeat = qMin(repeat, 2);-
2626 int hour = time.hour();-
2627 if (timeFormatContainsAP(format)) {
timeFormatContainsAP(format)Description
TRUEevaluated 3524 times by 12 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
FALSEevaluated 18727 times by 19 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
3524-18727
2628 if (hour > 12)
hour > 12Description
TRUEevaluated 1067 times by 9 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
FALSEevaluated 2457 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
1067-2457
2629 hour -= 12;
executed 1067 times by 9 tests: hour -= 12;
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
1067
2630 else if (hour == 0)
hour == 0Description
TRUEevaluated 156 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemModel
FALSEevaluated 2301 times by 10 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
156-2301
2631 hour = 12;
executed 156 times by 5 tests: hour = 12;
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemModel
156
2632 }
executed 3524 times by 12 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
3524
2633-
2634 switch (repeat) {-
2635 case 1:
executed 2870 times by 12 tests: case 1:
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
2870
2636 result.append(m_data->longLongToString(hour));-
2637 break;
executed 2870 times by 12 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
2870
2638 case 2:
executed 19381 times by 19 tests: case 2:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
19381
2639 result.append(m_data->longLongToString(hour, -1, 10, 2, QLocaleData::ZeroPadded));-
2640 break;
executed 19381 times by 19 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
19381
2641 }-
2642 break;
executed 22251 times by 27 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
22251
2643 }-
2644 case 'H':
executed 185 times by 4 tests: case 'H':
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNoDebug
  • tst_QTime
185
2645 used = true;-
2646 repeat = qMin(repeat, 2);-
2647 switch (repeat) {-
2648 case 1:
never executed: case 1:
0
2649 result.append(m_data->longLongToString(time.hour()));-
2650 break;
never executed: break;
0
2651 case 2:
executed 185 times by 4 tests: case 2:
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNoDebug
  • tst_QTime
185
2652 result.append(m_data->longLongToString(time.hour(), -1, 10, 2, QLocaleData::ZeroPadded));-
2653 break;
executed 185 times by 4 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNoDebug
  • tst_QTime
185
2654 }-
2655 break;
executed 185 times by 4 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNoDebug
  • tst_QTime
185
2656-
2657 case 'm':
executed 22236 times by 28 tests: case 'm':
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • ...
22236
2658 used = true;-
2659 repeat = qMin(repeat, 2);-
2660 switch (repeat) {-
2661 case 1:
executed 89 times by 2 tests: case 1:
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
89
2662 result.append(m_data->longLongToString(time.minute()));-
2663 break;
executed 89 times by 2 tests: break;
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
89
2664 case 2:
executed 22147 times by 28 tests: case 2:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • ...
22147
2665 result.append(m_data->longLongToString(time.minute(), -1, 10, 2, QLocaleData::ZeroPadded));-
2666 break;
executed 22147 times by 28 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • ...
22147
2667 }-
2668 break;
executed 22236 times by 28 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • ...
22236
2669-
2670 case 's':
executed 19423 times by 20 tests: case 's':
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
19423
2671 used = true;-
2672 repeat = qMin(repeat, 2);-
2673 switch (repeat) {-
2674 case 1:
executed 83 times by 2 tests: case 1:
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
83
2675 result.append(m_data->longLongToString(time.second()));-
2676 break;
executed 83 times by 2 tests: break;
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
83
2677 case 2:
executed 19340 times by 20 tests: case 2:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
19340
2678 result.append(m_data->longLongToString(time.second(), -1, 10, 2, QLocaleData::ZeroPadded));-
2679 break;
executed 19340 times by 20 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
19340
2680 }-
2681 break;
executed 19423 times by 20 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
19423
2682-
2683 case 'a':
executed 763 times by 2 tests: case 'a':
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
763
2684 used = true;-
2685 if (i + 1 < format.length() && format.at(i + 1).unicode() == 'p') {
i + 1 < format.length()Description
TRUEevaluated 725 times by 2 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QTime
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tst_QDateTimeEdit
format.at(i + ...icode() == 'p'Description
TRUEevaluated 725 times by 2 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QTime
FALSEnever evaluated
0-725
2686 repeat = 2;-
2687 } else {
executed 725 times by 2 tests: end of block
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
725
2688 repeat = 1;-
2689 }
executed 38 times by 1 test: end of block
Executed by:
  • tst_QDateTimeEdit
38
2690 result.append(time.hour() < 12 ? q->amText().toLower() : q->pmText().toLower());-
2691 break;
executed 763 times by 2 tests: break;
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
763
2692-
2693 case 'A':
executed 2805 times by 12 tests: case 'A':
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
2805
2694 used = true;-
2695 if (i + 1 < format.length() && format.at(i + 1).unicode() == 'P') {
i + 1 < format.length()Description
TRUEevaluated 2805 times by 12 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
FALSEnever evaluated
format.at(i + ...icode() == 'P'Description
TRUEevaluated 2805 times by 12 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
FALSEnever evaluated
0-2805
2696 repeat = 2;-
2697 } else {
executed 2805 times by 12 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
2805
2698 repeat = 1;-
2699 }
never executed: end of block
0
2700 result.append(time.hour() < 12 ? q->amText().toUpper() : q->pmText().toUpper());-
2701 break;
executed 2805 times by 12 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
2805
2702-
2703 case 'z':
executed 17358 times by 17 tests: case 'z':
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
17358
2704 used = true;-
2705 if (repeat >= 3) {
repeat >= 3Description
TRUEevaluated 17280 times by 17 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
FALSEevaluated 78 times by 2 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QTime
78-17280
2706 repeat = 3;-
2707 } else {
executed 17280 times by 17 tests: end of block
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
17280
2708 repeat = 1;-
2709 }
executed 78 times by 2 tests: end of block
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
78
2710 switch (repeat) {-
2711 case 1:
executed 78 times by 2 tests: case 1:
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
78
2712 result.append(m_data->longLongToString(time.msec()));-
2713 break;
executed 78 times by 2 tests: break;
Executed by:
  • tst_QDateTimeEdit
  • tst_QTime
78
2714 case 3:
executed 17280 times by 17 tests: case 3:
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
17280
2715 result.append(m_data->longLongToString(time.msec(), -1, 10, 3, QLocaleData::ZeroPadded));-
2716 break;
executed 17280 times by 17 tests: break;
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
17280
2717 }-
2718 break;
executed 17358 times by 17 tests: break;
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
17358
2719-
2720 case 't':
executed 2318 times by 16 tests: case 't':
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
2318
2721 used = true;-
2722 repeat = 1;-
2723 // If we have a QDateTime use the time spec otherwise use the current system tzname-
2724 if (formatDate) {
formatDateDescription
TRUEevaluated 2307 times by 15 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QVariant
  • tst_selftests - unknown status
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
11-2307
2725 result.append(datetime.timeZoneAbbreviation());-
2726 } else {
executed 2307 times by 15 tests: end of block
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QVariant
  • tst_selftests - unknown status
2307
2727 result.append(QDateTime::currentDateTime().timeZoneAbbreviation());-
2728 }
executed 11 times by 2 tests: end of block
Executed by:
  • tst_QItemDelegate
  • tst_QTime
11
2729 break;
executed 2318 times by 16 tests: break;
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_selftests - unknown status
2318
2730-
2731 default:
executed 93374 times by 31 tests: default:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
  • ...
93374
2732 break;
executed 93374 times by 31 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
  • ...
93374
2733 }-
2734 }-
2735 if (!used) {
!usedDescription
TRUEevaluated 121752 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 156648 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
121752-156648
2736 result.append(QString(repeat, c));-
2737 }
executed 121752 times by 33 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
121752
2738 i += repeat;-
2739 }
executed 278400 times by 33 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
278400
2740-
2741 return result;
executed 39153 times by 33 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
39153
2742}-
2743-
2744QString QLocaleData::doubleToString(double d, int precision, DoubleForm form,-
2745 int width, unsigned flags) const-
2746{-
2747 return doubleToString(m_zero, m_plus, m_minus, m_exponential, m_group, m_decimal,
executed 110646 times by 55 tests: return doubleToString(m_zero, m_plus, m_minus, m_exponential, m_group, m_decimal, d, precision, form, width, flags);
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
2748 d, precision, form, width, flags);
executed 110646 times by 55 tests: return doubleToString(m_zero, m_plus, m_minus, m_exponential, m_group, m_decimal, d, precision, form, width, flags);
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
2749}-
2750-
2751QString QLocaleData::doubleToString(const QChar _zero, const QChar plus, const QChar minus,-
2752 const QChar exponential, const QChar group, const QChar decimal,-
2753 double d, int precision, DoubleForm form, int width, unsigned flags)-
2754{-
2755 if (precision != QLocale::FloatingPointShortest && precision < 0)
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 < 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
2756 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
2757 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
2758 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
2759-
2760 bool negative = false;-
2761 QString num_str;-
2762-
2763 int decpt;-
2764 int bufSize = 1;-
2765 if (precision == QLocale::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
  • ...
168-110478
2766 bufSize += 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
168
2767 else if (form == DFDecimal) // optimize for numbers between -512k and 512k
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
2768 bufSize += ((d > (1 << 19) || d < -(1 << 19)) ? 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
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)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
35-2237
2769 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
2237
2770 else // Add extra digit due to different interpretations of precision. Also, "nan" has to fit.-
2771 bufSize += qMax(2, precision) + 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
  • ...
108241
2772-
2773 QVarLengthArray<char> buf(bufSize);-
2774 int length;-
2775-
2776 doubleToAscii(d, form, precision, buf.data(), bufSize, negative, length, decpt);-
2777-
2778 if (qstrncmp(buf.data(), "inf", 3) == 0 || qstrncmp(buf.data(), "nan", 3) == 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.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
2779 num_str = QString::fromLatin1(buf.data(), length);-
2780 } else { // Handle normal numbers
executed 812 times by 4 tests: end of block
Executed by:
  • tst_QDBusMarshall
  • tst_QString
  • tst_QTextStream
  • tst_QVariant
812
2781 QString digits = QString::fromLatin1(buf.data(), length);-
2782-
2783 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
2784 ushort z = _zero.unicode() - '0';-
2785 for (int i = 0; i < digits.length(); ++i)
i < digits.length()Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QString
1-7
2786 reinterpret_cast<ushort *>(digits.data())[i] += z;
executed 7 times by 1 test: reinterpret_cast<ushort *>(digits.data())[i] += z;
Executed by:
  • tst_QString
7
2787 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QString
1
2788-
2789 bool always_show_decpt = (flags & Alternate || flags & ForcePoint);
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 & 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
2790 switch (form) {-
2791 case DFExponent: {
executed 17 times by 3 tests: case DFExponent:
Executed by:
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
17
2792 num_str = exponentForm(_zero, decimal, exponential, group, plus, minus,-
2793 digits, decpt, precision, PMDecimalDigits,-
2794 always_show_decpt, flags & ZeroPadExponent);-
2795 break;
executed 17 times by 3 tests: break;
Executed by:
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
17
2796 }-
2797 case 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
2798 num_str = decimalForm(_zero, decimal, group,-
2799 digits, decpt, precision, PMDecimalDigits,-
2800 always_show_decpt, flags & ThousandsGroup);-
2801 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
2802 }-
2803 case 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
2804 PrecisionMode mode = (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
2805 PMSignificantDigits : PMChopTrailingZeros;-
2806-
2807 int cutoff = precision < 0 ? 6 : precision;
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
  • ...
144-107436
2808 // Find out which representation is shorter-
2809 if (precision == QLocale::FloatingPointShortest && decpt > 0) {
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 > 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
2810 cutoff = digits.length() + 4; // 'e', '+'/'-', one digit exponent-
2811 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
2812 ++cutoff;-
2813 } else {
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
2814 cutoff += decpt > 100 ? 2 : 1;
decpt > 100Description
TRUEnever evaluated
FALSEnever evaluated
0
2815 }
never executed: end of block
0
2816 if (!always_show_decpt && digits.length() > 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() > 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
2817 ++cutoff; // decpt shown in exponent form, but not in decimal form
executed 56 times by 6 tests: ++cutoff;
Executed by:
  • tst_QDBusMarshall
  • tst_QGraphicsItem
  • tst_QMetaType
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QVariant
56
2818 }
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
2819-
2820 if (decpt != digits.length() && (decpt <= -4 || decpt > cutoff))
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 <= -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 > 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
2821 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
2822 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
2823 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
2824 else-
2825 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
2826 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
2827 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
2828 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
2829 }-
2830 }-
2831-
2832 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
2833 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
2834-
2835 // pad with zeros. LeftAdjusted overrides this flag). Also, we don't-
2836 // pad special numbers-
2837 if (flags & QLocaleData::ZeroPadded && !(flags & QLocaleData::LeftAdjusted)) {
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 & 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
2838 int num_pad_chars = width - num_str.length();-
2839 // leave space for the sign-
2840 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
2841 || 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
2842 || 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
2843 --num_pad_chars;
executed 1746 times by 1 test: --num_pad_chars;
Executed by:
  • tst_QString
1746
2844-
2845 for (int i = 0; i < num_pad_chars; ++i)
i < num_pad_charsDescription
TRUEevaluated 23653 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 2309 times by 1 test
Evaluated by:
  • tst_QString
2309-23653
2846 num_str.prepend(_zero);
executed 23653 times by 1 test: num_str.prepend(_zero);
Executed by:
  • tst_QString
23653
2847 }
executed 2309 times by 1 test: end of block
Executed by:
  • tst_QString
2309
2848 }
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
2849-
2850 // add sign-
2851 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
2852 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
2853 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
2854 num_str.prepend(plus);
executed 4738 times by 2 tests: num_str.prepend(plus);
Executed by:
  • tst_QString
  • tst_QTextStream
4738
2855 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
2856 num_str.prepend(QLatin1Char(' '));
executed 2368 times by 1 test: num_str.prepend(QLatin1Char(' '));
Executed by:
  • tst_QString
2368
2857-
2858 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
2859 num_str = num_str.toUpper();
executed 4999 times by 2 tests: num_str = num_str.toUpper();
Executed by:
  • tst_QString
  • tst_QTextStream
4999
2860-
2861 return 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
2862}-
2863-
2864QString QLocaleData::longLongToString(qlonglong l, int precision,-
2865 int base, int width,-
2866 unsigned flags) const-
2867{-
2868 return longLongToString(m_zero, m_group, m_plus, m_minus,
executed 4937415 times by 440 tests: return longLongToString(m_zero, m_group, m_plus, m_minus, l, precision, base, width, flags);
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
4937415
2869 l, precision, base, width, flags);
executed 4937415 times by 440 tests: return longLongToString(m_zero, m_group, m_plus, m_minus, l, precision, base, width, flags);
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
4937415
2870}-
2871-
2872QString QLocaleData::longLongToString(const QChar zero, const QChar group,-
2873 const QChar plus, const QChar minus,-
2874 qlonglong l, int precision,-
2875 int base, int width,-
2876 unsigned flags)-
2877{-
2878 bool precision_not_specified = false;-
2879 if (precision == -1) {
precision == -1Description
TRUEevaluated 4936215 times by 439 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
FALSEevaluated 7552 times by 7 tests
Evaluated by:
  • tst_QByteArray
  • tst_QDoubleSpinBox
  • tst_QGraphicsTransform
  • tst_QRegExp
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
7552-4936215
2880 precision_not_specified = true;-
2881 precision = 1;-
2882 }
executed 4936215 times by 439 tests: end of block
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
4936215
2883-
2884 bool negative = l < 0;-
2885 if (base != 10) {
base != 10Description
TRUEevaluated 1291 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QColor
  • tst_QGuiVariant
  • tst_QRawFont
  • tst_QSpinBox
  • tst_QSslSocket
  • tst_QStaticText
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QVariant
  • tst_QWidget
  • tst_Utf8
  • tst_qlogging - unknown status
  • tst_qmakelib
FALSEevaluated 4942476 times by 439 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
1291-4942476
2886 // these are not supported by sprintf for octal and hex-
2887 flags &= ~AlwaysShowSign;-
2888 flags &= ~BlankBeforePositive;-
2889 negative = false; // neither are negative numbers-
2890 }
executed 1291 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QColor
  • tst_QGuiVariant
  • tst_QRawFont
  • tst_QSpinBox
  • tst_QSslSocket
  • tst_QStaticText
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QVariant
  • tst_QWidget
  • tst_Utf8
  • tst_qlogging - unknown status
  • tst_qmakelib
1291
2891-
2892 QString num_str;-
2893 if (base == 10)
base == 10Description
TRUEevaluated 4942476 times by 439 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
FALSEevaluated 1291 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QColor
  • tst_QGuiVariant
  • tst_QRawFont
  • tst_QSpinBox
  • tst_QSslSocket
  • tst_QStaticText
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QVariant
  • tst_QWidget
  • tst_Utf8
  • tst_qlogging - unknown status
  • tst_qmakelib
1291-4942476
2894 num_str = qlltoa(l, base, zero);
executed 4942476 times by 439 tests: num_str = qlltoa(l, base, zero);
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
4942476
2895 else-
2896 num_str = qulltoa(l, base, zero);
executed 1291 times by 18 tests: num_str = qulltoa(l, base, zero);
Executed by:
  • tst_NetworkSelfTest
  • tst_QColor
  • tst_QGuiVariant
  • tst_QRawFont
  • tst_QSpinBox
  • tst_QSslSocket
  • tst_QStaticText
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QVariant
  • tst_QWidget
  • tst_Utf8
  • tst_qlogging - unknown status
  • tst_qmakelib
1291
2897-
2898 uint cnt_thousand_sep = 0;-
2899 if (flags & ThousandsGroup && base == 10) {
flags & ThousandsGroupDescription
TRUEevaluated 1889 times by 23 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_languageChange
FALSEevaluated 4941878 times by 440 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
base == 10Description
TRUEevaluated 1888 times by 23 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_languageChange
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QString
1-4941878
2900 for (int i = num_str.length() - 3; i > 0; i -= 3) {
i > 0Description
TRUEevaluated 247 times by 10 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
  • tst_QString
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_languageChange
FALSEevaluated 1888 times by 23 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_languageChange
247-1888
2901 num_str.insert(i, group);-
2902 ++cnt_thousand_sep;-
2903 }
executed 247 times by 10 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
  • tst_QString
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_languageChange
247
2904 }
executed 1888 times by 23 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextStream
  • tst_languageChange
1888
2905-
2906 for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i)
i < precisionDescription
TRUEevaluated 196515 times by 382 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCache
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • ...
FALSEevaluated 4943767 times by 441 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
196515-4943767
2907 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
executed 196515 times by 382 tests: num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCache
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • ...
196515
2908-
2909 if ((flags & Alternate || flags & ShowBase)
flags & AlternateDescription
TRUEnever evaluated
FALSEevaluated 4943767 times by 441 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
flags & ShowBaseDescription
TRUEnever evaluated
FALSEevaluated 4943767 times by 441 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
0-4943767
2910 && base == 8
base == 8Description
TRUEnever evaluated
FALSEnever evaluated
0
2911 && (num_str.isEmpty() || num_str[0].unicode() != QLatin1Char('0')))
num_str.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
num_str[0].uni...atin1Char('0')Description
TRUEnever evaluated
FALSEnever evaluated
0
2912 num_str.prepend(QLatin1Char('0'));
never executed: num_str.prepend(QLatin1Char('0'));
0
2913-
2914 // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds-
2915 // when precision is not specified in the format string-
2916 bool zero_padded = flags & ZeroPadded
flags & ZeroPaddedDescription
TRUEevaluated 139734 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
FALSEevaluated 4804033 times by 434 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • ...
139734-4804033
2917 && !(flags & LeftAdjusted)
!(flags & LeftAdjusted)Description
TRUEevaluated 139734 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
FALSEnever evaluated
0-139734
2918 && precision_not_specified;
precision_not_specifiedDescription
TRUEevaluated 139734 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
FALSEnever evaluated
0-139734
2919-
2920 if (zero_padded) {
zero_paddedDescription
TRUEevaluated 139734 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
FALSEevaluated 4804033 times by 434 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • ...
139734-4804033
2921 int num_pad_chars = width - num_str.length();-
2922-
2923 // leave space for the sign-
2924 if (negative
negativeDescription
TRUEevaluated 458 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QString
FALSEevaluated 139276 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
458-139276
2925 || flags & AlwaysShowSign
flags & AlwaysShowSignDescription
TRUEnever evaluated
FALSEevaluated 139276 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
0-139276
2926 || flags & BlankBeforePositive)
flags & BlankBeforePositiveDescription
TRUEnever evaluated
FALSEevaluated 139276 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
0-139276
2927 --num_pad_chars;
executed 458 times by 3 tests: --num_pad_chars;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QString
458
2928-
2929 // leave space for optional '0x' in hex form-
2930 if (base == 16 && (flags & Alternate || flags & ShowBase))
base == 16Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QString
FALSEevaluated 139732 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
flags & AlternateDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QString
flags & ShowBaseDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QString
0-139732
2931 num_pad_chars -= 2;
never executed: num_pad_chars -= 2;
0
2932 // leave space for optional '0b' in binary form-
2933 else if (base == 2 && (flags & Alternate || flags & ShowBase))
base == 2Description
TRUEnever evaluated
FALSEevaluated 139734 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
flags & AlternateDescription
TRUEnever evaluated
FALSEnever evaluated
flags & ShowBaseDescription
TRUEnever evaluated
FALSEnever evaluated
0-139734
2934 num_pad_chars -= 2;
never executed: num_pad_chars -= 2;
0
2935-
2936 for (int i = 0; i < num_pad_chars; ++i)
i < num_pad_charsDescription
TRUEevaluated 67985 times by 35 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • ...
FALSEevaluated 139734 times by 38 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
67985-139734
2937 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
executed 67985 times by 35 tests: num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • ...
67985
2938 }
executed 139734 times by 38 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • ...
139734
2939-
2940 if (flags & CapitalEorX)
flags & CapitalEorXDescription
TRUEnever evaluated
FALSEevaluated 4943767 times by 441 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
0-4943767
2941 num_str = num_str.toUpper();
never executed: num_str = num_str.toUpper();
0
2942-
2943 if (base == 16 && (flags & Alternate || flags & ShowBase))
base == 16Description
TRUEevaluated 1109 times by 17 tests
Evaluated by:
  • tst_QColor
  • tst_QGuiVariant
  • tst_QRawFont
  • tst_QSpinBox
  • tst_QSslSocket
  • tst_QStaticText
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QVariant
  • tst_QWidget
  • tst_Utf8
  • tst_qlogging - unknown status
  • tst_qmakelib
FALSEevaluated 4942658 times by 439 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
flags & AlternateDescription
TRUEnever evaluated
FALSEevaluated 1109 times by 17 tests
Evaluated by:
  • tst_QColor
  • tst_QGuiVariant
  • tst_QRawFont
  • tst_QSpinBox
  • tst_QSslSocket
  • tst_QStaticText
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QVariant
  • tst_QWidget
  • tst_Utf8
  • tst_qlogging - unknown status
  • tst_qmakelib
flags & ShowBaseDescription
TRUEnever evaluated
FALSEevaluated 1109 times by 17 tests
Evaluated by:
  • tst_QColor
  • tst_QGuiVariant
  • tst_QRawFont
  • tst_QSpinBox
  • tst_QSslSocket
  • tst_QStaticText
  • tst_QString
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QVariant
  • tst_QWidget
  • tst_Utf8
  • tst_qlogging - unknown status
  • tst_qmakelib
0-4942658
2944 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0X" : "0x"));
never executed: num_str.prepend(QLatin1String(flags & UppercaseBase ? "0X" : "0x"));
0
2945 if (base == 2 && (flags & Alternate || flags & ShowBase))
base == 2Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QSpinBox
FALSEevaluated 4943758 times by 441 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
flags & AlternateDescription
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QSpinBox
flags & ShowBaseDescription
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QSpinBox
0-4943758
2946 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0B" : "0b"));
never executed: num_str.prepend(QLatin1String(flags & UppercaseBase ? "0B" : "0b"));
0
2947-
2948 // add sign-
2949 if (negative)
negativeDescription
TRUEevaluated 18535 times by 73 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QByteArray
  • tst_QCache
  • tst_QCalendarWidget
  • tst_QColor
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDialog
  • tst_QEasingCurve
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QFormLayout
  • tst_QFtp
  • ...
FALSEevaluated 4925232 times by 438 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCache
  • ...
18535-4925232
2950 num_str.prepend(minus);
executed 18535 times by 73 tests: num_str.prepend(minus);
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QBuffer
  • tst_QByteArray
  • tst_QCache
  • tst_QCalendarWidget
  • tst_QColor
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDialog
  • tst_QEasingCurve
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFont
  • tst_QFormLayout
  • tst_QFtp
  • ...
18535
2951 else if (flags & AlwaysShowSign)
flags & AlwaysShowSignDescription
TRUEevaluated 1914 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
FALSEevaluated 4923318 times by 438 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCache
  • ...
1914-4923318
2952 num_str.prepend(plus);
executed 1914 times by 4 tests: num_str.prepend(plus);
Executed by:
  • tst_QDoubleSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
1914
2953 else if (flags & BlankBeforePositive)
flags & BlankBeforePositiveDescription
TRUEnever evaluated
FALSEevaluated 4923318 times by 438 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCache
  • ...
0-4923318
2954 num_str.prepend(QLatin1Char(' '));
never executed: num_str.prepend(QLatin1Char(' '));
0
2955-
2956 return num_str;
executed 4943767 times by 441 tests: return num_str;
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
4943767
2957}-
2958-
2959QString QLocaleData::unsLongLongToString(qulonglong l, int precision,-
2960 int base, int width,-
2961 unsigned flags) const-
2962{-
2963 return unsLongLongToString(m_zero, m_group, m_plus,
executed 52041 times by 132 tests: return unsLongLongToString(m_zero, m_group, m_plus, l, precision, base, width, flags);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
52041
2964 l, precision, base, width, flags);
executed 52041 times by 132 tests: return unsLongLongToString(m_zero, m_group, m_plus, l, precision, base, width, flags);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
52041
2965}-
2966-
2967QString QLocaleData::unsLongLongToString(const QChar zero, const QChar group,-
2968 const QChar plus,-
2969 qulonglong l, int precision,-
2970 int base, int width,-
2971 unsigned flags)-
2972{-
2973 bool precision_not_specified = false;-
2974 if (precision == -1) {
precision == -1Description
TRUEevaluated 52041 times by 132 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
FALSEnever evaluated
0-52041
2975 precision_not_specified = true;-
2976 precision = 1;-
2977 }
executed 52041 times by 132 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
52041
2978-
2979 QString num_str = qulltoa(l, base, zero);-
2980-
2981 uint cnt_thousand_sep = 0;-
2982 if (flags & ThousandsGroup && base == 10) {
flags & ThousandsGroupDescription
TRUEevaluated 440 times by 3 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTextStream
FALSEevaluated 51601 times by 131 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
base == 10Description
TRUEevaluated 440 times by 3 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTextStream
FALSEnever evaluated
0-51601
2983 for (int i = num_str.length() - 3; i > 0; i -=3) {
i > 0Description
TRUEevaluated 259 times by 3 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTextStream
FALSEevaluated 440 times by 3 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTextStream
259-440
2984 num_str.insert(i, group);-
2985 ++cnt_thousand_sep;-
2986 }
executed 259 times by 3 tests: end of block
Executed by:
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTextStream
259
2987 }
executed 440 times by 3 tests: end of block
Executed by:
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTextStream
440
2988-
2989 for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i)
i < precisionDescription
TRUEevaluated 3542 times by 33 tests
Evaluated by:
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QColumnView
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QMetaObject
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QOpenGlConfig
  • tst_QStackedLayout
  • tst_QStateMachine
  • ...
FALSEevaluated 52041 times by 132 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
3542-52041
2990 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
executed 3542 times by 33 tests: num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
Executed by:
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QColumnView
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QGraphicsItem
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageWriter
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QMetaObject
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QOpenGlConfig
  • tst_QStackedLayout
  • tst_QStateMachine
  • ...
3542
2991-
2992 if ((flags & Alternate || flags & ShowBase)
flags & AlternateDescription
TRUEevaluated 1948 times by 33 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QErrorMessage
  • tst_QEventLoop
  • tst_QFileSystemModel
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiEventLoop
  • tst_QLayout
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QMetaObject
  • tst_QPrinter
  • tst_QSharedPointer
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QState
  • tst_QStateMachine
  • tst_QString
  • ...
FALSEevaluated 50093 times by 115 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
flags & ShowBaseDescription
TRUEevaluated 134 times by 11 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QDebug
  • tst_QGraphicsItem
  • tst_QGuiVariant
  • tst_QMdiSubWindow
  • tst_QNetworkConfigurationManager
  • tst_QTextStream
  • tst_QVariant
  • tst_QWidget
FALSEevaluated 49959 times by 113 tests
Evaluated by:
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • tst_QEventLoop
  • ...
134-50093
2993 && base == 8
base == 8Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 2080 times by 40 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QEventLoop
  • tst_QFileSystemModel
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiEventLoop
  • tst_QGuiVariant
  • tst_QLayout
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QMetaObject
  • tst_QNetworkConfigurationManager
  • tst_QPrinter
  • tst_QSharedPointer
  • ...
2-2080
2994 && (num_str.isEmpty() || num_str[0].unicode() != QLatin1Char('0')))
num_str.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextStream
num_str[0].uni...atin1Char('0')Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextStream
0-2
2995 num_str.prepend(QLatin1Char('0'));
executed 1 time by 1 test: num_str.prepend(QLatin1Char('0'));
Executed by:
  • tst_QTextStream
1
2996-
2997 // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds-
2998 // when precision is not specified in the format string-
2999 bool zero_padded = flags & ZeroPadded
flags & ZeroPaddedDescription
TRUEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
FALSEevaluated 45011 times by 131 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • tst_QErrorMessage
  • ...
7030-45011
3000 && !(flags & LeftAdjusted)
!(flags & LeftAdjusted)Description
TRUEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
FALSEnever evaluated
0-7030
3001 && precision_not_specified;
precision_not_specifiedDescription
TRUEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
FALSEnever evaluated
0-7030
3002-
3003 if (zero_padded) {
zero_paddedDescription
TRUEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
FALSEevaluated 45011 times by 131 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • tst_QErrorMessage
  • ...
7030-45011
3004 int num_pad_chars = width - num_str.length();-
3005-
3006 // leave space for optional '0x' in hex form-
3007 if (base == 16 && flags & Alternate)
base == 16Description
TRUEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
FALSEnever evaluated
flags & AlternateDescription
TRUEnever evaluated
FALSEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
0-7030
3008 num_pad_chars -= 2;
never executed: num_pad_chars -= 2;
0
3009 // leave space for optional '0b' in binary form-
3010 else if (base == 2 && flags & Alternate)
base == 2Description
TRUEnever evaluated
FALSEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
flags & AlternateDescription
TRUEnever evaluated
FALSEnever evaluated
0-7030
3011 num_pad_chars -= 2;
never executed: num_pad_chars -= 2;
0
3012-
3013 for (int i = 0; i < num_pad_chars; ++i)
i < num_pad_charsDescription
TRUEevaluated 14476 times by 4 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageWriter
  • tst_QUrlInternal
FALSEevaluated 7030 times by 5 tests
Evaluated by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
7030-14476
3014 num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
executed 14476 times by 4 tests: num_str.prepend(base == 10 ? zero : QChar::fromLatin1('0'));
Executed by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageWriter
  • tst_QUrlInternal
14476
3015 }
executed 7030 times by 5 tests: end of block
Executed by:
  • tst_QAlgorithms
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QUrlInternal
7030
3016-
3017 if (flags & CapitalEorX)
flags & CapitalEorXDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 52032 times by 132 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
9-52032
3018 num_str = num_str.toUpper();
executed 9 times by 1 test: num_str = num_str.toUpper();
Executed by:
  • tst_QTextStream
9
3019-
3020 if (base == 16 && (flags & Alternate || flags & ShowBase))
base == 16Description
TRUEevaluated 25079 times by 89 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QBrush
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QEventLoop
  • tst_QFileSystemModel
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiEventLoop
  • ...
FALSEevaluated 26962 times by 72 tests
Evaluated by:
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QByteArray
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QGuiVariant
  • ...
flags & AlternateDescription
TRUEevaluated 1948 times by 33 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QErrorMessage
  • tst_QEventLoop
  • tst_QFileSystemModel
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiEventLoop
  • tst_QLayout
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QMetaObject
  • tst_QPrinter
  • tst_QSharedPointer
  • tst_QSizeGrip
  • tst_QStackedLayout
  • tst_QState
  • tst_QStateMachine
  • tst_QString
  • ...
FALSEevaluated 23131 times by 64 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QBrush
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDebug
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • ...
flags & ShowBaseDescription
TRUEevaluated 117 times by 11 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QDebug
  • tst_QGraphicsItem
  • tst_QGuiVariant
  • tst_QMdiSubWindow
  • tst_QNetworkConfigurationManager
  • tst_QTextStream
  • tst_QVariant
  • tst_QWidget
FALSEevaluated 23014 times by 59 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QBrush
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDataStream
  • tst_QDebug
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QMimeData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • ...
117-26962
3021 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0X" : "0x"));
executed 2065 times by 40 tests: num_str.prepend(QLatin1String(flags & UppercaseBase ? "0X" : "0x"));
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QDebug
  • tst_QErrorMessage
  • tst_QEventLoop
  • tst_QFileSystemModel
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiEventLoop
  • tst_QGuiVariant
  • tst_QLayout
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QMetaObject
  • tst_QNetworkConfigurationManager
  • tst_QPrinter
  • tst_QSharedPointer
  • ...
2065
3022 else if (base == 2 && (flags & Alternate || flags & ShowBase))
base == 2Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 49961 times by 113 tests
Evaluated by:
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • tst_QEventLoop
  • ...
flags & AlternateDescription
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextStream
flags & ShowBaseDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextStream
0-49961
3023 num_str.prepend(QLatin1String(flags & UppercaseBase ? "0B" : "0b"));
executed 14 times by 1 test: num_str.prepend(QLatin1String(flags & UppercaseBase ? "0B" : "0b"));
Executed by:
  • tst_QTextStream
14
3024-
3025 // add sign-
3026 if (flags & AlwaysShowSign)
flags & AlwaysShowSignDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 52038 times by 132 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
3-52038
3027 num_str.prepend(plus);
executed 3 times by 1 test: num_str.prepend(plus);
Executed by:
  • tst_QTextStream
3
3028 else if (flags & BlankBeforePositive)
flags & BlankBeforePositiveDescription
TRUEnever evaluated
FALSEevaluated 52038 times by 132 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
0-52038
3029 num_str.prepend(QLatin1Char(' '));
never executed: num_str.prepend(QLatin1Char(' '));
0
3030-
3031 return num_str;
executed 52041 times by 132 tests: return num_str;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBrush
  • tst_QByteArray
  • tst_QChar
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QElapsedTimer
  • ...
52041
3032}-
3033-
3034/*-
3035 Converts a number in locale to its representation in the C locale.-
3036 Only has to guarantee that a string that is a correct representation of-
3037 a number will be converted. If junk is passed in, junk will be passed-
3038 out and the error will be detected during the actual conversion to a-
3039 number. We can't detect junk here, since we don't even know the base-
3040 of the number.-
3041*/-
3042bool QLocaleData::numberToCLocale(const QChar *str, int len, QLocale::NumberOptions number_options,-
3043 CharBuff *result) const-
3044{-
3045 const QChar *uc = str;-
3046 int l = len;-
3047 int idx = 0;-
3048-
3049 // Skip whitespace-
3050 while (idx < l && uc[idx].isSpace())
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()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
3051 ++idx;
executed 268 times by 4 tests: ++idx;
Executed by:
  • tst_QHostAddress
  • tst_QString
  • tst_QStringRef
  • tst_QXmlInputSource
268
3052 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
3053 return 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
3054-
3055 // Check trailing whitespace-
3056 for (; idx < l; --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
0-176919
3057 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
3058 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
3059 }
executed 175 times by 5 tests: end of block
Executed by:
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_QXmlInputSource
175
3060-
3061 int group_cnt = 0; // counts number of group chars-
3062 int decpt_idx = -1;-
3063 int last_separator_idx = -1;-
3064 int start_of_digits_idx = -1;-
3065 int exponent_idx = -1;-
3066-
3067 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
3068 const QChar in = uc[idx];-
3069-
3070 char out = digitToCLocale(in);-
3071 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
3072 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
3073 out = ';';
never executed: out = ';';
0
3074 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
3075 out = '%';
executed 4 times by 2 tests: out = '%';
Executed by:
  • tst_QTextDocument
  • tst_QTextDocumentFragment
4
3076 // for handling base-x numbers-
3077 else if (in.unicode() >= 'A' && in.unicode() <= 'Z')
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'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
3078 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
3079 else if (in.unicode() >= 'a' && in.unicode() <= 'z')
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'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
3080 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
3081 else-
3082 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
3083 }-
3084-
3085 if (number_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
3086 if (out == 'e' || out == 'E') {
out == 'e'Description
TRUEnever evaluated
FALSEnever evaluated
out == 'E'Description
TRUEnever evaluated
FALSEnever evaluated
0
3087 exponent_idx = idx;-
3088 } else if (exponent_idx != -1) {
never executed: end of block
exponent_idx != -1Description
TRUEnever evaluated
FALSEnever evaluated
0
3089 if (out >= '1' && out <= '9')
out >= '1'Description
TRUEnever evaluated
FALSEnever evaluated
out <= '9'Description
TRUEnever evaluated
FALSEnever evaluated
0
3090 exponent_idx = -1; // leading digit is not 0, forget exponent_idx
never executed: exponent_idx = -1;
0
3091 else if (out == '0' && idx < l - 1)
out == '0'Description
TRUEnever evaluated
FALSEnever evaluated
idx < l - 1Description
TRUEnever evaluated
FALSEnever evaluated
0
3092 return false;
never executed: return false;
0
3093 }
never executed: end of block
0
3094 }
never executed: end of block
0
3095-
3096 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
3097 if (start_of_digits_idx == -1 && out >= '0' && out <= '9') {
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'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'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
3098 start_of_digits_idx = idx;-
3099 } else if (out == ',') {
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
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
3100 // Don't allow group chars after the decimal point-
3101 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
3102 return false;
never executed: return false;
0
3103-
3104 // check distance from the last separator or from the beginning of the digits-
3105 // ### FIXME: Some locales allow other groupings! See https://en.wikipedia.org/wiki/Thousands_separator-
3106 if (last_separator_idx != -1 && idx - last_separator_idx != 4)
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 != 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
3107 return false;
executed 3 times by 3 tests: return false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QSpinBox
3
3108 if (last_separator_idx == -1 && (start_of_digits_idx == -1 || idx - start_of_digits_idx > 3))
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 == -1Description
TRUEnever evaluated
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
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
3109 return false;
never executed: return false;
0
3110-
3111 last_separator_idx = idx;-
3112 ++group_cnt;-
3113-
3114 // don't add the group separator-
3115 ++idx;-
3116 continue;
executed 51 times by 4 tests: continue;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QSpinBox
51
3117 } else if (out == '.' || out == 'e' || out == 'E') {
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'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'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
3118 // Fail if more than one decimal point-
3119 if (out == '.' && decpt_idx != -1)
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 != -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
3120 return false;
never executed: return false;
0
3121 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
3122 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
3123-
3124 // check distance from the last separator-
3125 // ### FIXME: Some locales allow other groupings! See https://en.wikipedia.org/wiki/Thousands_separator-
3126 if (last_separator_idx != -1 && idx - last_separator_idx != 4)
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 != 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
3127 return false;
executed 3 times by 2 tests: return false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
3
3128-
3129 // stop processing separators-
3130 last_separator_idx = -1;-
3131 }
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
3132 }
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
3133-
3134 result->append(out);-
3135-
3136 ++idx;-
3137 }
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
3138-
3139 if (!(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
3140 // group separator post-processing-
3141 // did we end in a separator?-
3142 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
3143 return false;
executed 67 times by 3 tests: return false;
Executed by:
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
67
3144 // were there enough digits since the last separator?-
3145 if (last_separator_idx != -1 && idx - last_separator_idx != 4)
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 != 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
3146 return false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_QDoubleSpinBox
3
3147 }
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
3148-
3149 result->append('\0');-
3150 return 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
3151}-
3152-
3153bool QLocaleData::validateChars(const QString &str, NumberMode numMode, QByteArray *buff,-
3154 int decDigits, QLocale::NumberOptions number_options) const-
3155{-
3156 buff->clear();-
3157 buff->reserve(str.length());-
3158-
3159 const bool scientific = numMode == DoubleScientificMode;-
3160 bool lastWasE = false;-
3161 bool lastWasDigit = false;-
3162 int eCnt = 0;-
3163 int decPointCnt = 0;-
3164 bool dec = false;-
3165 int decDigitCnt = 0;-
3166-
3167 for (int i = 0; i < str.length(); ++i) {
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
416-1769
3168 char c = digitToCLocale(str.at(i));-
3169-
3170 if (c >= '0' && c <= '9') {
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'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
3171 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
3172 // If a double has too many digits after decpt, it shall be Invalid.-
3173 if (dec && decDigits != -1 && decDigits < ++decDigitCnt)
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 != -1Description
TRUEevaluated 106 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
FALSEnever evaluated
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
3174 return false;
executed 12 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
12
3175 }
executed 788 times by 2 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QPrinter
788
3176-
3177 // The only non-digit character after the 'e' can be '+' or '-'.-
3178 // If a zero is directly after that, then the exponent is zero-padded.-
3179 if ((number_options & QLocale::RejectLeadingZeroInExponent) && c == '0' && eCnt > 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 > 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEnever evaluated
0-34
3180 !lastWasDigit)
!lastWasDigitDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEnever evaluated
0-5
3181 return false;
executed 5 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
5
3182-
3183 lastWasDigit = true;-
3184 } else {
executed 1312 times by 5 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
1312
3185 switch (c) {-
3186 case '.':
executed 74 times by 4 tests: case '.':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
74
3187 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
3188 // If an integer has a decimal point, it shall be Invalid.-
3189 return false;
executed 6 times by 2 tests: return false;
Executed by:
  • tst_QIntValidator
  • tst_QLineEdit
6
3190 } else {-
3191 // If a double has more than one decimal point, it shall be Invalid.-
3192 if (++decPointCnt > 1)
++decPointCnt > 1Description
TRUEnever evaluated
FALSEevaluated 68 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QPrinter
0-68
3193 return false;
never executed: return false;
0
3194#if 0-
3195 // If a double with no decimal digits has a decimal point, it shall be-
3196 // Invalid.-
3197 if (decDigits == 0)-
3198 return false;-
3199#endif // On second thoughts, it shall be Valid.-
3200-
3201 dec = true;-
3202 }
executed 68 times by 2 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QPrinter
68
3203 break;
executed 68 times by 2 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QPrinter
68
3204-
3205 case '+':
executed 45 times by 2 tests: case '+':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
45
3206 case '-':
executed 135 times by 3 tests: case '-':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
135
3207 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
3208 // If a scientific has a sign that's not at the beginning or after-
3209 // an 'e', it shall be Invalid.-
3210 if (i != 0 && !lastWasE)
i != 0Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
!lastWasEDescription
TRUEnever evaluated
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
0-58
3211 return false;
never executed: return false;
0
3212 } else {
executed 72 times by 1 test: end of block
Executed by:
  • tst_QDoubleValidator
72
3213 // If a non-scientific has a sign that's not at the beginning,-
3214 // it shall be Invalid.-
3215 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
3216 return false;
executed 4 times by 2 tests: return false;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
4
3217 }
executed 104 times by 3 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
104
3218 break;
executed 176 times by 3 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
176
3219-
3220 case ',':
executed 19 times by 2 tests: case ',':
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
19
3221 //it can only be placed after a digit which is before the decimal point-
3222 if ((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
3223 decPointCnt > 0)
decPointCnt > 0Description
TRUEnever evaluated
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
0-15
3224 return false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
4
3225 break;
executed 15 times by 2 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
15
3226-
3227 case 'e':
executed 124 times by 1 test: case 'e':
Executed by:
  • tst_QDoubleValidator
124
3228 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
3229 // If a scientific has more than one 'e', it shall be Invalid.-
3230 if (++eCnt > 1)
++eCnt > 1Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_QDoubleValidator
0-72
3231 return false;
never executed: return false;
0
3232 dec = false;-
3233 } else {
executed 72 times by 1 test: end of block
Executed by:
  • tst_QDoubleValidator
72
3234 // If a non-scientific has an 'e', it shall be Invalid.-
3235 return false;
executed 52 times by 1 test: return false;
Executed by:
  • tst_QDoubleValidator
52
3236 }-
3237 break;
executed 72 times by 1 test: break;
Executed by:
  • tst_QDoubleValidator
72
3238-
3239 default:
executed 43 times by 4 tests: default:
Executed by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
43
3240 // If it's not a valid digit, it shall be Invalid.-
3241 return false;
executed 43 times by 4 tests: return false;
Executed by:
  • tst_QAccessibility
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
43
3242 }-
3243 lastWasDigit = false;-
3244 }
executed 331 times by 4 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
331
3245-
3246 lastWasE = c == 'e';-
3247 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
3248 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
3249 }
executed 1643 times by 5 tests: end of block
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
1643
3250-
3251 return true;
executed 416 times by 5 tests: return true;
Executed by:
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
416
3252}-
3253-
3254double QLocaleData::stringToDouble(const QChar *begin, int len, bool *ok,-
3255 QLocale::NumberOptions number_options) const-
3256{-
3257 CharBuff buff;-
3258 if (!numberToCLocale(begin, len, number_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
3259 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
3260 *ok = false;
executed 49 times by 5 tests: *ok = false;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
49
3261 return 0.0;
executed 49 times by 5 tests: return 0.0;
Executed by:
  • tst_QDoubleSpinBox
  • tst_QItemDelegate
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
49
3262 }-
3263 int processed = 0;-
3264 bool nonNullOk = false;-
3265 double d = asciiToDouble(buff.constData(), buff.length() - 1, nonNullOk, processed);-
3266 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
3267 *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
3268 return 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
3269}-
3270-
3271qlonglong QLocaleData::stringToLongLong(const QChar *begin, int len, int base, bool *ok,-
3272 QLocale::NumberOptions number_options) const-
3273{-
3274 CharBuff buff;-
3275 if (!numberToCLocale(begin, len, number_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
3276 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
3277 *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
3278 return 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
3279 }-
3280-
3281 return 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
3282}-
3283-
3284qulonglong QLocaleData::stringToUnsLongLong(const QChar *begin, int len, int base, bool *ok,-
3285 QLocale::NumberOptions number_options) const-
3286{-
3287 CharBuff buff;-
3288 if (!numberToCLocale(begin, len, number_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
3289 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
3290 *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
3291 return 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
3292 }-
3293-
3294 return 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
3295}-
3296-
3297double QLocaleData::bytearrayToDouble(const char *num, bool *ok, bool *overflow)-
3298{-
3299 bool nonNullOk = false;-
3300 int len = static_cast<int>(strlen(num));-
3301 Q_ASSERT(len >= 0);-
3302 int processed = 0;-
3303 double d = asciiToDouble(num, len, nonNullOk, processed);-
3304 if (ok)
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
3305 *ok = nonNullOk;
never executed: *ok = nonNullOk;
0
3306 if (overflow)
overflowDescription
TRUEnever evaluated
FALSEnever evaluated
0
3307 *overflow = processed < len;
never executed: *overflow = processed < len;
0
3308 return d;
never executed: return d;
0
3309}-
3310-
3311qlonglong QLocaleData::bytearrayToLongLong(const char *num, int base, bool *ok, bool *overflow)-
3312{-
3313 bool _ok;-
3314 const char *endptr;-
3315-
3316 if (*num == '\0') {
*num == '\0'Description
TRUEevaluated 372 times by 19 tests
Evaluated by:
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QDockWidget
  • tst_QHttpSocketEngine
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSharedPointer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyleSheetStyle
  • tst_QTabWidget
  • tst_QTcpSocket
  • tst_QTextDocumentLayout
  • tst_Spdy
FALSEevaluated 350633 times by 105 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • 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
  • ...
372-350633
3317 if (ok != 0)
ok != 0Description
TRUEevaluated 334 times by 9 tests
Evaluated by:
  • tst_QByteArray
  • tst_QHttpSocketEngine
  • tst_QLineEdit
  • tst_QNetworkReply
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_Spdy
FALSEevaluated 38 times by 10 tests
Evaluated by:
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QDockWidget
  • tst_QLayout
  • tst_QMdiArea
  • tst_QPrinter
  • tst_QSharedPointer
  • tst_QStyleSheetStyle
  • tst_QTabWidget
  • tst_QTextDocumentLayout
38-334
3318 *ok = false;
executed 334 times by 9 tests: *ok = false;
Executed by:
  • tst_QByteArray
  • tst_QHttpSocketEngine
  • tst_QLineEdit
  • tst_QNetworkReply
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpSocket
  • tst_Spdy
334
3319 if (overflow != 0)
overflow != 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QLineEdit
FALSEevaluated 368 times by 18 tests
Evaluated by:
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QDockWidget
  • tst_QHttpSocketEngine
  • tst_QLayout
  • tst_QMdiArea
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSharedPointer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyleSheetStyle
  • tst_QTabWidget
  • tst_QTcpSocket
  • tst_QTextDocumentLayout
  • tst_Spdy
4-368
3320 *overflow = false;
executed 4 times by 1 test: *overflow = false;
Executed by:
  • tst_QLineEdit
4
3321 return 0;
executed 372 times by 19 tests: return 0;
Executed by:
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QDockWidget
  • tst_QHttpSocketEngine
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSharedPointer
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyleSheetStyle
  • tst_QTabWidget
  • tst_QTcpSocket
  • tst_QTextDocumentLayout
  • tst_Spdy
372
3322 }-
3323-
3324 qlonglong l = qstrtoll(num, &endptr, base, &_ok);-
3325-
3326 if (!_ok) {
!_okDescription
TRUEevaluated 197 times by 18 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlugin
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QTreeWidget
  • tst_QVariant
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 350436 times by 103 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • 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
  • ...
197-350436
3327 if (ok != 0)
ok != 0Description
TRUEevaluated 162 times by 17 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlugin
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QTreeWidget
  • tst_QVariant
  • tst_qmakelib
  • tst_selftests - unknown status
FALSEevaluated 35 times by 6 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QSqlError
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
35-162
3328 *ok = false;
executed 162 times by 17 tests: *ok = false;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlugin
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QTreeWidget
  • tst_QVariant
  • tst_qmakelib
  • tst_selftests - unknown status
162
3329 if (overflow != 0) {
overflow != 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QIntValidator
FALSEevaluated 196 times by 17 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlugin
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QTreeWidget
  • tst_QVariant
  • tst_qmakelib
  • tst_selftests - unknown status
1-196
3330 // the only way qstrtoll can fail with *endptr != '\0' on a non-empty-
3331 // input string is overflow-
3332 *overflow = *endptr != '\0';-
3333 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QIntValidator
1
3334 return 0;
executed 197 times by 18 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPlugin
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlError
  • tst_QSqlRelationalTableModel
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_QTreeWidget
  • tst_QVariant
  • tst_qmakelib
  • tst_selftests - unknown status
197
3335 }-
3336-
3337 if (*endptr != '\0') {
*endptr != '\0'Description
TRUEevaluated 85 times by 10 tests
Evaluated by:
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
FALSEevaluated 350351 times by 103 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • 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
  • ...
85-350351
3338 // we stopped at a non-digit character after converting some digits-
3339 if (ok != 0)
ok != 0Description
TRUEevaluated 75 times by 10 tests
Evaluated by:
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringRef
10-75
3340 *ok = false;
executed 75 times by 10 tests: *ok = false;
Executed by:
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
75
3341 if (overflow != 0)
overflow != 0Description
TRUEnever evaluated
FALSEevaluated 85 times by 10 tests
Evaluated by:
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
0-85
3342 *overflow = false;
never executed: *overflow = false;
0
3343 return 0;
executed 85 times by 10 tests: return 0;
Executed by:
  • tst_QDateTime
  • tst_QInputDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
  • tst_qmakelib
85
3344 }-
3345-
3346 if (ok != 0)
ok != 0Description
TRUEevaluated 241356 times by 85 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • 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_QGLBuffer
  • tst_QGLFunctions
  • tst_QGLThreads
  • tst_QGraphicsProxyWidget
  • ...
FALSEevaluated 108995 times by 40 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAction
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGuiVariant
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeySequence
  • tst_QLayout
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QShortcut
  • tst_QSpinBox
  • tst_QSqlError
  • ...
108995-241356
3347 *ok = true;
executed 241356 times by 85 tests: *ok = true;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • 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_QGLBuffer
  • tst_QGLFunctions
  • tst_QGLThreads
  • tst_QGraphicsProxyWidget
  • ...
241356
3348 if (overflow != 0)
overflow != 0Description
TRUEevaluated 177 times by 4 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
FALSEevaluated 350174 times by 103 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • 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
  • ...
177-350174
3349 *overflow = false;
executed 177 times by 4 tests: *overflow = false;
Executed by:
  • tst_QFontDialog
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QPrinter
177
3350 return l;
executed 350351 times by 103 tests: return l;
Executed by:
  • tst_Collections
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QChar
  • 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
  • ...
350351
3351}-
3352-
3353qulonglong QLocaleData::bytearrayToUnsLongLong(const char *num, int base, bool *ok)-
3354{-
3355 bool _ok;-
3356 const char *endptr;-
3357 qulonglong l = qstrtoull(num, &endptr, base, &_ok);-
3358-
3359 if (!_ok || *endptr != '\0') {
!_okDescription
TRUEevaluated 1085 times by 21 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QByteArray
  • tst_QDate
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlStream
  • tst_Spdy
FALSEevaluated 26116 times by 44 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpNetworkReply
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QOpenGlConfig
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • ...
*endptr != '\0'Description
TRUEevaluated 140 times by 5 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QString
  • tst_QStringRef
  • tst_QXmlStream
FALSEevaluated 25976 times by 44 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpNetworkReply
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QOpenGlConfig
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • ...
140-26116
3360 if (ok != 0)
ok != 0Description
TRUEevaluated 1203 times by 22 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QByteArray
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlStream
  • tst_Spdy
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_QByteArray
  • tst_QString
  • tst_QStringRef
22-1203
3361 *ok = false;
executed 1203 times by 22 tests: *ok = false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QByteArray
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlStream
  • tst_Spdy
1203
3362 return 0;
executed 1225 times by 22 tests: return 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QByteArray
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QMimeDatabase
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QXmlStream
  • tst_Spdy
1225
3363 }-
3364-
3365 if (ok != 0)
ok != 0Description
TRUEevaluated 22920 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpNetworkReply
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • ...
FALSEevaluated 3056 times by 11 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QOpenGlConfig
  • tst_QString
  • tst_QStringRef
  • tst_QTime
3056-22920
3366 *ok = true;
executed 22920 times by 42 tests: *ok = true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QByteArray
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpNetworkReply
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • ...
22920
3367 return l;
executed 25976 times by 44 tests: return l;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QByteArray
  • tst_QColorDialog
  • tst_QCssParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHostAddress
  • tst_QHttpNetworkConnection
  • tst_QHttpNetworkReply
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QOpenGlConfig
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • ...
25976
3368}-
3369-
3370/*!-
3371 \since 4.8-
3372-
3373 \enum QLocale::CurrencySymbolFormat-
3374-
3375 Specifies the format of the currency symbol.-
3376-
3377 \value CurrencyIsoCode a ISO-4217 code of the currency.-
3378 \value CurrencySymbol a currency symbol.-
3379 \value CurrencyDisplayName a user readable name of the currency.-
3380*/-
3381-
3382/*!-
3383 \since 4.8-
3384 Returns a currency symbol according to the \a format.-
3385*/-
3386QString QLocale::currencySymbol(QLocale::CurrencySymbolFormat format) const-
3387{-
3388#ifndef QT_NO_SYSTEMLOCALE-
3389 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
3390 QVariant res = systemLocale()->query(QSystemLocale::CurrencySymbol, format);-
3391 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3392 return res.toString();
never executed: return res.toString();
0
3393 }
never executed: end of block
0
3394#endif-
3395 quint32 idx, size;-
3396 switch (format) {-
3397 case CurrencySymbol:
never executed: case CurrencySymbol:
0
3398 idx = d->m_data->m_currency_symbol_idx;-
3399 size = d->m_data->m_currency_symbol_size;-
3400 return getLocaleData(currency_symbol_data + idx, size);
never executed: return getLocaleData(currency_symbol_data + idx, size);
0
3401 case CurrencyDisplayName:
never executed: case CurrencyDisplayName:
0
3402 idx = d->m_data->m_currency_display_name_idx;-
3403 size = d->m_data->m_currency_display_name_size;-
3404 return getLocaleListData(currency_display_name_data + idx, size, 0);
never executed: return getLocaleListData(currency_display_name_data + idx, size, 0);
0
3405 case CurrencyIsoCode: {
never executed: case CurrencyIsoCode:
0
3406 int len = 0;-
3407 const QLocaleData *data = this->d->m_data;-
3408 for (; len < 3; ++len)
len < 3Description
TRUEnever evaluated
FALSEnever evaluated
0
3409 if (!data->m_currency_iso_code[len])
!data->m_curre..._iso_code[len]Description
TRUEnever evaluated
FALSEnever evaluated
0
3410 break;
never executed: break;
0
3411 return len ? QString::fromLatin1(data->m_currency_iso_code, len) : QString();
never executed: return len ? QString::fromLatin1(data->m_currency_iso_code, len) : QString();
0
3412 }-
3413 }-
3414 return QString();
never executed: return QString();
0
3415}-
3416-
3417/*!-
3418 \since 4.8-
3419-
3420 Returns a localized string representation of \a value as a currency.-
3421 If the \a symbol is provided it is used instead of the default currency symbol.-
3422-
3423 \sa currencySymbol()-
3424*/-
3425QString QLocale::toCurrencyString(qlonglong value, const QString &symbol) const-
3426{-
3427#ifndef QT_NO_SYSTEMLOCALE-
3428 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
3429 QSystemLocale::CurrencyToStringArgument arg(value, symbol);-
3430 QVariant res = systemLocale()->query(QSystemLocale::CurrencyToString, QVariant::fromValue(arg));-
3431 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3432 return res.toString();
never executed: return res.toString();
0
3433 }
never executed: end of block
0
3434#endif-
3435 const QLocalePrivate *d = this->d;-
3436 quint8 idx = d->m_data->m_currency_format_idx;-
3437 quint8 size = d->m_data->m_currency_format_size;-
3438 if (d->m_data->m_currency_negative_format_size && value < 0) {
d->m_data->m_c...ve_format_sizeDescription
TRUEnever evaluated
FALSEnever evaluated
value < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
3439 idx = d->m_data->m_currency_negative_format_idx;-
3440 size = d->m_data->m_currency_negative_format_size;-
3441 value = -value;-
3442 }
never executed: end of block
0
3443 QString str = toString(value);-
3444 QString sym = symbol.isNull() ? currencySymbol() : symbol;
symbol.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3445 if (sym.isEmpty())
sym.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
3446 sym = currencySymbol(QLocale::CurrencyIsoCode);
never executed: sym = currencySymbol(QLocale::CurrencyIsoCode);
0
3447 QString format = getLocaleData(currency_format_data + idx, size);-
3448 return format.arg(str, sym);
never executed: return format.arg(str, sym);
0
3449}-
3450-
3451/*!-
3452 \since 4.8-
3453 \overload-
3454*/-
3455QString QLocale::toCurrencyString(qulonglong value, const QString &symbol) const-
3456{-
3457#ifndef QT_NO_SYSTEMLOCALE-
3458 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
3459 QSystemLocale::CurrencyToStringArgument arg(value, symbol);-
3460 QVariant res = systemLocale()->query(QSystemLocale::CurrencyToString, QVariant::fromValue(arg));-
3461 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3462 return res.toString();
never executed: return res.toString();
0
3463 }
never executed: end of block
0
3464#endif-
3465 const QLocaleData *data = this->d->m_data;-
3466 quint8 idx = data->m_currency_format_idx;-
3467 quint8 size = data->m_currency_format_size;-
3468 QString str = toString(value);-
3469 QString sym = symbol.isNull() ? currencySymbol() : symbol;
symbol.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3470 if (sym.isEmpty())
sym.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
3471 sym = currencySymbol(QLocale::CurrencyIsoCode);
never executed: sym = currencySymbol(QLocale::CurrencyIsoCode);
0
3472 QString format = getLocaleData(currency_format_data + idx, size);-
3473 return format.arg(str, sym);
never executed: return format.arg(str, sym);
0
3474}-
3475-
3476#if QT_VERSION < QT_VERSION_CHECK(6,0,0)-
3477/*!-
3478 \since 4.8-
3479 \overload-
3480*/-
3481QString QLocale::toCurrencyString(double value, const QString &symbol) const-
3482{-
3483 return toCurrencyString(value, symbol, d->m_data->m_currency_digits);
never executed: return toCurrencyString(value, symbol, d->m_data->m_currency_digits);
0
3484}-
3485#endif-
3486-
3487/*!-
3488 \since 5.7-
3489 \overload toCurrencyString()-
3490-
3491 Returns a localized string representation of \a value as a currency.-
3492 If the \a symbol is provided it is used instead of the default currency symbol.-
3493 If the \a precision is provided it is used to set the precision of the currency value.-
3494-
3495 \sa currencySymbol()-
3496 */-
3497QString QLocale::toCurrencyString(double value, const QString &symbol, int precision) const-
3498{-
3499#ifndef QT_NO_SYSTEMLOCALE-
3500 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
3501 QSystemLocale::CurrencyToStringArgument arg(value, symbol);-
3502 QVariant res = systemLocale()->query(QSystemLocale::CurrencyToString, QVariant::fromValue(arg));-
3503 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3504 return res.toString();
never executed: return res.toString();
0
3505 }
never executed: end of block
0
3506#endif-
3507 const QLocaleData *data = this->d->m_data;-
3508 quint8 idx = data->m_currency_format_idx;-
3509 quint8 size = data->m_currency_format_size;-
3510 if (data->m_currency_negative_format_size && value < 0) {
data->m_curren...ve_format_sizeDescription
TRUEnever evaluated
FALSEnever evaluated
value < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
3511 idx = data->m_currency_negative_format_idx;-
3512 size = data->m_currency_negative_format_size;-
3513 value = -value;-
3514 }
never executed: end of block
0
3515 QString str = toString(value, 'f', precision == -1 ? d->m_data->m_currency_digits : precision);-
3516 QString sym = symbol.isNull() ? currencySymbol() : symbol;
symbol.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3517 if (sym.isEmpty())
sym.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
3518 sym = currencySymbol(QLocale::CurrencyIsoCode);
never executed: sym = currencySymbol(QLocale::CurrencyIsoCode);
0
3519 QString format = getLocaleData(currency_format_data + idx, size);-
3520 return format.arg(str, sym);
never executed: return format.arg(str, sym);
0
3521}-
3522-
3523/*!-
3524 \since 4.8-
3525-
3526 Returns an ordered list of locale names for translation purposes in-
3527 preference order (like "en-Latn-US", "en-US", "en").-
3528-
3529 The return value represents locale names that the user expects to see the-
3530 UI translation in.-
3531-
3532 Most like you do not need to use this function directly, but just pass the-
3533 QLocale object to the QTranslator::load() function.-
3534-
3535 The first item in the list is the most preferred one.-
3536-
3537 \sa QTranslator, bcp47Name()-
3538*/-
3539QStringList QLocale::uiLanguages() const-
3540{-
3541#ifndef QT_NO_SYSTEMLOCALE-
3542 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
0-18
3543 QVariant res = systemLocale()->query(QSystemLocale::UILanguages, QVariant());-
3544 if (!res.isNull()) {
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3545 QStringList result = res.toStringList();-
3546 if (!result.isEmpty())
!result.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
3547 return result;
never executed: return result;
0
3548 }
never executed: end of block
0
3549 }
never executed: end of block
0
3550#endif-
3551 QLocaleId id = QLocaleId::fromIds(d->m_data->m_language_id, d->m_data->m_script_id, d->m_data->m_country_id);-
3552 const QLocaleId max = id.withLikelySubtagsAdded();-
3553 const QLocaleId min = max.withLikelySubtagsRemoved();-
3554-
3555 QStringList uiLanguages;-
3556 uiLanguages.append(QString::fromLatin1(min.name()));-
3557 if (id.script_id) {
id.script_idDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
4-14
3558 id.script_id = 0;-
3559 if (id != min && id.withLikelySubtagsAdded() == max)
id != minDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
id.withLikelyS...Added() == maxDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
0-4
3560 uiLanguages.append(QString::fromLatin1(id.name()));
executed 4 times by 1 test: uiLanguages.append(QString::fromLatin1(id.name()));
Executed by:
  • tst_QMimeDatabase
4
3561 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
4
3562 if (max != min && max != id)
max != minDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
max != idDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEnever evaluated
0-14
3563 uiLanguages.append(QString::fromLatin1(max.name()));
executed 4 times by 1 test: uiLanguages.append(QString::fromLatin1(max.name()));
Executed by:
  • tst_QMimeDatabase
4
3564 return uiLanguages;
executed 18 times by 1 test: return uiLanguages;
Executed by:
  • tst_QMimeDatabase
18
3565}-
3566-
3567/*!-
3568 \since 4.8-
3569-
3570 Returns a native name of the language for the locale. For example-
3571 "Schwiizertüütsch" for Swiss-German locale.-
3572-
3573 \sa nativeCountryName(), languageToString()-
3574*/-
3575QString QLocale::nativeLanguageName() const-
3576{-
3577#ifndef QT_NO_SYSTEMLOCALE-
3578 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
3579 QVariant res = systemLocale()->query(QSystemLocale::NativeLanguageName, QVariant());-
3580 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3581 return res.toString();
never executed: return res.toString();
0
3582 }
never executed: end of block
0
3583#endif-
3584 return getLocaleData(endonyms_data + d->m_data->m_language_endonym_idx, d->m_data->m_language_endonym_size);
never executed: return getLocaleData(endonyms_data + d->m_data->m_language_endonym_idx, d->m_data->m_language_endonym_size);
0
3585}-
3586-
3587/*!-
3588 \since 4.8-
3589-
3590 Returns a native name of the country for the locale. For example-
3591 "España" for Spanish/Spain locale.-
3592-
3593 \sa nativeLanguageName(), countryToString()-
3594*/-
3595QString QLocale::nativeCountryName() const-
3596{-
3597#ifndef QT_NO_SYSTEMLOCALE-
3598 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
3599 QVariant res = systemLocale()->query(QSystemLocale::NativeCountryName, QVariant());-
3600 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
3601 return res.toString();
never executed: return res.toString();
0
3602 }
never executed: end of block
0
3603#endif-
3604 return getLocaleData(endonyms_data + d->m_data->m_country_endonym_idx, d->m_data->m_country_endonym_size);
never executed: return getLocaleData(endonyms_data + d->m_data->m_country_endonym_idx, d->m_data->m_country_endonym_size);
0
3605}-
3606-
3607#ifndef QT_NO_DEBUG_STREAM-
3608QDebug operator<<(QDebug dbg, const QLocale &l)-
3609{-
3610 QDebugStateSaver saver(dbg);-
3611 dbg.nospace().noquote()-
3612 << "QLocale(" << QLocale::languageToString(l.language())-
3613 << ", " << QLocale::scriptToString(l.script())-
3614 << ", " << QLocale::countryToString(l.country()) << ')';-
3615 return dbg;
executed 1 time by 1 test: return dbg;
Executed by:
  • tst_QVariant
1
3616}-
3617#endif-
3618QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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