diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-06-28 09:19:42 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-07-09 11:37:26 +0000 |
commit | ffbf089addcaab3e132f5dbb0685c1a46bd6d1ab (patch) | |
tree | 35504ff333773fddecb538eadfd7fd7fc3f49a19 /src | |
parent | 0db86d6855ae56899d700e8b3f38e904fd80e2f3 (diff) |
QQuickTableViewPrivate::modelIndexAtCell(): print count when asserting
It's not useful to know the modelIndex without the count that it
exceeded. Also, print the names of the variables.
Change-Id: I97d83dad3980fa0fc3d85759a2adfb2b723a6ce1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquicktableview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index 82e4ed933e..0485f7c7b8 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -148,7 +148,8 @@ int QQuickTableViewPrivate::modelIndexAtCell(const QPoint &cell) const { int availableRows = tableSize.height(); int modelIndex = cell.y() + (cell.x() * availableRows); - Q_TABLEVIEW_ASSERT(modelIndex < model->count(), modelIndex << cell); + Q_TABLEVIEW_ASSERT(modelIndex < model->count(), + "modelIndex:" << modelIndex << "cell:" << cell << "count:" << model->count()); return modelIndex; } |