From ffbf089addcaab3e132f5dbb0685c1a46bd6d1ab Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 28 Jun 2018 09:19:42 +0200 Subject: 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 --- src/quick/items/qquicktableview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3