diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-26 01:00:11 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-04-09 10:08:41 +0200 |
commit | 2812184e1bb87cd94d2989162bc6ea954bb585c4 (patch) | |
tree | 25460548730e2ddc1f6f328d54e97d3fbfb49d21 /src/quick/items/qquicktableview.cpp | |
parent | cd4a99a7ba92968bf88da9af2624bb738d71e726 (diff) | |
parent | bf205b45a29ba80d94df3b6bac5fec4c7cd79bf9 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/qml/jsruntime/qv4executablecompilationunit.cpp
src/qml/jsruntime/qv4executablecompilationunit_p.h
src/qml/qml/qqmlobjectcreator.cpp
src/qml/qml/qqmlpropertycachecreator_p.h
src/qml/qml/qqmltypecompiler.cpp
src/qml/qml/qqmltypedata.cpp
tests/auto/qml/qmlformat/tst_qmlformat.cpp
tools/qmllint/scopetree.cpp
src/qml/qml/qqmlapplicationengine_p.h
Adjusted tools/qmllint/findunqualified.cpp to use newer API
Change-Id: Ibfb4678ca39d626d47527265e3c96e43313873d4
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
-rw-r--r-- | src/quick/items/qquicktableview.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index 3548d20706..5adfd20bf0 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ @@ -193,8 +193,10 @@ \qmlproperty int QtQuick::TableView::rows \readonly - This property holds the number of rows in the table. This is - equal to the number of rows in the model. + This property holds the number of rows in the table. + + \note \a rows is usually equal to the number of rows in the model, but can + temporarily differ until all pending model changes have been processed. This property is read only. */ @@ -203,9 +205,12 @@ \qmlproperty int QtQuick::TableView::columns \readonly - This property holds the number of columns in the table. This is - equal to the number of columns in the model. If the model is - a list, columns will be \c 1. + This property holds the number of rows in the table. + + \note \a columns is usually equal to the number of columns in the model, but + can temporarily differ until all pending model changes have been processed. + + If the model is a list, columns will be \c 1. This property is read only. */ @@ -549,6 +554,8 @@ QQuickTableViewPrivate::~QQuickTableViewPrivate() QString QQuickTableViewPrivate::tableLayoutToString() const { + if (loadedItems.isEmpty()) + return QLatin1String("table is empty!"); return QString(QLatin1String("table cells: (%1,%2) -> (%3,%4), item count: %5, table rect: %6,%7 x %8,%9")) .arg(leftColumn()).arg(topRow()) .arg(rightColumn()).arg(bottomRow()) |