OpenCoverage

qtextcodec.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/codecs/qtextcodec.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
15-
16-
17-
18-
19typedef QList<QTextCodec*>::ConstIterator TextCodecListConstIt;-
20typedef QList<QByteArray>::ConstIterator ByteArrayListConstIt;-
21-
22namespace { namespace Q_QGS_textCodecsMutex { typedef QMutex Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 1505 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 1505 times by 508 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
}
executed 1505 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (QMutex::Recursive))) : value (QMutex::Recursive) { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 45485 times by 64 tests: return &holder.value;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • ...
&holder.value;
executed 45485 times by 64 tests: return &holder.value;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • ...
} } } static QGlobalStatic<QMutex, Q_QGS_textCodecsMutex::innerFunction, Q_QGS_textCodecsMutex::guard> textCodecsMutex;;
0-45485
23QMutex *qTextCodecsMutex() { return
never executed: return textCodecsMutex();
textCodecsMutex();
never executed: return textCodecsMutex();
}
0
24static void setup() {}-
25QTextCodec::ConverterState::~ConverterState()-
26{-
27 if (flags & FreeFunction
flags & FreeFunctionDescription
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 763190 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • ...
)
14-763190
28 (
executed 14 times by 3 tests: (QTextCodecUnalignedPointer::decode(state_data))(this);
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
QTextCodecUnalignedPointer::decode(state_data))(this);
executed 14 times by 3 tests: (QTextCodecUnalignedPointer::decode(state_data))(this);
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
14
29 else if (d
dDescription
TRUEnever evaluated
FALSEevaluated 763190 times by 125 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • ...
)
0-763190
30 free(d);
never executed: free(d);
0
31}
executed 763204 times by 125 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBrush
  • tst_QBuffer
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • ...
763204
32QTextCodec::QTextCodec()-
33{-
34 QMutexLocker locker(textCodecsMutex());-
35-
36 QCoreGlobalData *globalInstance = QCoreGlobalData::instance();-
37 if (globalInstance->allCodecs.isEmpty()
globalInstance...decs.isEmpty()Description
TRUEevaluated 1097 times by 14 tests
Evaluated by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEevaluated 140 times by 10 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
)
140-1097
38 setup();
executed 1097 times by 14 tests: setup();
Executed by:
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1097
39-
40 globalInstance->allCodecs.prepend(this);-
41}
executed 1237 times by 24 tests: end of block
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1237
42QTextCodec::~QTextCodec()-
43{-
44}-
45QTextCodec *QTextCodec::codecForName(const QByteArray &name)-
46{-
47 if (name.isEmpty()
name.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 21327 times by 40 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
2-21327
48 return
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QTextCodec
0;
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QTextCodec
2
49-
50 QMutexLocker locker(textCodecsMutex());-
51-
52 QCoreGlobalData *globalData = QCoreGlobalData::instance();-
53 if (!globalData
!globalDataDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtextcodec - unknown status
FALSEevaluated 21326 times by 39 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
1-21326
54 return
executed 1 time by 1 test: return 0;
Executed by:
  • tst_qtextcodec - unknown status
0;
executed 1 time by 1 test: return 0;
Executed by:
  • tst_qtextcodec - unknown status
1
55 setup();-
56 return
executed 21326 times by 39 tests: return QIcuCodec::codecForNameUnlocked(name);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
QIcuCodec::codecForNameUnlocked(name);
executed 21326 times by 39 tests: return QIcuCodec::codecForNameUnlocked(name);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
21326
57-
58}-
59-
60-
61-
62-
63-
64-
65-
66QTextCodec* QTextCodec::codecForMib(int mib)-
67{-
68 QMutexLocker locker(textCodecsMutex());-
69-
70 QCoreGlobalData *globalData = QCoreGlobalData::instance();-
71 if (!globalData
!globalDataDescription
TRUEnever evaluated
FALSEevaluated 20722 times by 43 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
)
0-20722
72 return
never executed: return 0;
0;
never executed: return 0;
0
73 if (globalData->allCodecs.isEmpty()
globalData->al...decs.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 20722 times by 43 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
)
0-20722
74 setup();
never executed: setup();
0
75-
76 QByteArray key = "MIB: " + QByteArray::number(mib);-
77-
78 QTextCodecCache *cache = &globalData->codecCache;-
79 QTextCodec *codec;-
80 if (cache
cacheDescription
TRUEevaluated 20722 times by 43 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
FALSEnever evaluated
) {
0-20722
81 codec = cache->value(key);-
82 if (codec
codecDescription
TRUEevaluated 20431 times by 35 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • ...
FALSEevaluated 291 times by 43 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
)
291-20431
83 return
executed 20431 times by 35 tests: return codec;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • ...
codec;
executed 20431 times by 35 tests: return codec;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • ...
20431
84 }
executed 291 times by 43 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
291
85-
86 for (TextCodecListConstIt it = globalData->allCodecs.constBegin(), cend = globalData->allCodecs.constEnd(); it != cend
it != cendDescription
TRUEevaluated 6667 times by 43 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
FALSEevaluated 23 times by 5 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
; ++it) {
23-6667
87 QTextCodec *cursor = *it;-
88 if (cursor->mibEnum() == mib
cursor->mibEnum() == mibDescription
TRUEevaluated 268 times by 43 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
FALSEevaluated 6399 times by 5 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
) {
268-6399
89 if (cache
cacheDescription
TRUEevaluated 268 times by 43 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
FALSEnever evaluated
)
0-268
90 cache->insert(key, cursor);
executed 268 times by 43 tests: cache->insert(key, cursor);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
268
91 return
executed 268 times by 43 tests: return cursor;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
cursor;
executed 268 times by 43 tests: return cursor;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
268
92 }-
93 }
executed 6399 times by 5 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
6399
94-
95-
96 return
executed 23 times by 5 tests: return QIcuCodec::codecForMibUnlocked(mib);
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
QIcuCodec::codecForMibUnlocked(mib);
executed 23 times by 5 tests: return QIcuCodec::codecForMibUnlocked(mib);
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
23
97-
98-
99-
100}-
101QList<QByteArray> QTextCodec::availableCodecs()-
102{-
103 QMutexLocker locker(textCodecsMutex());-
104-
105 QCoreGlobalData *globalData = QCoreGlobalData::instance();-
106 if (globalData->allCodecs.isEmpty()
globalData->al...decs.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
)
0-4
107 setup();
never executed: setup();
0
108-
109 QList<QByteArray> codecs;-
110-
111 for (TextCodecListConstIt it = globalData->allCodecs.constBegin(), cend = globalData->allCodecs.constEnd(); it != cend
it != cendDescription
TRUEevaluated 344 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
; ++it) {
4-344
112 codecs += (*it)->name();-
113 codecs += (*it)->aliases();-
114 }
executed 344 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
344
115-
116-
117 codecs += QIcuCodec::availableCodecs();-
118-
119-
120 return
executed 4 times by 1 test: return codecs;
Executed by:
  • tst_QTextCodec
codecs;
executed 4 times by 1 test: return codecs;
Executed by:
  • tst_QTextCodec
4
121}-
122QList<int> QTextCodec::availableMibs()-
123{-
124-
125 return
executed 2 times by 1 test: return QIcuCodec::availableMibs();
Executed by:
  • tst_QTextCodec
QIcuCodec::availableMibs();
executed 2 times by 1 test: return QIcuCodec::availableMibs();
Executed by:
  • tst_QTextCodec
2
126}-
127void QTextCodec::setCodecForLocale(QTextCodec *c)-
128{-
129 QCoreGlobalData::instance()->codecForLocale.storeRelease(c);-
130}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_QGlobal
  • tst_QTextCodec
6
131QTextCodec* QTextCodec::codecForLocale()-
132{-
133 QCoreGlobalData *globalData = QCoreGlobalData::instance();-
134 if (!globalData
!globalDataDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_qlockfile - unknown status
  • tst_qtextstream - unknown status
FALSEevaluated 855222 times by 419 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • ...
)
7-855222
135 return
executed 7 times by 2 tests: return 0;
Executed by:
  • tst_qlockfile - unknown status
  • tst_qtextstream - unknown status
0;
executed 7 times by 2 tests: return 0;
Executed by:
  • tst_qlockfile - unknown status
  • tst_qtextstream - unknown status
7
136-
137 QTextCodec *codec = globalData->codecForLocale.loadAcquire();-
138 if (!codec
!codecDescription
TRUEevaluated 1098 times by 15 tests
Evaluated by:
  • tst_QTextCodec
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
FALSEevaluated 854124 times by 419 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • ...
) {
1098-854124
139-
140 textCodecsMutex()->lock();-
141 codec = QIcuCodec::defaultCodecUnlocked();-
142 textCodecsMutex()->unlock();-
143-
144-
145-
146-
147 }
executed 1098 times by 15 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1098
148-
149 return
executed 855222 times by 419 tests: return codec;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • ...
codec;
executed 855222 times by 419 tests: return codec;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • ...
855222
150}-
151QList<QByteArray> QTextCodec::aliases() const-
152{-
153 return
executed 400 times by 8 tests: return QList<QByteArray>();
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
QList<QByteArray>();
executed 400 times by 8 tests: return QList<QByteArray>();
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
400
154}-
155QTextDecoder* QTextCodec::makeDecoder(QTextCodec::ConversionFlags flags) const-
156{-
157 return
executed 7894 times by 40 tests: return new QTextDecoder(this, flags);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
new QTextDecoder(this, flags);
executed 7894 times by 40 tests: return new QTextDecoder(this, flags);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
7894
158}-
159QTextEncoder* QTextCodec::makeEncoder(QTextCodec::ConversionFlags flags) const-
160{-
161 return
executed 1012 times by 4 tests: return new QTextEncoder(this, flags);
Executed by:
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QXmlStream
  • tst_Utf8
new QTextEncoder(this, flags);
executed 1012 times by 4 tests: return new QTextEncoder(this, flags);
Executed by:
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QXmlStream
  • tst_Utf8
1012
162}-
163QByteArray QTextCodec::fromUnicode(const QString& str) const-
164{-
165 return
executed 10101 times by 139 tests: return convertFromUnicode(str.constData(), str.length(), 0);
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • ...
convertFromUnicode(str.constData(), str.length(), 0);
executed 10101 times by 139 tests: return convertFromUnicode(str.constData(), str.length(), 0);
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • ...
10101
166}-
167QString QTextCodec::toUnicode(const QByteArray& a) const-
168{-
169 return
executed 1006 times by 5 tests: return convertToUnicode(a.constData(), a.length(), 0);
Executed by:
  • tst_QClipboard
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextEdit
convertToUnicode(a.constData(), a.length(), 0);
executed 1006 times by 5 tests: return convertToUnicode(a.constData(), a.length(), 0);
Executed by:
  • tst_QClipboard
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextEdit
1006
170}-
171-
172-
173-
174-
175-
176bool QTextCodec::canEncode(QChar ch) const-
177{-
178 ConverterState state;-
179 state.flags = ConvertInvalidToNull;-
180 convertFromUnicode(&ch, 1, &state);-
181 return
executed 3899 times by 3 tests: return (state.invalidChars == 0);
Executed by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
(state.invalidChars == 0);
executed 3899 times by 3 tests: return (state.invalidChars == 0);
Executed by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
3899
182}-
183-
184-
185-
186-
187-
188-
189bool QTextCodec::canEncode(const QString& s) const-
190{-
191 ConverterState state;-
192 state.flags = ConvertInvalidToNull;-
193 convertFromUnicode(s.constData(), s.length(), &state);-
194 return
executed 9 times by 1 test: return (state.invalidChars == 0);
Executed by:
  • tst_QTextCodec
(state.invalidChars == 0);
executed 9 times by 1 test: return (state.invalidChars == 0);
Executed by:
  • tst_QTextCodec
9
195}-
196-
197-
198-
199-
200-
201-
202QString QTextCodec::toUnicode(const char *chars) const-
203{-
204 int len = qstrlen(chars);-
205 return
executed 2 times by 2 tests: return convertToUnicode(chars, len, 0);
Executed by:
  • tst_QSqlDatabase
  • tst_QXmlStream
convertToUnicode(chars, len, 0);
executed 2 times by 2 tests: return convertToUnicode(chars, len, 0);
Executed by:
  • tst_QSqlDatabase
  • tst_QXmlStream
2
206}-
207QTextEncoder::QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)-
208 : c(codec), state()-
209{-
210 state.flags = flags;-
211}
executed 1012 times by 4 tests: end of block
Executed by:
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QXmlStream
  • tst_Utf8
1012
212-
213-
214-
215-
216QTextEncoder::~QTextEncoder()-
217{-
218}-
219bool QTextEncoder::hasFailure() const-
220{-
221 return
executed 494 times by 1 test: return state.invalidChars != 0;
Executed by:
  • tst_Utf8
state.invalidChars != 0;
executed 494 times by 1 test: return state.invalidChars != 0;
Executed by:
  • tst_Utf8
494
222}-
223-
224-
225-
226-
227QByteArray QTextEncoder::fromUnicode(const QString& str)-
228{-
229 QByteArray result = c->fromUnicode(str.constData(), str.length(), &state);-
230 return
executed 5379 times by 4 tests: return result;
Executed by:
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QXmlStream
  • tst_Utf8
result;
executed 5379 times by 4 tests: return result;
Executed by:
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QXmlStream
  • tst_Utf8
5379
231}-
232-
233-
234-
235-
236-
237-
238-
239QByteArray QTextEncoder::fromUnicode(const QChar *uc, int len)-
240{-
241 QByteArray result = c->fromUnicode(uc, len, &state);-
242 return
executed 4925 times by 4 tests: return result;
Executed by:
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QXmlStream
  • tst_Utf8
result;
executed 4925 times by 4 tests: return result;
Executed by:
  • tst_QPlainTextEdit
  • tst_QTextEdit
  • tst_QXmlStream
  • tst_Utf8
4925
243}-
244QTextDecoder::QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)-
245 : c(codec), state()-
246{-
247 state.flags = flags;-
248}
executed 7894 times by 40 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
7894
249-
250-
251-
252-
253QTextDecoder::~QTextDecoder()-
254{-
255}-
256QString QTextDecoder::toUnicode(const char *chars, int len)-
257{-
258 return
executed 46108 times by 4 tests: return c->toUnicode(chars, len, &state);
Executed by:
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
c->toUnicode(chars, len, &state);
executed 46108 times by 4 tests: return c->toUnicode(chars, len, &state);
Executed by:
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
46108
259}-
260-
261-
262void qt_from_latin1(ushort *dst, const char *str, size_t size) noexcept;-
263-
264-
265-
266-
267-
268void QTextDecoder::toUnicode(QString *target, const char *chars, int len)-
269{-
270 ((!(target)) ? qt_assert("target",__FILE__,1010) : qt_noop());-
271 switch (c->mibEnum()) {-
272 case
executed 62786 times by 37 tests: case 106:
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
106:
executed 62786 times by 37 tests: case 106:
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
62786
273 static_cast<const QUtf8Codec*>(c)->convertToUnicode(target, chars, len, &state);-
274 break;
executed 62786 times by 37 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
62786
275 case
executed 3 times by 1 test: case 4:
Executed by:
  • tst_QXmlStream
4:
executed 3 times by 1 test: case 4:
Executed by:
  • tst_QXmlStream
3
276 target->resize(len);-
277 qt_from_latin1((ushort*)target->data(), chars, len);-
278 break;
executed 3 times by 1 test: break;
Executed by:
  • tst_QXmlStream
3
279 default
executed 427 times by 1 test: default:
Executed by:
  • tst_QXmlStream
:
executed 427 times by 1 test: default:
Executed by:
  • tst_QXmlStream
427
280 *target = c->toUnicode(chars, len, &state);-
281 }
executed 427 times by 1 test: end of block
Executed by:
  • tst_QXmlStream
427
282}-
283QString QTextDecoder::toUnicode(const QByteArray &ba)-
284{-
285 return
executed 301 times by 2 tests: return c->toUnicode(ba.constData(), ba.length(), &state);
Executed by:
  • tst_QXmlStream
  • tst_Utf8
c->toUnicode(ba.constData(), ba.length(), &state);
executed 301 times by 2 tests: return c->toUnicode(ba.constData(), ba.length(), &state);
Executed by:
  • tst_QXmlStream
  • tst_Utf8
301
286}-
287QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba, QTextCodec *defaultCodec)-
288{-
289-
290 QTextCodec *c = QTextCodec::codecForUtfText(ba, 0);-
291 if (!c
!cDescription
TRUEevaluated 72 times by 5 tests
Evaluated by:
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
) {
2-72
292 QByteArray header = ba.left(1024).toLower();-
293 int pos = header.indexOf("meta ");-
294 if (pos != -1
pos != -1Description
TRUEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
FALSEevaluated 48 times by 3 tests
Evaluated by:
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
) {
24-48
295 pos = header.indexOf("charset=", pos);-
296 if (pos != -1
pos != -1Description
TRUEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
FALSEnever evaluated
) {
0-24
297 pos += qstrlen("charset=");-
298-
299 int pos2 = pos;-
300-
301-
302 while (++
++pos2 < header.size()Description
TRUEevaluated 169 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextCodec
pos2 < header.size()
++pos2 < header.size()Description
TRUEevaluated 169 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextCodec
) {
3-169
303 char ch = header.at(pos2);-
304 if (ch == '\"'
ch == '\"'Description
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
FALSEevaluated 155 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
|| ch == '\''
ch == '\''Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 153 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
|| ch == '>'
ch == '>'Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 148 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
) {
2-155
305 QByteArray name = header.mid(pos, pos2 - pos);-
306 if (name == "unicode"
name == "unicode"Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 20 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
)
1-20
307 name = ([]() -> QByteArray { enum { Size = sizeof("UTF-8") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "UTF-8" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_QTextCodec
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_QTextCodec
}());
executed 1 time by 1 test: name = ([]() -> QByteArray { enum { Size = sizeof("UTF-8") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "UTF-8" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }());
Executed by:
  • tst_QTextCodec
1
308 c = QTextCodec::codecForName(name);-
309 return
executed 21 times by 3 tests: return c ? c : defaultCodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
c ? c : defaultCodec;
executed 21 times by 3 tests: return c ? c : defaultCodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
21
310 }-
311 }
executed 148 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
148
312 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
3
313 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
3
314 }
executed 51 times by 3 tests: end of block
Executed by:
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
51
315 if (!c
!cDescription
TRUEevaluated 51 times by 3 tests
Evaluated by:
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
)
2-51
316 c = defaultCodec;
executed 51 times by 3 tests: c = defaultCodec;
Executed by:
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
51
317-
318 return
executed 53 times by 3 tests: return c;
Executed by:
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
c;
executed 53 times by 3 tests: return c;
Executed by:
  • tst_QMimeData
  • tst_QTextBrowser
  • tst_QTextCodec
53
319}-
320QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba)-
321{-
322 return
executed 62 times by 3 tests: return codecForHtml(ba, QTextCodec::codecForName("ISO-8859-1"));
Executed by:
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
codecForHtml(ba, QTextCodec::codecForName("ISO-8859-1"));
executed 62 times by 3 tests: return codecForHtml(ba, QTextCodec::codecForName("ISO-8859-1"));
Executed by:
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
62
323}-
324QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec)-
325{-
326 const int arraySize = ba.size();-
327-
328 if (arraySize > 3
arraySize > 3Description
TRUEevaluated 2652 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
FALSEevaluated 1977 times by 2 tests
Evaluated by:
  • tst_QSettings
  • tst_QTextStream
) {
1977-2652
329 if ((
(uchar)ba[0] == 0x00Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2640 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
uchar)ba[0] == 0x00
(uchar)ba[0] == 0x00Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2640 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
12-2640
330 && (
(uchar)ba[1] == 0x00Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
uchar)ba[1] == 0x00
(uchar)ba[1] == 0x00Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
1-11
331 && (
(uchar)ba[2] == 0xFEDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
uchar)ba[2] == 0xFE
(uchar)ba[2] == 0xFEDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
1-10
332 && (
(uchar)ba[3] == 0xFFDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
uchar)ba[3] == 0xFF
(uchar)ba[3] == 0xFFDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
)
0-10
333 return
executed 10 times by 2 tests: return QTextCodec::codecForMib(1018);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
QTextCodec::codecForMib(1018);
executed 10 times by 2 tests: return QTextCodec::codecForMib(1018);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
10
334 else if ((
(uchar)ba[0] == 0xFFDescription
TRUEevaluated 70 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2572 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
uchar)ba[0] == 0xFF
(uchar)ba[0] == 0xFFDescription
TRUEevaluated 70 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2572 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
70-2572
335 && (
(uchar)ba[1] == 0xFEDescription
TRUEevaluated 70 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
uchar)ba[1] == 0xFE
(uchar)ba[1] == 0xFEDescription
TRUEevaluated 70 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
0-70
336 && (
(uchar)ba[2] == 0x00Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
uchar)ba[2] == 0x00
(uchar)ba[2] == 0x00Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
10-60
337 && (
(uchar)ba[3] == 0x00Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
uchar)ba[3] == 0x00
(uchar)ba[3] == 0x00Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
)
0-10
338 return
executed 10 times by 2 tests: return QTextCodec::codecForMib(1019);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
QTextCodec::codecForMib(1019);
executed 10 times by 2 tests: return QTextCodec::codecForMib(1019);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
10
339 }
executed 2632 times by 22 tests: end of block
Executed by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
2632
340-
341 if (arraySize < 2
arraySize < 2Description
TRUEevaluated 1822 times by 1 test
Evaluated by:
  • tst_QTextStream
FALSEevaluated 2787 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
)
1822-2787
342 return
executed 1822 times by 1 test: return defaultCodec;
Executed by:
  • tst_QTextStream
defaultCodec;
executed 1822 times by 1 test: return defaultCodec;
Executed by:
  • tst_QTextStream
1822
343 if ((
(uchar)ba[0] == 0xfeDescription
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2705 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
uchar)ba[0] == 0xfe
(uchar)ba[0] == 0xfeDescription
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2705 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
&& (
(uchar)ba[1] == 0xffDescription
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
uchar)ba[1] == 0xff
(uchar)ba[1] == 0xffDescription
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
)
0-2705
344 return
executed 82 times by 2 tests: return QTextCodec::codecForMib(1013);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
QTextCodec::codecForMib(1013);
executed 82 times by 2 tests: return QTextCodec::codecForMib(1013);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
82
345 else if ((
(uchar)ba[0] == 0xffDescription
TRUEevaluated 75 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2630 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
uchar)ba[0] == 0xff
(uchar)ba[0] == 0xffDescription
TRUEevaluated 75 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2630 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
&& (
(uchar)ba[1] == 0xfeDescription
TRUEevaluated 75 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
uchar)ba[1] == 0xfe
(uchar)ba[1] == 0xfeDescription
TRUEevaluated 75 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
)
0-2630
346 return
executed 75 times by 2 tests: return QTextCodec::codecForMib(1014);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
QTextCodec::codecForMib(1014);
executed 75 times by 2 tests: return QTextCodec::codecForMib(1014);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
75
347-
348 if (arraySize < 3
arraySize < 3Description
TRUEevaluated 54 times by 2 tests
Evaluated by:
  • tst_QSettings
  • tst_QTextStream
FALSEevaluated 2576 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
)
54-2576
349 return
executed 54 times by 2 tests: return defaultCodec;
Executed by:
  • tst_QSettings
  • tst_QTextStream
defaultCodec;
executed 54 times by 2 tests: return defaultCodec;
Executed by:
  • tst_QSettings
  • tst_QTextStream
54
350 if ((
(uchar)ba[0] == 0xefDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2565 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
uchar)ba[0] == 0xef
(uchar)ba[0] == 0xefDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 2565 times by 22 tests
Evaluated by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
11-2565
351 && (
(uchar)ba[1] == 0xbbDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
uchar)ba[1] == 0xbb
(uchar)ba[1] == 0xbbDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
0-11
352 && (
(uchar)ba[2] == 0xbfDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
uchar)ba[2] == 0xbf
(uchar)ba[2] == 0xbfDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEnever evaluated
)
0-11
353 return
executed 11 times by 2 tests: return QTextCodec::codecForMib(106);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
QTextCodec::codecForMib(106);
executed 11 times by 2 tests: return QTextCodec::codecForMib(106);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
11
354-
355 return
executed 2565 times by 22 tests: return defaultCodec;
Executed by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
defaultCodec;
executed 2565 times by 22 tests: return defaultCodec;
Executed by:
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeData
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QString
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_qmakelib
  • tst_qstandardpaths
2565
356}-
357QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba)-
358{-
359 return
never executed: return codecForUtfText(ba, QTextCodec::codecForMib( 4));
codecForUtfText(ba, QTextCodec::codecForMib( 4));
never executed: return codecForUtfText(ba, QTextCodec::codecForMib( 4));
0
360}-
361bool QTextDecoder::hasFailure() const-
362{-
363 return
executed 61457 times by 37 tests: return state.invalidChars != 0;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
state.invalidChars != 0;
executed 61457 times by 37 tests: return state.invalidChars != 0;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
61457
364}-
365-
366-
Switch to Source codePreprocessed file

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