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

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