OpenCoverage

qstringlist.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qstringlist.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5namespace {-
6struct CaseInsensitiveLessThan {-
7 typedef bool result_type;-
8 result_type operator()(const QString &s1, const QString &s2) const-
9 {-
10 return
executed 15 times by 1 test: return s1.compare(s2, Qt::CaseInsensitive) < 0;
Executed by:
  • tst_QStringList
s1.compare(s2, Qt::CaseInsensitive) < 0;
executed 15 times by 1 test: return s1.compare(s2, Qt::CaseInsensitive) < 0;
Executed by:
  • tst_QStringList
15
11 }-
12};-
13}-
14-
15void QtPrivate::QStringList_sort(QStringList *that, Qt::CaseSensitivity cs)-
16{-
17 if (cs == Qt::CaseSensitive
cs == Qt::CaseSensitiveDescription
TRUEevaluated 3290 times by 30 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirIterator
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHostInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringList
)
1-3290
18 std::sort(that->begin(), that->end());
executed 3290 times by 30 tests: std::sort(that->begin(), that->end());
Executed by:
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirIterator
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHostInfo
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
3290
19 else-
20 std::sort(that->begin(), that->end(), CaseInsensitiveLessThan());
executed 1 time by 1 test: std::sort(that->begin(), that->end(), CaseInsensitiveLessThan());
Executed by:
  • tst_QStringList
1
21}-
22QStringList QtPrivate::QStringList_filter(const QStringList *that, const QString &str,-
23 Qt::CaseSensitivity cs)-
24{-
25 QStringMatcher matcher(str, cs);-
26 QStringList res;-
27 for (int i = 0; i < that->size()
i < that->size()Description
TRUEevaluated 782 times by 9 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QStringList
  • tst_selftests - unknown status
FALSEevaluated 141 times by 9 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QStringList
  • tst_selftests - unknown status
; ++i)
141-782
28 if (matcher.indexIn(that->at(i)) != -1
matcher.indexI...->at(i)) != -1Description
TRUEevaluated 158 times by 9 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QStringList
  • tst_selftests - unknown status
FALSEevaluated 624 times by 8 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QStringList
  • tst_selftests - unknown status
)
158-624
29 res << that->at(i);
executed 158 times by 9 tests: res << that->at(i);
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QStringList
  • tst_selftests - unknown status
158
30 return
executed 141 times by 9 tests: return res;
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QStringList
  • tst_selftests - unknown status
res;
executed 141 times by 9 tests: return res;
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QStringList
  • tst_selftests - unknown status
141
31}-
32bool QtPrivate::QStringList_contains(const QStringList *that, const QString &str,-
33 Qt::CaseSensitivity cs)-
34{-
35 for (int i = 0; i < that->size()
i < that->size()Description
TRUEevaluated 204714 times by 235 tests
Evaluated by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • ...
FALSEevaluated 364727 times by 263 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
; ++i) {
204714-364727
36 const QString & string = that->at(i);-
37 if (string.length() == str.length()
string.length(...= str.length()Description
TRUEevaluated 79440 times by 207 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCoreApplication
  • ...
FALSEevaluated 125210 times by 227 tests
Evaluated by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • ...
&& str.compare(string, cs) == 0
str.compare(string, cs) == 0Description
TRUEevaluated 44213 times by 207 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCoreApplication
  • ...
FALSEevaluated 35291 times by 161 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • ...
)
35291-125210
38 return
executed 44213 times by 207 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCoreApplication
  • ...
true;
executed 44213 times by 207 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCoreApplication
  • ...
44213
39 }
executed 160501 times by 228 tests: end of block
Executed by:
  • tst_Gestures
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • ...
160501
40 return
executed 364727 times by 263 tests: return false;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
false;
executed 364727 times by 263 tests: return false;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
364727
41}-
42QStringList QtPrivate::QStringList_filter(const QStringList *that, const QRegExp &rx)-
43{-
44 QStringList res;-
45 for (int i = 0; i < that->size()
i < that->size()Description
TRUEevaluated 56 times by 3 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
  • tst_qstandardpaths
FALSEevaluated 18 times by 3 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
  • tst_qstandardpaths
; ++i)
18-56
46 if (that->at(i).contains(rx)
that->at(i).contains(rx)Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
FALSEevaluated 53 times by 3 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
  • tst_qstandardpaths
)
3-53
47 res << that->at(i);
executed 3 times by 2 tests: res << that->at(i);
Executed by:
  • tst_QProcess
  • tst_QStringList
3
48 return
executed 18 times by 3 tests: return res;
Executed by:
  • tst_QProcess
  • tst_QStringList
  • tst_qstandardpaths
res;
executed 18 times by 3 tests: return res;
Executed by:
  • tst_QProcess
  • tst_QStringList
  • tst_qstandardpaths
18
49}-
50QStringList QtPrivate::QStringList_filter(const QStringList *that, const QRegularExpression &re)-
51{-
52 QStringList res;-
53 for (int i = 0; i < that->size()
i < that->size()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringList
; ++i) {
1-3
54 if (that->at(i).contains(re)
that->at(i).contains(re)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringList
)
1-2
55 res << that->at(i);
executed 2 times by 1 test: res << that->at(i);
Executed by:
  • tst_QStringList
2
56 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QStringList
3
57 return
executed 1 time by 1 test: return res;
Executed by:
  • tst_QStringList
res;
executed 1 time by 1 test: return res;
Executed by:
  • tst_QStringList
1
58}-
59void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QString &before,-
60 const QString &after, Qt::CaseSensitivity cs)-
61{-
62 for (int i = 0; i < that->size()
i < that->size()Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QSortFilterProxyModel
  • tst_QStringList
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QSortFilterProxyModel
  • tst_QStringList
; ++i)
3-18
63 (*
executed 18 times by 2 tests: (*that)[i].replace(before, after, cs);
Executed by:
  • tst_QSortFilterProxyModel
  • tst_QStringList
that)[i].replace(before, after, cs);
executed 18 times by 2 tests: (*that)[i].replace(before, after, cs);
Executed by:
  • tst_QSortFilterProxyModel
  • tst_QStringList
18
64}
executed 3 times by 2 tests: end of block
Executed by:
  • tst_QSortFilterProxyModel
  • tst_QStringList
3
65void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after)-
66{-
67 for (int i = 0; i < that->size()
i < that->size()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QStringList
; ++i)
2-6
68 (*
executed 6 times by 1 test: (*that)[i].replace(rx, after);
Executed by:
  • tst_QStringList
that)[i].replace(rx, after);
executed 6 times by 1 test: (*that)[i].replace(rx, after);
Executed by:
  • tst_QStringList
6
69}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QStringList
2
70void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegularExpression &re, const QString &after)-
71{-
72 for (int i = 0; i < that->size()
i < that->size()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QStringList
; ++i)
2-6
73 (*
executed 6 times by 1 test: (*that)[i].replace(re, after);
Executed by:
  • tst_QStringList
that)[i].replace(re, after);
executed 6 times by 1 test: (*that)[i].replace(re, after);
Executed by:
  • tst_QStringList
6
74}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QStringList
2
75QString QtPrivate::QStringList_join(const QStringList *that, const QChar *sep, int seplen)-
76{-
77 int totalLength = 0;-
78 const int size = that->size();-
79-
80 for (int i = 0; i < size
i < sizeDescription
TRUEevaluated 113985 times by 139 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
FALSEevaluated 47707 times by 141 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • ...
; ++i)
47707-113985
81 totalLength += that->at(i).size();
executed 113985 times by 139 tests: totalLength += that->at(i).size();
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
113985
82-
83 if(size > 0
size > 0Description
TRUEevaluated 47047 times by 139 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
FALSEevaluated 660 times by 11 tests
Evaluated by:
  • tst_QDBusAbstractAdaptor
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHostInfo
  • tst_QMimeDatabase
  • tst_QOpenGlConfig
  • tst_QSharedPointer
  • tst_QSslCertificate
  • tst_QStringList
  • tst_Selftests
)
660-47047
84 totalLength += seplen * (size - 1);
executed 47047 times by 139 tests: totalLength += seplen * (size - 1);
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
47047
85-
86 QString res;-
87 if (totalLength == 0
totalLength == 0Description
TRUEevaluated 798 times by 11 tests
Evaluated by:
  • tst_QDBusAbstractAdaptor
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHostInfo
  • tst_QMimeDatabase
  • tst_QOpenGlConfig
  • tst_QSharedPointer
  • tst_QSslCertificate
  • tst_QStringList
  • tst_Selftests
FALSEevaluated 46909 times by 139 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
)
798-46909
88 return
executed 798 times by 11 tests: return res;
Executed by:
  • tst_QDBusAbstractAdaptor
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHostInfo
  • tst_QMimeDatabase
  • tst_QOpenGlConfig
  • tst_QSharedPointer
  • tst_QSslCertificate
  • tst_QStringList
  • tst_Selftests
res;
executed 798 times by 11 tests: return res;
Executed by:
  • tst_QDBusAbstractAdaptor
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHostInfo
  • tst_QMimeDatabase
  • tst_QOpenGlConfig
  • tst_QSharedPointer
  • tst_QSslCertificate
  • tst_QStringList
  • tst_Selftests
798
89 res.reserve(totalLength);-
90 for (int i = 0; i < size
i < sizeDescription
TRUEevaluated 113847 times by 139 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
FALSEevaluated 46909 times by 139 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
; ++i) {
46909-113847
91 if (i
iDescription
TRUEevaluated 66938 times by 26 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontCache
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QMimeDatabase
  • tst_QNetworkProxyFactory
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStringList
  • tst_QStyleSheetStyle
  • tst_Selftests
  • tst_languageChange
  • tst_qlogging - unknown status
  • ...
FALSEevaluated 46909 times by 139 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
)
46909-66938
92 res.append(sep, seplen);
executed 66938 times by 26 tests: res.append(sep, seplen);
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontCache
  • tst_QGraphicsProxyWidget
  • tst_QHostInfo
  • tst_QMimeDatabase
  • tst_QNetworkProxyFactory
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QStringList
  • tst_QStyleSheetStyle
  • tst_Selftests
  • tst_languageChange
  • tst_qlogging - unknown status
  • ...
66938
93 res += that->at(i);-
94 }
executed 113847 times by 139 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
113847
95 return
executed 46909 times by 139 tests: return res;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
res;
executed 46909 times by 139 tests: return res;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDnsLookup
  • tst_QDockWidget
  • ...
46909
96}-
97static int indexOfMutating(const QStringList *that, QRegExp &rx, int from)-
98{-
99 if (from < 0
from < 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
)
3-8
100 from = qMax(from + that->size(), 0);
executed 3 times by 1 test: from = qMax(from + that->size(), 0);
Executed by:
  • tst_QStringList
3
101 for (int i = from; i < that->size()
i < that->size()Description
TRUEevaluated 61 times by 2 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
; ++i) {
6-61
102 if (rx.exactMatch(that->at(i))
rx.exactMatch(that->at(i))Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
FALSEevaluated 56 times by 2 tests
Evaluated by:
  • tst_QProcess
  • tst_QStringList
)
5-56
103 return
executed 5 times by 2 tests: return i;
Executed by:
  • tst_QProcess
  • tst_QStringList
i;
executed 5 times by 2 tests: return i;
Executed by:
  • tst_QProcess
  • tst_QStringList
5
104 }
executed 56 times by 2 tests: end of block
Executed by:
  • tst_QProcess
  • tst_QStringList
56
105 return
executed 6 times by 2 tests: return -1;
Executed by:
  • tst_QProcess
  • tst_QStringList
-1;
executed 6 times by 2 tests: return -1;
Executed by:
  • tst_QProcess
  • tst_QStringList
6
106}-
107-
108static int lastIndexOfMutating(const QStringList *that, QRegExp &rx, int from)-
109{-
110 if (from < 0
from < 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringList
)
3-6
111 from += that->size();
executed 6 times by 1 test: from += that->size();
Executed by:
  • tst_QStringList
6
112 else if (from >= that->size()
from >= that->size()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QStringList
)
1-2
113 from = that->size() - 1;
executed 1 time by 1 test: from = that->size() - 1;
Executed by:
  • tst_QStringList
1
114 for (int i = from; i >= 0
i >= 0Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringList
; --i) {
3-17
115 if (rx.exactMatch(that->at(i))
rx.exactMatch(that->at(i))Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_QStringList
)
6-11
116 return
executed 6 times by 1 test: return i;
Executed by:
  • tst_QStringList
i;
executed 6 times by 1 test: return i;
Executed by:
  • tst_QStringList
6
117 }
executed 11 times by 1 test: end of block
Executed by:
  • tst_QStringList
11
118 return
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QStringList
-1;
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QStringList
3
119}-
120int QtPrivate::QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from)-
121{-
122 QRegExp rx2(rx);-
123 return
executed 2 times by 1 test: return indexOfMutating(that, rx2, from);
Executed by:
  • tst_QStringList
indexOfMutating(that, rx2, from);
executed 2 times by 1 test: return indexOfMutating(that, rx2, from);
Executed by:
  • tst_QStringList
2
124}-
125int QtPrivate::QStringList_indexOf(const QStringList *that, QRegExp &rx, int from)-
126{-
127 return
executed 9 times by 2 tests: return indexOfMutating(that, rx, from);
Executed by:
  • tst_QProcess
  • tst_QStringList
indexOfMutating(that, rx, from);
executed 9 times by 2 tests: return indexOfMutating(that, rx, from);
Executed by:
  • tst_QProcess
  • tst_QStringList
9
128}-
129int QtPrivate::QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from)-
130{-
131 QRegExp rx2(rx);-
132 return
executed 2 times by 1 test: return lastIndexOfMutating(that, rx2, from);
Executed by:
  • tst_QStringList
lastIndexOfMutating(that, rx2, from);
executed 2 times by 1 test: return lastIndexOfMutating(that, rx2, from);
Executed by:
  • tst_QStringList
2
133}-
134int QtPrivate::QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int from)-
135{-
136 return
executed 7 times by 1 test: return lastIndexOfMutating(that, rx, from);
Executed by:
  • tst_QStringList
lastIndexOfMutating(that, rx, from);
executed 7 times by 1 test: return lastIndexOfMutating(that, rx, from);
Executed by:
  • tst_QStringList
7
137}-
138int QtPrivate::QStringList_indexOf(const QStringList *that, const QRegularExpression &re, int from)-
139{-
140 if (from < 0
from < 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QStringList
)
3-6
141 from = qMax(from + that->size(), 0);
executed 3 times by 1 test: from = qMax(from + that->size(), 0);
Executed by:
  • tst_QStringList
3
142-
143 QString exactPattern = QLatin1String("\\A(?:") + re.pattern() + QLatin1String(")\\z");-
144 QRegularExpression exactRe(exactPattern, re.patternOptions());-
145-
146 for (int i = from; i < that->size()
i < that->size()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QStringList
; ++i) {
5-16
147 QRegularExpressionMatch m = exactRe.match(that->at(i));-
148 if (m.hasMatch()
m.hasMatch()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QStringList
)
4-12
149 return
executed 4 times by 1 test: return i;
Executed by:
  • tst_QStringList
i;
executed 4 times by 1 test: return i;
Executed by:
  • tst_QStringList
4
150 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_QStringList
12
151 return
executed 5 times by 1 test: return -1;
Executed by:
  • tst_QStringList
-1;
executed 5 times by 1 test: return -1;
Executed by:
  • tst_QStringList
5
152}-
153int QtPrivate::QStringList_lastIndexOf(const QStringList *that, const QRegularExpression &re, int from)-
154{-
155 if (from < 0
from < 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringList
)
3-6
156 from += that->size();
executed 6 times by 1 test: from += that->size();
Executed by:
  • tst_QStringList
6
157 else if (from >= that->size()
from >= that->size()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QStringList
)
1-2
158 from = that->size() - 1;
executed 1 time by 1 test: from = that->size() - 1;
Executed by:
  • tst_QStringList
1
159-
160 QString exactPattern = QLatin1String("\\A(?:") + re.pattern() + QLatin1String(")\\z");-
161 QRegularExpression exactRe(exactPattern, re.patternOptions());-
162-
163 for (int i = from; i >= 0
i >= 0Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringList
; --i) {
3-17
164 QRegularExpressionMatch m = exactRe.match(that->at(i));-
165 if (m.hasMatch()
m.hasMatch()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QStringList
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_QStringList
)
6-11
166 return
executed 6 times by 1 test: return i;
Executed by:
  • tst_QStringList
i;
executed 6 times by 1 test: return i;
Executed by:
  • tst_QStringList
6
167 }
executed 11 times by 1 test: end of block
Executed by:
  • tst_QStringList
11
168 return
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QStringList
-1;
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QStringList
3
169}-
170int QtPrivate::QStringList_removeDuplicates(QStringList *that)-
171{-
172 int n = that->size();-
173 int j = 0;-
174 QSet<QString> seen;-
175 seen.reserve(n);-
176 int setSize = 0;-
177 for (int i = 0; i < n
i < nDescription
TRUEevaluated 159 times by 4 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 149 times by 5 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qmimetype
  • tst_qstandardpaths
; ++i) {
149-159
178 const QString &s = that->at(i);-
179 seen.insert(s);-
180 if (setSize == seen.size()
setSize == seen.size()Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QStringList
  • tst_qmakelib
FALSEevaluated 156 times by 4 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qstandardpaths
)
3-156
181 continue;
executed 3 times by 2 tests: continue;
Executed by:
  • tst_QStringList
  • tst_qmakelib
3
182 ++setSize;-
183 if (j != i
j != iDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qmakelib
FALSEevaluated 155 times by 4 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qstandardpaths
)
1-155
184 that->swap(i, j);
executed 1 time by 1 test: that->swap(i, j);
Executed by:
  • tst_qmakelib
1
185 ++j;-
186 }
executed 156 times by 4 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qstandardpaths
156
187 if (n != j
n != jDescription
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QStringList
  • tst_qmakelib
FALSEevaluated 146 times by 5 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qmimetype
  • tst_qstandardpaths
)
3-146
188 that->erase(that->begin() + j, that->end());
executed 3 times by 2 tests: that->erase(that->begin() + j, that->end());
Executed by:
  • tst_QStringList
  • tst_qmakelib
3
189 return
executed 149 times by 5 tests: return n - j;
Executed by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qmimetype
  • tst_qstandardpaths
n - j;
executed 149 times by 5 tests: return n - j;
Executed by:
  • tst_QMimeDatabase
  • tst_QStringList
  • tst_qmakelib
  • tst_qmimetype
  • tst_qstandardpaths
149
190}-
191-
Switch to Source codePreprocessed file

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