OpenCoverage

qresource.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qresource.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 "qresource.h"-
41#include "qresource_p.h"-
42#include "qresource_iterator_p.h"-
43#include "qset.h"-
44#include "qmutex.h"-
45#include "qdebug.h"-
46#include "qlocale.h"-
47#include "qglobal.h"-
48#include "qvector.h"-
49#include "qdatetime.h"-
50#include "qbytearray.h"-
51#include "qstringlist.h"-
52#include <qshareddata.h>-
53#include <qplatformdefs.h>-
54#include "private/qabstractfileengine_p.h"-
55-
56#ifdef Q_OS_UNIX-
57# include "private/qcore_unix_p.h"-
58#endif-
59-
60//#define DEBUG_RESOURCE_MATCH-
61-
62QT_BEGIN_NAMESPACE-
63-
64-
65class QStringSplitter-
66{-
67public:-
68 QStringSplitter(const QString &s)-
69 : m_string(s), m_data(m_string.constData()), m_len(s.length()), m_pos(0)-
70 {-
71 m_splitChar = QLatin1Char('/');-
72 }
executed 69404 times by 113 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
69404
73-
74 inline bool hasNext() {-
75 while (m_pos < m_len && m_data[m_pos] == m_splitChar)
m_pos < m_lenDescription
TRUEevaluated 442270 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 37737 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
m_data[m_pos] == m_splitCharDescription
TRUEevaluated 170558 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 271712 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
37737-442270
76 ++m_pos;
executed 170558 times by 113 tests: ++m_pos;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
170558
77 return m_pos < m_len;
executed 309449 times by 113 tests: return m_pos < m_len;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
309449
78 }-
79-
80 inline QStringRef next() {-
81 int start = m_pos;-
82 while (m_pos < m_len && m_data[m_pos] != m_splitChar)
m_pos < m_lenDescription
TRUEevaluated 1867672 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 23411 times by 87 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
m_data[m_pos] != m_splitCharDescription
TRUEevaluated 1720525 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 147147 times by 107 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
23411-1867672
83 ++m_pos;
executed 1720525 times by 113 tests: ++m_pos;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
1720525
84 return QStringRef(&m_string, start, m_pos - start);
executed 170558 times by 113 tests: return QStringRef(&m_string, start, m_pos - start);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
170558
85 }-
86-
87 QString m_string;-
88 const QChar *m_data;-
89 QChar m_splitChar;-
90 int m_len;-
91 int m_pos;-
92};-
93-
94-
95//resource glue-
96class QResourceRoot-
97{-
98 enum Flags-
99 {-
100 Compressed = 0x01,-
101 Directory = 0x02-
102 };-
103 const uchar *tree, *names, *payloads;-
104 inline int findOffset(int node) const { return node * 14; } //sizeof each tree element
executed 751346 times by 113 tests: return node * 14;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
751346
105 uint hash(int node) const;-
106 QString name(int node) const;-
107 short flags(int node) const;-
108public:-
109 mutable QAtomicInt ref;-
110-
111 inline QResourceRoot(): tree(0), names(0), payloads(0) {}
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
112 inline QResourceRoot(const uchar *t, const uchar *n, const uchar *d) { setSource(t, n, d); }
executed 2828 times by 196 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • ...
2828
113 virtual ~QResourceRoot() { }-
114 int findNode(const QString &path, const QLocale &locale=QLocale()) const;-
115 inline bool isContainer(int node) const { return flags(node) & Directory; }
executed 19164 times by 85 tests: return flags(node) & Directory;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
19164
116 inline bool isCompressed(int node) const { return flags(node) & Compressed; }
executed 18648 times by 85 tests: return flags(node) & Compressed;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
18648
117 const uchar *data(int node, qint64 *size) const;-
118 QStringList children(int node) const;-
119 virtual QString mappingRoot() const { return QString(); }
executed 117967 times by 113 tests: return QString();
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
117967
120 bool mappingRootSubdir(const QString &path, QString *match=0) const;-
121 inline bool operator==(const QResourceRoot &other) const-
122 { return tree == other.tree && names == other.names && payloads == other.payloads; }
executed 1412 times by 185 tests: return tree == other.tree && names == other.names && payloads == other.payloads;
Executed by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • ...
1412
123 inline bool operator!=(const QResourceRoot &other) const-
124 { return !operator==(other); }
never executed: return !operator==(other);
0
125 enum ResourceRootType { Resource_Builtin, Resource_File, Resource_Buffer };-
126 virtual ResourceRootType type() const { return Resource_Builtin; }
executed 20 times by 2 tests: return Resource_Builtin;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
20
127-
128protected:-
129 inline void setSource(const uchar *t, const uchar *n, const uchar *d) {-
130 tree = t;-
131 names = n;-
132 payloads = d;-
133 }
executed 2844 times by 198 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QResourceEngine
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • ...
2844
134};-
135-
136static QString cleanPath(const QString &_path)-
137{-
138 QString path = QDir::cleanPath(_path);-
139 // QDir::cleanPath does not remove two trailing slashes under _Windows_-
140 // due to support for UNC paths. Remove those manually.-
141 if (path.startsWith(QLatin1String("//")))
path.startsWit...1String("//"))Description
TRUEnever evaluated
FALSEevaluated 24621 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
0-24621
142 path.remove(0, 1);
never executed: path.remove(0, 1);
0
143 return path;
executed 24621 times by 113 tests: return path;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
24621
144}-
145-
146Q_DECLARE_TYPEINFO(QResourceRoot, Q_MOVABLE_TYPE);-
147-
148Q_GLOBAL_STATIC_WITH_ARGS(QMutex, resourceMutex, (QMutex::Recursive))
never executed: end of block
never executed: guard.store(QtGlobalStatic::Destroyed);
executed 26193 times by 294 tests: return &holder.value;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
0-26193
149-
150typedef QList<QResourceRoot*> ResourceList;-
151Q_GLOBAL_STATIC(ResourceList, resourceList)
never executed: end of block
never executed: guard.store(QtGlobalStatic::Destroyed);
executed 32007 times by 294 tests: return &holder.value;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
0-32007
152-
153Q_GLOBAL_STATIC(QStringList, resourceSearchPaths)
executed 4 times by 4 tests: end of block
Executed by:
  • tst_qimagereader - unknown status
  • tst_qmovie - unknown status
  • tst_qresourceengine - unknown status
  • tst_qwidget - unknown status
executed 4 times by 4 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qimagereader - unknown status
  • tst_qmovie - unknown status
  • tst_qresourceengine - unknown status
  • tst_qwidget - unknown status
executed 28 times by 4 tests: return &holder.value;
Executed by:
  • tst_QImageReader
  • tst_QMovie
  • tst_QResourceEngine
  • tst_QWidget
guard.load() =...c::InitializedDescription
TRUEevaluated 4 times by 4 tests
Evaluated by:
  • tst_qimagereader - unknown status
  • tst_qmovie - unknown status
  • tst_qresourceengine - unknown status
  • tst_qwidget - unknown status
FALSEnever evaluated
0-28
154-
155/*!-
156 \class QResource-
157 \inmodule QtCore-
158 \brief The QResource class provides an interface for reading directly from resources.-
159-
160 \ingroup io-
161-
162 \reentrant-
163 \since 4.2-
164-
165 QResource is an object that represents a set of data (and possibly-
166 children) relating to a single resource entity. QResource gives direct-
167 access to the bytes in their raw format. In this way direct access-
168 allows reading data without buffer copying or indirection. Indirection-
169 is often useful when interacting with the resource entity as if it is a-
170 file, this can be achieved with QFile. The data and children behind a-
171 QResource are normally compiled into an application/library, but it is-
172 also possible to load a resource at runtime. When loaded at run time-
173 the resource file will be loaded as one big set of data and then given-
174 out in pieces via references into the resource tree.-
175-
176 A QResource can either be loaded with an absolute path, either treated-
177 as a file system rooted with a \c{/} character, or in resource notation-
178 rooted with a \c{:} character. A relative resource can also be opened-
179 which will be found in the list of paths returned by QDir::searchPaths().-
180-
181 A QResource that is representing a file will have data backing it, this-
182 data can possibly be compressed, in which case qUncompress() must be-
183 used to access the real data; this happens implicitly when accessed-
184 through a QFile. A QResource that is representing a directory will have-
185 only children and no data.-
186-
187 \section1 Dynamic Resource Loading-
188-
189 A resource can be left out of an application's binary and loaded when-
190 it is needed at run-time by using the registerResource() function. The-
191 resource file passed into registerResource() must be a binary resource-
192 as created by rcc. Further information about binary resources can be-
193 found in \l{The Qt Resource System} documentation.-
194-
195 This can often be useful when loading a large set of application icons-
196 that may change based on a setting, or that can be edited by a user and-
197 later recreated. The resource is immediately loaded into memory, either-
198 as a result of a single file read operation, or as a memory mapped file.-
199-
200 This approach can prove to be a significant performance gain as only a-
201 single file will be loaded, and pieces of data will be given out via the-
202 path requested in setFileName().-
203-
204 The unregisterResource() function removes a reference to a particular-
205 file. If there are QResource objects that currently reference resources related-
206 to the unregistered file, they will continue to be valid but the resource-
207 file itself will be removed from the resource roots, and thus no further-
208 QResource can be created pointing into this resource data. The resource-
209 itself will be unmapped from memory when the last QResource that points-
210 to it is destroyed.-
211-
212 \sa {The Qt Resource System}, QFile, QDir, QFileInfo-
213*/-
214-
215class QResourcePrivate {-
216public:-
217 inline QResourcePrivate(QResource *_q) : q_ptr(_q) { clear(); }
executed 49175 times by 114 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
49175
218 inline ~QResourcePrivate() { clear(); }
executed 49175 times by 115 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
49175
219-
220 void ensureInitialized() const;-
221 void ensureChildren() const;-
222-
223 bool load(const QString &file);-
224 void clear();-
225-
226 QLocale locale;-
227 QString fileName, absoluteFilePath;-
228 QList<QResourceRoot*> related;-
229 uint container : 1;-
230 mutable uint compressed : 1;-
231 mutable qint64 size;-
232 mutable const uchar *data;-
233 mutable QStringList children;-
234-
235 QResource *q_ptr;-
236 Q_DECLARE_PUBLIC(QResource)-
237};-
238-
239void-
240QResourcePrivate::clear()-
241{-
242 absoluteFilePath.clear();-
243 compressed = 0;-
244 data = 0;-
245 size = 0;-
246 children.clear();-
247 container = 0;-
248 for(int i = 0; i < related.size(); ++i) {
i < related.size()Description
TRUEevaluated 19164 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 147523 times by 115 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
19164-147523
249 QResourceRoot *root = related.at(i);-
250 if(!root->ref.deref())
!root->ref.deref()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QResourceEngine
FALSEevaluated 19163 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
1-19163
251 delete root;
executed 1 time by 1 test: delete root;
Executed by:
  • tst_QResourceEngine
1
252 }
executed 19164 times by 86 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
19164
253 related.clear();-
254}
executed 147523 times by 115 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
147523
255-
256bool-
257QResourcePrivate::load(const QString &file)-
258{-
259 related.clear();-
260 QMutexLocker lock(resourceMutex());-
261 const ResourceList *list = resourceList();-
262 QString cleaned = cleanPath(file);-
263 for(int i = 0; i < list->size(); ++i) {
i < list->size()Description
TRUEevaluated 69274 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 24448 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
24448-69274
264 QResourceRoot *res = list->at(i);-
265 const int node = res->findNode(cleaned, locale);-
266 if(node != -1) {
node != -1Description
TRUEevaluated 19164 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 50110 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
19164-50110
267 if(related.isEmpty()) {
related.isEmpty()Description
TRUEevaluated 19036 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 128 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QResourceEngine
128-19036
268 container = res->isContainer(node);-
269 if(!container) {
!containerDescription
TRUEevaluated 18648 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 388 times by 8 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QIcon
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
388-18648
270 data = res->data(node, &size);-
271 compressed = res->isCompressed(node);-
272 } else {
executed 18648 times by 85 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
18648
273 data = 0;-
274 size = 0;-
275 compressed = 0;-
276 }
executed 388 times by 8 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QIcon
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
388
277 } else if(res->isContainer(node) != container) {
res->isContain...) != containerDescription
TRUEnever evaluated
FALSEevaluated 128 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QMimeDatabase
  • tst_QResourceEngine
0-128
278 qWarning("QResourceInfo: Resource [%s] has both data and children!", file.toLatin1().constData());-
279 }
never executed: end of block
0
280 res->ref.ref();-
281 related.append(res);-
282 } else if(res->mappingRootSubdir(file)) {
executed 19164 times by 85 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
res->mappingRootSubdir(file)Description
TRUEnever evaluated
FALSEevaluated 50110 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
0-50110
283 container = true;-
284 data = 0;-
285 size = 0;-
286 compressed = 0;-
287 res->ref.ref();-
288 related.append(res);-
289 }
never executed: end of block
0
290 }
executed 69274 times by 113 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
69274
291 return !related.isEmpty();
executed 24448 times by 113 tests: return !related.isEmpty();
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
24448
292}-
293-
294void-
295QResourcePrivate::ensureInitialized() const-
296{-
297 if(!related.isEmpty())
!related.isEmpty()Description
TRUEevaluated 719083 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 24444 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
24444-719083
298 return;
executed 719083 times by 85 tests: return;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
719083
299 QResourcePrivate *that = const_cast<QResourcePrivate *>(this);-
300 if(fileName == QLatin1String(":"))
fileName == QLatin1String(":")Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QDir
  • tst_QResourceEngine
FALSEevaluated 24440 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
4-24440
301 that->fileName += QLatin1Char('/');
executed 4 times by 2 tests: that->fileName += QLatin1Char('/');
Executed by:
  • tst_QDir
  • tst_QResourceEngine
4
302 that->absoluteFilePath = fileName;-
303 if(!that->absoluteFilePath.startsWith(QLatin1Char(':')))
!that->absolut...tin1Char(':'))Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QResourceEngine
FALSEevaluated 24442 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
2-24442
304 that->absoluteFilePath.prepend(QLatin1Char(':'));
executed 2 times by 1 test: that->absoluteFilePath.prepend(QLatin1Char(':'));
Executed by:
  • tst_QResourceEngine
2
305-
306 QString path = fileName;-
307 if(path.startsWith(QLatin1Char(':')))
path.startsWit...tin1Char(':'))Description
TRUEevaluated 24442 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QResourceEngine
2-24442
308 path = path.mid(1);
executed 24442 times by 113 tests: path = path.mid(1);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
24442
309-
310 if(path.startsWith(QLatin1Char('/'))) {
path.startsWit...tin1Char('/'))Description
TRUEevaluated 24418 times by 112 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 26 times by 4 tests
Evaluated by:
  • tst_QImageReader
  • tst_QMovie
  • tst_QResourceEngine
  • tst_QWidget
26-24418
311 that->load(path);-
312 } else {
executed 24418 times by 112 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
24418
313 QMutexLocker lock(resourceMutex());-
314 QStringList searchPaths = *resourceSearchPaths();-
315 searchPaths << QLatin1String("");-
316 for(int i = 0; i < searchPaths.size(); ++i) {
i < searchPaths.size()Description
TRUEevaluated 30 times by 4 tests
Evaluated by:
  • tst_QImageReader
  • tst_QMovie
  • tst_QResourceEngine
  • tst_QWidget
FALSEnever evaluated
0-30
317 const QString searchPath(searchPaths.at(i) + QLatin1Char('/') + path);-
318 if(that->load(searchPath)) {
that->load(searchPath)Description
TRUEevaluated 26 times by 4 tests
Evaluated by:
  • tst_QImageReader
  • tst_QMovie
  • tst_QResourceEngine
  • tst_QWidget
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QResourceEngine
4-26
319 that->absoluteFilePath = QLatin1Char(':') + searchPath;-
320 break;
executed 26 times by 4 tests: break;
Executed by:
  • tst_QImageReader
  • tst_QMovie
  • tst_QResourceEngine
  • tst_QWidget
26
321 }-
322 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QResourceEngine
4
323 }
executed 26 times by 4 tests: end of block
Executed by:
  • tst_QImageReader
  • tst_QMovie
  • tst_QResourceEngine
  • tst_QWidget
26
324}-
325-
326void-
327QResourcePrivate::ensureChildren() const-
328{-
329 ensureInitialized();-
330 if(!children.isEmpty() || !container || related.isEmpty())
!children.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 173 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
!containerDescription
TRUEnever evaluated
FALSEevaluated 173 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
related.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 173 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
0-173
331 return;
never executed: return;
0
332-
333 QString path = absoluteFilePath, k;-
334 if(path.startsWith(QLatin1Char(':')))
path.startsWit...tin1Char(':'))Description
TRUEevaluated 173 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEnever evaluated
0-173
335 path = path.mid(1);
executed 173 times by 6 tests: path = path.mid(1);
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
173
336 QSet<QString> kids;-
337 QString cleaned = cleanPath(path);-
338 for(int i = 0; i < related.size(); ++i) {
i < related.size()Description
TRUEevaluated 208 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 173 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
173-208
339 QResourceRoot *res = related.at(i);-
340 if(res->mappingRootSubdir(path, &k) && !k.isEmpty()) {
res->mappingRo...bdir(path, &k)Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 190 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
!k.isEmpty()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QResourceEngine
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
3-190
341 if(!kids.contains(k)) {
!kids.contains(k)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QResourceEngine
FALSEnever evaluated
0-3
342 children += k;-
343 kids.insert(k);-
344 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QResourceEngine
3
345 } else {
executed 3 times by 1 test: end of block
Executed by:
  • tst_QResourceEngine
3
346 const int node = res->findNode(cleaned);-
347 if(node != -1) {
node != -1Description
TRUEevaluated 205 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEnever evaluated
0-205
348 QStringList related_children = res->children(node);-
349 for(int kid = 0; kid < related_children.size(); ++kid) {
kid < related_children.size()Description
TRUEevaluated 605 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 205 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
205-605
350 k = related_children.at(kid);-
351 if(!kids.contains(k)) {
!kids.contains(k)Description
TRUEevaluated 511 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 94 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
94-511
352 children += k;-
353 kids.insert(k);-
354 }
executed 511 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
511
355 }
executed 605 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
605
356 }
executed 205 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
205
357 }
executed 205 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
205
358 }-
359}
executed 173 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
173
360-
361/*!-
362 Constructs a QResource pointing to \a file. \a locale is used to-
363 load a specific localization of a resource data.-
364-
365 \sa QFileInfo, QDir::searchPaths(), setFileName(), setLocale()-
366*/-
367-
368QResource::QResource(const QString &file, const QLocale &locale) : d_ptr(new QResourcePrivate(this))-
369{-
370 Q_D(QResource);-
371 d->fileName = file;-
372 d->locale = locale;-
373}
executed 49175 times by 114 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
49175
374-
375/*!-
376 Releases the resources of the QResource object.-
377*/-
378QResource::~QResource()-
379{-
380}-
381-
382/*!-
383 Sets a QResource to only load the localization of resource to for \a-
384 locale. If a resource for the specific locale is not found then the-
385 C locale is used.-
386-
387 \sa setFileName()-
388*/-
389-
390void QResource::setLocale(const QLocale &locale)-
391{-
392 Q_D(QResource);-
393 d->clear();-
394 d->locale = locale;-
395}
executed 1 time by 1 test: end of block
Executed by:
  • tst_QResourceEngine
1
396-
397/*!-
398 Returns the locale used to locate the data for the QResource.-
399*/-
400-
401QLocale QResource::locale() const-
402{-
403 Q_D(const QResource);-
404 return d->locale;
never executed: return d->locale;
0
405}-
406-
407/*!-
408 Sets a QResource to point to \a file. \a file can either be absolute,-
409 in which case it is opened directly, if relative then the file will be-
410 tried to be found in QDir::searchPaths().-
411-
412 \sa absoluteFilePath()-
413*/-
414-
415void QResource::setFileName(const QString &file)-
416{-
417 Q_D(QResource);-
418 d->clear();-
419 d->fileName = file;-
420}
executed 49172 times by 114 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
49172
421-
422/*!-
423 Returns the full path to the file that this QResource represents as it-
424 was passed.-
425-
426 \sa absoluteFilePath()-
427*/-
428-
429QString QResource::fileName() const-
430{-
431 Q_D(const QResource);-
432 d->ensureInitialized();-
433 return d->fileName;
executed 40850 times by 84 tests: return d->fileName;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
40850
434}-
435-
436/*!-
437 Returns the real path that this QResource represents, if the resource-
438 was found via the QDir::searchPaths() it will be indicated in the path.-
439-
440 \sa fileName()-
441*/-
442-
443QString QResource::absoluteFilePath() const-
444{-
445 Q_D(const QResource);-
446 d->ensureInitialized();-
447 return d->absoluteFilePath;
executed 4211 times by 53 tests: return d->absoluteFilePath;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • ...
4211
448}-
449-
450/*!-
451 Returns \c true if the resource really exists in the resource hierarchy,-
452 false otherwise.-
453-
454*/-
455-
456bool QResource::isValid() const-
457{-
458 Q_D(const QResource);-
459 d->ensureInitialized();-
460 return !d->related.isEmpty();
executed 233625 times by 113 tests: return !d->related.isEmpty();
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
233625
461}-
462-
463/*!-
464 \fn bool QResource::isFile() const-
465-
466 Returns \c true if the resource represents a file and thus has data-
467 backing it, false if it represents a directory.-
468-
469 \sa isDir()-
470*/-
471-
472-
473/*!-
474 Returns \c true if the resource represents a file and the data backing it-
475 is in a compressed format, false otherwise.-
476-
477 \sa data(), isFile()-
478*/-
479-
480bool QResource::isCompressed() const-
481{-
482 Q_D(const QResource);-
483 d->ensureInitialized();-
484 return d->compressed;
executed 240197 times by 84 tests: return d->compressed;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
240197
485}-
486-
487/*!-
488 Returns the size of the data backing the resource.-
489-
490 \sa data(), isFile()-
491*/-
492-
493qint64 QResource::size() const-
494{-
495 Q_D(const QResource);-
496 d->ensureInitialized();-
497 return d->size;
executed 177991 times by 82 tests: return d->size;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
177991
498}-
499-
500/*!-
501 Returns direct access to a read only segment of data that this resource-
502 represents. If the resource is compressed the data returns is-
503 compressed and qUncompress() must be used to access the data. If the-
504 resource is a directory 0 is returned.-
505-
506 \sa size(), isCompressed(), isFile()-
507*/-
508-
509const uchar *QResource::data() const-
510{-
511 Q_D(const QResource);-
512 d->ensureInitialized();-
513 return d->data;
executed 42245 times by 82 tests: return d->data;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
42245
514}-
515-
516/*!-
517 Returns \c true if the resource represents a directory and thus may have-
518 children() in it, false if it represents a file.-
519-
520 \sa isFile()-
521*/-
522-
523bool QResource::isDir() const-
524{-
525 Q_D(const QResource);-
526 d->ensureInitialized();-
527 return d->container;
executed 4235 times by 49 tests: return d->container;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
4235
528}-
529-
530/*!-
531 Returns a list of all resources in this directory, if the resource-
532 represents a file the list will be empty.-
533-
534 \sa isDir()-
535*/-
536-
537QStringList QResource::children() const-
538{-
539 Q_D(const QResource);-
540 d->ensureChildren();-
541 return d->children;
executed 173 times by 6 tests: return d->children;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
173
542}-
543-
544/*!-
545 \obsolete-
546-
547 Use QDir::addSearchPath() with a prefix instead.-
548-
549 Adds \a path to the search paths searched in to find resources that are-
550 not specified with an absolute path. The \a path must be an absolute-
551 path (start with \c{/}).-
552-
553 The default search path is to search only in the root (\c{:/}). The last-
554 path added will be consulted first upon next QResource creation.-
555*/-
556void-
557QResource::addSearchPath(const QString &path)-
558{-
559 if (!path.startsWith(QLatin1Char('/'))) {
!path.startsWi...tin1Char('/'))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QResourceEngine
0-2
560 qWarning("QResource::addResourceSearchPath: Search paths must be absolute (start with /) [%s]",-
561 path.toLocal8Bit().data());-
562 return;
never executed: return;
0
563 }-
564 QMutexLocker lock(resourceMutex());-
565 resourceSearchPaths()->prepend(path);-
566}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QResourceEngine
2
567-
568/*!-
569 \obsolete-
570-
571 Use QDir::searchPaths() instead.-
572-
573 Returns the current search path list. This list is consulted when-
574 creating a relative resource.-
575-
576 \sa QDir::addSearchPath(), QDir::setSearchPaths()-
577*/-
578-
579QStringList-
580QResource::searchPaths()-
581{-
582 QMutexLocker lock(resourceMutex());-
583 return *resourceSearchPaths();
never executed: return *resourceSearchPaths();
0
584}-
585-
586inline uint QResourceRoot::hash(int node) const-
587{-
588 if(!node) //root
!nodeDescription
TRUEnever evaluated
FALSEevaluated 452748 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
0-452748
589 return 0;
never executed: return 0;
0
590 const int offset = findOffset(node);-
591 int name_offset = (tree[offset+0] << 24) + (tree[offset+1] << 16) +-
592 (tree[offset+2] << 8) + (tree[offset+3] << 0);-
593 name_offset += 2; //jump past name length-
594 return (names[name_offset+0] << 24) + (names[name_offset+1] << 16) +
executed 452748 times by 113 tests: return (names[name_offset+0] << 24) + (names[name_offset+1] << 16) + (names[name_offset+2] << 8) + (names[name_offset+3] << 0);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
452748
595 (names[name_offset+2] << 8) + (names[name_offset+3] << 0);
executed 452748 times by 113 tests: return (names[name_offset+0] << 24) + (names[name_offset+1] << 16) + (names[name_offset+2] << 8) + (names[name_offset+3] << 0);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
452748
596}-
597inline QString QResourceRoot::name(int node) const-
598{-
599 if(!node) // root
!nodeDescription
TRUEnever evaluated
FALSEevaluated 121269 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
0-121269
600 return QString();
never executed: return QString();
0
601 const int offset = findOffset(node);-
602-
603 QString ret;-
604 int name_offset = (tree[offset+0] << 24) + (tree[offset+1] << 16) +-
605 (tree[offset+2] << 8) + (tree[offset+3] << 0);-
606 const short name_length = (names[name_offset+0] << 8) +-
607 (names[name_offset+1] << 0);-
608 name_offset += 2;-
609 name_offset += 4; //jump past hash-
610-
611 ret.resize(name_length);-
612 QChar *strData = ret.data();-
613 for(int i = 0; i < name_length*2; i+=2) {
i < name_length*2Description
TRUEevaluated 1362287 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 121269 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
121269-1362287
614 QChar c(names[name_offset+i+1], names[name_offset+i]);-
615 *strData = c;-
616 ++strData;-
617 }
executed 1362287 times by 86 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
1362287
618 return ret;
executed 121269 times by 86 tests: return ret;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
121269
619}-
620-
621int QResourceRoot::findNode(const QString &_path, const QLocale &locale) const-
622{-
623 QString path = _path;-
624 {-
625 QString root = mappingRoot();-
626 if(!root.isEmpty()) {
!root.isEmpty()Description
TRUEevaluated 848 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 68631 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
848-68631
627 if(root == path) {
root == pathDescription
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 814 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
34-814
628 path = QLatin1Char('/');-
629 } else {
executed 34 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
34
630 if(!root.endsWith(QLatin1Char('/')))
!root.endsWith...tin1Char('/'))Description
TRUEevaluated 814 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-814
631 root += QLatin1Char('/');
executed 814 times by 2 tests: root += QLatin1Char('/');
Executed by:
  • tst_QResourceEngine
  • tst_rcc
814
632 if(path.size() >= root.size() && path.startsWith(root))
path.size() >= root.size()Description
TRUEevaluated 752 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 62 times by 1 test
Evaluated by:
  • tst_QResourceEngine
path.startsWith(root)Description
TRUEevaluated 535 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 217 times by 1 test
Evaluated by:
  • tst_QResourceEngine
62-752
633 path = path.mid(root.length()-1);
executed 535 times by 2 tests: path = path.mid(root.length()-1);
Executed by:
  • tst_QResourceEngine
  • tst_rcc
535
634 if(path.isEmpty())
path.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 814 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-814
635 path = QLatin1Char('/');
never executed: path = QLatin1Char('/');
0
636 }
executed 814 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
814
637 }-
638 }-
639#ifdef DEBUG_RESOURCE_MATCH-
640 qDebug() << "!!!!" << "START" << path << locale.country() << locale.language();-
641#endif-
642-
643 if(path == QLatin1String("/"))
path == QLatin1String("/")Description
TRUEevaluated 75 times by 5 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 69404 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
75-69404
644 return 0;
executed 75 times by 5 tests: return 0;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_rcc
75
645-
646 //the root node is always first-
647 int child_count = (tree[6] << 24) + (tree[7] << 16) +-
648 (tree[8] << 8) + (tree[9] << 0);-
649 int child = (tree[10] << 24) + (tree[11] << 16) +-
650 (tree[12] << 8) + (tree[13] << 0);-
651-
652 //now iterate up the tree-
653 int node = -1;-
654-
655 QStringSplitter splitter(path);-
656 while (child_count && splitter.hasNext()) {
child_countDescription
TRUEevaluated 188785 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEnever evaluated
splitter.hasNext()Description
TRUEevaluated 170558 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 18227 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
0-188785
657 QStringRef segment = splitter.next();-
658-
659#ifdef DEBUG_RESOURCE_MATCH-
660 qDebug() << " CHILDREN" << segment;-
661 for(int j = 0; j < child_count; ++j) {-
662 qDebug() << " " << child+j << " :: " << name(child+j);-
663 }-
664#endif-
665 const uint h = qt_hash(segment);-
666-
667 //do the binary search for the hash-
668 int l = 0, r = child_count-1;-
669 int sub_node = (l+r+1)/2;-
670 while(r != l) {
r != lDescription
TRUEevaluated 125817 times by 74 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
FALSEevaluated 150997 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
125817-150997
671 const uint sub_node_hash = hash(child+sub_node);-
672 if(h == sub_node_hash)
h == sub_node_hashDescription
TRUEevaluated 19561 times by 73 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
FALSEevaluated 106256 times by 73 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
19561-106256
673 break;
executed 19561 times by 73 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
19561
674 else if(h < sub_node_hash)
h < sub_node_hashDescription
TRUEevaluated 64913 times by 73 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
FALSEevaluated 41343 times by 68 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • ...
41343-64913
675 r = sub_node - 1;
executed 64913 times by 73 tests: r = sub_node - 1;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
64913
676 else-
677 l = sub_node;
executed 41343 times by 68 tests: l = sub_node;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • ...
41343
678 sub_node = (l + r + 1) / 2;-
679 }
executed 106256 times by 73 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
106256
680 sub_node += child;-
681-
682 //now do the "harder" compares-
683 bool found = false;-
684 if(hash(sub_node) == h) {
hash(sub_node) == hDescription
TRUEevaluated 120470 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 50088 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
50088-120470
685 while(sub_node > child && hash(sub_node-1) == h) //backup for collisions
sub_node > childDescription
TRUEevaluated 19631 times by 73 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
FALSEevaluated 100979 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
hash(sub_node-1) == hDescription
TRUEevaluated 140 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 19491 times by 73 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • ...
140-100979
686 --sub_node;
executed 140 times by 2 tests: --sub_node;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
140
687 for(; sub_node < child+child_count && hash(sub_node) == h; ++sub_node) { //here we go...
sub_node < child+child_countDescription
TRUEevaluated 136742 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 2149 times by 38 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAccessibility
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsScene
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPrinter
  • ...
hash(sub_node) == hDescription
TRUEevaluated 120664 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 16078 times by 69 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • ...
2149-136742
688 if(name(sub_node) == segment) {
name(sub_node) == segmentDescription
TRUEevaluated 120664 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEnever evaluated
0-120664
689 found = true;-
690 int offset = findOffset(sub_node);-
691#ifdef DEBUG_RESOURCE_MATCH-
692 qDebug() << " TRY" << sub_node << name(sub_node) << offset;-
693#endif-
694 offset += 4; //jump past name-
695-
696 const short flags = (tree[offset+0] << 8) +-
697 (tree[offset+1] << 0);-
698 offset += 2;-
699-
700 if(!splitter.hasNext()) {
!splitter.hasNext()Description
TRUEevaluated 19510 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 101154 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
19510-101154
701 if(!(flags & Directory)) {
!(flags & Directory)Description
TRUEevaluated 18923 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEevaluated 587 times by 8 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QIcon
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
587-18923
702 const short country = (tree[offset+0] << 8) +-
703 (tree[offset+1] << 0);-
704 offset += 2;-
705-
706 const short language = (tree[offset+0] << 8) +-
707 (tree[offset+1] << 0);-
708 offset += 2;-
709#ifdef DEBUG_RESOURCE_MATCH-
710 qDebug() << " " << "LOCALE" << country << language;-
711#endif-
712 if(country == locale.country() && language == locale.language()) {
country == locale.country()Description
TRUEevaluated 554 times by 7 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_rcc
  • tst_selftests - unknown status
FALSEevaluated 18369 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
language == locale.language()Description
TRUEevaluated 502 times by 7 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_rcc
  • tst_selftests - unknown status
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
52-18369
713#ifdef DEBUG_RESOURCE_MATCH-
714 qDebug() << "!!!!" << "FINISHED" << __LINE__ << sub_node;-
715#endif-
716 return sub_node;
executed 502 times by 7 tests: return sub_node;
Executed by:
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QSpinBox
  • tst_rcc
  • tst_selftests - unknown status
502
717 } else if((country == QLocale::AnyCountry && language == locale.language()) ||
country == QLocale::AnyCountryDescription
TRUEevaluated 18350 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
FALSEevaluated 71 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
language == locale.language()Description
TRUEevaluated 55 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 18295 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
55-18350
718 (country == QLocale::AnyCountry && language == QLocale::C && node == -1)) {
country == QLocale::AnyCountryDescription
TRUEevaluated 18295 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
FALSEevaluated 71 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
language == QLocale::CDescription
TRUEevaluated 18197 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
FALSEevaluated 98 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
node == -1Description
TRUEevaluated 18161 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
36-18295
719 node = sub_node;-
720 }
executed 18216 times by 80 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
18216
721 continue;
executed 18421 times by 80 tests: continue;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
18421
722 } else {-
723#ifdef DEBUG_RESOURCE_MATCH-
724 qDebug() << "!!!!" << "FINISHED" << __LINE__ << sub_node;-
725#endif-
726-
727 return sub_node;
executed 587 times by 8 tests: return sub_node;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QIcon
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
587
728 }-
729 }-
730-
731 if(!(flags & Directory))
!(flags & Directory)Description
TRUEnever evaluated
FALSEevaluated 101154 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
0-101154
732 return -1;
never executed: return -1;
0
733-
734 child_count = (tree[offset+0] << 24) + (tree[offset+1] << 16) +-
735 (tree[offset+2] << 8) + (tree[offset+3] << 0);-
736 offset += 4;-
737 child = (tree[offset+0] << 24) + (tree[offset+1] << 16) +-
738 (tree[offset+2] << 8) + (tree[offset+3] << 0);-
739 break;
executed 101154 times by 80 tests: break;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
101154
740 }-
741 }
never executed: end of block
0
742 }
executed 119381 times by 86 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
119381
743 if(!found)
!foundDescription
TRUEevaluated 50088 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 119381 times by 86 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
50088-119381
744 break;
executed 50088 times by 113 tests: break;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
50088
745 }
executed 119381 times by 86 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
119381
746#ifdef DEBUG_RESOURCE_MATCH-
747 qDebug() << "!!!!" << "FINISHED" << __LINE__ << node;-
748#endif-
749 return node;
executed 68315 times by 113 tests: return node;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
68315
750}-
751short QResourceRoot::flags(int node) const-
752{-
753 if(node == -1)
node == -1Description
TRUEnever evaluated
FALSEevaluated 37812 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
0-37812
754 return 0;
never executed: return 0;
0
755 const int offset = findOffset(node) + 4; //jump past name-
756 return (tree[offset+0] << 8) + (tree[offset+1] << 0);
executed 37812 times by 85 tests: return (tree[offset+0] << 8) + (tree[offset+1] << 0);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
37812
757}-
758const uchar *QResourceRoot::data(int node, qint64 *size) const-
759{-
760 if(node == -1) {
node == -1Description
TRUEnever evaluated
FALSEevaluated 18648 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
0-18648
761 *size = 0;-
762 return 0;
never executed: return 0;
0
763 }-
764 int offset = findOffset(node) + 4; //jump past name-
765-
766 const short flags = (tree[offset+0] << 8) + (tree[offset+1] << 0);-
767 offset += 2;-
768-
769 offset += 4; //jump past locale-
770-
771 if(!(flags & Directory)) {
!(flags & Directory)Description
TRUEevaluated 18648 times by 85 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
FALSEnever evaluated
0-18648
772 const int data_offset = (tree[offset+0] << 24) + (tree[offset+1] << 16) +-
773 (tree[offset+2] << 8) + (tree[offset+3] << 0);-
774 const uint data_length = (payloads[data_offset+0] << 24) + (payloads[data_offset+1] << 16) +-
775 (payloads[data_offset+2] << 8) + (payloads[data_offset+3] << 0);-
776 const uchar *ret = payloads+data_offset+4;-
777 *size = data_length;-
778 return ret;
executed 18648 times by 85 tests: return ret;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • ...
18648
779 }-
780 *size = 0;-
781 return 0;
never executed: return 0;
0
782}-
783QStringList QResourceRoot::children(int node) const-
784{-
785 if(node == -1)
node == -1Description
TRUEnever evaluated
FALSEevaluated 205 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
0-205
786 return QStringList();
never executed: return QStringList();
0
787 int offset = findOffset(node) + 4; //jump past name-
788-
789 const short flags = (tree[offset+0] << 8) + (tree[offset+1] << 0);-
790 offset += 2;-
791-
792 QStringList ret;-
793 if(flags & Directory) {
flags & DirectoryDescription
TRUEevaluated 205 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEnever evaluated
0-205
794 const int child_count = (tree[offset+0] << 24) + (tree[offset+1] << 16) +-
795 (tree[offset+2] << 8) + (tree[offset+3] << 0);-
796 offset += 4;-
797 const int child_off = (tree[offset+0] << 24) + (tree[offset+1] << 16) +-
798 (tree[offset+2] << 8) + (tree[offset+3] << 0);-
799 ret.reserve(child_count);-
800 for(int i = child_off; i < child_off+child_count; ++i)
i < child_off+child_countDescription
TRUEevaluated 605 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
FALSEevaluated 205 times by 6 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
205-605
801 ret << name(i);
executed 605 times by 6 tests: ret << name(i);
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
605
802 }
executed 205 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
205
803 return ret;
executed 205 times by 6 tests: return ret;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
205
804}-
805bool QResourceRoot::mappingRootSubdir(const QString &path, QString *match) const-
806{-
807 const QString root = mappingRoot();-
808 if(!root.isEmpty()) {
!root.isEmpty()Description
TRUEevaluated 297 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 50021 times by 113 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
297-50021
809 const QVector<QStringRef> root_segments = root.splitRef(QLatin1Char('/'), QString::SkipEmptyParts),-
810 path_segments = path.splitRef(QLatin1Char('/'), QString::SkipEmptyParts);-
811 if(path_segments.size() <= root_segments.size()) {
path_segments....egments.size()Description
TRUEevaluated 60 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 237 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
60-237
812 int matched = 0;-
813 for(int i = 0; i < path_segments.size(); ++i) {
i < path_segments.size()Description
TRUEevaluated 57 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
18-57
814 if(root_segments[i] != path_segments[i])
root_segments[...th_segments[i]Description
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_QResourceEngine
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
15-42
815 break;
executed 42 times by 1 test: break;
Executed by:
  • tst_QResourceEngine
42
816 ++matched;-
817 }
executed 15 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
15
818 if(matched == path_segments.size()) {
matched == pat...egments.size()Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 42 times by 1 test
Evaluated by:
  • tst_QResourceEngine
18-42
819 if(match && root_segments.size() > matched)
matchDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
root_segments.size() > matchedDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QResourceEngine
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-18
820 *match = root_segments.at(matched).toString();
executed 3 times by 1 test: *match = root_segments.at(matched).toString();
Executed by:
  • tst_QResourceEngine
3
821 return true;
executed 18 times by 2 tests: return true;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
18
822 }-
823 }
executed 42 times by 1 test: end of block
Executed by:
  • tst_QResourceEngine
42
824 }
executed 279 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
279
825 return false;
executed 50300 times by 113 tests: return false;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
50300
826}-
827-
828Q_CORE_EXPORT bool qRegisterResourceData(int version, const unsigned char *tree,-
829 const unsigned char *name, const unsigned char *data)-
830{-
831 QMutexLocker lock(resourceMutex());-
832 if(version == 0x01 && resourceList()) {
version == 0x01Description
TRUEevaluated 1327 times by 19 tests
Evaluated by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qmimetype
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
resourceList()Description
TRUEevaluated 1327 times by 19 tests
Evaluated by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qmimetype
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
0-1327
833 bool found = false;-
834 QResourceRoot res(tree, name, data);-
835 for(int i = 0; i < resourceList()->size(); ++i) {
i < resourceList()->size()Description
TRUEevaluated 509 times by 7 tests
Evaluated by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qmimetype
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1143 times by 15 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
509-1143
836 if(*resourceList()->at(i) == res) {
*resourceList()->at(i) == resDescription
TRUEevaluated 184 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qmimetype
  • tst_qprocess - unknown status
FALSEevaluated 325 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
184-325
837 found = true;-
838 break;
executed 184 times by 6 tests: break;
Executed by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qmimetype
  • tst_qprocess - unknown status
184
839 }-
840 }
executed 325 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
325
841 if(!found) {
!foundDescription
TRUEevaluated 1143 times by 15 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEevaluated 184 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qmimetype
  • tst_qprocess - unknown status
184-1143
842 QResourceRoot *root = new QResourceRoot(tree, name, data);-
843 root->ref.ref();-
844 resourceList()->append(root);-
845 }
executed 1143 times by 15 tests: end of block
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1143
846 return true;
executed 1327 times by 19 tests: return true;
Executed by:
  • tst_QApplication
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qmimetype
  • tst_qnetworkreply - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1327
847 }-
848 return false;
never executed: return false;
0
849}-
850-
851Q_CORE_EXPORT bool qUnregisterResourceData(int version, const unsigned char *tree,-
852 const unsigned char *name, const unsigned char *data)-
853{-
854 QMutexLocker lock(resourceMutex());-
855 if(version == 0x01 && resourceList()) {
version == 0x01Description
TRUEevaluated 358 times by 181 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
FALSEnever evaluated
resourceList()Description
TRUEevaluated 358 times by 181 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
FALSEnever evaluated
0-358
856 QResourceRoot res(tree, name, data);-
857 for(int i = 0; i < resourceList()->size(); ) {
i < resourceList()->size()Description
TRUEevaluated 903 times by 181 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
FALSEevaluated 358 times by 181 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
358-903
858 if(*resourceList()->at(i) == res) {
*resourceList()->at(i) == resDescription
TRUEevaluated 358 times by 181 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
FALSEevaluated 545 times by 181 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
358-545
859 QResourceRoot *root = resourceList()->takeAt(i);-
860 if(!root->ref.deref())
!root->ref.deref()Description
TRUEevaluated 358 times by 181 tests
Evaluated by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
FALSEnever evaluated
0-358
861 delete root;
executed 358 times by 181 tests: delete root;
Executed by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
358
862 } else {
executed 358 times by 181 tests: end of block
Executed by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
358
863 ++i;-
864 }
executed 545 times by 181 tests: end of block
Executed by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
545
865 }-
866 return true;
executed 358 times by 181 tests: return true;
Executed by:
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qapplication - unknown status
  • tst_qboxlayout - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcheckbox - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • ...
358
867 }-
868 return false;
never executed: return false;
0
869}-
870-
871//run time resource creation-
872-
873class QDynamicBufferResourceRoot: public QResourceRoot-
874{-
875 QString root;-
876 const uchar *buffer;-
877-
878public:-
879 inline QDynamicBufferResourceRoot(const QString &_root) : root(_root), buffer(0) { }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
880 inline ~QDynamicBufferResourceRoot() { }-
881 inline const uchar *mappingBuffer() const { return buffer; }
never executed: return buffer;
0
882 virtual QString mappingRoot() const Q_DECL_OVERRIDE { return root; }
executed 1850 times by 2 tests: return root;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
1850
883 virtual ResourceRootType type() const Q_DECL_OVERRIDE { return Resource_Buffer; }
never executed: return Resource_Buffer;
0
884-
885 // size == -1 means "unknown"-
886 bool registerSelf(const uchar *b, int size)-
887 {-
888 // 5 int "pointers"-
889 if (size >= 0 && size < 20)
size >= 0Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
size < 20Description
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-16
890 return false;
never executed: return false;
0
891-
892 //setup the data now-
893 int offset = 0;-
894-
895 //magic number-
896 if(b[offset+0] != 'q' || b[offset+1] != 'r' ||
b[offset+0] != 'q'Description
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
b[offset+1] != 'r'Description
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-16
897 b[offset+2] != 'e' || b[offset+3] != 's') {
b[offset+2] != 'e'Description
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
b[offset+3] != 's'Description
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-16
898 return false;
never executed: return false;
0
899 }-
900 offset += 4;-
901-
902 const int version = (b[offset+0] << 24) + (b[offset+1] << 16) +-
903 (b[offset+2] << 8) + (b[offset+3] << 0);-
904 offset += 4;-
905-
906 const int tree_offset = (b[offset+0] << 24) + (b[offset+1] << 16) +-
907 (b[offset+2] << 8) + (b[offset+3] << 0);-
908 offset += 4;-
909-
910 const int data_offset = (b[offset+0] << 24) + (b[offset+1] << 16) +-
911 (b[offset+2] << 8) + (b[offset+3] << 0);-
912 offset += 4;-
913-
914 const int name_offset = (b[offset+0] << 24) + (b[offset+1] << 16) +-
915 (b[offset+2] << 8) + (b[offset+3] << 0);-
916 offset += 4;-
917-
918 // Some sanity checking for sizes. This is _not_ a security measure.-
919 if (size >= 0 && (tree_offset >= size || data_offset >= size || name_offset >= size))
size >= 0Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
tree_offset >= sizeDescription
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
data_offset >= sizeDescription
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
name_offset >= sizeDescription
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-16
920 return false;
never executed: return false;
0
921-
922 if(version == 0x01) {
version == 0x01Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
923 buffer = b;-
924 setSource(b+tree_offset, b+name_offset, b+data_offset);-
925 return true;
executed 16 times by 2 tests: return true;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
926 }-
927 return false;
never executed: return false;
0
928 }-
929};-
930-
931#if defined(Q_OS_UNIX) && !defined (Q_OS_NACL) && !defined(Q_OS_INTEGRITY)-
932#define QT_USE_MMAP-
933#endif-
934-
935// most of the headers below are already included in qplatformdefs.h-
936// also this lacks Large File support but that's probably irrelevant-
937#if defined(QT_USE_MMAP)-
938// for mmap-
939QT_BEGIN_INCLUDE_NAMESPACE-
940#include <sys/mman.h>-
941#include <errno.h>-
942QT_END_INCLUDE_NAMESPACE-
943#endif-
944-
945-
946-
947class QDynamicFileResourceRoot: public QDynamicBufferResourceRoot-
948{-
949 QString fileName;-
950 // for mmap'ed files, this is what needs to be unmapped.-
951 uchar *unmapPointer;-
952 unsigned int unmapLength;-
953-
954public:-
955 inline QDynamicFileResourceRoot(const QString &_root) : QDynamicBufferResourceRoot(_root), unmapPointer(0), unmapLength(0) { }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
956 ~QDynamicFileResourceRoot() {-
957#if defined(QT_USE_MMAP)-
958 if (unmapPointer) {
unmapPointerDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
959 munmap((char*)unmapPointer, unmapLength);-
960 unmapPointer = 0;-
961 unmapLength = 0;-
962 } else
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
963#endif-
964 {-
965 delete [] mappingBuffer();-
966 }
never executed: end of block
0
967 }-
968 QString mappingFile() const { return fileName; }
executed 20 times by 2 tests: return fileName;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
20
969 virtual ResourceRootType type() const Q_DECL_OVERRIDE { return Resource_File; }
executed 20 times by 2 tests: return Resource_File;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
20
970-
971 bool registerSelf(const QString &f) {-
972 bool fromMM = false;-
973 uchar *data = 0;-
974 unsigned int data_len = 0;-
975-
976#ifdef QT_USE_MMAP-
977-
978#ifndef MAP_FILE-
979#define MAP_FILE 0-
980#endif-
981#ifndef MAP_FAILED-
982#define MAP_FAILED -1-
983#endif-
984-
985 int fd = QT_OPEN(QFile::encodeName(f), O_RDONLY,-
986#if defined(Q_OS_WIN)-
987 _S_IREAD | _S_IWRITE-
988#else-
989 0666-
990#endif-
991 );-
992 if (fd >= 0) {
fd >= 0Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
993 QT_STATBUF st;-
994 if (!QT_FSTAT(fd, &st)) {
!::fstat64(fd, &st)Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
995 uchar *ptr;-
996 ptr = reinterpret_cast<uchar *>(-
997 mmap(0, st.st_size, // any address, whole file-
998 PROT_READ, // read-only memory-
999 MAP_FILE | MAP_PRIVATE, // swap-backed map from file-
1000 fd, 0)); // from offset 0 of fd-
1001 if (ptr && ptr != reinterpret_cast<uchar *>(MAP_FAILED)) {
ptrDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
ptr != reinter...((void *) -1))Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
1002 data = ptr;-
1003 data_len = st.st_size;-
1004 fromMM = true;-
1005 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
1006 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
1007 ::close(fd);-
1008 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
1009#endif // QT_USE_MMAP-
1010 if(!data) {
!dataDescription
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-16
1011 QFile file(f);-
1012 if (!file.exists())
!file.exists()Description
TRUEnever evaluated
FALSEnever evaluated
0
1013 return false;
never executed: return false;
0
1014 data_len = file.size();-
1015 data = new uchar[data_len];-
1016-
1017 bool ok = false;-
1018 if (file.open(QIODevice::ReadOnly))
file.open(QIODevice::ReadOnly)Description
TRUEnever evaluated
FALSEnever evaluated
0
1019 ok = (data_len == (uint)file.read((char*)data, data_len));
never executed: ok = (data_len == (uint)file.read((char*)data, data_len));
0
1020 if (!ok) {
!okDescription
TRUEnever evaluated
FALSEnever evaluated
0
1021 delete [] data;-
1022 data = 0;-
1023 data_len = 0;-
1024 return false;
never executed: return false;
0
1025 }-
1026 fromMM = false;-
1027 }
never executed: end of block
0
1028 if (data && QDynamicBufferResourceRoot::registerSelf(data, data_len)) {
dataDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
QDynamicBuffer...ata, data_len)Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
1029 if(fromMM) {
fromMMDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
1030 unmapPointer = data;-
1031 unmapLength = data_len;-
1032 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
1033 fileName = f;-
1034 return true;
executed 16 times by 2 tests: return true;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
1035 }-
1036 return false;
never executed: return false;
0
1037 }-
1038};-
1039-
1040static QString qt_resource_fixResourceRoot(QString r) {-
1041 if(!r.isEmpty()) {
!r.isEmpty()Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QResourceEngine
2-30
1042 if(r.startsWith(QLatin1Char(':')))
r.startsWith(QLatin1Char(':'))Description
TRUEnever evaluated
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-30
1043 r = r.mid(1);
never executed: r = r.mid(1);
0
1044 if(!r.isEmpty())
!r.isEmpty()Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-30
1045 r = QDir::cleanPath(r);
executed 30 times by 2 tests: r = QDir::cleanPath(r);
Executed by:
  • tst_QResourceEngine
  • tst_rcc
30
1046 }
executed 30 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
30
1047 return r;
executed 32 times by 2 tests: return r;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
32
1048}-
1049-
1050-
1051/*!-
1052 \fn bool QResource::registerResource(const QString &rccFileName, const QString &mapRoot)-
1053-
1054 Registers the resource with the given \a rccFileName at the location in the-
1055 resource tree specified by \a mapRoot, and returns \c true if the file is-
1056 successfully opened; otherwise returns \c false.-
1057-
1058 \sa unregisterResource()-
1059*/-
1060-
1061bool-
1062QResource::registerResource(const QString &rccFilename, const QString &resourceRoot)-
1063{-
1064 QString r = qt_resource_fixResourceRoot(resourceRoot);-
1065 if(!r.isEmpty() && r[0] != QLatin1Char('/')) {
!r.isEmpty()Description
TRUEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QResourceEngine
r[0] != QLatin1Char('/')Description
TRUEnever evaluated
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
0-15
1066 qWarning("QDir::registerResource: Registering a resource [%s] must be rooted in an absolute path (start with /) [%s]",-
1067 rccFilename.toLocal8Bit().data(), resourceRoot.toLocal8Bit().data());-
1068 return false;
never executed: return false;
0
1069 }-
1070-
1071 QDynamicFileResourceRoot *root = new QDynamicFileResourceRoot(r);-
1072 if(root->registerSelf(rccFilename)) {
root->register...f(rccFilename)Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-16
1073 root->ref.ref();-
1074 QMutexLocker lock(resourceMutex());-
1075 resourceList()->append(root);-
1076 return true;
executed 16 times by 2 tests: return true;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
16
1077 }-
1078 delete root;-
1079 return false;
never executed: return false;
0
1080}-
1081-
1082/*!-
1083 \fn bool QResource::unregisterResource(const QString &rccFileName, const QString &mapRoot)-
1084-
1085 Unregisters the resource with the given \a rccFileName at the location in-
1086 the resource tree specified by \a mapRoot, and returns \c true if the-
1087 resource is successfully unloaded and no references exist for the-
1088 resource; otherwise returns \c false.-
1089-
1090 \sa registerResource()-
1091*/-
1092-
1093bool-
1094QResource::unregisterResource(const QString &rccFilename, const QString &resourceRoot)-
1095{-
1096 QString r = qt_resource_fixResourceRoot(resourceRoot);-
1097-
1098 QMutexLocker lock(resourceMutex());-
1099 ResourceList *list = resourceList();-
1100 for(int i = 0; i < list->size(); ++i) {
i < list->size()Description
TRUEevaluated 40 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
0-40
1101 QResourceRoot *res = list->at(i);-
1102 if(res->type() == QResourceRoot::Resource_File) {
res->type() ==...:Resource_FileDescription
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
20
1103 QDynamicFileResourceRoot *root = reinterpret_cast<QDynamicFileResourceRoot*>(res);-
1104 if (root->mappingFile() == rccFilename && root->mappingRoot() == r) {
root->mappingF...== rccFilenameDescription
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEnever evaluated
root->mappingRoot() == rDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QResourceEngine
0-20
1105 resourceList()->removeAt(i);-
1106 if(!root->ref.deref()) {
!root->ref.deref()Description
TRUEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QResourceEngine
1-15
1107 delete root;-
1108 return true;
executed 15 times by 2 tests: return true;
Executed by:
  • tst_QResourceEngine
  • tst_rcc
15
1109 }-
1110 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QResourceEngine
1
1111 }-
1112 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QResourceEngine
4
1113 }
executed 24 times by 2 tests: end of block
Executed by:
  • tst_QResourceEngine
  • tst_rcc
24
1114 return false;
never executed: return false;
0
1115}-
1116-
1117-
1118/*!-
1119 \fn bool QResource::registerResource(const uchar *rccData, const QString &mapRoot)-
1120 \since 4.3-
1121-
1122 Registers the resource with the given \a rccData at the location in the-
1123 resource tree specified by \a mapRoot, and returns \c true if the file is-
1124 successfully opened; otherwise returns \c false.-
1125-
1126 \warning The data must remain valid throughout the life of any QFile-
1127 that may reference the resource data.-
1128-
1129 \sa unregisterResource()-
1130*/-
1131-
1132bool-
1133QResource::registerResource(const uchar *rccData, const QString &resourceRoot)-
1134{-
1135 QString r = qt_resource_fixResourceRoot(resourceRoot);-
1136 if(!r.isEmpty() && r[0] != QLatin1Char('/')) {
!r.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
r[0] != QLatin1Char('/')Description
TRUEnever evaluated
FALSEnever evaluated
0
1137 qWarning("QDir::registerResource: Registering a resource [%p] must be rooted in an absolute path (start with /) [%s]",-
1138 rccData, resourceRoot.toLocal8Bit().data());-
1139 return false;
never executed: return false;
0
1140 }-
1141-
1142 QDynamicBufferResourceRoot *root = new QDynamicBufferResourceRoot(r);-
1143 if (root->registerSelf(rccData, -1)) {
root->register...f(rccData, -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
1144 root->ref.ref();-
1145 QMutexLocker lock(resourceMutex());-
1146 resourceList()->append(root);-
1147 return true;
never executed: return true;
0
1148 }-
1149 delete root;-
1150 return false;
never executed: return false;
0
1151}-
1152-
1153/*!-
1154 \fn bool QResource::unregisterResource(const uchar *rccData, const QString &mapRoot)-
1155 \since 4.3-
1156-
1157 Unregisters the resource with the given \a rccData at the location in the-
1158 resource tree specified by \a mapRoot, and returns \c true if the resource is-
1159 successfully unloaded and no references exist into the resource; otherwise returns \c false.-
1160-
1161 \sa registerResource()-
1162*/-
1163-
1164bool-
1165QResource::unregisterResource(const uchar *rccData, const QString &resourceRoot)-
1166{-
1167 QString r = qt_resource_fixResourceRoot(resourceRoot);-
1168-
1169 QMutexLocker lock(resourceMutex());-
1170 ResourceList *list = resourceList();-
1171 for(int i = 0; i < list->size(); ++i) {
i < list->size()Description
TRUEnever evaluated
FALSEnever evaluated
0
1172 QResourceRoot *res = list->at(i);-
1173 if(res->type() == QResourceRoot::Resource_Buffer) {
res->type() ==...esource_BufferDescription
TRUEnever evaluated
FALSEnever evaluated
0
1174 QDynamicBufferResourceRoot *root = reinterpret_cast<QDynamicBufferResourceRoot*>(res);-
1175 if (root->mappingBuffer() == rccData && root->mappingRoot() == r) {
root->mappingB...r() == rccDataDescription
TRUEnever evaluated
FALSEnever evaluated
root->mappingRoot() == rDescription
TRUEnever evaluated
FALSEnever evaluated
0
1176 resourceList()->removeAt(i);-
1177 if(!root->ref.deref()) {
!root->ref.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
1178 delete root;-
1179 return true;
never executed: return true;
0
1180 }-
1181 return false;
never executed: return false;
0
1182 }-
1183 }
never executed: end of block
0
1184 }
never executed: end of block
0
1185 return false;
never executed: return false;
0
1186}-
1187-
1188#if !defined(QT_BOOTSTRAPPED)-
1189//resource engine-
1190class QResourceFileEnginePrivate : public QAbstractFileEnginePrivate-
1191{-
1192protected:-
1193 Q_DECLARE_PUBLIC(QResourceFileEngine)-
1194private:-
1195 uchar *map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags);-
1196 bool unmap(uchar *ptr);-
1197 void uncompress() const;-
1198 qint64 offset;-
1199 QResource resource;-
1200 mutable QByteArray uncompressed;-
1201protected:-
1202 QResourceFileEnginePrivate() : offset(0) { }
executed 48997 times by 114 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
48997
1203};-
1204-
1205bool QResourceFileEngine::mkdir(const QString &, bool) const-
1206{-
1207 return false;
never executed: return false;
0
1208}-
1209-
1210bool QResourceFileEngine::rmdir(const QString &, bool) const-
1211{-
1212 return false;
never executed: return false;
0
1213}-
1214-
1215bool QResourceFileEngine::setSize(qint64)-
1216{-
1217 return false;
never executed: return false;
0
1218}-
1219-
1220QStringList QResourceFileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const-
1221{-
1222 return QAbstractFileEngine::entryList(filters, filterNames);
never executed: return QAbstractFileEngine::entryList(filters, filterNames);
0
1223}-
1224-
1225bool QResourceFileEngine::caseSensitive() const-
1226{-
1227 return true;
never executed: return true;
0
1228}-
1229-
1230QResourceFileEngine::QResourceFileEngine(const QString &file) :-
1231 QAbstractFileEngine(*new QResourceFileEnginePrivate)-
1232{-
1233 Q_D(QResourceFileEngine);-
1234 d->resource.setFileName(file);-
1235}
executed 48997 times by 114 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDirIterator
  • tst_QDnsLookup_Appless
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFile
  • ...
48997
1236-
1237QResourceFileEngine::~QResourceFileEngine()-
1238{-
1239}-
1240-
1241void QResourceFileEngine::setFileName(const QString &file)-
1242{-
1243 Q_D(QResourceFileEngine);-
1244 d->resource.setFileName(file);-
1245}
executed 174 times by 6 tests: end of block
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
174
1246-
1247bool QResourceFileEngine::open(QIODevice::OpenMode flags)-
1248{-
1249 Q_D(QResourceFileEngine);-
1250 if (d->resource.fileName().isEmpty()) {
d->resource.fi...me().isEmpty()Description
TRUEnever evaluated
FALSEevaluated 14854 times by 83 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
0-14854
1251 qWarning("QResourceFileEngine::open: Missing file name");-
1252 return false;
never executed: return false;
0
1253 }-
1254 if(flags & QIODevice::WriteOnly)
flags & QIODevice::WriteOnlyDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSettings
FALSEevaluated 14851 times by 83 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
3-14851
1255 return false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_QSettings
3
1256 d->uncompress();-
1257 if (!d->resource.isValid()) {
!d->resource.isValid()Description
TRUEevaluated 212 times by 7 tests
Evaluated by:
  • tst_QFile
  • tst_QImageReader
  • tst_QPlainTextEdit
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_Selftests
FALSEevaluated 14639 times by 81 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
212-14639
1258 d->errorString = qt_error_string(ENOENT);-
1259 return false;
executed 212 times by 7 tests: return false;
Executed by:
  • tst_QFile
  • tst_QImageReader
  • tst_QPlainTextEdit
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_Selftests
212
1260 }-
1261 return true;
executed 14639 times by 81 tests: return true;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
14639
1262}-
1263-
1264bool QResourceFileEngine::close()-
1265{-
1266 Q_D(QResourceFileEngine);-
1267 d->offset = 0;-
1268 d->uncompressed.clear();-
1269 return true;
executed 14639 times by 81 tests: return true;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
14639
1270}-
1271-
1272bool QResourceFileEngine::flush()-
1273{-
1274 return true;
executed 14639 times by 81 tests: return true;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
14639
1275}-
1276-
1277qint64 QResourceFileEngine::read(char *data, qint64 len)-
1278{-
1279 Q_D(QResourceFileEngine);-
1280 if(len > size()-d->offset)
len > size()-d->offsetDescription
TRUEevaluated 57501 times by 78 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsEffect
  • ...
FALSEevaluated 1830 times by 12 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QFileInfo
  • tst_QFontDialog
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QRawFont
  • tst_QResourceEngine
  • tst_QStyle
  • tst_QWizard
  • tst_Selftests
  • tst_rcc
1830-57501
1281 len = size()-d->offset;
executed 57501 times by 78 tests: len = size()-d->offset;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsEffect
  • ...
57501
1282 if(len <= 0)
len <= 0Description
TRUEevaluated 16426 times by 7 tests
Evaluated by:
  • tst_QFile
  • tst_QGraphicsScene
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QTemporaryFile
FALSEevaluated 42905 times by 81 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
16426-42905
1283 return 0;
executed 16426 times by 7 tests: return 0;
Executed by:
  • tst_QFile
  • tst_QGraphicsScene
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QMovie
  • tst_QNetworkReply
  • tst_QTemporaryFile
16426
1284 if(d->resource.isCompressed())
d->resource.isCompressed()Description
TRUEevaluated 1286 times by 8 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
FALSEevaluated 41619 times by 79 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsEffect
  • ...
1286-41619
1285 memcpy(data, d->uncompressed.constData()+d->offset, len);
executed 1286 times by 8 tests: memcpy(data, d->uncompressed.constData()+d->offset, len);
Executed by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
1286
1286 else-
1287 memcpy(data, d->resource.data()+d->offset, len);
executed 41619 times by 79 tests: memcpy(data, d->resource.data()+d->offset, len);
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsEffect
  • ...
41619
1288 d->offset += len;-
1289 return len;
executed 42905 times by 81 tests: return len;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
42905
1290}-
1291-
1292qint64 QResourceFileEngine::write(const char *, qint64)-
1293{-
1294 return -1;
never executed: return -1;
0
1295}-
1296-
1297bool QResourceFileEngine::remove()-
1298{-
1299 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QFile
1
1300}-
1301-
1302bool QResourceFileEngine::copy(const QString &)-
1303{-
1304 return false;
executed 34 times by 4 tests: return false;
Executed by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QIcon
  • tst_QMimeDatabase
34
1305}-
1306-
1307bool QResourceFileEngine::rename(const QString &)-
1308{-
1309 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QFile
1
1310}-
1311-
1312bool QResourceFileEngine::link(const QString &)-
1313{-
1314 return false;
never executed: return false;
0
1315}-
1316-
1317qint64 QResourceFileEngine::size() const-
1318{-
1319 Q_D(const QResourceFileEngine);-
1320 if(!d->resource.isValid())
!d->resource.isValid()Description
TRUEnever evaluated
FALSEevaluated 179590 times by 81 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
0-179590
1321 return 0;
never executed: return 0;
0
1322 if (d->resource.isCompressed()) {
d->resource.isCompressed()Description
TRUEevaluated 2845 times by 8 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
FALSEevaluated 176745 times by 80 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
2845-176745
1323 d->uncompress();-
1324 return d->uncompressed.size();
executed 2845 times by 8 tests: return d->uncompressed.size();
Executed by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
2845
1325 }-
1326 return d->resource.size();
executed 176745 times by 80 tests: return d->resource.size();
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
176745
1327}-
1328-
1329qint64 QResourceFileEngine::pos() const-
1330{-
1331 Q_D(const QResourceFileEngine);-
1332 return d->offset;
never executed: return d->offset;
0
1333}-
1334-
1335bool QResourceFileEngine::atEnd() const-
1336{-
1337 Q_D(const QResourceFileEngine);-
1338 if(!d->resource.isValid())
!d->resource.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
0
1339 return true;
never executed: return true;
0
1340 return d->offset == size();
never executed: return d->offset == size();
0
1341}-
1342-
1343bool QResourceFileEngine::seek(qint64 pos)-
1344{-
1345 Q_D(QResourceFileEngine);-
1346 if(!d->resource.isValid())
!d->resource.isValid()Description
TRUEnever evaluated
FALSEevaluated 29931 times by 69 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • ...
0-29931
1347 return false;
never executed: return false;
0
1348-
1349 if(d->offset > size())
d->offset > size()Description
TRUEnever evaluated
FALSEevaluated 29931 times by 69 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • ...
0-29931
1350 return false;
never executed: return false;
0
1351 d->offset = pos;-
1352 return true;
executed 29931 times by 69 tests: return true;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • ...
29931
1353}-
1354-
1355bool QResourceFileEngine::isSequential() const-
1356{-
1357 return false;
executed 52738 times by 81 tests: return false;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
52738
1358}-
1359-
1360QAbstractFileEngine::FileFlags QResourceFileEngine::fileFlags(QAbstractFileEngine::FileFlags type) const-
1361{-
1362 Q_D(const QResourceFileEngine);-
1363 QAbstractFileEngine::FileFlags ret = 0;-
1364 if(!d->resource.isValid())
!d->resource.isValid()Description
TRUEevaluated 4673 times by 60 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QIcon
  • ...
FALSEevaluated 4398 times by 53 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • ...
4398-4673
1365 return ret;
executed 4673 times by 60 tests: return ret;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QIcon
  • ...
4673
1366-
1367 if(type & PermsMask)
type & PermsMaskDescription
TRUEevaluated 119 times by 7 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QTranslator
FALSEevaluated 4279 times by 53 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • ...
119-4279
1368 ret |= QAbstractFileEngine::FileFlags(ReadOwnerPerm|ReadUserPerm|ReadGroupPerm|ReadOtherPerm);
executed 119 times by 7 tests: ret |= QAbstractFileEngine::FileFlags(ReadOwnerPerm|ReadUserPerm|ReadGroupPerm|ReadOtherPerm);
Executed by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QTranslator
119
1369 if(type & TypesMask) {
type & TypesMaskDescription
TRUEevaluated 4235 times by 49 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
FALSEevaluated 163 times by 11 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QDir
  • tst_QFile
  • tst_QFileInfo
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QTemporaryFile
  • tst_QTranslator
  • tst_QWidget
163-4235
1370 if(d->resource.isDir())
d->resource.isDir()Description
TRUEevaluated 283 times by 7 tests
Evaluated by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QIcon
  • tst_QResourceEngine
  • tst_rcc
FALSEevaluated 3952 times by 49 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
283-3952
1371 ret |= DirectoryType;
executed 283 times by 7 tests: ret |= DirectoryType;
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QIcon
  • tst_QResourceEngine
  • tst_rcc
283
1372 else-
1373 ret |= FileType;
executed 3952 times by 49 tests: ret |= FileType;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
3952
1374 }-
1375 if(type & FlagsMask) {
type & FlagsMaskDescription
TRUEevaluated 4209 times by 53 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • ...
FALSEevaluated 189 times by 9 tests
Evaluated by:
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileInfo
  • tst_QIcon
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_QTranslator
  • tst_rcc
189-4209
1376 ret |= ExistsFlag;-
1377 if(d->resource.absoluteFilePath() == QLatin1String(":/"))
d->resource.ab...n1String(":/")Description
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QDir
  • tst_QFileInfo
  • tst_QResourceEngine
FALSEevaluated 4205 times by 53 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • ...
4-4205
1378 ret |= RootFlag;
executed 4 times by 3 tests: ret |= RootFlag;
Executed by:
  • tst_QDir
  • tst_QFileInfo
  • tst_QResourceEngine
4
1379 }
executed 4209 times by 53 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • ...
4209
1380 return ret;
executed 4398 times by 53 tests: return ret;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSelector
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • ...
4398
1381}-
1382-
1383bool QResourceFileEngine::setPermissions(uint)-
1384{-
1385 return false;
never executed: return false;
0
1386}-
1387-
1388QString QResourceFileEngine::fileName(FileName file) const-
1389{-
1390 Q_D(const QResourceFileEngine);-
1391 if(file == BaseName) {
file == BaseNameDescription
TRUEnever evaluated
FALSEevaluated 25998 times by 71 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • ...
0-25998
1392 int slash = d->resource.fileName().lastIndexOf(QLatin1Char('/'));-
1393 if (slash == -1)
slash == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1394 return d->resource.fileName();
never executed: return d->resource.fileName();
0
1395 return d->resource.fileName().mid(slash + 1);
never executed: return d->resource.fileName().mid(slash + 1);
0
1396 } else if(file == PathName || file == AbsolutePathName) {
file == PathNameDescription
TRUEnever evaluated
FALSEevaluated 25998 times by 71 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • ...
file == AbsolutePathNameDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEevaluated 25997 times by 70 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • ...
0-25998
1397 const QString path = (file == AbsolutePathName) ? d->resource.absoluteFilePath() : d->resource.fileName();
(file == AbsolutePathName)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEnever evaluated
0-1
1398 const int slash = path.lastIndexOf(QLatin1Char('/'));-
1399 if (slash == -1)
slash == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
1400 return QLatin1String(":");
never executed: return QLatin1String(":");
0
1401 else if (slash <= 1)
slash <= 1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
1402 return QLatin1String(":/");
never executed: return QLatin1String(":/");
0
1403 return path.left(slash);
executed 1 time by 1 test: return path.left(slash);
Executed by:
  • tst_QFileInfo
1
1404-
1405 } else if(file == CanonicalName || file == CanonicalPathName) {
file == CanonicalNameDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDir
FALSEevaluated 25996 times by 70 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • ...
file == CanonicalPathNameDescription
TRUEnever evaluated
FALSEevaluated 25996 times by 70 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • ...
0-25996
1406 const QString absoluteFilePath = d->resource.absoluteFilePath();-
1407 if(file == CanonicalPathName) {
file == CanonicalPathNameDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDir
0-1
1408 const int slash = absoluteFilePath.lastIndexOf(QLatin1Char('/'));-
1409 if (slash != -1)
slash != -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1410 return absoluteFilePath.left(slash);
never executed: return absoluteFilePath.left(slash);
0
1411 }
never executed: end of block
0
1412 return absoluteFilePath;
executed 1 time by 1 test: return absoluteFilePath;
Executed by:
  • tst_QDir
1
1413 }-
1414 return d->resource.fileName();
executed 25996 times by 70 tests: return d->resource.fileName();
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDir
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsEffect
  • tst_QGraphicsEffectSource
  • tst_QGraphicsItem
  • ...
25996
1415}-
1416-
1417bool QResourceFileEngine::isRelativePath() const-
1418{-
1419 return false;
executed 14 times by 5 tests: return false;
Executed by:
  • tst_QDir
  • tst_QGuiApplication
  • tst_QKeySequence
  • tst_QTextBrowser
  • tst_QTranslator
14
1420}-
1421-
1422uint QResourceFileEngine::ownerId(FileOwner) const-
1423{-
1424 static const uint nobodyID = (uint) -2;-
1425 return nobodyID;
never executed: return nobodyID;
0
1426}-
1427-
1428QString QResourceFileEngine::owner(FileOwner) const-
1429{-
1430 return QString();
never executed: return QString();
0
1431}-
1432-
1433QDateTime QResourceFileEngine::fileTime(FileTime) const-
1434{-
1435 return QDateTime();
executed 998 times by 29 tests: return QDateTime();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QIcon
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextBrowser
  • ...
998
1436}-
1437-
1438/*!-
1439 \internal-
1440*/-
1441QAbstractFileEngine::Iterator *QResourceFileEngine::beginEntryList(QDir::Filters filters,-
1442 const QStringList &filterNames)-
1443{-
1444 return new QResourceFileEngineIterator(filters, filterNames);
executed 174 times by 6 tests: return new QResourceFileEngineIterator(filters, filterNames);
Executed by:
  • tst_QDir
  • tst_QDirIterator
  • tst_QFileInfo
  • tst_QResourceEngine
  • tst_QVariant
  • tst_rcc
174
1445}-
1446-
1447/*!-
1448 \internal-
1449*/-
1450QAbstractFileEngine::Iterator *QResourceFileEngine::endEntryList()-
1451{-
1452 return 0;
never executed: return 0;
0
1453}-
1454-
1455bool QResourceFileEngine::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)-
1456{-
1457 Q_D(QResourceFileEngine);-
1458 if (extension == MapExtension) {
extension == MapExtensionDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QIcon
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QFile
9-11
1459 const MapExtensionOption *options = (const MapExtensionOption*)(option);-
1460 MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);-
1461 returnValue->address = d->map(options->offset, options->size, options->flags);-
1462 return (returnValue->address != 0);
executed 11 times by 2 tests: return (returnValue->address != 0);
Executed by:
  • tst_QFile
  • tst_QIcon
11
1463 }-
1464 if (extension == UnMapExtension) {
extension == UnMapExtensionDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QFile
FALSEnever evaluated
0-9
1465 const UnMapExtensionOption *options = (const UnMapExtensionOption*)option;-
1466 return d->unmap(options->address);
executed 9 times by 1 test: return d->unmap(options->address);
Executed by:
  • tst_QFile
9
1467 }-
1468 return false;
never executed: return false;
0
1469}-
1470-
1471bool QResourceFileEngine::supportsExtension(Extension extension) const-
1472{-
1473 return (extension == UnMapExtension || extension == MapExtension);
executed 331 times by 6 tests: return (extension == UnMapExtension || extension == MapExtension);
Executed by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QMimeDatabase
  • tst_QNetworkReply
331
1474}-
1475-
1476uchar *QResourceFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags)-
1477{-
1478 Q_Q(QResourceFileEngine);-
1479 Q_UNUSED(flags);-
1480 if (offset < 0 || size <= 0 || !resource.isValid() || offset + size > resource.size()) {
offset < 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QIcon
size <= 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QIcon
!resource.isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QIcon
offset + size ...esource.size()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFile
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QFile
  • tst_QIcon
1-9
1481 q->setError(QFile::UnspecifiedError, QString());-
1482 return 0;
executed 8 times by 1 test: return 0;
Executed by:
  • tst_QFile
8
1483 }-
1484 uchar *address = const_cast<uchar *>(resource.data());-
1485 return (address + offset);
executed 3 times by 2 tests: return (address + offset);
Executed by:
  • tst_QFile
  • tst_QIcon
3
1486}-
1487-
1488bool QResourceFileEnginePrivate::unmap(uchar *ptr)-
1489{-
1490 Q_UNUSED(ptr);-
1491 return true;
executed 9 times by 1 test: return true;
Executed by:
  • tst_QFile
9
1492}-
1493-
1494void QResourceFileEnginePrivate::uncompress() const-
1495{-
1496 if (resource.isCompressed() && uncompressed.isEmpty() && resource.size()) {
resource.isCompressed()Description
TRUEevaluated 3458 times by 8 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
FALSEevaluated 14238 times by 82 tests
Evaluated by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
uncompressed.isEmpty()Description
TRUEevaluated 619 times by 8 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
FALSEevaluated 2839 times by 8 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
resource.size()Description
TRUEevaluated 619 times by 8 tests
Evaluated by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
FALSEnever evaluated
0-14238
1497#ifndef QT_NO_COMPRESS-
1498 uncompressed = qUncompress(resource.data(), resource.size());-
1499#else-
1500 Q_ASSERT(!"QResourceFileEngine::open: Qt built without support for compression");-
1501#endif-
1502 }
executed 619 times by 8 tests: end of block
Executed by:
  • tst_QFileInfo
  • tst_QIcon
  • tst_QImageReader
  • tst_QKeySequence
  • tst_QMimeDatabase
  • tst_QResourceEngine
  • tst_Selftests
  • tst_rcc
619
1503}
executed 17696 times by 83 tests: end of block
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
17696
1504-
1505#endif // !defined(QT_BOOTSTRAPPED)-
1506-
1507QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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