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

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