diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-06-23 12:30:10 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-07-18 07:25:54 +0000 |
commit | 3d9a59b4329cd6f4af6f5e65bc59f8ff28180eec (patch) | |
tree | edb02d4cb83e86b7599befc720ce1f4bf06ebffd /src/qml/types | |
parent | e6f6c4aee6951a2c8f00ac628cea544a61e9021c (diff) |
QQmlDelegateModel: remove unused m_useFirstColumnOnly
This variable will no longer be used once QQuickTableView
starts to use the new QQmlTableInstanceModel.
Change-Id: I0a4df2b3ce16868105426dac79a8f506fe353cea
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 7aba0689d1..cdd336006f 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -213,7 +213,6 @@ QQmlDelegateModelPrivate::QQmlDelegateModelPrivate(QQmlContext *ctxt) , m_transaction(false) , m_incubatorCleanupScheduled(false) , m_waitingToFetchMore(false) - , m_useFirstColumnOnly(true) , m_cacheItems(nullptr) , m_items(nullptr) , m_persistedItems(nullptr) @@ -230,7 +229,10 @@ QQmlDelegateModelPrivate::~QQmlDelegateModelPrivate() int QQmlDelegateModelPrivate::adaptorModelCount() const { - return m_useFirstColumnOnly ? m_adaptorModel.rowCount() : m_adaptorModel.count(); + // QQmlDelegateModel currently only support list models. + // So even if a model is a table model, only the first + // column will be used. + return m_adaptorModel.rowCount(); } void QQmlDelegateModelPrivate::requestMoreIfNecessary() |