From ed8677b3915a1955f2df6221c4535de1bd411076 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 23 Jun 2014 16:01:48 +0200 Subject: [PATCH] QmlDesigner: Always show all items in section model Change-Id: Iad0ee5e39553c9cb778bfd5673378af84063f4af Reviewed-by: Tim Jenssen --- .../components/itemlibrary/itemlibrarysectionmodel.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp index ff768aa0858..9b5a2fadd26 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp @@ -46,24 +46,23 @@ ItemLibrarySectionModel::~ItemLibrarySectionModel() int ItemLibrarySectionModel::rowCount(const QModelIndex &) const { - return visibleItemCount(); + return m_itemList.count(); } QVariant ItemLibrarySectionModel::data(const QModelIndex &index, int role) const { - if (!index.isValid() || index.row() + 1 > visibleItemCount()) { + if (!index.isValid() || index.row() + 1 > m_itemList.count()) { qDebug() << Q_FUNC_INFO << "invalid index requested"; return QVariant(); } if (m_roleNames.contains(role)) { - QList visibleItemList = visibleItems(); - QVariant value = visibleItemList.at(index.row())->property(m_roleNames.value(role)); + QVariant value = m_itemList.at(index.row())->property(m_roleNames.value(role)); if (ItemLibrarySectionModel* model = qobject_cast(value.value())) return QVariant::fromValue(model); - return visibleItemList.at(index.row())->property(m_roleNames.value(role)); + return m_itemList.at(index.row())->property(m_roleNames.value(role)); } qWarning() << Q_FUNC_INFO << "invalid role requested";