qlibraryinfo.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/global/qlibraryinfo.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Copyright (C) 2014 Intel Corporation-
5** Contact: http://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL21$-
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 http://www.qt.io/terms-conditions. For further-
16** information use the contact form at http://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 2.1 or version 3 as published by the Free-
21** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
22** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
23** following information to ensure the GNU Lesser General Public License-
24** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
25** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
26**-
27** As a special exception, The Qt Company gives you certain additional-
28** rights. These rights are described in The Qt Company LGPL Exception-
29** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
30**-
31** $QT_END_LICENSE$-
32**-
33****************************************************************************/-
34-
35#include "qdir.h"-
36#include "qstringlist.h"-
37#include "qfile.h"-
38#include "qsettings.h"-
39#include "qlibraryinfo.h"-
40#include "qscopedpointer.h"-
41-
42#ifdef QT_BUILD_QMAKE-
43QT_BEGIN_NAMESPACE-
44extern QString qmake_libraryInfoFile();-
45QT_END_NAMESPACE-
46#else-
47# include "qcoreapplication.h"-
48#endif-
49-
50#ifdef Q_OS_DARWIN-
51# include "private/qcore_mac_p.h"-
52#endif-
53-
54#include "qconfig.cpp"-
55#include "archdetect.cpp"-
56-
57QT_BEGIN_NAMESPACE-
58-
59extern void qDumpCPUFeatures(); // in qsimd.cpp-
60-
61#ifndef QT_NO_SETTINGS-
62-
63struct QLibrarySettings-
64{-
65 QLibrarySettings();-
66 void load();-
67-
68 QScopedPointer<QSettings> settings;-
69#ifdef QT_BUILD_QMAKE-
70 bool haveDevicePaths;-
71 bool haveEffectiveSourcePaths;-
72 bool haveEffectivePaths;-
73 bool havePaths;-
74#else-
75 bool reloadOnQAppAvailable;-
76#endif-
77};-
78Q_GLOBAL_STATIC(QLibrarySettings, qt_library_settings)
executed 1247 times by 541 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 1247 times by 541 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
executed 4516 times by 65 tests: return &holder.value;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 1247 times by 541 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEnever evaluated
0-4516
79-
80class QLibraryInfoPrivate-
81{-
82public:-
83 static QSettings *findConfiguration();-
84#ifdef QT_BUILD_QMAKE-
85 static bool haveGroup(QLibraryInfo::PathGroup group)-
86 {-
87 QLibrarySettings *ls = qt_library_settings();-
88 return ls ? (group == QLibraryInfo::EffectiveSourcePaths-
89 ? ls->haveEffectiveSourcePaths-
90 : group == QLibraryInfo::EffectivePaths-
91 ? ls->haveEffectivePaths-
92 : group == QLibraryInfo::DevicePaths-
93 ? ls->haveDevicePaths-
94 : ls->havePaths) : false;-
95 }-
96#endif-
97 static QSettings *configuration()-
98 {-
99 QLibrarySettings *ls = qt_library_settings();-
100 if (ls) {
lsDescription
TRUEevaluated 4516 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
FALSEnever evaluated
0-4516
101#ifndef QT_BUILD_QMAKE-
102 if (ls->reloadOnQAppAvailable && QCoreApplication::instance() != 0)
ls->reloadOnQAppAvailableDescription
TRUEevaluated 657 times by 14 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
FALSEevaluated 3859 times by 63 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • ...
QCoreApplicati...nstance() != 0Description
TRUEevaluated 11 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
FALSEevaluated 646 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
11-3859
103 ls->load();
executed 11 times by 11 tests: ls->load();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
11
104#endif-
105 return ls->settings.data();
executed 4516 times by 65 tests: return ls->settings.data();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
4516
106 } else {-
107 return 0;
never executed: return 0;
0
108 }-
109 }-
110};-
111-
112static const char platformsSection[] = "Platforms";-
113-
114QLibrarySettings::QLibrarySettings()-
115{-
116 load();-
117}
executed 778 times by 11 tests: end of block
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
778
118-
119void QLibrarySettings::load()-
120{-
121 // If we get any settings here, those won't change when the application shows up.-
122 settings.reset(QLibraryInfoPrivate::findConfiguration());-
123#ifndef QT_BUILD_QMAKE-
124 reloadOnQAppAvailable = (settings.data() == 0 && QCoreApplication::instance() == 0);
settings.data() == 0Description
TRUEevaluated 768 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
QCoreApplicati...nstance() == 0Description
TRUEevaluated 151 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 617 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
21-768
125 bool haveDevicePaths;-
126 bool haveEffectivePaths;-
127 bool havePaths;-
128#endif-
129 if (settings) {
settingsDescription
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 768 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
21-768
130 // This code needs to be in the regular library, as otherwise a qt.conf that-
131 // works for qmake would break things for dynamically built Qt tools.-
132 QStringList children = settings->childGroups();-
133 haveDevicePaths = children.contains(QLatin1String("DevicePaths"));-
134#ifdef QT_BUILD_QMAKE-
135 haveEffectiveSourcePaths = children.contains(QLatin1String("EffectiveSourcePaths"));-
136#else-
137 // EffectiveSourcePaths is for the Qt build only, so needs no backwards compat trickery.-
138 bool haveEffectiveSourcePaths = false;-
139#endif-
140 haveEffectivePaths = haveEffectiveSourcePaths || children.contains(QLatin1String("EffectivePaths"));
haveEffectiveSourcePathsDescription
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
children.conta...ectivePaths"))Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-21
141 // Backwards compat: an existing but empty file is claimed to contain the Paths section.-
142 havePaths = (!haveDevicePaths && !haveEffectivePaths
!haveDevicePathsDescription
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
!haveEffectivePathsDescription
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-21
143 && !children.contains(QLatin1String(platformsSection)))
!children.cont...formsSection))Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-21
144 || children.contains(QLatin1String("Paths"));
children.conta...ring("Paths"))Description
TRUEnever evaluated
FALSEnever evaluated
0
145#ifndef QT_BUILD_QMAKE-
146 if (!havePaths)
!havePathsDescription
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-21
147 settings.reset(0);
never executed: settings.reset(0);
0
148#else-
149 } else {-
150 haveDevicePaths = false;-
151 haveEffectiveSourcePaths = false;-
152 haveEffectivePaths = false;-
153 havePaths = false;-
154#endif-
155 }
executed 21 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
21
156}
executed 789 times by 22 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
789
157-
158QSettings *QLibraryInfoPrivate::findConfiguration()-
159{-
160 QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
executed 919 times by 22 tests: return qstring_literal_temp;
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
919
161 if (QFile::exists(qtconfig))
QFile::exists(qtconfig)Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 898 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
21-898
162 return new QSettings(qtconfig, QSettings::IniFormat);
executed 21 times by 1 test: return new QSettings(qtconfig, QSettings::IniFormat);
Executed by:
  • tst_selftests - unknown status
21
163#ifdef QT_BUILD_QMAKE-
164 qtconfig = qmake_libraryInfoFile();-
165 if (QFile::exists(qtconfig))-
166 return new QSettings(qtconfig, QSettings::IniFormat);-
167#else-
168#ifdef Q_OS_DARWIN-
169 CFBundleRef bundleRef = CFBundleGetMainBundle();-
170 if (bundleRef) {-
171 QCFType<CFURLRef> urlRef = CFBundleCopyResourceURL(bundleRef,-
172 QCFString(QLatin1String("qt.conf")),-
173 0,-
174 0);-
175 if (urlRef) {-
176 QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);-
177 qtconfig = QDir::cleanPath(path);-
178 if (QFile::exists(qtconfig))-
179 return new QSettings(qtconfig, QSettings::IniFormat);-
180 }-
181 }-
182#endif-
183 if (QCoreApplication::instance()) {
QCoreApplication::instance()Description
TRUEevaluated 747 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
FALSEevaluated 151 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
151-747
184 QDir pwd(QCoreApplication::applicationDirPath());-
185 qtconfig = pwd.filePath(QLatin1String("qt.conf"));-
186 if (QFile::exists(qtconfig))
QFile::exists(qtconfig)Description
TRUEnever evaluated
FALSEevaluated 746 times by 22 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
0-746
187 return new QSettings(qtconfig, QSettings::IniFormat);
never executed: return new QSettings(qtconfig, QSettings::IniFormat);
0
188 }
executed 746 times by 22 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
746
189#endif-
190 return 0; //no luck
executed 897 times by 22 tests: return 0;
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
897
191}-
192-
193#endif // QT_NO_SETTINGS-
194-
195/*!-
196 \class QLibraryInfo-
197 \inmodule QtCore-
198 \brief The QLibraryInfo class provides information about the Qt library.-
199-
200 Many pieces of information are established when Qt is configured and built.-
201 This class provides an abstraction for accessing that information.-
202 By using the static functions of this class, an application can obtain-
203 information about the instance of the Qt library which the application-
204 is using at run-time.-
205-
206 You can also use a \c qt.conf file to override the hard-coded paths-
207 that are compiled into the Qt library. For more information, see-
208 the \l {Using qt.conf} documentation.-
209-
210 \sa QSysInfo, {Using qt.conf}-
211*/-
212-
213#ifndef QT_BUILD_QMAKE-
214-
215/*!-
216 \internal-
217-
218 You cannot create a QLibraryInfo, instead only the static functions are available to query-
219 information.-
220*/-
221-
222QLibraryInfo::QLibraryInfo()-
223{ }-
224-
225/*!-
226 Returns the person to whom this build of Qt is licensed.-
227-
228 \sa licensedProducts()-
229*/-
230-
231QString-
232QLibraryInfo::licensee()-
233{-
234 const char * volatile str = QT_CONFIGURE_LICENSEE;-
235 return QString::fromLocal8Bit(str);
never executed: return QString::fromLocal8Bit(str);
0
236}-
237-
238/*!-
239 Returns the products that the license for this build of Qt has access to.-
240-
241 \sa licensee()-
242*/-
243-
244QString-
245QLibraryInfo::licensedProducts()-
246{-
247 const char * volatile str = QT_CONFIGURE_LICENSED_PRODUCTS;-
248 return QString::fromLatin1(str);
never executed: return QString::fromLatin1(str);
0
249}-
250-
251/*!-
252 \since 4.6-
253 \deprecated-
254 This function used to return the installation date for this build of Qt, but now returns a constant date.-
255*/-
256#ifndef QT_NO_DATESTRING-
257#if QT_DEPRECATED_SINCE(5, 5)-
258QDate-
259QLibraryInfo::buildDate()-
260{-
261 return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate);
never executed: return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate);
0
262}-
263#endif-
264#endif //QT_NO_DATESTRING-
265-
266#if defined(Q_CC_INTEL) // must be before GNU, Clang and MSVC because ICC/ICL claim to be them-
267# ifdef __INTEL_CLANG_COMPILER-
268# define ICC_COMPAT "Clang"-
269# elif defined(__INTEL_MS_COMPAT_LEVEL)-
270# define ICC_COMPAT "Microsoft"-
271# elif defined(__GNUC__)-
272# define ICC_COMPAT "GCC"-
273# else-
274# define ICC_COMPAT "no"-
275# endif-
276# if __INTEL_COMPILER == 1300-
277# define ICC_VERSION "13.0"-
278# elif __INTEL_COMPILER == 1310-
279# define ICC_VERSION "13.1"-
280# elif __INTEL_COMPILER == 1400-
281# define ICC_VERSION "14.0"-
282# elif __INTEL_COMPILER == 1500-
283# define ICC_VERSION "15.0"-
284# else-
285# define ICC_VERSION QT_STRINGIFY(__INTEL_COMPILER)-
286# endif-
287# ifdef __INTEL_COMPILER_UPDATE-
288# define COMPILER_STRING "Intel(R) C++ " ICC_VERSION "." QT_STRINGIFY(__INTEL_COMPILER_UPDATE) \-
289 " build " QT_STRINGIFY(__INTEL_COMPILER_BUILD_DATE) " [" \-
290 ICC_COMPAT " compatibility]"-
291# else-
292# define COMPILER_STRING "Intel(R) C++ " ICC_VERSION \-
293 " build " QT_STRINGIFY(__INTEL_COMPILER_BUILD_DATE) " [" \-
294 ICC_COMPAT " compatibility]"-
295# endif-
296#elif defined(Q_CC_CLANG) // must be before GNU, because clang claims to be GNU too-
297# ifdef __apple_build_version__ // Apple clang has other version numbers-
298# define COMPILER_STRING "Clang " __clang_version__ " (Apple)"-
299# else-
300# define COMPILER_STRING "Clang " __clang_version__-
301# endif-
302#elif defined(Q_CC_GNU)-
303# define COMPILER_STRING "GCC " __VERSION__-
304#elif defined(Q_CC_MSVC)-
305# if _MSC_VER < 1600-
306# define COMPILER_STRING "MSVC 2008"-
307# elif _MSC_VER < 1700-
308# define COMPILER_STRING "MSVC 2010"-
309# elif _MSC_VER < 1800-
310# define COMPILER_STRING "MSVC 2012"-
311# elif _MSC_VER < 1900-
312# define COMPILER_STRING "MSVC 2013"-
313# elif _MSC_VER < 1910-
314# define COMPILER_STRING "MSVC 2015"-
315# elif _MSC_VER < 2000-
316# define COMPILER_STRING "MSVC 2017"-
317# else-
318# define COMPILER_STRING "MSVC _MSC_VER " QT_STRINGIFY(_MSC_VER)-
319# endif-
320#else-
321# define COMPILER_STRING "<unknown compiler>"-
322#endif-
323#ifdef QT_NO_DEBUG-
324# define DEBUG_STRING " release"-
325#else-
326# define DEBUG_STRING " debug"-
327#endif-
328#ifdef QT_SHARED-
329# define SHARED_STRING " shared (dynamic)"-
330#else-
331# define SHARED_STRING " static"-
332#endif-
333#define QT_BUILD_STR "Qt " QT_VERSION_STR " (" ARCH_FULL SHARED_STRING DEBUG_STRING " build; by " COMPILER_STRING ")"-
334-
335/*!-
336 Returns a string describing how this version of Qt was built.-
337-
338 \internal-
339-
340 \since 5.3-
341*/-
342-
343const char *QLibraryInfo::build() Q_DECL_NOTHROW-
344{-
345 return QT_BUILD_STR;
executed 1469 times by 539 tests: return "Qt " "5.6.4" " (" "x86_64" "-" "little_endian" "-" "lp64" "" "" "" " shared (dynamic)" " debug" " build; by " "GCC " "4.9.2" ")";
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
1469
346}-
347-
348/*!-
349 \since 5.0-
350 Returns \c true if this build of Qt was built with debugging enabled, or-
351 false if it was built in release mode.-
352*/-
353bool-
354QLibraryInfo::isDebugBuild()-
355{-
356#ifdef QT_DEBUG-
357 return true;
executed 3 times by 2 tests: return true;
Executed by:
  • tst_Lancelot
  • tst_QGraphicsAnchorLayout1
3
358#else-
359 return false;-
360#endif-
361}-
362-
363#endif // QT_BUILD_QMAKE-
364-
365/*-
366 * To add a new entry in QLibrary::LibraryLocation, add it to the enum above the bootstrapped values and:-
367 * - add its relative path in the qtConfEntries[] array below-
368 * (the key is what appears in a qt.conf file)-
369 * - add a property name in qmake/property.cpp propList[] array-
370 * (it's used with qmake -query)-
371 * - add to qt_config.prf, qt_module.prf, qt_module_fwdpri.prf-
372 */-
373-
374static const struct {-
375 char key[19], value[13];-
376} qtConfEntries[] = {-
377 { "Prefix", "." },-
378 { "Documentation", "doc" }, // should be ${Data}/doc-
379 { "Headers", "include" },-
380 { "Libraries", "lib" },-
381#ifdef Q_OS_WIN-
382 { "LibraryExecutables", "bin" },-
383#else-
384 { "LibraryExecutables", "libexec" }, // should be ${ArchData}/libexec-
385#endif-
386 { "Binaries", "bin" },-
387 { "Plugins", "plugins" }, // should be ${ArchData}/plugins-
388 { "Imports", "imports" }, // should be ${ArchData}/imports-
389 { "Qml2Imports", "qml" }, // should be ${ArchData}/qml-
390 { "ArchData", "." },-
391 { "Data", "." },-
392 { "Translations", "translations" }, // should be ${Data}/translations-
393 { "Examples", "examples" },-
394 { "Tests", "tests" },-
395#ifdef QT_BUILD_QMAKE-
396 { "Sysroot", "" },-
397 { "HostBinaries", "bin" },-
398 { "HostLibraries", "lib" },-
399 { "HostData", "." },-
400 { "TargetSpec", "" },-
401 { "HostSpec", "" },-
402 { "HostPrefix", "" },-
403#endif-
404};-
405-
406/*!-
407 Returns the location specified by \a loc.-
408*/-
409QString-
410QLibraryInfo::location(LibraryLocation loc)-
411{-
412#ifdef QT_BUILD_QMAKE // ends inside rawLocation !-
413 QString ret = rawLocation(loc, FinalPaths);-
414-
415 // Automatically prepend the sysroot to target paths-
416 if ((loc < SysrootPath || loc > LastHostPath) && QT_CONFIGURE_SYSROOTIFY_PREFIX) {-
417 QString sysroot = rawLocation(SysrootPath, FinalPaths);-
418 if (!sysroot.isEmpty() && ret.length() > 2 && ret.at(1) == QLatin1Char(':')-
419 && (ret.at(2) == QLatin1Char('/') || ret.at(2) == QLatin1Char('\\')))-
420 ret.replace(0, 2, sysroot); // Strip out the drive on Windows targets-
421 else-
422 ret.prepend(sysroot);-
423 }-
424-
425 return ret;-
426}-
427-
428QString-
429QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)-
430{-
431#endif // QT_BUILD_QMAKE, started inside location !-
432 QString ret;-
433#ifdef QT_BUILD_QMAKE-
434 // Logic for choosing the right data source: if EffectivePaths are requested-
435 // and qt.conf with that section is present, use it, otherwise fall back to-
436 // FinalPaths. For FinalPaths, use qt.conf if present and contains not only-
437 // [EffectivePaths], otherwise fall back to builtins.-
438 // EffectiveSourcePaths falls back to EffectivePaths.-
439 // DevicePaths falls back to FinalPaths.-
440 PathGroup orig_group = group;-
441 if (!QLibraryInfoPrivate::haveGroup(group)-
442 && !(group == EffectiveSourcePaths-
443 && (group = EffectivePaths, QLibraryInfoPrivate::haveGroup(group)))-
444 && !((group == EffectivePaths || group == DevicePaths)-
445 && (group = FinalPaths, QLibraryInfoPrivate::haveGroup(group)))-
446 && (group = orig_group, true))-
447#elif !defined(QT_NO_SETTINGS)-
448 if (!QLibraryInfoPrivate::configuration())
!QLibraryInfoP...onfiguration()Description
TRUEevaluated 3928 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
FALSEevaluated 294 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
294-3928
449#endif-
450 {-
451 const char * volatile path = 0;-
452 if (loc == PrefixPath) {
loc == PrefixPathDescription
TRUEevaluated 1964 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
FALSEevaluated 1964 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
1964
453 path =-
454#ifdef QT_BUILD_QMAKE-
455 (group != DevicePaths) ?-
456 QT_CONFIGURE_EXT_PREFIX_PATH :-
457#endif-
458 QT_CONFIGURE_PREFIX_PATH;-
459 } else if (unsigned(loc) <= sizeof(qt_configure_str_offsets)/sizeof(qt_configure_str_offsets[0])) {
executed 1964 times by 65 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
unsigned(loc) ...tr_offsets[0])Description
TRUEevaluated 1957 times by 58 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • ...
FALSEevaluated 7 times by 7 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSettings
  • tst_QTextFormat
  • tst_languageChange
7-1964
460 path = qt_configure_strs + qt_configure_str_offsets[loc - 1];-
461#ifndef Q_OS_WIN // On Windows we use the registry-
462 } else if (loc == SettingsPath) {
executed 1957 times by 58 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • ...
loc == SettingsPathDescription
TRUEevaluated 7 times by 7 tests
Evaluated by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSettings
  • tst_QTextFormat
  • tst_languageChange
FALSEnever evaluated
0-1957
463 path = QT_CONFIGURE_SETTINGS_PATH;-
464#endif-
465#ifdef QT_BUILD_QMAKE-
466 } else if (loc == HostPrefixPath) {-
467 path = QT_CONFIGURE_HOST_PREFIX_PATH;-
468#endif-
469 }
executed 7 times by 7 tests: end of block
Executed by:
  • tst_QColorDialog
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QSettings
  • tst_QTextFormat
  • tst_languageChange
7
470-
471 if (path)
pathDescription
TRUEevaluated 3928 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
FALSEnever evaluated
0-3928
472 ret = QString::fromLocal8Bit(path);
executed 3928 times by 65 tests: ret = QString::fromLocal8Bit(path);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
3928
473#ifndef QT_NO_SETTINGS-
474 } else {
executed 3928 times by 65 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
3928
475 QString key;-
476 QString defaultValue;-
477 if (unsigned(loc) < sizeof(qtConfEntries)/sizeof(qtConfEntries[0])) {
unsigned(loc) ...onfEntries[0])Description
TRUEevaluated 294 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-294
478 key = QLatin1String(qtConfEntries[loc].key);-
479 defaultValue = QLatin1String(qtConfEntries[loc].value);-
480 }
executed 294 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
294
481#ifndef Q_OS_WIN // On Windows we use the registry-
482 else if (loc == SettingsPath) {
loc == SettingsPathDescription
TRUEnever evaluated
FALSEnever evaluated
0
483 key = QLatin1String("Settings");-
484 defaultValue = QLatin1String(".");-
485 }
never executed: end of block
0
486#endif-
487-
488 if(!key.isNull()) {
!key.isNull()Description
TRUEevaluated 294 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-294
489 QSettings *config = QLibraryInfoPrivate::configuration();-
490 config->beginGroup(QLatin1String(-
491#ifdef QT_BUILD_QMAKE-
492 group == DevicePaths ? "DevicePaths" :-
493 group == EffectiveSourcePaths ? "EffectiveSourcePaths" :-
494 group == EffectivePaths ? "EffectivePaths" :-
495#endif-
496 "Paths"));-
497-
498 ret = config->value(key, defaultValue).toString();-
499-
500#ifdef QT_BUILD_QMAKE-
501 if (ret.isEmpty()) {-
502 if (loc == HostPrefixPath)-
503 ret = config->value(QLatin1String(qtConfEntries[PrefixPath].key),-
504 QLatin1String(qtConfEntries[PrefixPath].value)).toString();-
505 else if (loc == TargetSpecPath || loc == HostSpecPath)-
506 ret = QString::fromLocal8Bit(qt_configure_strs + qt_configure_str_offsets[loc - 1]);-
507 }-
508#endif-
509-
510 // expand environment variables in the form $(ENVVAR)-
511 int rep;-
512 QRegExp reg_var(QLatin1String("\\$\\(.*\\)"));-
513 reg_var.setMinimal(true);-
514 while((rep = reg_var.indexIn(ret)) != -1) {
(rep = reg_var...In(ret)) != -1Description
TRUEnever evaluated
FALSEevaluated 294 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-294
515 ret.replace(rep, reg_var.matchedLength(),-
516 QString::fromLocal8Bit(qgetenv(ret.mid(rep + 2,-
517 reg_var.matchedLength() - 3).toLatin1().constData()).constData()));-
518 }
never executed: end of block
0
519-
520 config->endGroup();-
521-
522 ret = QDir::fromNativeSeparators(ret);-
523 }
executed 294 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
294
524#endif // QT_NO_SETTINGS-
525 }
executed 294 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
294
526-
527#ifdef QT_BUILD_QMAKE-
528 // The specs need to be returned verbatim.-
529 if (loc == TargetSpecPath || loc == HostSpecPath)-
530 return ret;-
531#endif-
532-
533 if (!ret.isEmpty() && QDir::isRelativePath(ret)) {
!ret.isEmpty()Description
TRUEevaluated 4222 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
FALSEnever evaluated
QDir::isRelativePath(ret)Description
TRUEevaluated 2258 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
FALSEevaluated 1964 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
0-4222
534 QString baseDir;-
535#ifdef QT_BUILD_QMAKE-
536 if (loc == HostPrefixPath || loc == PrefixPath || loc == SysrootPath) {-
537 // We make the prefix/sysroot path absolute to the executable's directory.-
538 // loc == PrefixPath while a sysroot is set would make no sense here.-
539 // loc == SysrootPath only makes sense if qmake lives inside the sysroot itself.-
540 baseDir = QFileInfo(qmake_libraryInfoFile()).absolutePath();-
541 } else if (loc > SysrootPath && loc <= LastHostPath) {-
542 // We make any other host path absolute to the host prefix directory.-
543 baseDir = rawLocation(HostPrefixPath, group);-
544 } else {-
545 // we make any other path absolute to the prefix directory-
546 baseDir = rawLocation(PrefixPath, group);-
547 }-
548#else-
549 if (loc == PrefixPath) {
loc == PrefixPathDescription
TRUEevaluated 147 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 2111 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
147-2111
550 if (QCoreApplication::instance()) {
QCoreApplication::instance()Description
TRUEevaluated 147 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-147
551#ifdef Q_OS_DARWIN-
552 CFBundleRef bundleRef = CFBundleGetMainBundle();-
553 if (bundleRef) {-
554 QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef);-
555 if (urlRef) {-
556 QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);-
557#ifdef Q_OS_OSX-
558 QString bundleContentsDir = QString(path) + QLatin1String("/Contents/");-
559 if (QDir(bundleContentsDir).exists())-
560 return QDir::cleanPath(bundleContentsDir + ret);-
561#else-
562 return QDir::cleanPath(QString(path) + QLatin1Char('/') + ret); // iOS-
563#endif // Q_OS_OSX-
564 }-
565 }-
566#endif // Q_OS_DARWIN-
567 // We make the prefix path absolute to the executable's directory.-
568 baseDir = QCoreApplication::applicationDirPath();-
569 } else {
executed 147 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
147
570 baseDir = QDir::currentPath();-
571 }
never executed: end of block
0
572 } else {-
573 // we make any other path absolute to the prefix directory-
574 baseDir = location(PrefixPath);-
575 }
executed 2111 times by 65 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
2111
576#endif // QT_BUILD_QMAKE-
577 ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret);-
578 }
executed 2258 times by 65 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
2258
579 return ret;
executed 4222 times by 65 tests: return ret;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QApplication
  • tst_QChar
  • tst_QColorDialog
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QFactoryLoader
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlobal
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QImage
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • ...
4222
580}-
581-
582/*!-
583 Returns additional arguments to the platform plugin matching-
584 \a platformName which can be specified as a string list using-
585 the key \c Arguments in a group called \c Platforms of the-
586 \c qt.conf file.-
587-
588 sa {Using qt.conf}-
589-
590 \internal-
591-
592 \since 5.3-
593*/-
594-
595QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)-
596{-
597#if !defined(QT_BUILD_QMAKE) && !defined(QT_NO_SETTINGS)-
598 QScopedPointer<const QSettings> settings(QLibraryInfoPrivate::findConfiguration());-
599 if (!settings.isNull()) {
!settings.isNull()Description
TRUEnever evaluated
FALSEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
0-129
600 QString key = QLatin1String(platformsSection);-
601 key += QLatin1Char('/');-
602 key += platformName;-
603 key += QLatin1String("Arguments");-
604 return settings->value(key).toStringList();
never executed: return settings->value(key).toStringList();
0
605 }-
606#endif // !QT_BUILD_QMAKE && !QT_NO_SETTINGS-
607 return QStringList();
executed 129 times by 5 tests: return QStringList();
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
608}-
609-
610/*!-
611 \enum QLibraryInfo::LibraryLocation-
612-
613 \keyword library location-
614-
615 This enum type is used to specify a specific location-
616 specifier:-
617-
618 \value PrefixPath The default prefix for all paths.-
619 \value DocumentationPath The location for documentation upon install.-
620 \value HeadersPath The location for all headers.-
621 \value LibrariesPath The location of installed libraries.-
622 \value LibraryExecutablesPath The location of installed executables required by libraries at runtime.-
623 \value BinariesPath The location of installed Qt binaries (tools and applications).-
624 \value PluginsPath The location of installed Qt plugins.-
625 \value ImportsPath The location of installed QML extensions to import (QML 1.x).-
626 \value Qml2ImportsPath The location of installed QML extensions to import (QML 2.x).-
627 \value ArchDataPath The location of general architecture-dependent Qt data.-
628 \value DataPath The location of general architecture-independent Qt data.-
629 \value TranslationsPath The location of translation information for Qt strings.-
630 \value ExamplesPath The location for examples upon install.-
631 \value TestsPath The location of installed Qt testcases.-
632 \value SettingsPath The location for Qt settings. Not applicable on Windows.-
633-
634 \sa location()-
635*/-
636-
637QT_END_NAMESPACE-
638-
639#if defined(Q_CC_GNU) && defined(ELF_INTERPRETER)-
640# include <stdio.h>-
641# include <stdlib.h>-
642-
643#include "private/qcoreapplication_p.h"-
644-
645extern const char qt_core_interpreter[] __attribute__((section(".interp")))-
646 = ELF_INTERPRETER;-
647-
648extern "C" void qt_core_boilerplate();-
649void qt_core_boilerplate()-
650{-
651 printf("This is the QtCore library version " QT_BUILD_STR "\n"-
652 "Copyright (C) 2016 The Qt Company Ltd.\n"-
653 "Contact: http://www.qt.io/licensing/\n"-
654 "\n"-
655 "Installation prefix: %s\n"-
656 "Library path: %s\n"-
657 "Include path: %s\n",-
658 qt_configure_prefix_path_str + 12,-
659 qt_configure_strs + qt_configure_str_offsets[QT_PREPEND_NAMESPACE(QLibraryInfo)::LibrariesPath - 1],-
660 qt_configure_strs + qt_configure_str_offsets[QT_PREPEND_NAMESPACE(QLibraryInfo)::HeadersPath - 1]);-
661-
662 QT_PREPEND_NAMESPACE(qDumpCPUFeatures)();-
663-
664#ifdef QT_EVAL-
665 extern void qt_core_eval_init(QCoreApplicationPrivate::Type);-
666 qt_core_eval_init(QCoreApplicationPrivate::Tty);-
667#endif-
668-
669 exit(0);
never executed: exit(0);
0
670}-
671-
672#endif-
Source codeSwitch to Preprocessed file

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