qlocale_unix.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qlocale_unix.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtCore module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qlocale_p.h"-
41-
42#include "qstringbuilder.h"-
43#include "qdatetime.h"-
44#include "qstringlist.h"-
45#include "qvariant.h"-
46#include "qreadwritelock.h"-
47-
48QT_BEGIN_NAMESPACE-
49-
50#ifndef QT_NO_SYSTEMLOCALE-
51struct QSystemLocaleData-
52{-
53 QSystemLocaleData()-
54 : lc_numeric(QLocale::C)-
55 ,lc_time(QLocale::C)-
56 ,lc_monetary(QLocale::C)-
57 ,lc_messages(QLocale::C)-
58 {-
59 readEnvironment();-
60 }
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
61-
62 void readEnvironment();-
63-
64 QReadWriteLock lock;-
65-
66 QLocale lc_numeric;-
67 QLocale lc_time;-
68 QLocale lc_monetary;-
69 QLocale lc_messages;-
70 QByteArray lc_messages_var;-
71 QByteArray lc_measurement_var;-
72 QStringList uiLanguages;-
73};-
74-
75void QSystemLocaleData::readEnvironment()-
76{-
77 QWriteLocker locker(&lock);-
78-
79 QByteArray all = qgetenv("LC_ALL");-
80 QByteArray numeric = all.isEmpty() ? qgetenv("LC_NUMERIC") : all;
all.isEmpty()Description
TRUEevaluated 2031 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-2031
81 QByteArray time = all.isEmpty() ? qgetenv("LC_TIME") : all;
all.isEmpty()Description
TRUEevaluated 2031 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-2031
82 QByteArray monetary = all.isEmpty() ? qgetenv("LC_MONETARY") : all;
all.isEmpty()Description
TRUEevaluated 2031 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-2031
83 lc_messages_var = all.isEmpty() ? qgetenv("LC_MESSAGES") : all;
all.isEmpty()Description
TRUEevaluated 2031 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-2031
84 lc_measurement_var = all.isEmpty() ? qgetenv("LC_MEASUREMENT") : all;
all.isEmpty()Description
TRUEevaluated 2031 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-2031
85 QByteArray lang = qgetenv("LANG");-
86 if (lang.isEmpty())
lang.isEmpty()Description
TRUEevaluated 1578 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 453 times by 11 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
453-1578
87 lang = QByteArray("C");
executed 1578 times by 1 test: lang = QByteArray("C");
Executed by:
  • tst_selftests - unknown status
1578
88 if (numeric.isEmpty())
numeric.isEmpty()Description
TRUEevaluated 2031 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-2031
89 numeric = lang;
executed 2031 times by 12 tests: numeric = lang;
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
2031
90 if (time.isEmpty())
time.isEmpty()Description
TRUEevaluated 2031 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-2031
91 time = lang;
executed 2031 times by 12 tests: time = lang;
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
2031
92 if (monetary.isEmpty())
monetary.isEmpty()Description
TRUEevaluated 2031 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-2031
93 monetary = lang;
executed 2031 times by 12 tests: monetary = lang;
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
2031
94 if (lc_messages_var.isEmpty())
lc_messages_var.isEmpty()Description
TRUEevaluated 2031 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-2031
95 lc_messages_var = lang;
executed 2031 times by 12 tests: lc_messages_var = lang;
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
2031
96 if (lc_measurement_var.isEmpty())
lc_measurement_var.isEmpty()Description
TRUEevaluated 2031 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-2031
97 lc_measurement_var = lang;
executed 2031 times by 12 tests: lc_measurement_var = lang;
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
2031
98 lc_numeric = QLocale(QString::fromLatin1(numeric));-
99 lc_time = QLocale(QString::fromLatin1(time));-
100 lc_monetary = QLocale(QString::fromLatin1(monetary));-
101 lc_messages = QLocale(QString::fromLatin1(lc_messages_var));-
102}
executed 2030 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
2030
103-
104Q_GLOBAL_STATIC(QSystemLocaleData, qSystemLocaleData)
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 26532 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-26532
105-
106#endif-
107-
108#ifndef QT_NO_SYSTEMLOCALE-
109-
110QLocale QSystemLocale::fallbackUiLocale() const-
111{-
112 QByteArray lang = qgetenv("LC_ALL");-
113 if (lang.isEmpty())
lang.isEmpty()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
114 lang = qgetenv("LC_MESSAGES");
executed 1015 times by 12 tests: lang = qgetenv("LC_MESSAGES");
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
115 if (lang.isEmpty())
lang.isEmpty()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
116 lang = qgetenv("LANG");
executed 1015 times by 12 tests: lang = qgetenv("LANG");
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
117 // if the locale is the "C" locale, then we can return the language we found here:-
118 if (lang.isEmpty() || lang == QByteArray("C") || lang == QByteArray("POSIX"))
lang.isEmpty()Description
TRUEevaluated 789 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 226 times by 11 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
lang == QByteArray("C")Description
TRUEnever evaluated
FALSEevaluated 226 times by 11 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
lang == QByteArray("POSIX")Description
TRUEnever evaluated
FALSEevaluated 226 times by 11 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
0-789
119 return QLocale(QString::fromLatin1(lang));
executed 789 times by 1 test: return QLocale(QString::fromLatin1(lang));
Executed by:
  • tst_selftests - unknown status
789
120-
121 // if the locale is not the "C" locale and LANGUAGE is not empty, return-
122 // the first part of LANGUAGE if LANGUAGE is set and has a first part:-
123 QByteArray language = qgetenv("LANGUAGE");-
124 if (!language.isEmpty()) {
!language.isEmpty()Description
TRUEevaluated 226 times by 11 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
FALSEnever evaluated
0-226
125 language = language.split(':').constFirst();-
126 if (!language.isEmpty())
!language.isEmpty()Description
TRUEevaluated 226 times by 11 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
FALSEnever evaluated
0-226
127 return QLocale(QString::fromLatin1(language));
executed 226 times by 11 tests: return QLocale(QString::fromLatin1(language));
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
226
128 }
never executed: end of block
0
129-
130 return QLocale(QString::fromLatin1(lang));
never executed: return QLocale(QString::fromLatin1(lang));
0
131}-
132-
133QVariant QSystemLocale::query(QueryType type, QVariant in) const-
134{-
135 QSystemLocaleData *d = qSystemLocaleData();-
136-
137 if (type == LocaleChanged) {
type == LocaleChangedDescription
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
FALSEevaluated 25517 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
  • ...
1015-25517
138 d->readEnvironment();-
139 return QVariant();
executed 1015 times by 12 tests: return QVariant();
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
140 }-
141-
142 QReadLocker locker(&d->lock);-
143-
144 const QLocale &lc_numeric = d->lc_numeric;-
145 const QLocale &lc_time = d->lc_time;-
146 const QLocale &lc_monetary = d->lc_monetary;-
147 const QLocale &lc_messages = d->lc_messages;-
148-
149 switch (type) {-
150 case DecimalPoint:
executed 1015 times by 12 tests: case DecimalPoint:
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
151 return lc_numeric.decimalPoint();
executed 1015 times by 12 tests: return lc_numeric.decimalPoint();
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
152 case GroupSeparator:
executed 1015 times by 12 tests: case GroupSeparator:
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
153 return lc_numeric.groupSeparator();
executed 1015 times by 12 tests: return lc_numeric.groupSeparator();
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
154 case ZeroDigit:
executed 1015 times by 12 tests: case ZeroDigit:
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
155 return lc_numeric.zeroDigit();
executed 1015 times by 12 tests: return lc_numeric.zeroDigit();
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
156 case NegativeSign:
executed 1015 times by 12 tests: case NegativeSign:
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
157 return lc_numeric.negativeSign();
executed 1015 times by 12 tests: return lc_numeric.negativeSign();
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
158 case DateFormatLong:
never executed: case DateFormatLong:
0
159 return lc_time.dateFormat(QLocale::LongFormat);
never executed: return lc_time.dateFormat(QLocale::LongFormat);
0
160 case DateFormatShort:
executed 11 times by 4 tests: case DateFormatShort:
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
11
161 return lc_time.dateFormat(QLocale::ShortFormat);
executed 11 times by 4 tests: return lc_time.dateFormat(QLocale::ShortFormat);
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
11
162 case TimeFormatLong:
never executed: case TimeFormatLong:
0
163 return lc_time.timeFormat(QLocale::LongFormat);
never executed: return lc_time.timeFormat(QLocale::LongFormat);
0
164 case TimeFormatShort:
executed 11 times by 4 tests: case TimeFormatShort:
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
11
165 return lc_time.timeFormat(QLocale::ShortFormat);
executed 11 times by 4 tests: return lc_time.timeFormat(QLocale::ShortFormat);
Executed by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
11
166 case DayNameLong:
executed 252 times by 3 tests: case DayNameLong:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
252
167 return lc_time.dayName(in.toInt(), QLocale::LongFormat);
executed 252 times by 3 tests: return lc_time.dayName(in.toInt(), QLocale::LongFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
252
168 case DayNameShort:
executed 935 times by 6 tests: case DayNameShort:
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
935
169 return lc_time.dayName(in.toInt(), QLocale::ShortFormat);
executed 935 times by 6 tests: return lc_time.dayName(in.toInt(), QLocale::ShortFormat);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
935
170 case MonthNameLong:
executed 3559 times by 3 tests: case MonthNameLong:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
3559
171 return lc_time.monthName(in.toInt(), QLocale::LongFormat);
executed 3559 times by 3 tests: return lc_time.monthName(in.toInt(), QLocale::LongFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
3559
172 case MonthNameShort:
executed 8303 times by 5 tests: case MonthNameShort:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_qmakelib
8303
173 return lc_time.monthName(in.toInt(), QLocale::ShortFormat);
executed 8303 times by 5 tests: return lc_time.monthName(in.toInt(), QLocale::ShortFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_qmakelib
8303
174 case StandaloneMonthNameLong:
executed 513 times by 3 tests: case StandaloneMonthNameLong:
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
513
175 return lc_time.standaloneMonthName(in.toInt(), QLocale::LongFormat);
executed 513 times by 3 tests: return lc_time.standaloneMonthName(in.toInt(), QLocale::LongFormat);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
513
176 case StandaloneMonthNameShort:
executed 24 times by 1 test: case StandaloneMonthNameShort:
Executed by:
  • tst_QDate
24
177 return lc_time.standaloneMonthName(in.toInt(), QLocale::ShortFormat);
executed 24 times by 1 test: return lc_time.standaloneMonthName(in.toInt(), QLocale::ShortFormat);
Executed by:
  • tst_QDate
24
178 case DateToStringLong:
executed 33 times by 2 tests: case DateToStringLong:
Executed by:
  • tst_QDate
  • tst_QItemDelegate
33
179 return lc_time.toString(in.toDate(), QLocale::LongFormat);
executed 33 times by 2 tests: return lc_time.toString(in.toDate(), QLocale::LongFormat);
Executed by:
  • tst_QDate
  • tst_QItemDelegate
33
180 case DateToStringShort:
executed 43 times by 2 tests: case DateToStringShort:
Executed by:
  • tst_QDate
  • tst_QItemDelegate
43
181 return lc_time.toString(in.toDate(), QLocale::ShortFormat);
executed 43 times by 2 tests: return lc_time.toString(in.toDate(), QLocale::ShortFormat);
Executed by:
  • tst_QDate
  • tst_QItemDelegate
43
182 case TimeToStringLong:
executed 9 times by 2 tests: case TimeToStringLong:
Executed by:
  • tst_QItemDelegate
  • tst_QTime
9
183 return lc_time.toString(in.toTime(), QLocale::LongFormat);
executed 9 times by 2 tests: return lc_time.toString(in.toTime(), QLocale::LongFormat);
Executed by:
  • tst_QItemDelegate
  • tst_QTime
9
184 case TimeToStringShort:
executed 21 times by 2 tests: case TimeToStringShort:
Executed by:
  • tst_QItemDelegate
  • tst_QTime
21
185 return lc_time.toString(in.toTime(), QLocale::ShortFormat);
executed 21 times by 2 tests: return lc_time.toString(in.toTime(), QLocale::ShortFormat);
Executed by:
  • tst_QItemDelegate
  • tst_QTime
21
186 case DateTimeFormatLong:
executed 1 time by 1 test: case DateTimeFormatLong:
Executed by:
  • tst_QDateTime
1
187 return lc_time.dateTimeFormat(QLocale::LongFormat);
executed 1 time by 1 test: return lc_time.dateTimeFormat(QLocale::LongFormat);
Executed by:
  • tst_QDateTime
1
188 case DateTimeFormatShort:
executed 13 times by 5 tests: case DateTimeFormatShort:
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
13
189 return lc_time.dateTimeFormat(QLocale::ShortFormat);
executed 13 times by 5 tests: return lc_time.dateTimeFormat(QLocale::ShortFormat);
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
13
190 case DateTimeToStringLong:
executed 1 time by 1 test: case DateTimeToStringLong:
Executed by:
  • tst_QDateTime
1
191 return lc_time.toString(in.toDateTime(), QLocale::LongFormat);
executed 1 time by 1 test: return lc_time.toString(in.toDateTime(), QLocale::LongFormat);
Executed by:
  • tst_QDateTime
1
192 case DateTimeToStringShort:
executed 2722 times by 8 tests: case DateTimeToStringShort:
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2722
193 return lc_time.toString(in.toDateTime(), QLocale::ShortFormat);
executed 2722 times by 8 tests: return lc_time.toString(in.toDateTime(), QLocale::ShortFormat);
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2722
194 case PositiveSign:
executed 1015 times by 12 tests: case PositiveSign:
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
195 return lc_numeric.positiveSign();
executed 1015 times by 12 tests: return lc_numeric.positiveSign();
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
196 case AMText:
executed 744 times by 5 tests: case AMText:
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QTime
744
197 return lc_time.amText();
executed 744 times by 5 tests: return lc_time.amText();
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QTime
744
198 case PMText:
executed 178 times by 4 tests: case PMText:
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
178
199 return lc_time.pmText();
executed 178 times by 4 tests: return lc_time.pmText();
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
178
200 case FirstDayOfWeek:
executed 22 times by 2 tests: case FirstDayOfWeek:
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
22
201 return lc_time.firstDayOfWeek();
executed 22 times by 2 tests: return lc_time.firstDayOfWeek();
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
22
202 case CurrencySymbol:
never executed: case CurrencySymbol:
0
203 return lc_monetary.currencySymbol(QLocale::CurrencySymbolFormat(in.toUInt()));
never executed: return lc_monetary.currencySymbol(QLocale::CurrencySymbolFormat(in.toUInt()));
0
204 case CurrencyToString: {
never executed: case CurrencyToString:
0
205 switch (in.type()) {-
206 case QVariant::Int:
never executed: case QVariant::Int:
0
207 return lc_monetary.toCurrencyString(in.toInt());
never executed: return lc_monetary.toCurrencyString(in.toInt());
0
208 case QVariant::UInt:
never executed: case QVariant::UInt:
0
209 return lc_monetary.toCurrencyString(in.toUInt());
never executed: return lc_monetary.toCurrencyString(in.toUInt());
0
210 case QVariant::Double:
never executed: case QVariant::Double:
0
211 return lc_monetary.toCurrencyString(in.toDouble());
never executed: return lc_monetary.toCurrencyString(in.toDouble());
0
212 case QVariant::LongLong:
never executed: case QVariant::LongLong:
0
213 return lc_monetary.toCurrencyString(in.toLongLong());
never executed: return lc_monetary.toCurrencyString(in.toLongLong());
0
214 case QVariant::ULongLong:
never executed: case QVariant::ULongLong:
0
215 return lc_monetary.toCurrencyString(in.toULongLong());
never executed: return lc_monetary.toCurrencyString(in.toULongLong());
0
216 default:
never executed: default:
0
217 break;
never executed: break;
0
218 }-
219 return QString();
never executed: return QString();
0
220 }-
221 case MeasurementSystem: {
executed 2 times by 1 test: case MeasurementSystem:
Executed by:
  • tst_QPrinter
2
222 const QString meas_locale = QString::fromLatin1(d->lc_measurement_var.constData(), d->lc_measurement_var.size());-
223 if (meas_locale.compare(QLatin1String("Metric"), Qt::CaseInsensitive) == 0)
meas_locale.co...ensitive) == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
0-2
224 return QLocale::MetricSystem;
never executed: return QLocale::MetricSystem;
0
225 if (meas_locale.compare(QLatin1String("Other"), Qt::CaseInsensitive) == 0)
meas_locale.co...ensitive) == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QPrinter
0-2
226 return QLocale::MetricSystem;
never executed: return QLocale::MetricSystem;
0
227 return QVariant((int)QLocale(meas_locale).measurementSystem());
executed 2 times by 1 test: return QVariant((int)QLocale(meas_locale).measurementSystem());
Executed by:
  • tst_QPrinter
2
228 }-
229 case UILanguages: {
never executed: case UILanguages:
0
230 if (!d->uiLanguages.isEmpty())
!d->uiLanguages.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
231 return d->uiLanguages;
never executed: return d->uiLanguages;
0
232 QString languages = QString::fromLatin1(qgetenv("LANGUAGE"));-
233 QStringList lst;-
234 if (languages.isEmpty())
languages.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
235 lst.append(QString::fromLatin1(d->lc_messages_var));
never executed: lst.append(QString::fromLatin1(d->lc_messages_var));
0
236 else-
237 lst = languages.split(QLatin1Char(':'));
never executed: lst = languages.split(QLatin1Char(':'));
0
238-
239 for (int i = 0; i < lst.size(); ++i) {
i < lst.size()Description
TRUEnever evaluated
FALSEnever evaluated
0
240 const QString &name = lst.at(i);-
241 QString lang, script, cntry;-
242 if (qt_splitLocaleName(name, lang, script, cntry)) {
qt_splitLocale...script, cntry)Description
TRUEnever evaluated
FALSEnever evaluated
0
243 if (!cntry.length())
!cntry.length()Description
TRUEnever evaluated
FALSEnever evaluated
0
244 d->uiLanguages.append(lang);
never executed: d->uiLanguages.append(lang);
0
245 else-
246 d->uiLanguages.append(lang % QLatin1Char('-') % cntry);
never executed: d->uiLanguages.append(lang % QLatin1Char('-') % cntry);
0
247 }-
248 }
never executed: end of block
0
249 return d->uiLanguages.isEmpty() ? QVariant() : QVariant(d->uiLanguages);
never executed: return d->uiLanguages.isEmpty() ? QVariant() : QVariant(d->uiLanguages);
0
250 }-
251 case StringToStandardQuotation:
never executed: case StringToStandardQuotation:
0
252 return lc_messages.quoteString(in.value<QStringRef>());
never executed: return lc_messages.quoteString(in.value<QStringRef>());
0
253 case StringToAlternateQuotation:
never executed: case StringToAlternateQuotation:
0
254 return lc_messages.quoteString(in.value<QStringRef>(), QLocale::AlternateQuotation);
never executed: return lc_messages.quoteString(in.value<QStringRef>(), QLocale::AlternateQuotation);
0
255 case ListToSeparatedString:
never executed: case ListToSeparatedString:
0
256 return lc_messages.createSeparatedList(in.toStringList());
never executed: return lc_messages.createSeparatedList(in.toStringList());
0
257 case LocaleChanged:
never executed: case LocaleChanged:
0
258 Q_ASSERT(false);-
259 default:
code before this statement never executed: default:
executed 3045 times by 12 tests: default:
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
0-3045
260 break;
executed 3045 times by 12 tests: break;
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
3045
261 }-
262 return QVariant();
executed 3045 times by 12 tests: return QVariant();
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
3045
263}-
264#endif // QT_NO_SYSTEMLOCALE-
265-
266QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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