| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | const QListData::Data QListData::shared_null = { { { -1 } }, 0, 0, 0, { 0 } }; | - |
| static int grow(int size) | |
| { | |
| if (size_t(size) > (MaxAllocSize - QListData::DataHeaderSize) / sizeof(void *)) | |
| qBadAlloc(); | |
| | |
| volatile int x = qAllocMore(size * sizeof(void *), QListData::DataHeaderSize) / sizeof(void *); | |
| return x; | |
| }QListData::Data *QListData::detach_grow(int *idx, int num) | |
| 8 | { | - |
| 9 | Data *x = d; | - |
| 10 | int l = x->end - x->begin; | - |
| 11 | int nl = l + num; | - |
| 12 | int allocauto blockInfo = growqCalculateGrowingBlockSize(nl, sizeof(void *), DataHeaderSize); | - |
| 13 | Data* t = static_cast<Data *>(::malloc(DataHeaderSize + alloc * sizeof(void *)));blockInfo.size)); | - |
| 14 | do { if (!(t)| TRUE | never evaluated | | FALSE | evaluated 1170293 times by 591 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
) qBadAlloc();never executed: qBadAlloc(); } while (0); | 0-1170293 |
| 15 | t->alloc = int(uint(blockInfo.elementCount)); | - |
| 16 | | - |
| 17 | t->ref.initializeOwned(); | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | t->alloc = alloc;int bg; | - |
| 25 | if (*| TRUE | never evaluated | | FALSE | evaluated 1170293 times by 591 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
idx < 0| TRUE | never evaluated | | FALSE | evaluated 1170293 times by 591 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
) { | 0-1170293 |
| 26 | *idx = 0; | - |
| 27 | bg = (t->alloc - nl) >> 1; | - |
| 28 | } never executed: end of block else if (*| TRUE | evaluated 1005874 times by 588 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- 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
- ...
| | FALSE | evaluated 164419 times by 280 testsEvaluated by:- tst_Collections
- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QBuffer
- ...
|
idx > l| TRUE | evaluated 1005874 times by 588 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- 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
- ...
| | FALSE | evaluated 164419 times by 280 testsEvaluated by:- tst_Collections
- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QBuffer
- ...
|
) { | 0-1005874 |
| 29 | *idx = l; | - |
| 30 | bg = 0; | - |
| 31 | }executed 1005874 times by 588 tests: end of blockExecuted by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- 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
- ...
else if (*| TRUE | evaluated 3831 times by 13 testsEvaluated by:- tst_Collections
- tst_QAbstractItemView
- tst_QApplication
- tst_QCommandLineParser
- tst_QList
- tst_QList_StrictIterators
- tst_QPluginLoader
- tst_QRegExp
- tst_QStateMachine
- tst_QStringListModel
- tst_QTextBoundaryFinder
- tst_QUrlQuery
- tst_qmessagehandler
| | FALSE | evaluated 160588 times by 278 testsEvaluated by:- tst_Collections
- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QBuffer
- ...
|
idx < (l >> 1)| TRUE | evaluated 3831 times by 13 testsEvaluated by:- tst_Collections
- tst_QAbstractItemView
- tst_QApplication
- tst_QCommandLineParser
- tst_QList
- tst_QList_StrictIterators
- tst_QPluginLoader
- tst_QRegExp
- tst_QStateMachine
- tst_QStringListModel
- tst_QTextBoundaryFinder
- tst_QUrlQuery
- tst_qmessagehandler
| | FALSE | evaluated 160588 times by 278 testsEvaluated by:- tst_Collections
- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QBuffer
- ...
|
) { | 3831-1005874 |
| 32 | bg = (t->alloc - nl) >> 1; | - |
| 33 | }executed 3831 times by 13 tests: end of blockExecuted by:- tst_Collections
- tst_QAbstractItemView
- tst_QApplication
- tst_QCommandLineParser
- tst_QList
- tst_QList_StrictIterators
- tst_QPluginLoader
- tst_QRegExp
- tst_QStateMachine
- tst_QStringListModel
- tst_QTextBoundaryFinder
- tst_QUrlQuery
- tst_qmessagehandler
else { | 3831 |
| 34 | bg = 0; | - |
| 35 | }executed 160588 times by 278 tests: end of blockExecuted by:- tst_Collections
- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QBuffer
- ...
| 160588 |
| 36 | t->begin = bg; | - |
| 37 | t->end = bg + nl; | - |
| 38 | d = t; | - |
| 39 | | - |
| 40 | returnexecuted 1170293 times by 591 tests: return x;Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
x;executed 1170293 times by 591 tests: return x;Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 1170293 |
| 41 | } | - |
| 42 | QListData::Data *QListData::detach(int alloc) | - |
| 43 | { | - |
| 44 | Data *x = d; | - |
| 45 | Data* t = static_cast<Data *>(::malloc(DataHeaderSize +qCalculateBlockSize(alloc*, sizeof(void*)));*), DataHeaderSize))); | - |
| 46 | do { if (!(t)| TRUE | never evaluated | | FALSE | evaluated 210646 times by 442 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QButtonGroup
- ...
|
) qBadAlloc();never executed: qBadAlloc(); } while (0); | 0-210646 |
| 47 | | - |
| 48 | t->ref.initializeOwned(); | - |
| 49 | t->alloc = alloc; | - |
| 50 | if (!alloc| TRUE | evaluated 32574 times by 128 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAccessibility
- tst_QAlgorithms
- tst_QCalendarWidget
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QDataWidgetMapper
- tst_QDateTimeEdit
- tst_QDebug
- tst_QDialog
- tst_QDirIterator
- tst_QDirModel
- tst_QDnsLookup
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- ...
| | FALSE | evaluated 178072 times by 429 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QButtonGroup
- ...
|
) { | 32574-178072 |
| 51 | t->begin = 0; | - |
| 52 | t->end = 0; | - |
| 53 | }executed 32574 times by 128 tests: end of blockExecuted by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAccessibility
- tst_QAlgorithms
- tst_QCalendarWidget
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QDataWidgetMapper
- tst_QDateTimeEdit
- tst_QDebug
- tst_QDialog
- tst_QDirIterator
- tst_QDirModel
- tst_QDnsLookup
- tst_QFileDialog2
- tst_QFileIconProvider
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- ...
else { | 32574 |
| 54 | t->begin = x->begin; | - |
| 55 | t->end = x->end; | - |
| 56 | }executed 178072 times by 429 tests: end of blockExecuted by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QButtonGroup
- ...
| 178072 |
| 57 | d = t; | - |
| 58 | | - |
| 59 | returnexecuted 210646 times by 442 tests: return x;Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QButtonGroup
- ...
x;executed 210646 times by 442 tests: return x;Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QBrush
- tst_QButtonGroup
- ...
| 210646 |
| 60 | } | - |
| 61 | | - |
| 62 | void QListData::realloc(int alloc) | - |
| 63 | { | - |
| 64 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,142139) : qt_noop()); | - |
| 65 | Data *x = static_cast<Data *>(::realloc(d, DataHeaderSize +qCalculateBlockSize(alloc*, sizeof(void *)));*), DataHeaderSize))); | - |
| 66 | do { if (!(x)| TRUE | never evaluated | | FALSE | evaluated 838 times by 15 testsEvaluated by:- tst_QApplication
- tst_QGraphicsWidget
- tst_QIcon
- tst_QImage
- tst_QImageReader
- tst_QImageWriter
- tst_QLabel
- tst_QNetworkReply
- tst_QPixmap
- tst_QPlainTextEdit
- tst_QSslSocket
- tst_QStyleSheetStyle
- tst_QSystemTrayIcon
- tst_QTextBrowser
- tst_QTextEdit
|
) qBadAlloc();never executed: qBadAlloc(); } while (0); | 0-838 |
| 67 | | - |
| 68 | d = x; | - |
| 69 | d->alloc = alloc; | - |
| 70 | if (!alloc| TRUE | never evaluated | | FALSE | evaluated 838 times by 15 testsEvaluated by:- tst_QApplication
- tst_QGraphicsWidget
- tst_QIcon
- tst_QImage
- tst_QImageReader
- tst_QImageWriter
- tst_QLabel
- tst_QNetworkReply
- tst_QPixmap
- tst_QPlainTextEdit
- tst_QSslSocket
- tst_QStyleSheetStyle
- tst_QSystemTrayIcon
- tst_QTextBrowser
- tst_QTextEdit
|
) | 0-838 |
| 71 | d->begin = d->end = 0; never executed: d->begin = d->end = 0; | 0 |
| 72 | }executed 838 times by 15 tests: end of blockExecuted by:- tst_QApplication
- tst_QGraphicsWidget
- tst_QIcon
- tst_QImage
- tst_QImageReader
- tst_QImageWriter
- tst_QLabel
- tst_QNetworkReply
- tst_QPixmap
- tst_QPlainTextEdit
- tst_QSslSocket
- tst_QStyleSheetStyle
- tst_QSystemTrayIcon
- tst_QTextBrowser
- tst_QTextEdit
| 838 |
| 73 | | - |
| 74 | void QListData::realloc_grow(int growth) | - |
| 75 | { | - |
| 76 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,154151) : qt_noop()); | - |
| 77 | int allocauto r = growqCalculateGrowingBlockSize(d->alloc + growth, sizeof(void *), DataHeaderSize); | - |
| 78 | Data *x = static_cast<Data *>(::realloc(d, DataHeaderSize + alloc * sizeof(void *)));r.size)); | - |
| 79 | do { if (!(x)| TRUE | never evaluated | | FALSE | evaluated 423175 times by 395 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- ...
|
) qBadAlloc();never executed: qBadAlloc(); } while (0); | 0-423175 |
| 80 | | - |
| 81 | d = x; | - |
| 82 | d->alloc = alloc;int(uint(r.elementCount)); | - |
| 83 | }executed 423175 times by 395 tests: end of blockExecuted by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- tst_QAnimationGroup
- ...
| 423175 |
| 84 | | - |
| 85 | void QListData::dispose(Data *d) | - |
| 86 | { | - |
| 87 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,165162) : qt_noop()); | - |
| 88 | free(d); | - |
| 89 | } | - |
| 90 | | - |
| 91 | | - |
| 92 | void **QListData::append(int n) | - |
| 93 | { | - |
| 94 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,172169) : qt_noop()); | - |
| 95 | int e = d->end; | - |
| 96 | if (e + n > d->alloc) { | - |
| 97 | int b = d->begin; | - |
| 98 | if (b - n >= 2 * d->alloc / 3) { | - |
| 99 | | - |
| 100 | e -= b; | - |
| 101 | ::memcpy(d->array, d->array + b, e * sizeof(void *)); | - |
| 102 | d->begin = 0; | - |
| 103 | } else { | - |
| 104 | realloc_grow(n); | - |
| 105 | } | - |
| 106 | } | - |
| 107 | d->end = e + n; | - |
| 108 | return d->array + e; | - |
| 109 | } | - |
| 110 | | - |
| 111 | | - |
| 112 | void **QListData::append() | - |
| 113 | { | - |
| 114 | return append(1); | - |
| 115 | } | - |
| 116 | | - |
| 117 | | - |
| 118 | void **QListData::append(const QListData& l) | - |
| 119 | { | - |
| 120 | return append(l.d->end - l.d->begin); | - |
| 121 | } | - |
| 122 | | - |
| 123 | void **QListData::prepend() | - |
| 124 | { | - |
| 125 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,203200) : qt_noop()); | - |
| 126 | if (d->begin == 0) { | - |
| 127 | if (d->end >= d->alloc / 3) | - |
| 128 | realloc_grow(1); | - |
| 129 | | - |
| 130 | if (d->end < d->alloc / 3) | - |
| 131 | d->begin = d->alloc - 2 * d->end; | - |
| 132 | else | - |
| 133 | d->begin = d->alloc - d->end; | - |
| 134 | | - |
| 135 | ::memmove(d->array + d->begin, d->array, d->end * sizeof(void *)); | - |
| 136 | d->end += d->begin; | - |
| 137 | } | - |
| 138 | return d->array + --d->begin; | - |
| 139 | } | - |
| 140 | | - |
| 141 | void **QListData::insert(int i) | - |
| 142 | { | - |
| 143 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,221218) : qt_noop()); | - |
| 144 | if (i <= 0) | - |
| 145 | return prepend(); | - |
| 146 | int size = d->end - d->begin; | - |
| 147 | if (i >= size) | - |
| 148 | return append(); | - |
| 149 | | - |
| 150 | bool leftward = false; | - |
| 151 | | - |
| 152 | if (d->begin == 0) { | - |
| 153 | if (d->end == d->alloc) { | - |
| 154 | | - |
| 155 | realloc_grow(1); | - |
| 156 | } else { | - |
| 157 | | - |
| 158 | } | - |
| 159 | } else { | - |
| 160 | if (d->end == d->alloc) { | - |
| 161 | | - |
| 162 | leftward = true; | - |
| 163 | } else { | - |
| 164 | | - |
| 165 | leftward = (i < size - i); | - |
| 166 | } | - |
| 167 | } | - |
| 168 | | - |
| 169 | if (leftward) { | - |
| 170 | --d->begin; | - |
| 171 | ::memmove(d->array + d->begin, d->array + d->begin + 1, i * sizeof(void *)); | - |
| 172 | } else { | - |
| 173 | ::memmove(d->array + d->begin + i + 1, d->array + d->begin + i, | - |
| 174 | (size - i) * sizeof(void *)); | - |
| 175 | ++d->end; | - |
| 176 | } | - |
| 177 | return d->array + d->begin + i; | - |
| 178 | } | - |
| 179 | | - |
| 180 | void QListData::remove(int i) | - |
| 181 | { | - |
| 182 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,260257) : qt_noop()); | - |
| 183 | i += d->begin; | - |
| 184 | if (i - d->begin < d->end - i) { | - |
| 185 | if (int offset = i - d->begin) | - |
| 186 | ::memmove(d->array + d->begin + 1, d->array + d->begin, offset * sizeof(void *)); | - |
| 187 | d->begin++; | - |
| 188 | } else { | - |
| 189 | if (int offset = d->end - i - 1) | - |
| 190 | ::memmove(d->array + i, d->array + i + 1, offset * sizeof(void *)); | - |
| 191 | d->end--; | - |
| 192 | } | - |
| 193 | } | - |
| 194 | | - |
| 195 | void QListData::remove(int i, int n) | - |
| 196 | { | - |
| 197 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,275272) : qt_noop()); | - |
| 198 | i += d->begin; | - |
| 199 | int middle = i + n/2; | - |
| 200 | if (middle - d->begin < d->end - middle) { | - |
| 201 | ::memmove(d->array + d->begin + n, d->array + d->begin, | - |
| 202 | (i - d->begin) * sizeof(void*)); | - |
| 203 | d->begin += n; | - |
| 204 | } else { | - |
| 205 | ::memmove(d->array + i, d->array + i + n, | - |
| 206 | (d->end - i - n) * sizeof(void*)); | - |
| 207 | d->end -= n; | - |
| 208 | } | - |
| 209 | } | - |
| 210 | | - |
| 211 | void QListData::move(int from, int to) | - |
| 212 | { | - |
| 213 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,291288) : qt_noop()); | - |
| 214 | if (from == to) | - |
| 215 | return; | - |
| 216 | | - |
| 217 | from += d->begin; | - |
| 218 | to += d->begin; | - |
| 219 | void *t = d->array[from]; | - |
| 220 | | - |
| 221 | if (from < to) { | - |
| 222 | if (d->end == d->alloc || 3 * (to - from) < 2 * (d->end - d->begin)) { | - |
| 223 | ::memmove(d->array + from, d->array + from + 1, (to - from) * sizeof(void *)); | - |
| 224 | } else { | - |
| 225 | | - |
| 226 | if (int offset = from - d->begin) | - |
| 227 | ::memmove(d->array + d->begin + 1, d->array + d->begin, offset * sizeof(void *)); | - |
| 228 | if (int offset = d->end - (to + 1)) | - |
| 229 | ::memmove(d->array + to + 2, d->array + to + 1, offset * sizeof(void *)); | - |
| 230 | ++d->begin; | - |
| 231 | ++d->end; | - |
| 232 | ++to; | - |
| 233 | } | - |
| 234 | } else { | - |
| 235 | if (d->begin == 0 || 3 * (from - to) < 2 * (d->end - d->begin)) { | - |
| 236 | ::memmove(d->array + to + 1, d->array + to, (from - to) * sizeof(void *)); | - |
| 237 | } else { | - |
| 238 | | - |
| 239 | if (int offset = to - d->begin) | - |
| 240 | ::memmove(d->array + d->begin - 1, d->array + d->begin, offset * sizeof(void *)); | - |
| 241 | if (int offset = d->end - (from + 1)) | - |
| 242 | ::memmove(d->array + from, d->array + from + 1, offset * sizeof(void *)); | - |
| 243 | --d->begin; | - |
| 244 | --d->end; | - |
| 245 | --to; | - |
| 246 | } | - |
| 247 | } | - |
| 248 | d->array[to] = t; | - |
| 249 | } | - |
| 250 | | - |
| 251 | void **QListData::erase(void **xi) | - |
| 252 | { | - |
| 253 | ((!(!d->ref.isShared())) ? qt_assert("!d->ref.isShared()",__FILE__,331328) : qt_noop()); | - |
| 254 | int i = xi - (d->array + d->begin); | - |
| 255 | remove(i); | - |
| 256 | return d->array + d->begin + i; | - |
| 257 | } | - |
| 258 | | - |
| | |