OpenCoverage

qlocale.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qlocale.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#if !defined(QWS) && defined(Q_OS_MAC)-
42# include "private/qcore_mac_p.h"-
43# include <CoreFoundation/CoreFoundation.h>-
44#endif-
45-
46#include "qglobal.h"-
47-
48#include "qplatformdefs.h"-
49-
50#include "qdatastream.h"-
51#include "qdebug.h"-
52#include "qhashfunctions.h"-
53#include "qstring.h"-
54#include "qlocale.h"-
55#include "qlocale_p.h"-
56#include "qlocale_tools_p.h"-
57#include "qdatetimeparser_p.h"-
58#include "qnamespace.h"-
59#include "qdatetime.h"-
60#include "qstringlist.h"-
61#include "qvariant.h"-
62#include "qstringbuilder.h"-
63#include "private/qnumeric_p.h"-
64#include "private/qsystemlibrary_p.h"-
65#ifdef Q_OS_WIN-
66# include <qt_windows.h>-
67# include <time.h>-
68#endif-
69-
70QT_BEGIN_NAMESPACE-
71-
72#ifndef QT_NO_SYSTEMLOCALE-
73static QSystemLocale *_systemLocale = 0;-
74class QSystemLocaleSingleton: public QSystemLocale-
75{-
76public:-
77 QSystemLocaleSingleton() : QSystemLocale(true) {}
executed 1016 times by 12 tests: end of block
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1016
78};-
79-
80Q_GLOBAL_STATIC(QSystemLocaleSingleton, QSystemLocale_globalSystemLocale)
executed 1435 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 1435 times by 508 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 18413 times by 30 tests: return &holder.value;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qmakelib
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 1435 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEnever evaluated
0-18413
81static QLocaleData *system_data = 0;-
82static QLocaleData globalLocaleData;-
83#endif-
84-
85/******************************************************************************-
86** Helpers for accessing Qt locale database-
87*/-
88-
89QT_BEGIN_INCLUDE_NAMESPACE-
90#include "qlocale_data_p.h"-
91QT_END_INCLUDE_NAMESPACE-
92-
93QLocale::Language QLocalePrivate::codeToLanguage(const QChar *code, int len) Q_DECL_NOTHROW-
94{-
95 if (len != 2 && len != 3)
len != 2Description
TRUEnever evaluated
FALSEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
len != 3Description
TRUEnever evaluated
FALSEnever evaluated
0-2372
96 return QLocale::C;
never executed: return QLocale::C;
0
97 ushort uc1 = code[0].toLower().unicode();-
98 ushort uc2 = code[1].toLower().unicode();-
99 ushort uc3 = len > 2 ? code[2].toLower().unicode() : 0;
len > 2Description
TRUEnever evaluated
FALSEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
0-2372
100-
101 const unsigned char *c = language_code_list;-
102 for (; *c != 0; c += 3) {
*c != 0Description
TRUEevaluated 80935 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
7-80935
103 if (uc1 == c[0] && uc2 == c[1] && uc3 == c[2])
uc1 == c[0]Description
TRUEevaluated 5202 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 75733 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
uc2 == c[1]Description
TRUEevaluated 2379 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 2823 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
uc3 == c[2]Description
TRUEevaluated 2365 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
14-75733
104 return QLocale::Language((c - language_code_list)/3);
executed 2365 times by 25 tests: return QLocale::Language((c - language_code_list)/3);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2365
105 }
executed 78570 times by 25 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
78570
106-
107 // legacy codes-
108 if (uc1 == 'n' && uc2 == 'o' && uc3 == 0) { // no -> nb
uc1 == 'n'Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
uc2 == 'o'Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
uc3 == 0Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
FALSEnever evaluated
0-7
109 Q_STATIC_ASSERT(QLocale::Norwegian == QLocale::NorwegianBokmal);-
110 return QLocale::Norwegian;
executed 7 times by 2 tests: return QLocale::Norwegian;
Executed by:
  • tst_QCollator
  • tst_QDateTimeEdit
7
111 }-
112 if (uc1 == 't' && uc2 == 'l' && uc3 == 0) { // tl -> fil
uc1 == 't'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'l'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
113 Q_STATIC_ASSERT(QLocale::Tagalog == QLocale::Filipino);-
114 return QLocale::Tagalog;
never executed: return QLocale::Tagalog;
0
115 }-
116 if (uc1 == 's' && uc2 == 'h' && uc3 == 0) { // sh -> sr[_Latn]
uc1 == 's'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'h'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
117 Q_STATIC_ASSERT(QLocale::SerboCroatian == QLocale::Serbian);-
118 return QLocale::SerboCroatian;
never executed: return QLocale::SerboCroatian;
0
119 }-
120 if (uc1 == 'm' && uc2 == 'o' && uc3 == 0) { // mo -> ro
uc1 == 'm'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'o'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
121 Q_STATIC_ASSERT(QLocale::Moldavian == QLocale::Romanian);-
122 return QLocale::Moldavian;
never executed: return QLocale::Moldavian;
0
123 }-
124 // Android uses the following deprecated codes-
125 if (uc1 == 'i' && uc2 == 'w' && uc3 == 0) // iw -> he
uc1 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'w'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
126 return QLocale::Hebrew;
never executed: return QLocale::Hebrew;
0
127 if (uc1 == 'i' && uc2 == 'n' && uc3 == 0) // in -> id
uc1 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'n'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
128 return QLocale::Indonesian;
never executed: return QLocale::Indonesian;
0
129 if (uc1 == 'j' && uc2 == 'i' && uc3 == 0) // ji -> yi
uc1 == 'j'Description
TRUEnever evaluated
FALSEnever evaluated
uc2 == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
uc3 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
130 return QLocale::Yiddish;
never executed: return QLocale::Yiddish;
0
131-
132 return QLocale::C;
never executed: return QLocale::C;
0
133}-
134-
135QLocale::Script QLocalePrivate::codeToScript(const QChar *code, int len) Q_DECL_NOTHROW-
136{-
137 if (len != 4)
len != 4Description
TRUEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
0-2372
138 return QLocale::AnyScript;
executed 2372 times by 25 tests: return QLocale::AnyScript;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2372
139-
140 // script is titlecased in our data-
141 unsigned char c0 = code[0].toUpper().toLatin1();-
142 unsigned char c1 = code[1].toLower().toLatin1();-
143 unsigned char c2 = code[2].toLower().toLatin1();-
144 unsigned char c3 = code[3].toLower().toLatin1();-
145-
146 const unsigned char *c = script_code_list;-
147 for (int i = 0; i < QLocale::LastScript; ++i, c += 4) {
i < QLocale::LastScriptDescription
TRUEnever evaluated
FALSEnever evaluated
0
148 if (c0 == c[0] && c1 == c[1] && c2 == c[2] && c3 == c[3])
c0 == c[0]Description
TRUEnever evaluated
FALSEnever evaluated
c1 == c[1]Description
TRUEnever evaluated
FALSEnever evaluated
c2 == c[2]Description
TRUEnever evaluated
FALSEnever evaluated
c3 == c[3]Description
TRUEnever evaluated
FALSEnever evaluated
0
149 return QLocale::Script(i);
never executed: return QLocale::Script(i);
0
150 }
never executed: end of block
0
151 return QLocale::AnyScript;
never executed: return QLocale::AnyScript;
0
152}-
153-
154QLocale::Country QLocalePrivate::codeToCountry(const QChar *code, int len) Q_DECL_NOTHROW-
155{-
156 if (len != 2 && len != 3)
len != 2Description
TRUEevaluated 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEevaluated 2717 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
len != 3Description
TRUEevaluated 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEnever evaluated
0-2717
157 return QLocale::AnyCountry;
executed 76 times by 6 tests: return QLocale::AnyCountry;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
76
158 ushort uc1 = code[0].toUpper().unicode();-
159 ushort uc2 = code[1].toUpper().unicode();-
160 ushort uc3 = len > 2 ? code[2].toUpper().unicode() : 0;
len > 2Description
TRUEnever evaluated
FALSEevaluated 2717 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
0-2717
161-
162 const unsigned char *c = country_code_list;-
163 for (; *c != 0; c += 3) {
*c != 0Description
TRUEevaluated 550758 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
0-550758
164 if (uc1 == c[0] && uc2 == c[1] && uc3 == c[2])
uc1 == c[0]Description
TRUEevaluated 10533 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 540225 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
uc2 == c[1]Description
TRUEevaluated 2716 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 7817 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
uc3 == c[2]Description
TRUEevaluated 2716 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
0-540225
165 return QLocale::Country((c - country_code_list)/3);
executed 2716 times by 22 tests: return QLocale::Country((c - country_code_list)/3);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2716
166 }
executed 548042 times by 22 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
548042
167-
168 return QLocale::AnyCountry;
never executed: return QLocale::AnyCountry;
0
169}-
170-
171QString QLocalePrivate::languageToCode(QLocale::Language language)-
172{-
173 if (language == QLocale::AnyLanguage)
language == QL...e::AnyLanguageDescription
TRUEnever evaluated
FALSEevaluated 3310 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3310
174 return QString();
never executed: return QString();
0
175 if (language == QLocale::C)
language == QLocale::CDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTimeZone
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
18-3292
176 return QLatin1String("C");
executed 18 times by 2 tests: return QLatin1String("C");
Executed by:
  • tst_QMimeDatabase
  • tst_QTimeZone
18
177-
178 const unsigned char *c = language_code_list + 3*(uint(language));-
179-
180 QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);-
181-
182 code[0] = ushort(c[0]);-
183 code[1] = ushort(c[1]);-
184 if (c[2] != 0)
c[2] != 0Description
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
185 code[2] = ushort(c[2]);
never executed: code[2] = ushort(c[2]);
0
186-
187 return code;
executed 3292 times by 13 tests: return code;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
3292
188}-
189-
190QString QLocalePrivate::scriptToCode(QLocale::Script script)-
191{-
192 if (script == QLocale::AnyScript || script > QLocale::LastScript)
script == QLocale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
script > QLocale::LastScriptDescription
TRUEnever evaluated
FALSEnever evaluated
0
193 return QString();
never executed: return QString();
0
194 const unsigned char *c = script_code_list + 4*(uint(script));-
195 return QString::fromLatin1((const char *)c, 4);
never executed: return QString::fromLatin1((const char *)c, 4);
0
196}-
197-
198QString QLocalePrivate::countryToCode(QLocale::Country country)-
199{-
200 if (country == QLocale::AnyCountry)
country == QLocale::AnyCountryDescription
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
201 return QString();
never executed: return QString();
0
202-
203 const unsigned char *c = country_code_list + 3*(uint(country));-
204-
205 QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);-
206-
207 code[0] = ushort(c[0]);-
208 code[1] = ushort(c[1]);-
209 if (c[2] != 0)
c[2] != 0Description
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
210 code[2] = ushort(c[2]);
never executed: code[2] = ushort(c[2]);
0
211-
212 return code;
executed 3292 times by 13 tests: return code;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
3292
213}-
214-
215// http://www.unicode.org/reports/tr35/#Likely_Subtags-
216static bool addLikelySubtags(QLocaleId &localeId)-
217{-
218 // ### optimize with bsearch-
219 const int likely_subtags_count = sizeof(likely_subtags) / sizeof(likely_subtags[0]);-
220 const QLocaleId *p = likely_subtags;-
221 const QLocaleId *const e = p + likely_subtags_count;-
222 for ( ; p < e; p += 2) {
p < eDescription
TRUEevaluated 3641376 times by 44 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
FALSEevaluated 4217 times by 39 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
4217-3641376
223 if (localeId == p[0]) {
localeId == p[0]Description
TRUEevaluated 3140 times by 43 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
FALSEevaluated 3638236 times by 44 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
3140-3638236
224 localeId = p[1];-
225 return true;
executed 3140 times by 43 tests: return true;
Executed by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
3140
226 }-
227 }
executed 3638236 times by 44 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
3638236
228 return false;
executed 4217 times by 39 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
4217
229}-
230-
231QLocaleId QLocaleId::withLikelySubtagsAdded() const-
232{-
233 // language_script_region-
234 if (language_id || script_id || country_id) {
language_idDescription
TRUEevaluated 3981 times by 44 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTime
  • ...
FALSEnever evaluated
script_idDescription
TRUEnever evaluated
FALSEnever evaluated
country_idDescription
TRUEnever evaluated
FALSEnever evaluated
0-3981
235 QLocaleId id = QLocaleId::fromIds(language_id, script_id, country_id);-
236 if (addLikelySubtags(id))
addLikelySubtags(id)Description
TRUEevaluated 468 times by 25 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTime
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QWidget
  • tst_languageChange
  • tst_rcc
FALSEevaluated 3513 times by 39 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
468-3513
237 return id;
executed 468 times by 25 tests: return id;
Executed by:
  • tst_ModelTest
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QCompleter
  • tst_QDate
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTime
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QWidget
  • tst_languageChange
  • tst_rcc
468
238 }
executed 3513 times by 39 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
3513
239 // language_script-
240 if (country_id) {
country_idDescription
TRUEevaluated 2672 times by 38 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QIntValidator
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTableWidget
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_QVariant
  • ...
FALSEevaluated 841 times by 4 tests
Evaluated by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
841-2672
241 QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);-
242 if (addLikelySubtags(id)) {
addLikelySubtags(id)Description
TRUEevaluated 2320 times by 27 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • ...
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352-2320
243 id.country_id = country_id;-
244 return id;
executed 2320 times by 27 tests: return id;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • ...
2320
245 }-
246 }
executed 352 times by 15 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352
247 // language_region-
248 if (script_id) {
script_idDescription
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEevaluated 841 times by 4 tests
Evaluated by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
352-841
249 QLocaleId id = QLocaleId::fromIds(language_id, 0, country_id);-
250 if (addLikelySubtags(id)) {
addLikelySubtags(id)Description
TRUEnever evaluated
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-352
251 id.script_id = script_id;-
252 return id;
never executed: return id;
0
253 }-
254 }
executed 352 times by 15 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352
255 // language-
256 if (script_id && country_id) {
script_idDescription
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEevaluated 841 times by 4 tests
Evaluated by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
country_idDescription
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEnever evaluated
0-841
257 QLocaleId id = QLocaleId::fromIds(language_id, 0, 0);-
258 if (addLikelySubtags(id)) {
addLikelySubtags(id)Description
TRUEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEnever evaluated
0-352
259 id.script_id = script_id;-
260 id.country_id = country_id;-
261 return id;
executed 352 times by 15 tests: return id;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
352
262 }-
263 }
never executed: end of block
0
264 return *this;
executed 841 times by 4 tests: return *this;
Executed by:
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QTimeZone
  • tst_selftests - unknown status
841
265}-
266-
267QLocaleId QLocaleId::withLikelySubtagsRemoved() const-
268{-
269 QLocaleId max = withLikelySubtagsAdded();-
270 // language-
271 {-
272 QLocaleId id = QLocaleId::fromIds(language_id, 0, 0);-
273 if (id.withLikelySubtagsAdded() == max)
id.withLikelyS...Added() == maxDescription
TRUEevaluated 361 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QCollator
1-361
274 return id;
executed 361 times by 15 tests: return id;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
361
275 }-
276 // language_region-
277 if (country_id) {
country_idDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QCollator
FALSEnever evaluated
0-1
278 QLocaleId id = QLocaleId::fromIds(language_id, 0, country_id);-
279 if (id.withLikelySubtagsAdded() == max)
id.withLikelyS...Added() == maxDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QCollator
FALSEnever evaluated
0-1
280 return id;
executed 1 time by 1 test: return id;
Executed by:
  • tst_QCollator
1
281 }
never executed: end of block
0
282 // language_script-
283 if (script_id) {
script_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
284 QLocaleId id = QLocaleId::fromIds(language_id, script_id, 0);-
285 if (id.withLikelySubtagsAdded() == max)
id.withLikelyS...Added() == maxDescription
TRUEnever evaluated
FALSEnever evaluated
0
286 return id;
never executed: return id;
0
287 }
never executed: end of block
0
288 return max;
never executed: return max;
0
289}-
290-
291QByteArray QLocaleId::name(char separator) const-
292{-
293 if (language_id == QLocale::AnyLanguage)
language_id ==...e::AnyLanguageDescription
TRUEnever evaluated
FALSEevaluated 370 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-370
294 return QByteArray();
never executed: return QByteArray();
0
295 if (language_id == QLocale::C)
language_id == QLocale::CDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 356 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
14-356
296 return QByteArrayLiteral("C");
executed 14 times by 1 test: return ([]() -> QByteArray { enum { Size = sizeof("C") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "C" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }());
Executed by:
  • tst_QMimeDatabase
executed 14 times by 1 test: return ba;
Executed by:
  • tst_QMimeDatabase
14
297-
298 const unsigned char *lang = language_code_list + 3 * language_id;-
299 const unsigned char *script =-
300 (script_id != QLocale::AnyScript ? script_code_list + 4 * script_id : 0);
script_id != Q...ale::AnyScriptDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
4-352
301 const unsigned char *country =-
302 (country_id != QLocale::AnyCountry ? country_code_list + 3 * country_id : 0);
country_id != ...le::AnyCountryDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
FALSEevaluated 347 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
9-347
303 char len = (lang[2] != 0 ? 3 : 2) + (script ? 4+1 : 0) + (country ? (country[2] != 0 ? 3 : 2)+1 : 0);
lang[2] != 0Description
TRUEnever evaluated
FALSEevaluated 356 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
scriptDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
countryDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
FALSEevaluated 347 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
country[2] != 0Description
TRUEnever evaluated
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
0-356
304 QByteArray name(len, Qt::Uninitialized);-
305 char *uc = name.data();-
306 *uc++ = lang[0];-
307 *uc++ = lang[1];-
308 if (lang[2] != 0)
lang[2] != 0Description
TRUEnever evaluated
FALSEevaluated 356 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-356
309 *uc++ = lang[2];
never executed: *uc++ = lang[2];
0
310 if (script) {
scriptDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QMimeDatabase
FALSEevaluated 352 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
4-352
311 *uc++ = separator;-
312 *uc++ = script[0];-
313 *uc++ = script[1];-
314 *uc++ = script[2];-
315 *uc++ = script[3];-
316 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QMimeDatabase
4
317 if (country) {
countryDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
FALSEevaluated 347 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
9-347
318 *uc++ = separator;-
319 *uc++ = country[0];-
320 *uc++ = country[1];-
321 if (country[2] != 0)
country[2] != 0Description
TRUEnever evaluated
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QCollator
  • tst_QMimeDatabase
0-9
322 *uc++ = country[2];
never executed: *uc++ = country[2];
0
323 }
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QMimeDatabase
9
324 return name;
executed 356 times by 15 tests: return name;
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
356
325}-
326-
327QByteArray QLocalePrivate::bcp47Name(char separator) const-
328{-
329 if (m_data->m_language_id == QLocale::AnyLanguage)
m_data->m_lang...e::AnyLanguageDescription
TRUEnever evaluated
FALSEevaluated 344 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-344
330 return QByteArray();
never executed: return QByteArray();
0
331 if (m_data->m_language_id == QLocale::C)
m_data->m_lang... == QLocale::CDescription
TRUEnever evaluated
FALSEevaluated 344 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
0-344
332 return QByteArrayLiteral("C");
never executed: return ([]() -> QByteArray { enum { Size = sizeof("C") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "C" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }());
never executed: return ba;
0
333-
334 QLocaleId localeId = QLocaleId::fromIds(m_data->m_language_id, m_data->m_script_id, m_data->m_country_id);-
335 return localeId.withLikelySubtagsRemoved().name(separator);
executed 344 times by 14 tests: return localeId.withLikelySubtagsRemoved().name(separator);
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QString
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
344
336}-
337-
338const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLocale::Script script, QLocale::Country country)-
339{-
340 QLocaleId localeId = QLocaleId::fromIds(language, script, country);-
341 localeId = localeId.withLikelySubtagsAdded();-
342-
343 uint idx = locale_index[localeId.language_id];-
344-
345 const QLocaleData *data = locale_data + idx;-
346-
347 if (idx == 0) // default language has no associated country
idx == 0Description
TRUEevaluated 799 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
FALSEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
799-2435
348 return data;
executed 799 times by 3 tests: return data;
Executed by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
799
349-
350 Q_ASSERT(data->m_language_id == localeId.language_id);-
351-
352 if (localeId.script_id != QLocale::AnyScript && localeId.country_id != QLocale::AnyCountry) {
localeId.scrip...ale::AnyScriptDescription
TRUEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEnever evaluated
localeId.count...le::AnyCountryDescription
TRUEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEnever evaluated
0-2435
353 // both script and country are explicitly specified-
354 do {-
355 if (data->m_script_id == localeId.script_id && data->m_country_id == localeId.country_id)
data->m_script...leId.script_idDescription
TRUEevaluated 2583 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QString
data->m_countr...eId.country_idDescription
TRUEevaluated 2435 times by 32 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEevaluated 148 times by 6 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
  • tst_QIntValidator
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
2-2583
356 return data;
executed 2435 times by 32 tests: return data;
Executed by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QTextStream
  • tst_QTime
  • tst_QTimeZone
  • tst_QVariant
  • tst_QWidget
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
2435
357 ++data;-
358 } while (data->m_language_id == localeId.language_id);
executed 150 times by 6 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTimeEdit
  • tst_QIntValidator
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
data->m_langua...Id.language_idDescription
TRUEevaluated 150 times by 6 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTimeEdit
  • tst_QIntValidator
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEnever evaluated
0-150
359-
360 // no match; try again with default script-
361 localeId.script_id = QLocale::AnyScript;-
362 data = locale_data + idx;-
363 }
never executed: end of block
0
364-
365 if (localeId.script_id == QLocale::AnyScript && localeId.country_id == QLocale::AnyCountry)
localeId.scrip...ale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
localeId.count...le::AnyCountryDescription
TRUEnever evaluated
FALSEnever evaluated
0
366 return data;
never executed: return data;
0
367-
368 if (localeId.script_id == QLocale::AnyScript) {
localeId.scrip...ale::AnyScriptDescription
TRUEnever evaluated
FALSEnever evaluated
0
369 do {-
370 if (data->m_country_id == localeId.country_id)
data->m_countr...eId.country_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
371 return data;
never executed: return data;
0
372 ++data;-
373 } while (data->m_language_id == localeId.language_id);
never executed: end of block
data->m_langua...Id.language_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
374 } else if (localeId.country_id == QLocale::AnyCountry) {
never executed: end of block
localeId.count...le::AnyCountryDescription
TRUEnever evaluated
FALSEnever evaluated
0
375 do {-
376 if (data->m_script_id == localeId.script_id)
data->m_script...leId.script_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
377 return data;
never executed: return data;
0
378 ++data;-
379 } while (data->m_language_id == localeId.language_id);
never executed: end of block
data->m_langua...Id.language_idDescription
TRUEnever evaluated
FALSEnever evaluated
0
380 }
never executed: end of block
0
381-
382 return locale_data + idx;
never executed: return locale_data + idx;
0
383}-
384-
385static bool parse_locale_tag(const QString &input, int &i, QString *result, const QString &separators)-
386{-
387 *result = QString(8, Qt::Uninitialized); // worst case according to BCP47-
388 QChar *pch = result->data();-
389 const QChar *uc = input.data() + i;-
390 const int l = input.length();-
391 int size = 0;-
392 for (; i < l && size < 8; ++i, ++size) {
i < lDescription
TRUEevaluated 13443 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 561 times by 24 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
size < 8Description
TRUEevaluated 13443 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
0-13443
393 if (separators.contains(*uc))
separators.contains(*uc)Description
TRUEevaluated 4107 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 9336 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
4107-9336
394 break;
executed 4107 times by 22 tests: break;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
4107
395 if (! ((uc->unicode() >= 'a' && uc->unicode() <= 'z') ||
uc->unicode() >= 'a'Description
TRUEevaluated 4744 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 4592 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
uc->unicode() <= 'z'Description
TRUEevaluated 4744 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
0-4744
396 (uc->unicode() >= 'A' && uc->unicode() <= 'Z') ||
uc->unicode() >= 'A'Description
TRUEevaluated 4592 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
uc->unicode() <= 'Z'Description
TRUEevaluated 4592 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEnever evaluated
0-4592
397 (uc->unicode() >= '0' && uc->unicode() <= '9')) ) // latin only
uc->unicode() >= '0'Description
TRUEnever evaluated
FALSEnever evaluated
uc->unicode() <= '9'Description
TRUEnever evaluated
FALSEnever evaluated
0
398 return false;
never executed: return false;
0
399 *pch++ = *uc++;-
400 }
executed 9336 times by 25 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
9336
401 result->truncate(size);-
402 return true;
executed 4668 times by 25 tests: return true;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
4668
403}-
404-
405bool qt_splitLocaleName(const QString &name, QString &lang, QString &script, QString &cntry)-
406{-
407 const int length = name.length();-
408-
409 lang = script = cntry = QString();-
410-
411 const QString separators = QStringLiteral("_-.@");
executed 3171 times by 26 tests: return qstring_literal_temp;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3171
412 enum ParserState { NoState, LangState, ScriptState, CountryState };-
413 ParserState state = LangState;-
414 for (int i = 0; i < length && state != NoState; ) {
i < lengthDescription
TRUEevaluated 6479 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 1360 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • tst_selftests - unknown status
state != NoStateDescription
TRUEevaluated 4668 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 1811 times by 12 tests
Evaluated by:
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
1360-6479
415 QString value;-
416 if (!parse_locale_tag(name, i, &value, separators) ||value.isEmpty())
!parse_locale_...e, separators)Description
TRUEnever evaluated
FALSEevaluated 4668 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
value.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4668 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
0-4668
417 break;
never executed: break;
0
418 QChar sep = i < length ? name.at(i) : QChar();
i < lengthDescription
TRUEevaluated 4107 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 561 times by 24 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
561-4107
419 switch (state) {-
420 case LangState:
executed 2372 times by 25 tests: case LangState:
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2372
421 if (!sep.isNull() && !separators.contains(sep)) {
!sep.isNull()Description
TRUEevaluated 2296 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
FALSEevaluated 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
!separators.contains(sep)Description
TRUEnever evaluated
FALSEevaluated 2296 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
0-2296
422 state = NoState;-
423 break;
never executed: break;
0
424 }-
425 lang = value;-
426 if (i == length) {
i == lengthDescription
TRUEevaluated 76 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
FALSEevaluated 2296 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
76-2296
427 // just language was specified-
428 state = NoState;-
429 break;
executed 76 times by 6 tests: break;
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QString
  • tst_rcc
76
430 }-
431 state = ScriptState;-
432 break;
executed 2296 times by 22 tests: break;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2296
433 case ScriptState: {
executed 2296 times by 22 tests: case ScriptState:
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2296
434 QString scripts = QString::fromLatin1((const char *)script_code_list, sizeof(script_code_list) - 1);-
435 if (value.length() == 4 && scripts.indexOf(value) % 4 == 0) {
value.length() == 4Description
TRUEnever evaluated
FALSEevaluated 2296 times by 22 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
scripts.indexO...alue) % 4 == 0Description
TRUEnever evaluated
FALSEnever evaluated
0-2296
436 // script name is always 4 characters-
437 script = value;-
438 state = CountryState;-
439 } else {
never executed: end of block
0
440 // it wasn't a script, maybe it is a country then?-
441 cntry = value;-
442 state = NoState;-
443 }
executed 2296 times by 22 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2296
444 break;
executed 2296 times by 22 tests: break;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2296
445 }-
446 case CountryState:
never executed: case CountryState:
0
447 cntry = value;-
448 state = NoState;-
449 break;
never executed: break;
0
450 case NoState:
never executed: case NoState:
0
451 // shouldn't happen-
452 qWarning("QLocale: This should never happen");-
453 break;
never executed: break;
0
454 }-
455 ++i;-
456 }
executed 4668 times by 25 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
4668
457 return lang.length() == 2 || lang.length() == 3;
executed 3171 times by 26 tests: return lang.length() == 2 || lang.length() == 3;
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3171
458}-
459-
460void QLocalePrivate::getLangAndCountry(const QString &name, QLocale::Language &lang,-
461 QLocale::Script &script, QLocale::Country &cntry)-
462{-
463 lang = QLocale::C;-
464 script = QLocale::AnyScript;-
465 cntry = QLocale::AnyCountry;-
466-
467 QString lang_code;-
468 QString script_code;-
469 QString cntry_code;-
470 if (!qt_splitLocaleName(name, lang_code, script_code, cntry_code))
!qt_splitLocal...e, cntry_code)Description
TRUEevaluated 799 times by 3 tests
Evaluated by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
FALSEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
799-2372
471 return;
executed 799 times by 3 tests: return;
Executed by:
  • tst_QMetaType
  • tst_QTimeZone
  • tst_selftests - unknown status
799
472-
473 lang = QLocalePrivate::codeToLanguage(lang_code);-
474 if (lang == QLocale::C)
lang == QLocale::CDescription
TRUEnever evaluated
FALSEevaluated 2372 times by 25 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
0-2372
475 return;
never executed: return;
0
476 script = QLocalePrivate::codeToScript(script_code);-
477 cntry = QLocalePrivate::codeToCountry(cntry_code);-
478}
executed 2371 times by 25 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
2371
479-
480static const QLocaleData *findLocaleData(const QString &name)-
481{-
482 QLocale::Language lang;-
483 QLocale::Script script;-
484 QLocale::Country cntry;-
485 QLocalePrivate::getLangAndCountry(name, lang, script, cntry);-
486-
487 return QLocaleData::findLocaleData(lang, script, cntry);
executed 3170 times by 26 tests: return QLocaleData::findLocaleData(lang, script, cntry);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3170
488}-
489-
490QString qt_readEscapedFormatString(const QString &format, int *idx)-
491{-
492 int &i = *idx;-
493-
494 Q_ASSERT(format.at(i) == QLatin1Char('\''));-
495 ++i;-
496 if (i == format.size())
i == format.size()Description
TRUEnever evaluated
FALSEevaluated 1421 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
0-1421
497 return QString();
never executed: return QString();
0
498 if (format.at(i).unicode() == '\'') { // "''" outside of a quoted stirng
format.at(i).unicode() == '\''Description
TRUEnever evaluated
FALSEevaluated 1421 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
0-1421
499 ++i;-
500 return QLatin1String("'");
never executed: return QLatin1String("'");
0
501 }-
502-
503 QString result;-
504-
505 while (i < format.size()) {
i < format.size()Description
TRUEevaluated 4537 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 1210 times by 1 test
Evaluated by:
  • tst_QNetworkCookie
1210-4537
506 if (format.at(i).unicode() == '\'') {
format.at(i).unicode() == '\''Description
TRUEevaluated 211 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 4326 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
211-4326
507 if (i + 1 < format.size() && format.at(i + 1).unicode() == '\'') {
i + 1 < format.size()Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTimeEdit
FALSEevaluated 198 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
format.at(i + ...code() == '\''Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTimeEdit
0-198
508 // "''" inside of a quoted string-
509 result.append(QLatin1Char('\''));-
510 i += 2;-
511 } else {
never executed: end of block
0
512 break;
executed 211 times by 5 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
211
513 }-
514 } else {-
515 result.append(format.at(i++));-
516 }
executed 4326 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
4326
517 }-
518 if (i < format.size())
i < format.size()Description
TRUEevaluated 211 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 1210 times by 1 test
Evaluated by:
  • tst_QNetworkCookie
211-1210
519 ++i;
executed 211 times by 5 tests: ++i;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
211
520-
521 return result;
executed 1421 times by 6 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
1421
522}-
523-
524int qt_repeatCount(const QString &s, int i)-
525{-
526 QChar c = s.at(i);-
527 int j = i + 1;-
528 while (j < s.size() && s.at(j) == c)
j < s.size()Description
TRUEevaluated 443503 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 34921 times by 22 tests
Evaluated by:
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QVariant
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
s.at(j) == cDescription
TRUEevaluated 200024 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
FALSEevaluated 243479 times by 33 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
34921-443503
529 ++j;
executed 200024 times by 33 tests: ++j;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
200024
530 return j - i;
executed 278400 times by 33 tests: return j - i;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
278400
531}-
532-
533static const QLocaleData *default_data = 0;-
534static QLocale::NumberOptions default_number_options = QLocale::DefaultNumberOptions;-
535-
536static const QLocaleData *const c_data = locale_data;-
537static QLocalePrivate *c_private()-
538{-
539 static QLocalePrivate c_locale = { c_data, Q_BASIC_ATOMIC_INITIALIZER(1), QLocale::OmitGroupSeparator };-
540 return &c_locale;
executed 139167 times by 118 tests: return &c_locale;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QColumnView
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
139167
541}-
542-
543#ifndef QT_NO_SYSTEMLOCALE-
544-
545-
546/******************************************************************************-
547** Default system locale behavior-
548*/-
549-
550/*!-
551 Constructs a QSystemLocale object. The constructor will automatically-
552 install this object as the system locale and remove any earlier installed-
553 system locales.-
554*/-
555QSystemLocale::QSystemLocale()-
556{-
557 delete _systemLocale;-
558 _systemLocale = this;-
559-
560 if (system_data)
system_dataDescription
TRUEnever evaluated
FALSEnever evaluated
0
561 system_data->m_language_id = 0;
never executed: system_data->m_language_id = 0;
0
562}
never executed: end of block
0
563-
564/*!-
565 \internal-
566*/-
567QSystemLocale::QSystemLocale(bool)-
568{ }-
569-
570/*!-
571 Deletes the object.-
572*/-
573QSystemLocale::~QSystemLocale()-
574{-
575 if (_systemLocale == this) {
_systemLocale == thisDescription
TRUEnever evaluated
FALSEevaluated 1435 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
0-1435
576 _systemLocale = 0;-
577-
578 if (system_data)
system_dataDescription
TRUEnever evaluated
FALSEnever evaluated
0
579 system_data->m_language_id = 0;
never executed: system_data->m_language_id = 0;
0
580 }
never executed: end of block
0
581}
executed 1435 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1435
582-
583static const QSystemLocale *systemLocale()-
584{-
585 if (_systemLocale)
_systemLocaleDescription
TRUEnever evaluated
FALSEevaluated 18413 times by 30 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qmakelib
  • ...
0-18413
586 return _systemLocale;
never executed: return _systemLocale;
0
587 return QSystemLocale_globalSystemLocale();
executed 18413 times by 30 tests: return QSystemLocale_globalSystemLocale();
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qmakelib
  • ...
18413
588}-
589-
590void QLocalePrivate::updateSystemPrivate()-
591{-
592 const QSystemLocale *sys_locale = systemLocale();-
593 if (!system_data)
!system_dataDescription
TRUEevaluated 1016 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1016
594 system_data = &globalLocaleData;
executed 1016 times by 12 tests: system_data = &globalLocaleData;
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1016
595-
596 // tell the object that the system locale has changed.-
597 sys_locale->query(QSystemLocale::LocaleChanged, QVariant());-
598-
599 *system_data = *sys_locale->fallbackUiLocale().d->m_data;-
600-
601 QVariant res = sys_locale->query(QSystemLocale::LanguageId, QVariant());-
602 if (!res.isNull()) {
!res.isNull()Description
TRUEnever evaluated
FALSEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-1015
603 system_data->m_language_id = res.toInt();-
604 system_data->m_script_id = QLocale::AnyScript; // default for compatibility-
605 }
never executed: end of block
0
606 res = sys_locale->query(QSystemLocale::CountryId, QVariant());-
607 if (!res.isNull()) {
!res.isNull()Description
TRUEnever evaluated
FALSEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-1015
608 system_data->m_country_id = res.toInt();-
609 system_data->m_script_id = QLocale::AnyScript; // default for compatibility-
610 }
never executed: end of block
0
611 res = sys_locale->query(QSystemLocale::ScriptId, QVariant());-
612 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-1015
613 system_data->m_script_id = res.toInt();
never executed: system_data->m_script_id = res.toInt();
0
614-
615 res = sys_locale->query(QSystemLocale::DecimalPoint, QVariant());-
616 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1015
617 system_data->m_decimal = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_decimal = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
618-
619 res = sys_locale->query(QSystemLocale::GroupSeparator, QVariant());-
620 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1015
621 system_data->m_group = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_group = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
622-
623 res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant());-
624 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1015
625 system_data->m_zero = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_zero = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
626-
627 res = sys_locale->query(QSystemLocale::NegativeSign, QVariant());-
628 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1015
629 system_data->m_minus = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_minus = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
630-
631 res = sys_locale->query(QSystemLocale::PositiveSign, QVariant());-
632 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 1015 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1015
633 system_data->m_plus = res.toString().at(0).unicode();
executed 1015 times by 12 tests: system_data->m_plus = res.toString().at(0).unicode();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
634}
executed 1015 times by 12 tests: end of block
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
635#endif-
636-
637static const QLocaleData *systemData()-
638{-
639#ifndef QT_NO_SYSTEMLOCALE-
640 // copy over the information from the fallback locale and modify-
641 if (!system_data || system_data->m_language_id == 0)
!system_dataDescription
TRUEevaluated 1016 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 105070 times by 71 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
system_data->m...nguage_id == 0Description
TRUEnever evaluated
FALSEevaluated 105070 times by 71 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
0-105070
642 QLocalePrivate::updateSystemPrivate();
executed 1016 times by 12 tests: QLocalePrivate::updateSystemPrivate();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1016
643-
644 return system_data;
executed 106085 times by 81 tests: return system_data;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
106085
645#else-
646 return locale_data;-
647#endif-
648}-
649-
650static const QLocaleData *defaultData()-
651{-
652 if (!default_data)
!default_dataDescription
TRUEevaluated 1016 times by 12 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1016
653 default_data = systemData();
executed 1016 times by 12 tests: default_data = systemData();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1016
654 return default_data;
executed 1015 times by 12 tests: return default_data;
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1015
655}-
656-
657const QLocaleData *QLocaleData::c()-
658{-
659 Q_ASSERT(locale_index[QLocale::C] == 0);-
660 return c_data;
executed 5075198 times by 459 tests: return c_data;
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
5075198
661}-
662-
663static inline QString getLocaleData(const ushort *data, int size)-
664{-
665 return size > 0 ? QString::fromRawData(reinterpret_cast<const QChar *>(data), size) : QString();
executed 44365 times by 23 tests: return size > 0 ? QString::fromRawData(reinterpret_cast<const QChar *>(data), size) : QString();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QXmlStream
  • tst_languageChange
  • tst_qmakelib
44365
666}-
667-
668static QString getLocaleListData(const ushort *data, int size, int index)-
669{-
670 static const ushort separator = ';';-
671 while (index && size > 0) {
indexDescription
TRUEevaluated 150127 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEevaluated 34587 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
size > 0Description
TRUEevaluated 150127 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEnever evaluated
0-150127
672 while (*data != separator)
*data != separatorDescription
TRUEevaluated 585528 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEevaluated 150127 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
150127-585528
673 ++data, --size;
executed 585528 times by 14 tests: ++data, --size;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
585528
674 --index;-
675 ++data;-
676 --size;-
677 }
executed 150127 times by 14 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
150127
678 const ushort *end = data;-
679 while (size > 0 && *end != separator)
size > 0Description
TRUEevaluated 179244 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEnever evaluated
*end != separatorDescription
TRUEevaluated 144657 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
FALSEevaluated 34587 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
0-179244
680 ++end, --size;
executed 144657 times by 14 tests: ++end, --size;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
144657
681 return getLocaleData(data, end - data);
executed 34587 times by 14 tests: return getLocaleData(data, end - data);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
  • tst_qmakelib
34587
682}-
683-
684-
685#ifndef QT_NO_DATASTREAM-
686QDataStream &operator<<(QDataStream &ds, const QLocale &l)-
687{-
688 ds << l.name();-
689 return ds;
executed 3 times by 2 tests: return ds;
Executed by:
  • tst_QMetaType
  • tst_QVariant
3
690}-
691-
692QDataStream &operator>>(QDataStream &ds, QLocale &l)-
693{-
694 QString s;-
695 ds >> s;-
696 l = QLocale(s);-
697 return ds;
executed 7 times by 2 tests: return ds;
Executed by:
  • tst_QMetaType
  • tst_QVariant
7
698}-
699#endif // QT_NO_DATASTREAM-
700-
701-
702static const int locale_data_size = sizeof(locale_data)/sizeof(QLocaleData) - 1;-
703-
704Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer<QLocalePrivate>, defaultLocalePrivate,
executed 1438 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 1438 times by 508 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 459209 times by 201 tests: return &holder.value;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 1438 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEnever evaluated
0-459209
705 (QLocalePrivate::create(defaultData(), default_number_options)))-
706-
707static QLocalePrivate *localePrivateByName(const QString &name)-
708{-
709 if (name == QLatin1String("C"))
name == QLatin1String("C")Description
TRUEevaluated 7883 times by 6 tests
Evaluated by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_selftests - unknown status
FALSEevaluated 3171 times by 26 tests
Evaluated by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3171-7883
710 return c_private();
executed 7883 times by 6 tests: return c_private();
Executed by:
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_selftests - unknown status
7883
711 const QLocaleData *data = findLocaleData(name);-
712 return QLocalePrivate::create(data, data->m_language_id == QLocale::C ?
executed 3170 times by 26 tests: return QLocalePrivate::create(data, data->m_language_id == QLocale::C ? QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3170
713 QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
executed 3170 times by 26 tests: return QLocalePrivate::create(data, data->m_language_id == QLocale::C ? QLocale::OmitGroupSeparator : QLocale::DefaultNumberOptions);
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_rcc
  • ...
3170
714}-
715-
716static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Script script,-
717 QLocale::Country country)-
718{-
719 if (language == QLocale::C)
language == QLocale::CDescription
TRUEevaluated 131284 times by 117 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QColumnView
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
FALSEevaluated 64 times by 12 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QTime
  • tst_QWidget
64-131284
720 return c_private();
executed 131284 times by 117 tests: return c_private();
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QColumnView
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • ...
131284
721-
722 const QLocaleData *data = QLocaleData::findLocaleData(language, script, country);-
723-
724 QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions;-
725-
726 // If not found, should default to system-
727 if (data->m_language_id == QLocale::C && language != QLocale::C) {
data->m_langua... == QLocale::CDescription
TRUEnever evaluated
FALSEevaluated 64 times by 12 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QTime
  • tst_QWidget
language != QLocale::CDescription
TRUEnever evaluated
FALSEnever evaluated
0-64
728 numberOptions = default_number_options;-
729 data = defaultData();-
730 }
never executed: end of block
0
731 return QLocalePrivate::create(data, numberOptions);
executed 64 times by 12 tests: return QLocalePrivate::create(data, numberOptions);
Executed by:
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QIntValidator
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QString
  • tst_QTime
  • tst_QWidget
64
732}-
733-
734-
735/*!-
736 \internal-
737*/-
738QLocale::QLocale(QLocalePrivate &dd)-
739 : d(&dd)-
740{}
executed 37515 times by 68 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
37515
741-
742-
743/*!-
744 Constructs a QLocale object with the specified \a name,-
745 which has the format-
746 "language[_script][_country][.codeset][@modifier]" or "C", where:-
747-
748 \list-
749 \li language is a lowercase, two-letter, ISO 639 language code (also some three-letter codes),-
750 \li script is a titlecase, four-letter, ISO 15924 script code,-
751 \li country is an uppercase, two-letter, ISO 3166 country code (also "419" as defined by United Nations),-
752 \li and codeset and modifier are ignored.-
753 \endlist-
754-
755 The separator can be either underscore or a minus sign.-
756-
757 If the string violates the locale format, or language is not-
758 a valid ISO 639 code, the "C" locale is used instead. If country-
759 is not present, or is not a valid ISO 3166 code, the most-
760 appropriate country is chosen for the specified language.-
761-
762 The language, script and country codes are converted to their respective-
763 \c Language, \c Script and \c Country enums. After this conversion is-
764 performed, the constructor behaves exactly like QLocale(Country, Script,-
765 Language).-
766-
767 This constructor is much slower than QLocale(Country, Script, Language).-
768-
769 \sa bcp47Name()-
770*/-
771-
772QLocale::QLocale(const QString &name)-
773 : d(localePrivateByName(name))-
774{-
775}
executed 11053 times by 27 tests: end of block
Executed by:
  • tst_QCollator
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QVariant
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • ...
11053
776-
777/*!-
778 Constructs a QLocale object initialized with the default locale. If-
779 no default locale was set using setDefault(), this locale will-
780 be the same as the one returned by system().-
781-
782 \sa setDefault()-
783*/-
784-
785QLocale::QLocale()-
786 : d(*defaultLocalePrivate)-
787{-
788}
executed 456748 times by 200 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
456748
789-
790/*!-
791 Constructs a QLocale object with the specified \a language and \a-
792 country.-
793-
794 \list-
795 \li If the language/country pair is found in the database, it is used.-
796 \li If the language is found but the country is not, or if the country-
797 is \c AnyCountry, the language is used with the most-
798 appropriate available country (for example, Germany for German),-
799 \li If neither the language nor the country are found, QLocale-
800 defaults to the default locale (see setDefault()).-
801 \endlist-
802-
803 The language and country that are actually used can be queried-
804 using language() and country().-
805-
806 \sa setDefault(), language(), country()-
807*/-
808-
809QLocale::QLocale(Language language, Country country)-
810 : d(findLocalePrivate(language, QLocale::AnyScript, country))-
811{-
812}
executed 131348 times by 121 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QColumnView
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFile
  • tst_QFileDialog2
  • ...
131348
813-
814/*!-
815 \since 4.8-
816-
817 Constructs a QLocale object with the specified \a language, \a script and-
818 \a country.-
819-
820 \list-
821 \li If the language/script/country is found in the database, it is used.-
822 \li If both \a script is AnyScript and \a country is AnyCountry, the-
823 language is used with the most appropriate available script and country-
824 (for example, Germany for German),-
825 \li If either \a script is AnyScript or \a country is AnyCountry, the-
826 language is used with the first locale that matches the given \a script-
827 and \a country.-
828 \li If neither the language nor the country are found, QLocale-
829 defaults to the default locale (see setDefault()).-
830 \endlist-
831-
832 The language, script and country that are actually used can be queried-
833 using language(), script() and country().-
834-
835 \sa setDefault(), language(), script(), country()-
836*/-
837-
838QLocale::QLocale(Language language, Script script, Country country)-
839 : d(findLocalePrivate(language, script, country))-
840{-
841}
never executed: end of block
0
842-
843/*!-
844 Constructs a QLocale object as a copy of \a other.-
845*/-
846-
847QLocale::QLocale(const QLocale &other)-
848{-
849 d = other.d;-
850}
executed 119582 times by 138 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • ...
119582
851-
852/*!-
853 Destructor-
854*/-
855-
856QLocale::~QLocale()-
857{-
858}-
859-
860/*!-
861 Assigns \a other to this QLocale object and returns a reference-
862 to this QLocale object.-
863*/-
864-
865QLocale &QLocale::operator=(const QLocale &other)-
866{-
867 d = other.d;-
868 return *this;
executed 277365 times by 127 tests: return *this;
Executed by:
  • tst_ModelTest
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • ...
277365
869}-
870-
871bool QLocale::operator==(const QLocale &other) const-
872{-
873 return d->m_data == other.d->m_data && d->m_numberOptions == other.d->m_numberOptions;
executed 57140 times by 121 tests: return d->m_data == other.d->m_data && d->m_numberOptions == other.d->m_numberOptions;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
57140
874}-
875-
876bool QLocale::operator!=(const QLocale &other) const-
877{-
878 return d->m_data != other.d->m_data || d->m_numberOptions != other.d->m_numberOptions;
executed 46051 times by 51 tests: return d->m_data != other.d->m_data || d->m_numberOptions != other.d->m_numberOptions;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QBrush
  • tst_QColumnView
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleValidator
  • tst_QElapsedTimer
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGuiEventLoop
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QIntValidator
  • ...
46051
879}-
880-
881/*!-
882 \fn void QLocale::swap(QLocale &other)-
883 \since 5.6-
884-
885 Swaps locale \a other with this locale. This operation is very fast and-
886 never fails.-
887*/-
888-
889/*!-
890 \since 5.6-
891 \relates QLocale-
892-
893 Returns the hash value for \a key, using-
894 \a seed to seed the calculation.-
895*/-
896uint qHash(const QLocale &key, uint seed) Q_DECL_NOTHROW-
897{-
898 QtPrivate::QHashCombine hash;-
899 seed = hash(seed, key.d->m_data);-
900 seed = hash(seed, key.d->m_numberOptions);-
901 return seed;
never executed: return seed;
0
902}-
903-
904/*!-
905 \since 4.2-
906-
907 Sets the \a options related to number conversions for this-
908 QLocale instance.-
909*/-
910void QLocale::setNumberOptions(NumberOptions options)-
911{-
912 d->m_numberOptions = options;-
913}
executed 48162 times by 36 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSplitter
  • ...
48162
914-
915/*!-
916 \since 4.2-
917-
918 Returns the options related to number conversions for this-
919 QLocale instance.-
920-
921 By default, no options are set for the standard locales.-
922*/-
923QLocale::NumberOptions QLocale::numberOptions() const-
924{-
925 return static_cast<NumberOptions>(d->m_numberOptions);
executed 3878 times by 30 tests: return static_cast<NumberOptions>(d->m_numberOptions);
Executed by:
  • tst_QAccessibility
  • tst_QBrush
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGuiVariant
  • tst_QIntValidator
  • tst_QLineEdit
  • tst_QListView
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QOpenGlConfig
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • ...
3878
926}-
927-
928/*!-
929 \since 4.8-
930-
931 Returns \a str quoted according to the current locale using the given-
932 quotation \a style.-
933*/-
934QString QLocale::quoteString(const QString &str, QuotationStyle style) const-
935{-
936 return quoteString(&str, style);
never executed: return quoteString(&str, style);
0
937}-
938-
939/*!-
940 \since 4.8-
941-
942 \overload-
943*/-
944QString QLocale::quoteString(const QStringRef &str, QuotationStyle style) const-
945{-
946#ifndef QT_NO_SYSTEMLOCALE-
947 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
948 QVariant res;-
949 if (style == QLocale::AlternateQuotation)
style == QLoca...rnateQuotationDescription
TRUEnever evaluated
FALSEnever evaluated
0
950 res = systemLocale()->query(QSystemLocale::StringToAlternateQuotation, QVariant::fromValue(str));
never executed: res = systemLocale()->query(QSystemLocale::StringToAlternateQuotation, QVariant::fromValue(str));
0
951 if (res.isNull() || style == QLocale::StandardQuotation)
res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
style == QLoca...ndardQuotationDescription
TRUEnever evaluated
FALSEnever evaluated
0
952 res = systemLocale()->query(QSystemLocale::StringToStandardQuotation, QVariant::fromValue(str));
never executed: res = systemLocale()->query(QSystemLocale::StringToStandardQuotation, QVariant::fromValue(str));
0
953 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
954 return res.toString();
never executed: return res.toString();
0
955 }
never executed: end of block
0
956#endif-
957-
958 if (style == QLocale::StandardQuotation)
style == QLoca...ndardQuotationDescription
TRUEnever evaluated
FALSEnever evaluated
0
959 return QChar(d->m_data->m_quotation_start) % str % QChar(d->m_data->m_quotation_end);
never executed: return QChar(d->m_data->m_quotation_start) % str % QChar(d->m_data->m_quotation_end);
0
960 else-
961 return QChar(d->m_data->m_alternate_quotation_start) % str % QChar(d->m_data->m_alternate_quotation_end);
never executed: return QChar(d->m_data->m_alternate_quotation_start) % str % QChar(d->m_data->m_alternate_quotation_end);
0
962}-
963-
964/*!-
965 \since 4.8-
966-
967 Returns a string that represents a join of a given \a list of strings with-
968 a separator defined by the locale.-
969*/-
970QString QLocale::createSeparatedList(const QStringList &list) const-
971{-
972#ifndef QT_NO_SYSTEMLOCALE-
973 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEnever evaluated
FALSEnever evaluated
0
974 QVariant res;-
975 res = systemLocale()->query(QSystemLocale::ListToSeparatedString, QVariant::fromValue(list));-
976-
977 if (!res.isNull())
!res.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
978 return res.toString();
never executed: return res.toString();
0
979 }
never executed: end of block
0
980#endif-
981-
982 const int size = list.size();-
983 if (size == 1) {
size == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
984 return list.at(0);
never executed: return list.at(0);
0
985 } else if (size == 2) {
size == 2Description
TRUEnever evaluated
FALSEnever evaluated
0
986 QString format = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_two_idx, d->m_data->m_list_pattern_part_two_size);-
987 return format.arg(list.at(0), list.at(1));
never executed: return format.arg(list.at(0), list.at(1));
0
988 } else if (size > 2) {
size > 2Description
TRUEnever evaluated
FALSEnever evaluated
0
989 QString formatStart = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_start_idx, d->m_data->m_list_pattern_part_start_size);-
990 QString formatMid = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_mid_idx, d->m_data->m_list_pattern_part_mid_size);-
991 QString formatEnd = getLocaleData(list_pattern_part_data + d->m_data->m_list_pattern_part_end_idx, d->m_data->m_list_pattern_part_end_size);-
992 QString result = formatStart.arg(list.at(0), list.at(1));-
993 for (int i = 2; i < size - 1; ++i)
i < size - 1Description
TRUEnever evaluated
FALSEnever evaluated
0
994 result = formatMid.arg(result, list.at(i));
never executed: result = formatMid.arg(result, list.at(i));
0
995 result = formatEnd.arg(result, list.at(size - 1));-
996 return result;
never executed: return result;
0
997 }-
998-
999 return QString();
never executed: return QString();
0
1000}-
1001-
1002/*!-
1003 \nonreentrant-
1004-
1005 Sets the global default locale to \a locale. These-
1006 values are used when a QLocale object is constructed with-
1007 no arguments. If this function is not called, the system's-
1008 locale is used.-
1009-
1010 \warning In a multithreaded application, the default locale-
1011 should be set at application startup, before any non-GUI threads-
1012 are created.-
1013-
1014 \sa system(), c()-
1015*/-
1016-
1017void QLocale::setDefault(const QLocale &locale)-
1018{-
1019 default_data = locale.d->m_data;-
1020 default_number_options = locale.numberOptions();-
1021-
1022 if (defaultLocalePrivate.exists()) {
defaultLocalePrivate.exists()Description
TRUEevaluated 2461 times by 14 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_rcc
FALSEnever evaluated
0-2461
1023 // update the cached private-
1024 *defaultLocalePrivate = locale.d;-
1025 }
executed 2461 times by 14 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_rcc
2461
1026}
executed 2461 times by 14 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QIntValidator
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_QString
  • tst_QStringRef
  • tst_QTime
  • tst_rcc
2461
1027-
1028/*!-
1029 Returns the language of this locale.-
1030-
1031 \sa script(), country(), languageToString(), bcp47Name()-
1032*/-
1033QLocale::Language QLocale::language() const-
1034{-
1035 return Language(d->languageId());
executed 22225 times by 95 tests: return Language(d->languageId());
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
22225
1036}-
1037-
1038/*!-
1039 \since 4.8-
1040-
1041 Returns the script of this locale.-
1042-
1043 \sa language(), country(), languageToString(), scriptToString(), bcp47Name()-
1044*/-
1045QLocale::Script QLocale::script() const-
1046{-
1047 return Script(d->m_data->m_script_id);
executed 35 times by 35 tests: return Script(d->m_data->m_script_id);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QRadioButton
  • ...
35
1048}-
1049-
1050/*!-
1051 Returns the country of this locale.-
1052-
1053 \sa language(), script(), countryToString(), bcp47Name()-
1054*/-
1055QLocale::Country QLocale::country() const-
1056{-
1057 return Country(d->countryId());
executed 22216 times by 94 tests: return Country(d->countryId());
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • ...
22216
1058}-
1059-
1060/*!-
1061 Returns the language and country of this locale as a-
1062 string of the form "language_country", where-
1063 language is a lowercase, two-letter ISO 639 language code,-
1064 and country is an uppercase, two- or three-letter ISO 3166 country code.-
1065-
1066 Note that even if QLocale object was constructed with an explicit script,-
1067 name() will not contain it for compatibility reasons. Use bcp47Name() instead-
1068 if you need a full locale name.-
1069-
1070 \sa QLocale(), language(), script(), country(), bcp47Name()-
1071*/-
1072-
1073QString QLocale::name() const-
1074{-
1075 Language l = language();-
1076-
1077 QString result = d->languageCode();-
1078-
1079 if (l == C)
l == CDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTimeZone
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
18-3292
1080 return result;
executed 18 times by 2 tests: return result;
Executed by:
  • tst_QMimeDatabase
  • tst_QTimeZone
18
1081-
1082 Country c = country();-
1083 if (c == AnyCountry)
c == AnyCountryDescription
TRUEnever evaluated
FALSEevaluated 3292 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
0-3292
1084 return result;
never executed: return result;
0
1085-
1086 result.append(QLatin1Char('_'));-
1087 result.append(d->countryCode());-
1088-
1089 return result;
executed 3292 times by 13 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFileSelector
  • tst_QHttpNetworkConnection
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • tst_Spdy
3292
1090}-
1091-
1092static qlonglong toIntegral_helper(const QLocaleData *d, const QChar *data, int len, bool *ok,-
1093 QLocale::NumberOptions mode, qlonglong)-
1094{-
1095 return d->stringToLongLong(data, len, 10, ok, mode);
executed 1226 times by 16 tests: return d->stringToLongLong(data, len, 10, ok, mode);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
1226
1096}-
1097-
1098static qulonglong toIntegral_helper(const QLocaleData *d, const QChar *data, int len, bool *ok,-
1099 QLocale::NumberOptions mode, qulonglong)-
1100{-
1101 return d->stringToUnsLongLong(data, len, 10, ok, mode);
executed 15675 times by 11 tests: return d->stringToUnsLongLong(data, len, 10, ok, mode);
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
15675
1102}-
1103-
1104template <typename T> static inline-
1105T toIntegral_helper(const QLocalePrivate *d, const QChar *data, int len, bool *ok)-
1106{-
1107 // ### Qt6: use std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type-
1108 const bool isUnsigned = T(0) < T(-1);-
1109 typedef typename QtPrivate::QConditional<isUnsigned, qulonglong, qlonglong>::Type Int64;-
1110-
1111 // we select the right overload by the last, unused parameter-
1112 Int64 val = toIntegral_helper(d->m_data, data, len, ok, d->m_numberOptions, Int64());-
1113 if (T(val) != val) {
T(val) != valDescription
TRUEnever evaluated
FALSEevaluated 16901 times by 23 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
0-16901
1114 if (ok)
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
1115 *ok = false;
never executed: *ok = false;
0
1116 val = 0;-
1117 }
never executed: end of block
0
1118 return T(val);
executed 16901 times by 23 tests: return T(val);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QFtp
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_languageChange
16901
1119}-
1120-
1121-
1122/*!-
1123 \since 4.8-
1124-
1125 Returns the dash-separated language, script and country (and possibly other BCP47 fields)-
1126 of this locale as a string.-
1127-
1128 Unlike the uiLanguages() the returned value of the bcp47Name() represents-
1129 the locale name of the QLocale data but not the language the user-interface-
1130 should be in.-
1131-
1132 This function tries to conform the locale name to BCP47.-
1133-
1134 \sa language(), country(), script(), uiLanguages()-
1135*/-
1136QString QLocale::bcp47Name() const-
1137{-
1138 return QString::fromLatin1(d->bcp47Name());
executed 336 times by 13 tests: return QString::fromLatin1(d->bcp47Name());
Executed by:
  • tst_ModelTest
  • tst_QCollator
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
336
1139}-
1140-
1141/*!-
1142 Returns a QString containing the name of \a language.-
1143-
1144 \sa countryToString(), scriptToString(), bcp47Name()-
1145*/-
1146-
1147QString QLocale::languageToString(Language language)-
1148{-
1149 if (uint(language) > uint(QLocale::LastLanguage))
uint(language)...:LastLanguage)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
0-1
1150 return QLatin1String("Unknown");
never executed: return QLatin1String("Unknown");
0
1151 return QLatin1String(language_name_list + language_name_index[language]);
executed 1 time by 1 test: return QLatin1String(language_name_list + language_name_index[language]);
Executed by:
  • tst_QVariant
1
1152}-
1153-
1154/*!-
1155 Returns a QString containing the name of \a country.-
1156-
1157 \sa languageToString(), scriptToString(), country(), bcp47Name()-
1158*/-
1159-
1160QString QLocale::countryToString(Country country)-
1161{-
1162 if (uint(country) > uint(QLocale::LastCountry))
uint(country) ...::LastCountry)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
0-1
1163 return QLatin1String("Unknown");
never executed: return QLatin1String("Unknown");
0
1164 return QLatin1String(country_name_list + country_name_index[country]);
executed 1 time by 1 test: return QLatin1String(country_name_list + country_name_index[country]);
Executed by:
  • tst_QVariant
1
1165}-
1166-
1167/*!-
1168 \since 4.8-
1169-
1170 Returns a QString containing the name of \a script.-
1171-
1172 \sa languageToString(), countryToString(), script(), bcp47Name()-
1173*/-
1174QString QLocale::scriptToString(QLocale::Script script)-
1175{-
1176 if (uint(script) > uint(QLocale::LastScript))
uint(script) >...e::LastScript)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
0-1
1177 return QLatin1String("Unknown");
never executed: return QLatin1String("Unknown");
0
1178 return QLatin1String(script_name_list + script_name_index[script]);
executed 1 time by 1 test: return QLatin1String(script_name_list + script_name_index[script]);
Executed by:
  • tst_QVariant
1
1179}-
1180-
1181/*!-
1182 Returns the short int represented by the localized string \a s.-
1183-
1184 If the conversion fails the function returns 0.-
1185-
1186 If \a ok is not 0, failure is reported by setting *ok to false, and-
1187 success by setting *ok to true.-
1188-
1189 This function ignores leading and trailing whitespace.-
1190-
1191 \sa toUShort(), toString()-
1192*/-
1193-
1194short QLocale::toShort(const QString &s, bool *ok) const-
1195{-
1196 return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
0
1197}-
1198-
1199/*!-
1200 Returns the unsigned short int represented by the localized string \a s.-
1201-
1202 If the conversion fails the function returns 0.-
1203-
1204 If \a ok is not 0, failure is reported by setting *ok to false, and-
1205 success by setting *ok to true.-
1206-
1207 This function ignores leading and trailing whitespace.-
1208-
1209 \sa toShort(), toString()-
1210*/-
1211-
1212ushort QLocale::toUShort(const QString &s, bool *ok) const-
1213{-
1214 return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
0
1215}-
1216-
1217/*!-
1218 Returns the int represented by the localized string \a s.-
1219-
1220 If the conversion fails the function returns 0.-
1221-
1222 If \a ok is not 0, failure is reported by setting *ok to false, and-
1223 success by setting *ok to true.-
1224-
1225 This function ignores leading and trailing whitespace.-
1226-
1227 \sa toUInt(), toString()-
1228*/-
1229-
1230int QLocale::toInt(const QString &s, bool *ok) const-
1231{-
1232 return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
executed 1226 times by 16 tests: return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFontDialog
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
1226
1233}-
1234-
1235/*!-
1236 Returns the unsigned int represented by the localized string \a s.-
1237-
1238 If the conversion fails the function returns 0.-
1239-
1240 If \a ok is not 0, failure is reported by setting *ok to false, and-
1241 success by setting *ok to true.-
1242-
1243 This function ignores leading and trailing whitespace.-
1244-
1245 \sa toInt(), toString()-
1246*/-
1247-
1248uint QLocale::toUInt(const QString &s, bool *ok) const-
1249{-
1250 return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
0
1251}-
1252-
1253/*!-
1254 Returns the long long int represented by the localized string \a s.-
1255-
1256 If the conversion fails the function returns 0.-
1257-
1258 If \a ok is not 0, failure is reported by setting *ok to false, and-
1259 success by setting *ok to true.-
1260-
1261 This function ignores leading and trailing whitespace.-
1262-
1263 \sa toInt(), toULongLong(), toDouble(), toString()-
1264*/-
1265-
1266-
1267qlonglong QLocale::toLongLong(const QString &s, bool *ok) const-
1268{-
1269 return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
0
1270}-
1271-
1272/*!-
1273 Returns the unsigned long long int represented by the localized-
1274 string \a s.-
1275-
1276 If the conversion fails the function returns 0.-
1277-
1278 If \a ok is not 0, failure is reported by setting *ok to false, and-
1279 success by setting *ok to true.-
1280-
1281 This function ignores leading and trailing whitespace.-
1282-
1283 \sa toLongLong(), toInt(), toDouble(), toString()-
1284*/-
1285-
1286qulonglong QLocale::toULongLong(const QString &s, bool *ok) const-
1287{-
1288 return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
0
1289}-
1290-
1291/*!-
1292 Returns the float represented by the localized string \a s, or 0.0-
1293 if the conversion failed.-
1294-
1295 If \a ok is not 0, reports failure by setting-
1296 *ok to false and success by setting *ok to true.-
1297-
1298 This function ignores leading and trailing whitespace.-
1299-
1300 \sa toDouble(), toInt(), toString()-
1301*/-
1302-
1303float QLocale::toFloat(const QString &s, bool *ok) const-
1304{-
1305 return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
never executed: return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
0
1306}-
1307-
1308/*!-
1309 Returns the double represented by the localized string \a s, or-
1310 0.0 if the conversion failed.-
1311-
1312 If \a ok is not 0, reports failure by setting-
1313 *ok to false and success by setting *ok to true.-
1314-
1315 Unlike QString::toDouble(), this function does not fall back to-
1316 the "C" locale if the string cannot be interpreted in this-
1317 locale.-
1318-
1319 \snippet code/src_corelib_tools_qlocale.cpp 3-
1320-
1321 Notice that the last conversion returns 1234.0, because '.' is the-
1322 thousands group separator in the German locale.-
1323-
1324 This function ignores leading and trailing whitespace.-
1325-
1326 \sa toFloat(), toInt(), toString()-
1327*/-
1328-
1329double QLocale::toDouble(const QString &s, bool *ok) const-
1330{-
1331 return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
executed 1212 times by 7 tests: return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
Executed by:
  • tst_QAccessibility
  • tst_QDoubleSpinBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QPrinter
  • tst_QSpinBox
  • tst_QTextStream
1212
1332}-
1333-
1334/*!-
1335 Returns the short int represented by the localized string \a s.-
1336-
1337 If the conversion fails the function returns 0.-
1338-
1339 If \a ok is not null, failure is reported by setting *ok to false, and-
1340 success by setting *ok to true.-
1341-
1342 This function ignores leading and trailing whitespace.-
1343-
1344 \sa toUShort(), toString()-
1345-
1346 \since 5.1-
1347*/-
1348-
1349short QLocale::toShort(const QStringRef &s, bool *ok) const-
1350{-
1351 return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<short>(d, s.constData(), s.size(), ok);
0
1352}-
1353-
1354/*!-
1355 Returns the unsigned short int represented by the localized string \a s.-
1356-
1357 If the conversion fails the function returns 0.-
1358-
1359 If \a ok is not null, failure is reported by setting *ok to false, and-
1360 success by setting *ok to true.-
1361-
1362 This function ignores leading and trailing whitespace.-
1363-
1364 \sa toShort(), toString()-
1365-
1366 \since 5.1-
1367*/-
1368-
1369ushort QLocale::toUShort(const QStringRef &s, bool *ok) const-
1370{-
1371 return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<ushort>(d, s.constData(), s.size(), ok);
0
1372}-
1373-
1374/*!-
1375 Returns the int represented by the localized string \a s.-
1376-
1377 If the conversion fails the function returns 0.-
1378-
1379 If \a ok is not null, failure is reported by setting *ok to false, and-
1380 success by setting *ok to true.-
1381-
1382 This function ignores leading and trailing whitespace.-
1383-
1384 \sa toUInt(), toString()-
1385-
1386 \since 5.1-
1387*/-
1388-
1389int QLocale::toInt(const QStringRef &s, bool *ok) const-
1390{-
1391 return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<int>(d, s.constData(), s.size(), ok);
0
1392}-
1393-
1394/*!-
1395 Returns the unsigned int represented by the localized string \a s.-
1396-
1397 If the conversion fails the function returns 0.-
1398-
1399 If \a ok is not null, failure is reported by setting *ok to false, and-
1400 success by setting *ok to true.-
1401-
1402 This function ignores leading and trailing whitespace.-
1403-
1404 \sa toInt(), toString()-
1405-
1406 \since 5.1-
1407*/-
1408-
1409uint QLocale::toUInt(const QStringRef &s, bool *ok) const-
1410{-
1411 return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
executed 15675 times by 11 tests: return toIntegral_helper<uint>(d, s.constData(), s.size(), ok);
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
15675
1412}-
1413-
1414/*!-
1415 Returns the long long int represented by the localized string \a s.-
1416-
1417 If the conversion fails the function returns 0.-
1418-
1419 If \a ok is not null, failure is reported by setting *ok to false, and-
1420 success by setting *ok to true.-
1421-
1422 This function ignores leading and trailing whitespace.-
1423-
1424 \sa toInt(), toULongLong(), toDouble(), toString()-
1425-
1426 \since 5.1-
1427*/-
1428-
1429-
1430qlonglong QLocale::toLongLong(const QStringRef &s, bool *ok) const-
1431{-
1432 return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qlonglong>(d, s.constData(), s.size(), ok);
0
1433}-
1434-
1435/*!-
1436 Returns the unsigned long long int represented by the localized-
1437 string \a s.-
1438-
1439 If the conversion fails the function returns 0.-
1440-
1441 If \a ok is not null, failure is reported by setting *ok to false, and-
1442 success by setting *ok to true.-
1443-
1444 This function ignores leading and trailing whitespace.-
1445-
1446 \sa toLongLong(), toInt(), toDouble(), toString()-
1447-
1448 \since 5.1-
1449*/-
1450-
1451qulonglong QLocale::toULongLong(const QStringRef &s, bool *ok) const-
1452{-
1453 return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
never executed: return toIntegral_helper<qulonglong>(d, s.constData(), s.size(), ok);
0
1454}-
1455-
1456/*!-
1457 Returns the float represented by the localized string \a s, or 0.0-
1458 if the conversion failed.-
1459-
1460 If \a ok is not null, reports failure by setting-
1461 *ok to false and success by setting *ok to true.-
1462-
1463 This function ignores leading and trailing whitespace.-
1464-
1465 \sa toDouble(), toInt(), toString()-
1466-
1467 \since 5.1-
1468*/-
1469-
1470float QLocale::toFloat(const QStringRef &s, bool *ok) const-
1471{-
1472 return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
never executed: return QLocaleData::convertDoubleToFloat(toDouble(s, ok), ok);
0
1473}-
1474-
1475/*!-
1476 Returns the double represented by the localized string \a s, or-
1477 0.0 if the conversion failed.-
1478-
1479 If \a ok is not null, reports failure by setting-
1480 *ok to false and success by setting *ok to true.-
1481-
1482 Unlike QString::toDouble(), this function does not fall back to-
1483 the "C" locale if the string cannot be interpreted in this-
1484 locale.-
1485-
1486 \snippet code/src_corelib_tools_qlocale.cpp 3-
1487-
1488 Notice that the last conversion returns 1234.0, because '.' is the-
1489 thousands group separator in the German locale.-
1490-
1491 This function ignores leading and trailing whitespace.-
1492-
1493 \sa toFloat(), toInt(), toString()-
1494-
1495 \since 5.1-
1496*/-
1497-
1498double QLocale::toDouble(const QStringRef &s, bool *ok) const-
1499{-
1500 return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
never executed: return d->m_data->stringToDouble(s.constData(), s.size(), ok, d->m_numberOptions);
0
1501}-
1502-
1503-
1504/*!-
1505 Returns a localized string representation of \a i.-
1506-
1507 \sa toLongLong()-
1508*/-
1509-
1510QString QLocale::toString(qlonglong i) const-
1511{-
1512 int flags = d->m_numberOptions & OmitGroupSeparator
d->m_numberOpt...GroupSeparatorDescription
TRUEevaluated 11586 times by 12 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QSortFilterProxyModel
  • tst_QSpinBox
  • tst_QTableView
  • tst_QTreeView
FALSEevaluated 1655 times by 20 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
1655-11586
1513 ? 0-
1514 : QLocaleData::ThousandsGroup;-
1515-
1516 return d->m_data->longLongToString(i, -1, 10, -1, flags);
executed 13241 times by 26 tests: return d->m_data->longLongToString(i, -1, 10, -1, flags);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QProgressDialog
  • tst_QSortFilterProxyModel
  • tst_QSpinBox
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTreeView
  • ...
13241
1517}-
1518-
1519/*!-
1520 \overload-
1521-
1522 \sa toULongLong()-
1523*/-
1524-
1525QString QLocale::toString(qulonglong i) const-
1526{-
1527 int flags = d->m_numberOptions & OmitGroupSeparator
d->m_numberOpt...GroupSeparatorDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QItemDelegate
FALSEevaluated 290 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QItemModel
12-290
1528 ? 0-
1529 : QLocaleData::ThousandsGroup;-
1530-
1531 return d->m_data->unsLongLongToString(i, -1, 10, -1, flags);
executed 302 times by 2 tests: return d->m_data->unsLongLongToString(i, -1, 10, -1, flags);
Executed by:
  • tst_QItemDelegate
  • tst_QItemModel
302
1532}-
1533-
1534/*!-
1535 Returns a localized string representation of the given \a date in the-
1536 specified \a format.-
1537 If \a format is an empty string, an empty string is returned.-
1538*/-
1539-
1540QString QLocale::toString(const QDate &date, const QString &format) const-
1541{-
1542 return d->dateTimeToString(format, QDateTime(), date, QTime(), this);
executed 14106 times by 8 tests: return d->dateTimeToString(format, QDateTime(), date, QTime(), this);
Executed by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QVariant
14106
1543}-
1544-
1545/*!-
1546 Returns a localized string representation of the given \a date according-
1547 to the specified \a format.-
1548*/-
1549-
1550QString QLocale::toString(const QDate &date, FormatType format) const-
1551{-
1552 if (!date.isValid())
!date.isValid()Description
TRUEnever evaluated
FALSEevaluated 204 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
0-204
1553 return QString();
never executed: return QString();
0
1554-
1555#ifndef QT_NO_SYSTEMLOCALE-
1556 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
FALSEevaluated 128 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
76-128
1557 QVariant res = systemLocale()->query(format == LongFormat-
1558 ? QSystemLocale::DateToStringLong : QSystemLocale::DateToStringShort,-
1559 date);-
1560 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QItemDelegate
FALSEnever evaluated
0-76
1561 return res.toString();
executed 76 times by 2 tests: return res.toString();
Executed by:
  • tst_QDate
  • tst_QItemDelegate
76
1562 }
never executed: end of block
0
1563#endif-
1564-
1565 QString format_str = dateFormat(format);-
1566 return toString(date, format_str);
executed 128 times by 2 tests: return toString(date, format_str);
Executed by:
  • tst_QDate
  • tst_QItemDelegate
128
1567}-
1568-
1569static bool timeFormatContainsAP(const QString &format)-
1570{-
1571 int i = 0;-
1572 while (i < format.size()) {
i < format.size()Description
TRUEevaluated 312089 times by 27 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
FALSEevaluated 18727 times by 19 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
18727-312089
1573 if (format.at(i).unicode() == '\'') {
format.at(i).unicode() == '\''Description
TRUEevaluated 694 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
FALSEevaluated 311395 times by 27 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
694-311395
1574 qt_readEscapedFormatString(format, &i);-
1575 continue;
executed 694 times by 6 tests: continue;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QXmlStream
694
1576 }-
1577-
1578 if (format.at(i).toLower().unicode() == 'a')
format.at(i).t...icode() == 'a'Description
TRUEevaluated 3524 times by 12 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
FALSEevaluated 307871 times by 27 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
3524-307871
1579 return true;
executed 3524 times by 12 tests: return true;
Executed by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QTime
  • tst_languageChange
3524
1580-
1581 ++i;-
1582 }
executed 307871 times by 27 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • ...
307871
1583 return false;
executed 18727 times by 19 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QTime
  • tst_QVariant
  • tst_QXmlStream
  • tst_selftests - unknown status
18727
1584}-
1585-
1586/*!-
1587 Returns a localized string representation of the given \a time according-
1588 to the specified \a format.-
1589 If \a format is an empty string, an empty string is returned.-
1590*/-
1591QString QLocale::toString(const QTime &time, const QString &format) const-
1592{-
1593 return d->dateTimeToString(format, QDateTime(), QDate(), time, this);
executed 14816 times by 7 tests: return d->dateTimeToString(format, QDateTime(), QDate(), time, this);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
14816
1594}-
1595-
1596/*!-
1597 \since 4.4-
1598-
1599 Returns a localized string representation of the given \a dateTime according-
1600 to the specified \a format.-
1601 If \a format is an empty string, an empty string is returned.-
1602*/-
1603-
1604QString QLocale::toString(const QDateTime &dateTime, const QString &format) const-
1605{-
1606 return d->dateTimeToString(format, dateTime, QDate(), QTime(), this);
executed 10235 times by 30 tests: return d->dateTimeToString(format, dateTime, QDate(), QTime(), this);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QVariant
  • ...
10235
1607}-
1608-
1609/*!-
1610 \since 4.4-
1611-
1612 Returns a localized string representation of the given \a dateTime according-
1613 to the specified \a format.-
1614*/-
1615-
1616QString QLocale::toString(const QDateTime &dateTime, FormatType format) const-
1617{-
1618 if (!dateTime.isValid())
!dateTime.isValid()Description
TRUEnever evaluated
FALSEevaluated 5449 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
0-5449
1619 return QString();
never executed: return QString();
0
1620-
1621#ifndef QT_NO_SYSTEMLOCALE-
1622 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 2723 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
FALSEevaluated 2726 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2723-2726
1623 QVariant res = systemLocale()->query(format == LongFormat-
1624 ? QSystemLocale::DateTimeToStringLong-
1625 : QSystemLocale::DateTimeToStringShort,-
1626 dateTime);-
1627 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 2723 times by 8 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
FALSEnever evaluated
0-2723
1628 return res.toString();
executed 2723 times by 8 tests: return res.toString();
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2723
1629 }
never executed: end of block
0
1630#endif-
1631-
1632 const QString format_str = dateTimeFormat(format);-
1633 return toString(dateTime, format_str);
executed 2726 times by 8 tests: return toString(dateTime, format_str);
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2726
1634}-
1635-
1636-
1637/*!-
1638 Returns a localized string representation of the given \a time in the-
1639 specified \a format.-
1640*/-
1641-
1642QString QLocale::toString(const QTime &time, FormatType format) const-
1643{-
1644 if (!time.isValid())
!time.isValid()Description
TRUEnever evaluated
FALSEevaluated 64 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
0-64
1645 return QString();
never executed: return QString();
0
1646-
1647#ifndef QT_NO_SYSTEMLOCALE-
1648 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
FALSEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
30-34
1649 QVariant res = systemLocale()->query(format == LongFormat-
1650 ? QSystemLocale::TimeToStringLong : QSystemLocale::TimeToStringShort,-
1651 time);-
1652 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QItemDelegate
  • tst_QTime
FALSEnever evaluated
0-30
1653 return res.toString();
executed 30 times by 2 tests: return res.toString();
Executed by:
  • tst_QItemDelegate
  • tst_QTime
30
1654 }
never executed: end of block
0
1655#endif-
1656-
1657 QString format_str = timeFormat(format);-
1658 return toString(time, format_str);
executed 34 times by 2 tests: return toString(time, format_str);
Executed by:
  • tst_QItemDelegate
  • tst_QTime
34
1659}-
1660-
1661/*!-
1662 \since 4.1-
1663-
1664 Returns the date format used for the current locale.-
1665-
1666 If \a format is LongFormat the format will be a long version.-
1667 Otherwise it uses a shorter version.-
1668-
1669 \sa QDate::toString(), QDate::fromString()-
1670*/-
1671-
1672QString QLocale::dateFormat(FormatType format) const-
1673{-
1674#ifndef QT_NO_SYSTEMLOCALE-
1675 if (d->m_data == systemData()) {
d->m_data == systemData()Description
TRUEevaluated 11 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEevaluated 3092 times by 13 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QStyleSheetStyle
  • tst_languageChange
11-3092
1676 QVariant res = systemLocale()->query(format == LongFormat-
1677 ? QSystemLocale::DateFormatLong : QSystemLocale::DateFormatShort,-
1678 QVariant());-
1679 if (!res.isNull())
!res.isNull()Description
TRUEevaluated 11 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEnever evaluated
0-11