OpenCoverage

qstringmatcher.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qstringmatcher.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtCore module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qstringmatcher.h"-
41-
42QT_BEGIN_NAMESPACE-
43-
44static void bm_init_skiptable(const ushort *uc, int len, uchar *skiptable, Qt::CaseSensitivity cs)-
45{-
46 int l = qMin(len, 255);-
47 memset(skiptable, l, 256*sizeof(uchar));-
48 uc += len - l;-
49 if (cs == Qt::CaseSensitive) {
cs == Qt::CaseSensitiveDescription
TRUEevaluated 393398 times by 115 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
FALSEevaluated 190 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
190-393398
50 while (l--) {
l--Description
TRUEevaluated 4688427 times by 115 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
FALSEevaluated 393398 times by 115 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
393398-4688427
51 skiptable[*uc & 0xff] = l;-
52 uc++;-
53 }
executed 4688427 times by 115 tests: end of block
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
4688427
54 } else {
executed 393398 times by 115 tests: end of block
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
393398
55 const ushort *start = uc;-
56 while (l--) {
l--Description
TRUEevaluated 6581 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
FALSEevaluated 190 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
190-6581
57 skiptable[foldCase(uc, start) & 0xff] = l;-
58 uc++;-
59 }
executed 6581 times by 12 tests: end of block
Executed by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
6581
60 }
executed 190 times by 12 tests: end of block
Executed by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
190
61}-
62-
63static inline int bm_find(const ushort *uc, uint l, int index, const ushort *puc, uint pl,-
64 const uchar *skiptable, Qt::CaseSensitivity cs)-
65{-
66 if (pl == 0)
pl == 0Description
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringMatcher
FALSEevaluated 397045 times by 115 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
34-397045
67 return index > (int)l ? -1 : index;
executed 34 times by 2 tests: return index > (int)l ? -1 : index;
Executed by:
  • tst_QString
  • tst_QStringMatcher
34
68 const uint pl_minus_one = pl - 1;-
69-
70 const ushort *current = uc + index + pl_minus_one;-
71 const ushort *end = uc + l;-
72 if (cs == Qt::CaseSensitive) {
cs == Qt::CaseSensitiveDescription
TRUEevaluated 396242 times by 115 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
FALSEevaluated 803 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
803-396242
73 while (current < end) {
current < endDescription
TRUEevaluated 164594537 times by 115 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
FALSEevaluated 78537 times by 99 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileSelector
  • tst_QFiledialog
  • tst_QFont
  • ...
78537-164594537
74 uint skip = skiptable[*current & 0xff];-
75 if (!skip) {
!skipDescription
TRUEevaluated 220408 times by 48 tests
Evaluated by:
  • tst_Collections
  • tst_QAction
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QFileInfo
  • tst_QFont
  • tst_QFontDialog
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
FALSEevaluated 164255192 times by 114 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • tst_QFileInfo
  • ...
220408-164255192
76 // possible match-
77 while (skip < pl) {
skip < plDescription
TRUEevaluated 736857 times by 48 tests
Evaluated by:
  • tst_Collections
  • tst_QAction
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QFileInfo
  • tst_QFont
  • tst_QFontDialog
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
FALSEevaluated 203495 times by 46 tests
Evaluated by:
  • tst_Collections
  • tst_QAction
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QFileInfo
  • tst_QFont
  • tst_QFontDialog
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
203495-736857
78 if (*(current - skip) != puc[pl_minus_one-skip])
*(current - sk...inus_one-skip]Description
TRUEevaluated 16913 times by 17 tests
Evaluated by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QNetworkReply
  • tst_QString
  • tst_QStringList
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QWidget_window
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
FALSEevaluated 719944 times by 48 tests
Evaluated by:
  • tst_Collections
  • tst_QAction
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QFileInfo
  • tst_QFont
  • tst_QFontDialog
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
16913-719944
79 break;
executed 16913 times by 17 tests: break;
Executed by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QNetworkReply
  • tst_QString
  • tst_QStringList
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QWidget_window
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
16913
80 skip++;-
81 }
executed 719944 times by 48 tests: end of block
Executed by:
  • tst_Collections
  • tst_QAction
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QFileInfo
  • tst_QFont
  • tst_QFontDialog
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
719944
82 if (skip > pl_minus_one) // we have a match
skip > pl_minus_oneDescription
TRUEevaluated 203495 times by 46 tests
Evaluated by:
  • tst_Collections
  • tst_QAction
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QFileInfo
  • tst_QFont
  • tst_QFontDialog
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
FALSEevaluated 16913 times by 17 tests
Evaluated by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QNetworkReply
  • tst_QString
  • tst_QStringList
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QWidget_window
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
16913-203495
83 return (current - uc) - pl_minus_one;
executed 203495 times by 46 tests: return (current - uc) - pl_minus_one;
Executed by:
  • tst_Collections
  • tst_QAction
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QFileInfo
  • tst_QFont
  • tst_QFontDialog
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
203495
84-
85 // in case we don't have a match we are a bit inefficient as we only skip by one-
86 // when we have the non matching char in the string.-
87 if (skiptable[*(current - skip) & 0xff] == pl)
skiptable[*(cu... & 0xff] == plDescription
TRUEevaluated 1865 times by 14 tests
Evaluated by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QNetworkReply
  • tst_QString
  • tst_QStringList
  • tst_QStringMatcher
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
FALSEevaluated 15048 times by 8 tests
Evaluated by:
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentLayout
  • tst_QWidget_window
  • tst_uic
1865-15048
88 skip = pl - skip;
executed 1865 times by 14 tests: skip = pl - skip;
Executed by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QNetworkReply
  • tst_QString
  • tst_QStringList
  • tst_QStringMatcher
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
1865
89 else-
90 skip = 1;
executed 15048 times by 8 tests: skip = 1;
Executed by:
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentLayout
  • tst_QWidget_window
  • tst_uic
15048
91 }-
92 if (current > end - skip)
current > end - skipDescription
TRUEevaluated 114210 times by 57 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDialog
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGestureRecognizer
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QMessageBox
  • ...
FALSEevaluated 169078831 times by 114 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
114210-169078831
93 break;
executed 114210 times by 57 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDialog
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGestureRecognizer
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QMessageBox
  • ...
114210
94 current += skip;-
95 }
executed 175264912 times by 114 tests: end of block
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
175264912
96 } else {
executed 192747 times by 112 tests: end of block
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
192747
97 while (current < end) {
current < endDescription
TRUEevaluated 900 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
FALSEevaluated 255 times by 7 tests
Evaluated by:
  • tst_Collections
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QString
255-900
98 uint skip = skiptable[foldCase(current, uc) & 0xff];-
99 if (!skip) {
!skipDescription
TRUEevaluated 234 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
FALSEevaluated 666 times by 7 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
234-666
100 // possible match-
101 while (skip < pl) {
skip < plDescription
TRUEevaluated 10022 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
FALSEevaluated 188 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
188-10022
102 if (foldCase(current - skip, uc) != foldCase(puc + pl_minus_one - skip, puc))
foldCase(curre...e - skip, puc)Description
TRUEevaluated 46 times by 8 tests
Evaluated by:
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
FALSEevaluated 9976 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
46-9976
103 break;
executed 46 times by 8 tests: break;
Executed by:
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
46
104 skip++;-
105 }
executed 9976 times by 12 tests: end of block
Executed by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
9976
106 if (skip > pl_minus_one) // we have a match
skip > pl_minus_oneDescription
TRUEevaluated 188 times by 12 tests
Evaluated by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
FALSEevaluated 46 times by 8 tests
Evaluated by:
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
46-188
107 return (current - uc) - pl_minus_one;
executed 188 times by 12 tests: return (current - uc) - pl_minus_one;
Executed by:
  • tst_Collections
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
188
108 // in case we don't have a match we are a bit inefficient as we only skip by one-
109 // when we have the non matching char in the string.-
110 if (skiptable[foldCase(current - skip, uc) & 0xff] == pl)
skiptable[fold... & 0xff] == plDescription
TRUEevaluated 19 times by 4 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
FALSEevaluated 27 times by 6 tests
Evaluated by:
  • tst_QRegExp
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
19-27
111 skip = pl - skip;
executed 19 times by 4 tests: skip = pl - skip;
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
19
112 else-
113 skip = 1;
executed 27 times by 6 tests: skip = 1;
Executed by:
  • tst_QRegExp
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
27
114 }-
115 if (current > end - skip)
current > end - skipDescription
TRUEevaluated 360 times by 7 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
FALSEevaluated 352 times by 9 tests
Evaluated by:
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
352-360
116 break;
executed 360 times by 7 tests: break;
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
360
117 current += skip;-
118 }
executed 352 times by 9 tests: end of block
Executed by:
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
352
119 }
executed 615 times by 8 tests: end of block
Executed by:
  • tst_Collections
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
615
120 return -1; // not found
executed 193362 times by 112 tests: return -1;
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
193362
121}-
122-
123/*!-
124 \class QStringMatcher-
125 \inmodule QtCore-
126 \brief The QStringMatcher class holds a sequence of characters that-
127 can be quickly matched in a Unicode string.-
128-
129 \ingroup tools-
130 \ingroup string-processing-
131-
132 This class is useful when you have a sequence of \l{QChar}s that-
133 you want to repeatedly match against some strings (perhaps in a-
134 loop), or when you want to search for the same sequence of-
135 characters multiple times in the same string. Using a matcher-
136 object and indexIn() is faster than matching a plain QString with-
137 QString::indexOf() if repeated matching takes place. This class-
138 offers no benefit if you are doing one-off string matches.-
139-
140 Create the QStringMatcher with the QString you want to search-
141 for. Then call indexIn() on the QString that you want to search.-
142-
143 \sa QString, QByteArrayMatcher, QRegExp-
144*/-
145-
146/*!-
147 Constructs an empty string matcher that won't match anything.-
148 Call setPattern() to give it a pattern to match.-
149*/-
150QStringMatcher::QStringMatcher()-
151 : d_ptr(0), q_cs(Qt::CaseSensitive)-
152{-
153 memset(q_data, 0, sizeof(q_data));-
154}
executed 14 times by 1 test: end of block
Executed by:
  • tst_QStringMatcher
14
155-
156/*!-
157 Constructs a string matcher that will search for \a pattern, with-
158 case sensitivity \a cs.-
159-
160 Call indexIn() to perform a search.-
161*/-
162QStringMatcher::QStringMatcher(const QString &pattern, Qt::CaseSensitivity cs)-
163 : d_ptr(0), q_pattern(pattern), q_cs(cs)-
164{-
165 p.uc = pattern.unicode();-
166 p.len = pattern.size();-
167 bm_init_skiptable((const ushort *)p.uc, p.len, p.q_skiptable, cs);-
168}
executed 216 times by 11 tests: end of block
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringList
  • tst_QStringMatcher
  • tst_selftests - unknown status
216
169-
170/*!-
171 \fn QStringMatcher::QStringMatcher(const QChar *uc, int length, Qt::CaseSensitivity cs)-
172 \since 4.5-
173-
174 Constructs a string matcher that will search for the pattern referred to-
175 by \a uc with the given \a length and case sensitivity specified by \a cs.-
176*/-
177QStringMatcher::QStringMatcher(const QChar *uc, int len, Qt::CaseSensitivity cs)-
178 : d_ptr(0), q_cs(cs)-
179{-
180 p.uc = uc;-
181 p.len = len;-
182 bm_init_skiptable((const ushort *)p.uc, len, p.q_skiptable, cs);-
183}
executed 393182 times by 112 tests: end of block
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
393182
184-
185/*!-
186 Copies the \a other string matcher to this string matcher.-
187*/-
188QStringMatcher::QStringMatcher(const QStringMatcher &other)-
189 : d_ptr(0)-
190{-
191 operator=(other);-
192}
executed 1 time by 1 test: end of block
Executed by:
  • tst_QStringMatcher
1
193-
194/*!-
195 Destroys the string matcher.-
196*/-
197QStringMatcher::~QStringMatcher()-
198{-
199 Q_UNUSED(d_ptr);-
200}
executed 393413 times by 113 tests: end of block
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
393413
201-
202/*!-
203 Assigns the \a other string matcher to this string matcher.-
204*/-
205QStringMatcher &QStringMatcher::operator=(const QStringMatcher &other)-
206{-
207 if (this != &other) {
this != &otherDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringMatcher
FALSEnever evaluated
0-2
208 q_pattern = other.q_pattern;-
209 q_cs = other.q_cs;-
210 memcpy(q_data, other.q_data, sizeof(q_data));-
211 }
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QString
  • tst_QStringMatcher
2
212 return *this;
executed 2 times by 2 tests: return *this;
Executed by:
  • tst_QString
  • tst_QStringMatcher
2
213}-
214-
215/*!-
216 Sets the string that this string matcher will search for to \a-
217 pattern.-
218-
219 \sa pattern(), setCaseSensitivity(), indexIn()-
220*/-
221void QStringMatcher::setPattern(const QString &pattern)-
222{-
223 q_pattern = pattern;-
224 p.uc = pattern.unicode();-
225 p.len = pattern.size();-
226 bm_init_skiptable((const ushort *)pattern.unicode(), pattern.size(), p.q_skiptable, q_cs);-
227}
executed 12 times by 1 test: end of block
Executed by:
  • tst_QStringMatcher
12
228-
229/*!-
230 \fn QString QStringMatcher::pattern() const-
231-
232 Returns the string pattern that this string matcher will search-
233 for.-
234-
235 \sa setPattern()-
236*/-
237-
238QString QStringMatcher::pattern() const-
239{-
240 if (!q_pattern.isEmpty())
!q_pattern.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringMatcher
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringMatcher
1
241 return q_pattern;
executed 1 time by 1 test: return q_pattern;
Executed by:
  • tst_QStringMatcher
1
242 return QString(p.uc, p.len);
executed 1 time by 1 test: return QString(p.uc, p.len);
Executed by:
  • tst_QStringMatcher
1
243}-
244-
245/*!-
246 Sets the case sensitivity setting of this string matcher to \a-
247 cs.-
248-
249 \sa caseSensitivity(), setPattern(), indexIn()-
250*/-
251void QStringMatcher::setCaseSensitivity(Qt::CaseSensitivity cs)-
252{-
253 if (cs == q_cs)
cs == q_csDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringMatcher
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QStringMatcher
2-3
254 return;
executed 3 times by 1 test: return;
Executed by:
  • tst_QStringMatcher
3
255 bm_init_skiptable((const ushort *)q_pattern.unicode(), q_pattern.size(), p.q_skiptable, cs);-
256 q_cs = cs;-
257}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QStringMatcher
2
258-
259/*!-
260 Searches the string \a str from character position \a from-
261 (default 0, i.e. from the first character), for the string-
262 pattern() that was set in the constructor or in the most recent-
263 call to setPattern(). Returns the position where the pattern()-
264 matched in \a str, or -1 if no match was found.-
265-
266 \sa setPattern(), setCaseSensitivity()-
267*/-
268int QStringMatcher::indexIn(const QString &str, int from) const-
269{-
270 if (from < 0)
from < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringMatcher
FALSEevaluated 195806 times by 106 tests
Evaluated by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
1-195806
271 from = 0;
executed 1 time by 1 test: from = 0;
Executed by:
  • tst_QStringMatcher
1
272 return bm_find((const ushort *)str.unicode(), str.size(), from,
executed 195807 times by 106 tests: return bm_find((const ushort *)str.unicode(), str.size(), from, (const ushort *)p.uc, p.len, p.q_skiptable, q_cs);
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
195807
273 (const ushort *)p.uc, p.len,
executed 195807 times by 106 tests: return bm_find((const ushort *)str.unicode(), str.size(), from, (const ushort *)p.uc, p.len, p.q_skiptable, q_cs);
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
195807
274 p.q_skiptable, q_cs);
executed 195807 times by 106 tests: return bm_find((const ushort *)str.unicode(), str.size(), from, (const ushort *)p.uc, p.len, p.q_skiptable, q_cs);
Executed by:
  • tst_Collections
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDockWidget
  • tst_QEventLoop
  • tst_QFileDialog2
  • ...
195807
275}-
276-
277/*!-
278 \since 4.5-
279-
280 Searches the string starting at \a str (of length \a length) from-
281 character position \a from (default 0, i.e. from the first-
282 character), for the string pattern() that was set in the-
283 constructor or in the most recent call to setPattern(). Returns-
284 the position where the pattern() matched in \a str, or -1 if no-
285 match was found.-
286-
287 \sa setPattern(), setCaseSensitivity()-
288*/-
289int QStringMatcher::indexIn(const QChar *str, int length, int from) const-
290{-
291 if (from < 0)
from < 0Description
TRUEnever evaluated
FALSEevaluated 201096 times by 16 tests
Evaluated by:
  • tst_QDBusInterface
  • tst_QFontComboBox
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QRegExp
  • tst_QSortFilterProxyModel
  • tst_QString
  • tst_QStringList
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
0-201096
292 from = 0;
never executed: from = 0;
0
293 return bm_find((const ushort *)str, length, from,
executed 201096 times by 16 tests: return bm_find((const ushort *)str, length, from, (const ushort *)p.uc, p.len, p.q_skiptable, q_cs);
Executed by:
  • tst_QDBusInterface
  • tst_QFontComboBox
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QRegExp
  • tst_QSortFilterProxyModel
  • tst_QString
  • tst_QStringList
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
201096
294 (const ushort *)p.uc, p.len,
executed 201096 times by 16 tests: return bm_find((const ushort *)str, length, from, (const ushort *)p.uc, p.len, p.q_skiptable, q_cs);
Executed by:
  • tst_QDBusInterface
  • tst_QFontComboBox
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QRegExp
  • tst_QSortFilterProxyModel
  • tst_QString
  • tst_QStringList
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
201096
295 p.q_skiptable, q_cs);
executed 201096 times by 16 tests: return bm_find((const ushort *)str, length, from, (const ushort *)p.uc, p.len, p.q_skiptable, q_cs);
Executed by:
  • tst_QDBusInterface
  • tst_QFontComboBox
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QRegExp
  • tst_QSortFilterProxyModel
  • tst_QString
  • tst_QStringList
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_qmakelib
  • tst_selftests - unknown status
  • tst_uic
201096
296}-
297-
298/*!-
299 \fn Qt::CaseSensitivity QStringMatcher::caseSensitivity() const-
300-
301 Returns the case sensitivity setting for this string matcher.-
302-
303 \sa setCaseSensitivity()-
304*/-
305-
306/*!-
307 \internal-
308*/-
309-
310int qFindStringBoyerMoore(-
311 const QChar *haystack, int haystackLen, int haystackOffset,-
312 const QChar *needle, int needleLen, Qt::CaseSensitivity cs)-
313{-
314 uchar skiptable[256];-
315 bm_init_skiptable((const ushort *)needle, needleLen, skiptable, cs);-
316 if (haystackOffset < 0)
haystackOffset < 0Description
TRUEnever evaluated
FALSEevaluated 176 times by 12 tests
Evaluated by:
  • tst_QGraphicsProxyWidget
  • tst_QMessageBox
  • tst_QString
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QXmlSimpleReader
  • tst_QXmlStream
0-176
317 haystackOffset = 0;
never executed: haystackOffset = 0;
0
318 return bm_find((const ushort *)haystack, haystackLen, haystackOffset,
executed 176 times by 12 tests: return bm_find((const ushort *)haystack, haystackLen, haystackOffset, (const ushort *)needle, needleLen, skiptable, cs);
Executed by:
  • tst_QGraphicsProxyWidget
  • tst_QMessageBox
  • tst_QString
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QXmlSimpleReader
  • tst_QXmlStream
176
319 (const ushort *)needle, needleLen, skiptable, cs);
executed 176 times by 12 tests: return bm_find((const ushort *)haystack, haystackLen, haystackOffset, (const ushort *)needle, needleLen, skiptable, cs);
Executed by:
  • tst_QGraphicsProxyWidget
  • tst_QMessageBox
  • tst_QString
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentFragment
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextList
  • tst_QXmlSimpleReader
  • tst_QXmlStream
176
320}-
321-
322QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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