| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | QStringListModel::QStringListModel(QObject *parent) | - |
| 9 | : QAbstractListModel(parent) | - |
| 10 | { | - |
| 11 | }executed 285 times by 13 tests: end of blockExecuted by:- tst_ModelTest
- tst_QAbstractItemModel
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QListView
- tst_QObject
- tst_QSortFilterProxyModel
- tst_QTableView
| 285 |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | QStringListModel::QStringListModel(const QStringList &strings, QObject *parent) | - |
| 19 | : QAbstractListModel(parent), lst(strings) | - |
| 20 | { | - |
| 21 | }executed 67 times by 14 tests: end of blockExecuted by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QHeaderView
- tst_QIdentityProxyModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTreeView
| 67 |
| 22 | int QStringListModel::rowCount(const QModelIndex &parent) const | - |
| 23 | { | - |
| 24 | if (parent.isValid()| TRUE | evaluated 18 times by 3 testsEvaluated by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
| | FALSE | evaluated 91991 times by 20 testsEvaluated by:- tst_ModelTest
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QHeaderView
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTableView
- tst_QTreeView
|
) | 18-91991 |
| 25 | returnexecuted 18 times by 3 tests: return 0;Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
0;executed 18 times by 3 tests: return 0;Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
| 18 |
| 26 | | - |
| 27 | returnexecuted 91991 times by 20 tests: return lst.count();Executed by:- tst_ModelTest
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QHeaderView
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTableView
- tst_QTreeView
lst.count();executed 91991 times by 20 tests: return lst.count();Executed by:- tst_ModelTest
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QHeaderView
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTableView
- tst_QTreeView
| 91991 |
| 28 | } | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | QModelIndex QStringListModel::sibling(int row, int column, const QModelIndex &idx) const | - |
| 34 | { | - |
| 35 | if (!idx.isValid()| TRUE | evaluated 5 times by 2 testsEvaluated by:- tst_ModelTest
- tst_QItemModel
| | FALSE | evaluated 73 times by 3 testsEvaluated by:- tst_ModelTest
- tst_QItemModel
- tst_QListView
|
|| column != 0| TRUE | never evaluated | | FALSE | evaluated 73 times by 3 testsEvaluated by:- tst_ModelTest
- tst_QItemModel
- tst_QListView
|
|| row >= lst.count()| TRUE | never evaluated | | FALSE | evaluated 73 times by 3 testsEvaluated by:- tst_ModelTest
- tst_QItemModel
- tst_QListView
|
) | 0-73 |
| 36 | returnexecuted 5 times by 2 tests: return QModelIndex();Executed by:- tst_ModelTest
- tst_QItemModel
QModelIndex();executed 5 times by 2 tests: return QModelIndex();Executed by:- tst_ModelTest
- tst_QItemModel
| 5 |
| 37 | | - |
| 38 | returnexecuted 73 times by 3 tests: return createIndex(row, 0);Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QListView
createIndex(row, 0);executed 73 times by 3 tests: return createIndex(row, 0);Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QListView
| 73 |
| 39 | } | - |
| 40 | QVariant QStringListModel::data(const QModelIndex &index, int role) const | - |
| 41 | { | - |
| 42 | if (index.row() < 0| TRUE | evaluated 4739 times by 6 testsEvaluated by:- tst_ModelTest
- tst_QComboBox
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QItemModel
- tst_QSortFilterProxyModel
| | FALSE | evaluated 132335 times by 17 testsEvaluated by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTreeView
|
|| index.row() >= lst.size()| TRUE | never evaluated | | FALSE | evaluated 132335 times by 17 testsEvaluated by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTreeView
|
) | 0-132335 |
| 43 | returnexecuted 4739 times by 6 tests: return QVariant();Executed by:- tst_ModelTest
- tst_QComboBox
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QItemModel
- tst_QSortFilterProxyModel
QVariant();executed 4739 times by 6 tests: return QVariant();Executed by:- tst_ModelTest
- tst_QComboBox
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QItemModel
- tst_QSortFilterProxyModel
| 4739 |
| 44 | | - |
| 45 | if (role == Qt::DisplayRole| TRUE | evaluated 19898 times by 14 testsEvaluated by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontDialog
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTreeView
| | FALSE | evaluated 112437 times by 15 testsEvaluated by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QTreeView
|
|| role == Qt::EditRole| TRUE | evaluated 4295 times by 8 testsEvaluated by:- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QLineEdit
- tst_QListWidget
| | FALSE | evaluated 108142 times by 14 testsEvaluated by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QLineEdit
- tst_QListView
- tst_QSortFilterProxyModel
- tst_QTreeView
|
) | 4295-112437 |
| 46 | returnexecuted 24193 times by 17 tests: return lst.at(index.row());Executed by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTreeView
lst.at(index.row());executed 24193 times by 17 tests: return lst.at(index.row());Executed by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QStringListModel
- tst_QTreeView
| 24193 |
| 47 | | - |
| 48 | returnexecuted 108142 times by 14 tests: return QVariant();Executed by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QLineEdit
- tst_QListView
- tst_QSortFilterProxyModel
- tst_QTreeView
QVariant();executed 108142 times by 14 tests: return QVariant();Executed by:- tst_ModelTest
- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QIdentityProxyModel
- tst_QItemModel
- tst_QLineEdit
- tst_QListView
- tst_QSortFilterProxyModel
- tst_QTreeView
| 108142 |
| 49 | } | - |
| 50 | Qt::ItemFlags QStringListModel::flags(const QModelIndex &index) const | - |
| 51 | { | - |
| 52 | if (!index.isValid()| TRUE | evaluated 18 times by 3 testsEvaluated by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
| | FALSE | evaluated 10582 times by 13 testsEvaluated by:- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QTreeView
|
) | 18-10582 |
| 53 | returnexecuted 18 times by 3 tests: return QAbstractListModel::flags(index) | Qt::ItemIsDropEnabled;Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
QAbstractListModel::flags(index) | Qt::ItemIsDropEnabled;executed 18 times by 3 tests: return QAbstractListModel::flags(index) | Qt::ItemIsDropEnabled;Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
| 18 |
| 54 | | - |
| 55 | returnexecuted 10582 times by 13 tests: return QAbstractListModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;Executed by:- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QTreeView
QAbstractListModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;executed 10582 times by 13 tests: return QAbstractListModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;Executed by:- tst_QAbstractItemView
- tst_QColumnView
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QItemSelectionModel
- tst_QLineEdit
- tst_QListView
- tst_QListWidget
- tst_QSortFilterProxyModel
- tst_QTreeView
| 10582 |
| 56 | } | - |
| 57 | bool QStringListModel::setData(const QModelIndex &index, const QVariant &value, int role) | - |
| 58 | { | - |
| 59 | if (index.row() >= 0| TRUE | evaluated 37 times by 4 testsEvaluated by:- tst_QAbstractItemView
- tst_QItemModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
| | FALSE | evaluated 35 times by 3 testsEvaluated by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
|
&& index.row() < lst.size()| TRUE | evaluated 37 times by 4 testsEvaluated by:- tst_QAbstractItemView
- tst_QItemModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
| | FALSE | never evaluated |
| 0-37 |
| 60 | && (role == Qt::EditRole| TRUE | evaluated 34 times by 4 testsEvaluated by:- tst_QAbstractItemView
- tst_QItemModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
| | FALSE | evaluated 3 times by 2 testsEvaluated by:- tst_QSortFilterProxyModel
- tst_QStringListModel
|
|| role == Qt::DisplayRole| TRUE | evaluated 3 times by 2 testsEvaluated by:- tst_QSortFilterProxyModel
- tst_QStringListModel
| | FALSE | never evaluated |
)) { | 0-34 |
| 61 | lst.replace(index.row(), value.toString()); | - |
| 62 | QVector<int> roles; | - |
| 63 | roles.reserve(2); | - |
| 64 | roles.append(Qt::DisplayRole); | - |
| 65 | roles.append(Qt::EditRole); | - |
| 66 | dataChanged(index, index, roles); | - |
| 67 | | - |
| 68 | | - |
| 69 | returnexecuted 37 times by 4 tests: return true;Executed by:- tst_QAbstractItemView
- tst_QItemModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
true;executed 37 times by 4 tests: return true;Executed by:- tst_QAbstractItemView
- tst_QItemModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
| 37 |
| 70 | } | - |
| 71 | returnexecuted 35 times by 3 tests: return false;Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
false;executed 35 times by 3 tests: return false;Executed by:- tst_ModelTest
- tst_QItemModel
- tst_QSortFilterProxyModel
| 35 |
| 72 | } | - |
| 73 | bool QStringListModel::insertRows(int row, int count, const QModelIndex &parent) | - |
| 74 | { | - |
| 75 | if (count < 1| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 37 times by 7 testsEvaluated by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
|
|| row < 0| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 33 times by 7 testsEvaluated by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
|
|| row > rowCount(parent)| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 29 times by 7 testsEvaluated by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
|
) | 4-37 |
| 76 | returnexecuted 24 times by 1 test: return false; false;executed 24 times by 1 test: return false; | 24 |
| 77 | | - |
| 78 | beginInsertRows(QModelIndex(), row, row + count - 1); | - |
| 79 | | - |
| 80 | for (int r = 0; r < count| TRUE | evaluated 140 times by 7 testsEvaluated by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
| | FALSE | evaluated 29 times by 7 testsEvaluated by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
|
; ++r) | 29-140 |
| 81 | lst.insert(row, QString());executed 140 times by 7 tests: lst.insert(row, QString());Executed by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
| 140 |
| 82 | | - |
| 83 | endInsertRows(); | - |
| 84 | | - |
| 85 | returnexecuted 29 times by 7 tests: return true;Executed by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
true;executed 29 times by 7 tests: return true;Executed by:- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QSortFilterProxyModel
- tst_QStringListModel
| 29 |
| 86 | } | - |
| 87 | bool QStringListModel::removeRows(int row, int count, const QModelIndex &parent) | - |
| 88 | { | - |
| 89 | if (count <= 0| TRUE | evaluated 16 times by 1 test | | FALSE | evaluated 39 times by 5 testsEvaluated by:- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QListView
- tst_QStringListModel
|
|| row < 0| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 33 times by 5 testsEvaluated by:- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QListView
- tst_QStringListModel
|
|| (| TRUE | evaluated 9 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QStringListModel
| | FALSE | evaluated 24 times by 5 testsEvaluated by:- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QListView
- tst_QStringListModel
|
row + count) > rowCount(parent)| TRUE | evaluated 9 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QStringListModel
| | FALSE | evaluated 24 times by 5 testsEvaluated by:- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QListView
- tst_QStringListModel
|
) | 6-39 |
| 90 | returnexecuted 31 times by 2 tests: return false;Executed by:- tst_QItemModel
- tst_QStringListModel
false;executed 31 times by 2 tests: return false;Executed by:- tst_QItemModel
- tst_QStringListModel
| 31 |
| 91 | | - |
| 92 | beginRemoveRows(QModelIndex(), row, row + count - 1); | - |
| 93 | | - |
| 94 | const auto it = lst.begin() + row; | - |
| 95 | lst.erase(it, it + count); | - |
| 96 | | - |
| 97 | endRemoveRows(); | - |
| 98 | | - |
| 99 | returnexecuted 24 times by 5 tests: return true;Executed by:- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QListView
- tst_QStringListModel
true;executed 24 times by 5 tests: return true;Executed by:- tst_QAbstractItemView
- tst_QHeaderView
- tst_QItemModel
- tst_QListView
- tst_QStringListModel
| 24 |
| 100 | } | - |
| 101 | | - |
| 102 | static bool ascendingLessThan(const QPair<QString, int> &s1, const QPair<QString, int> &s2) | - |
| 103 | { | - |
| 104 | returnexecuted 952 times by 2 tests: return s1.first < s2.first;Executed by:- tst_QItemModel
- tst_QTableView
s1.first < s2.first;executed 952 times by 2 tests: return s1.first < s2.first;Executed by:- tst_QItemModel
- tst_QTableView
| 952 |
| 105 | } | - |
| 106 | | - |
| 107 | static bool decendingLessThan(const QPair<QString, int> &s1, const QPair<QString, int> &s2) | - |
| 108 | { | - |
| 109 | returnexecuted 26 times by 1 test: return s1.first > s2.first; s1.first > s2.first;executed 26 times by 1 test: return s1.first > s2.first; | 26 |
| 110 | } | - |
| 111 | | - |
| 112 | | - |
| 113 | | - |
| 114 | | - |
| 115 | void QStringListModel::sort(int, Qt::SortOrder order) | - |
| 116 | { | - |
| 117 | layoutAboutToBeChanged(QList<QPersistentModelIndex>(), VerticalSortHint); | - |
| 118 | | - |
| 119 | QVector<QPair<QString, int> > list; | - |
| 120 | const int lstCount = lst.count(); | - |
| 121 | list.reserve(lstCount); | - |
| 122 | for (int i = 0; i < lstCount| TRUE | evaluated 347 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QTableView
| | FALSE | evaluated 19 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QTableView
|
; ++i) | 19-347 |
| 123 | list.append(QPair<QString, int>(lst.at(i), i));executed 347 times by 2 tests: list.append(QPair<QString, int>(lst.at(i), i));Executed by:- tst_QItemModel
- tst_QTableView
| 347 |
| 124 | | - |
| 125 | if (order == Qt::AscendingOrder| TRUE | evaluated 15 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QTableView
| | FALSE | evaluated 4 times by 1 test |
) | 4-15 |
| 126 | std::sort(list.begin(), list.end(), ascendingLessThan);executed 15 times by 2 tests: std::sort(list.begin(), list.end(), ascendingLessThan);Executed by:- tst_QItemModel
- tst_QTableView
| 15 |
| 127 | else | - |
| 128 | std::sort(list.begin(), list.end(), decendingLessThan);executed 4 times by 1 test: std::sort(list.begin(), list.end(), decendingLessThan); | 4 |
| 129 | | - |
| 130 | lst.clear(); | - |
| 131 | QVector<int> forwarding(lstCount); | - |
| 132 | for (int i = 0; i < lstCount| TRUE | evaluated 347 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QTableView
| | FALSE | evaluated 19 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QTableView
|
; ++i) { | 19-347 |
| 133 | lst.append(list.at(i).first); | - |
| 134 | forwarding[list.at(i).second] = i; | - |
| 135 | }executed 347 times by 2 tests: end of blockExecuted by:- tst_QItemModel
- tst_QTableView
| 347 |
| 136 | | - |
| 137 | QModelIndexList oldList = persistentIndexList(); | - |
| 138 | QModelIndexList newList; | - |
| 139 | const int numOldIndexes = oldList.count(); | - |
| 140 | newList.reserve(numOldIndexes); | - |
| 141 | for (int i = 0; i < numOldIndexes| TRUE | never evaluated | | FALSE | evaluated 19 times by 2 testsEvaluated by:- tst_QItemModel
- tst_QTableView
|
; ++i) | 0-19 |
| 142 | newList.append(index(forwarding.at(oldList.at(i).row()), 0)); never executed: newList.append(index(forwarding.at(oldList.at(i).row()), 0)); | 0 |
| 143 | changePersistentIndexList(oldList, newList); | - |
| 144 | | - |
| 145 | layoutChanged(QList<QPersistentModelIndex>(), VerticalSortHint); | - |
| 146 | }executed 19 times by 2 tests: end of blockExecuted by:- tst_QItemModel
- tst_QTableView
| 19 |
| 147 | | - |
| 148 | | - |
| 149 | | - |
| 150 | | - |
| 151 | QStringList QStringListModel::stringList() const | - |
| 152 | { | - |
| 153 | returnexecuted 1498 times by 2 tests: return lst;Executed by:- tst_QFontDialog
- tst_QTableView
lst;executed 1498 times by 2 tests: return lst;Executed by:- tst_QFontDialog
- tst_QTableView
| 1498 |
| 154 | } | - |
| 155 | | - |
| 156 | | - |
| 157 | | - |
| 158 | | - |
| 159 | | - |
| 160 | | - |
| 161 | | - |
| 162 | void QStringListModel::setStringList(const QStringList &strings) | - |
| 163 | { | - |
| 164 | beginResetModel(); | - |
| 165 | lst = strings; | - |
| 166 | endResetModel(); | - |
| 167 | }executed 628 times by 11 tests: end of blockExecuted by:- tst_ModelTest
- tst_QComboBox
- tst_QCompleter
- tst_QFontComboBox
- tst_QFontDialog
- tst_QGraphicsProxyWidget
- tst_QItemModel
- tst_QItemSelectionModel
- tst_QListView
- tst_QSortFilterProxyModel
- tst_QTableView
| 628 |
| 168 | | - |
| 169 | | - |
| 170 | | - |
| 171 | | - |
| 172 | Qt::DropActions QStringListModel::supportedDropActions() const | - |
| 173 | { | - |
| 174 | returnexecuted 19 times by 4 tests: return QAbstractItemModel::supportedDropActions() | Qt::MoveAction;Executed by:- tst_ModelTest
- tst_QAbstractItemModel
- tst_QItemModel
- tst_QSortFilterProxyModel
QAbstractItemModel::supportedDropActions() | Qt::MoveAction;executed 19 times by 4 tests: return QAbstractItemModel::supportedDropActions() | Qt::MoveAction;Executed by:- tst_ModelTest
- tst_QAbstractItemModel
- tst_QItemModel
- tst_QSortFilterProxyModel
| 19 |
| 175 | } | - |
| 176 | | - |
| 177 | | - |
| | |