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) 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 "qstringmatcher.h"-
35-
36QT_BEGIN_NAMESPACE-
37-
38static void bm_init_skiptable(const ushort *uc, int len, uchar *skiptable, Qt::CaseSensitivity cs)-
39{-
40 int l = qMin(len, 255);-
41 memset(skiptable, l, 256*sizeof(uchar));-
42 uc += len - l;-
43 if (cs == Qt::CaseSensitive) {
cs == Qt::CaseSensitiveDescription
TRUEevaluated 375431 times by 87 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
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-375431
44 while (l--) {
l--Description
TRUEevaluated 4575759 times by 87 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
FALSEevaluated 375431 times by 87 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
375431-4575759
45 skiptable[*uc & 0xff] = l;-
46 uc++;-
47 }
executed 4575759 times by 87 tests: end of block
Executed by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
4575759
48 } else {
executed 375431 times by 87 tests: end of block
Executed by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
375431
49 const ushort *start = uc;-
50 while (l--) {
l--Description
TRUEevaluated 6584 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-6584
51 skiptable[foldCase(uc, start) & 0xff] = l;-
52 uc++;-
53 }
executed 6584 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
6584
54 }
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
55}-
56-
57static inline int bm_find(const ushort *uc, uint l, int index, const ushort *puc, uint pl,-
58 const uchar *skiptable, Qt::CaseSensitivity cs)-
59{-
60 if (pl == 0)
pl == 0Description
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringMatcher
FALSEevaluated 379071 times by 87 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
34-379071
61 return index > (int)l ? -1 : index;
executed 34 times by 2 tests: return index > (int)l ? -1 : index;
Executed by:
  • tst_QString
  • tst_QStringMatcher
index > (int)lDescription
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringMatcher
FALSEevaluated 29 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringMatcher
5-34
62 const uint pl_minus_one = pl - 1;-
63-
64 const ushort *current = uc + index + pl_minus_one;-
65 const ushort *end = uc + l;-
66 if (cs == Qt::CaseSensitive) {
cs == Qt::CaseSensitiveDescription
TRUEevaluated 378250 times by 87 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
FALSEevaluated 821 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
821-378250
67 while (current < end) {
current < endDescription
TRUEevaluated 184146747 times by 86 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
FALSEevaluated 64409 times by 68 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFiledialog
  • tst_QFont
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGraphicsProxyWidget
  • ...
64409-184146747
68 uint skip = skiptable[*current & 0xff];-
69 if (!skip) {
!skipDescription
TRUEevaluated 220152 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_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
FALSEevaluated 163132035 times by 85 tests
Evaluated by:
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • tst_QFontComboBox
  • ...
220152-163132035
70 // possible match-
71 while (skip < pl) {
skip < plDescription
TRUEevaluated 736653 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_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
FALSEevaluated 203478 times by 43 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_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QProgressBar
  • ...
203478-736653
72 if (*(current - skip) != puc[pl_minus_one-skip])
*(current - sk...inus_one-skip]Description
TRUEevaluated 16674 times by 18 tests
Evaluated by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • 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 719979 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_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
16674-719979
73 break;
executed 16674 times by 18 tests: break;
Executed by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • 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
16674
74 skip++;-
75 }
executed 719979 times by 46 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_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • ...
719979
76 if (skip > pl_minus_one) // we have a match
skip > pl_minus_oneDescription
TRUEevaluated 203478 times by 43 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_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QProgressBar
  • ...
FALSEevaluated 16674 times by 18 tests
Evaluated by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • 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
16674-203478
77 return (current - uc) - pl_minus_one;
executed 203478 times by 43 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_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QProgressBar
  • ...
203478
78-
79 // in case we don't have a match we are a bit inefficient as we only skip by one-
80 // when we have the non matching char in the string.-
81 if (skiptable[*(current - skip) & 0xff] == pl)
skiptable[*(cu... & 0xff] == plDescription
TRUEevaluated 1887 times by 15 tests
Evaluated by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • 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 14787 times by 9 tests
Evaluated by:
  • tst_QMessageBox
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentLayout
  • tst_QWidget_window
  • tst_uic
1887-14787
82 skip = pl - skip;
executed 1887 times by 15 tests: skip = pl - skip;
Executed by:
  • tst_Collections
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • 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
1887
83 else-
84 skip = 1;
executed 14787 times by 9 tests: skip = 1;
Executed by:
  • tst_QMessageBox
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextBrowser
  • tst_QTextDocument
  • tst_QTextDocumentLayout
  • tst_QWidget_window
  • tst_uic
14787
85 }-
86 if (current > end - skip)
current > end - skipDescription
TRUEevaluated 110363 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 184049768 times by 85 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
110363-184049768
87 break;
executed 110363 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
  • ...
110363
88 current += skip;-
89 }
executed 168829084 times by 85 tests: end of block
Executed by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
168829084
90 } else {
executed 174772 times by 83 tests: end of block
Executed by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
174772
91 while (current < end) {
current < endDescription
TRUEevaluated 913 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 261 times by 7 tests
Evaluated by:
  • tst_Collections
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QString
261-913
92 uint skip = skiptable[foldCase(current, uc) & 0xff];-
93 if (!skip) {
!skipDescription
TRUEevaluated 235 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 678 times by 7 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
235-678
94 // possible match-
95 while (skip < pl) {
skip < plDescription
TRUEevaluated 10025 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 189 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
189-10025
96 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 9979 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-9979
97 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
98 skip++;-
99 }
executed 9979 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
9979
100 if (skip > pl_minus_one) // we have a match
skip > pl_minus_oneDescription
TRUEevaluated 189 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-189
101 return (current - uc) - pl_minus_one;
executed 189 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
189
102 // in case we don't have a match we are a bit inefficient as we only skip by one-
103 // when we have the non matching char in the string.-
104 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
105 skip = pl - skip;
executed 19 times by 4 tests: skip = pl - skip;
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
19
106 else-
107 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
108 }-
109 if (current > end - skip)
current > end - skipDescription
TRUEevaluated 371 times by 7 tests
Evaluated by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
FALSEevaluated 353 times by 9 tests
Evaluated by:
  • tst_QRegExp
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
353-371
110 break;
executed 371 times by 7 tests: break;
Executed by:
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
371
111 current += skip;-
112 }
executed 353 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
353
113 }
executed 632 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
632
114 return -1; // not found
executed 175404 times by 83 tests: return -1;
Executed by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
175404
115}-
116-
117/*!-
118 \class QStringMatcher-
119 \inmodule QtCore-
120 \brief The QStringMatcher class holds a sequence of characters that-
121 can be quickly matched in a Unicode string.-
122-
123 \ingroup tools-
124 \ingroup string-processing-
125-
126 This class is useful when you have a sequence of \l{QChar}s that-
127 you want to repeatedly match against some strings (perhaps in a-
128 loop), or when you want to search for the same sequence of-
129 characters multiple times in the same string. Using a matcher-
130 object and indexIn() is faster than matching a plain QString with-
131 QString::indexOf() if repeated matching takes place. This class-
132 offers no benefit if you are doing one-off string matches.-
133-
134 Create the QStringMatcher with the QString you want to search-
135 for. Then call indexIn() on the QString that you want to search.-
136-
137 \sa QString, QByteArrayMatcher, QRegExp-
138*/-
139-
140/*!-
141 Constructs an empty string matcher that won't match anything.-
142 Call setPattern() to give it a pattern to match.-
143*/-
144QStringMatcher::QStringMatcher()-
145 : d_ptr(0), q_cs(Qt::CaseSensitive)-
146{-
147 memset(q_data, 0, sizeof(q_data));-
148}
executed 13 times by 1 test: end of block
Executed by:
  • tst_QStringMatcher
13
149-
150/*!-
151 Constructs a string matcher that will search for \a pattern, with-
152 case sensitivity \a cs.-
153-
154 Call indexIn() to perform a search.-
155*/-
156QStringMatcher::QStringMatcher(const QString &pattern, Qt::CaseSensitivity cs)-
157 : d_ptr(0), q_pattern(pattern), q_cs(cs)-
158{-
159 p.uc = pattern.unicode();-
160 p.len = pattern.size();-
161 bm_init_skiptable((const ushort *)p.uc, p.len, p.q_skiptable, cs);-
162}
executed 212 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
212
163-
164/*!-
165 \fn QStringMatcher::QStringMatcher(const QChar *uc, int length, Qt::CaseSensitivity cs)-
166 \since 4.5-
167-
168 Constructs a string matcher that will search for the pattern referred to-
169 by \a uc with the given \a length and case sensitivity specified by \a cs.-
170*/-
171QStringMatcher::QStringMatcher(const QChar *uc, int len, Qt::CaseSensitivity cs)-
172 : d_ptr(0), q_cs(cs)-
173{-
174 p.uc = uc;-
175 p.len = len;-
176 bm_init_skiptable((const ushort *)p.uc, len, p.q_skiptable, cs);-
177}
executed 375218 times by 83 tests: end of block
Executed by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
375218
178-
179/*!-
180 Copies the \a other string matcher to this string matcher.-
181*/-
182QStringMatcher::QStringMatcher(const QStringMatcher &other)-
183 : d_ptr(0)-
184{-
185 operator=(other);-
186}
executed 1 time by 1 test: end of block
Executed by:
  • tst_QStringMatcher
1
187-
188/*!-
189 Destroys the string matcher.-
190*/-
191QStringMatcher::~QStringMatcher()-
192{-
193 Q_UNUSED(d_ptr);-
194}
executed 375444 times by 83 tests: end of block
Executed by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
375444
195-
196/*!-
197 Assigns the \a other string matcher to this string matcher.-
198*/-
199QStringMatcher &QStringMatcher::operator=(const QStringMatcher &other)-
200{-
201 if (this != &other) {
this != &otherDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringMatcher
FALSEnever evaluated
0-2
202 q_pattern = other.q_pattern;-
203 q_cs = other.q_cs;-
204 memcpy(q_data, other.q_data, sizeof(q_data));-
205 }
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QString
  • tst_QStringMatcher
2
206 return *this;
executed 2 times by 2 tests: return *this;
Executed by:
  • tst_QString
  • tst_QStringMatcher
2
207}-
208-
209/*!-
210 Sets the string that this string matcher will search for to \a-
211 pattern.-
212-
213 \sa pattern(), setCaseSensitivity(), indexIn()-
214*/-
215void QStringMatcher::setPattern(const QString &pattern)-
216{-
217 q_pattern = pattern;-
218 p.uc = pattern.unicode();-
219 p.len = pattern.size();-
220 bm_init_skiptable((const ushort *)pattern.unicode(), pattern.size(), p.q_skiptable, q_cs);-
221}
executed 12 times by 1 test: end of block
Executed by:
  • tst_QStringMatcher
12
222-
223/*!-
224 \fn QString QStringMatcher::pattern() const-
225-
226 Returns the string pattern that this string matcher will search-
227 for.-
228-
229 \sa setPattern()-
230*/-
231-
232QString QStringMatcher::pattern() const-
233{-
234 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
235 return q_pattern;
executed 1 time by 1 test: return q_pattern;
Executed by:
  • tst_QStringMatcher
1
236 return QString(p.uc, p.len);
executed 1 time by 1 test: return QString(p.uc, p.len);
Executed by:
  • tst_QStringMatcher
1
237}-
238-
239/*!-
240 Sets the case sensitivity setting of this string matcher to \a-
241 cs.-
242-
243 \sa caseSensitivity(), setPattern(), indexIn()-
244*/-
245void QStringMatcher::setCaseSensitivity(Qt::CaseSensitivity cs)-
246{-
247 if (cs == q_cs)
cs == q_csDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QStringMatcher
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QStringMatcher
2-3
248 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_QStringMatcher
2
249 bm_init_skiptable((const ushort *)p.uc, p.len, p.q_skiptable, cs);-
250 q_cs = cs;-
251}
executed 3 times by 1 test: end of block
Executed by:
  • tst_QStringMatcher
3
252-
253/*!-
254 Searches the string \a str from character position \a from-
255 (default 0, i.e. from the first character), for the string-
256 pattern() that was set in the constructor or in the most recent-
257 call to setPattern(). Returns the position where the pattern()-
258 matched in \a str, or -1 if no match was found.-
259-
260 \sa setPattern(), setCaseSensitivity()-
261*/-
262int QStringMatcher::indexIn(const QString &str, int from) const-
263{-
264 if (from < 0)
from < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStringMatcher
FALSEevaluated 177866 times by 75 tests
Evaluated by:
  • tst_Collections
  • 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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
1-177866
265 from = 0;
executed 1 time by 1 test: from = 0;
Executed by:
  • tst_QStringMatcher
1
266 return bm_find((const ushort *)str.unicode(), str.size(), from,
executed 177867 times by 75 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_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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
177867
267 (const ushort *)p.uc, p.len,
executed 177867 times by 75 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_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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
177867
268 p.q_skiptable, q_cs);
executed 177867 times by 75 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_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_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • ...
177867
269}-
270-
271/*!-
272 \since 4.5-
273-
274 Searches the string starting at \a str (of length \a length) from-
275 character position \a from (default 0, i.e. from the first-
276 character), for the string pattern() that was set in the-
277 constructor or in the most recent call to setPattern(). Returns-
278 the position where the pattern() matched in \a str, or -1 if no-
279 match was found.-
280-
281 \sa setPattern(), setCaseSensitivity()-
282*/-
283int QStringMatcher::indexIn(const QChar *str, int length, int from) const-
284{-
285 if (from < 0)
from < 0Description
TRUEnever evaluated
FALSEevaluated 201062 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-201062
286 from = 0;
never executed: from = 0;
0
287 return bm_find((const ushort *)str, length, from,
executed 201062 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
201062
288 (const ushort *)p.uc, p.len,
executed 201062 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
201062
289 p.q_skiptable, q_cs);
executed 201062 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
201062
290}-
291-
292/*!-
293 \fn Qt::CaseSensitivity QStringMatcher::caseSensitivity() const-
294-
295 Returns the case sensitivity setting for this string matcher.-
296-
297 \sa setCaseSensitivity()-
298*/-
299-
300/*!-
301 \internal-
302*/-
303-
304int qFindStringBoyerMoore(-
305 const QChar *haystack, int haystackLen, int haystackOffset,-
306 const QChar *needle, int needleLen, Qt::CaseSensitivity cs)-
307{-
308 uchar skiptable[256];-
309 bm_init_skiptable((const ushort *)needle, needleLen, skiptable, cs);-
310 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
311 haystackOffset = 0;
never executed: haystackOffset = 0;
0
312 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
313 (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
314}-
315-
316QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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