Commit ef07e39c authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Use filter on display and type names

The filter was applied just to the display names which
was confusing. We use the display and typ name with this patch.

Task-number: QTCREATORBUG-19054
Change-Id: I5671d8d615bbb89d3a46a76fd45f88d0f76c8557
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Mitch Curtis's avatarMitch Curtis <mitch.curtis@qt.io>
parent 32e444d9
......@@ -42,6 +42,11 @@ QString ItemLibraryItem::itemName() const
return m_itemLibraryEntry.name();
}
QString ItemLibraryItem::typeName() const
{
return QString::fromUtf8(m_itemLibraryEntry.typeName());
}
QString ItemLibraryItem::itemLibraryIconPath() const
{
//Prepend image provider prefix
......
......@@ -48,6 +48,7 @@ public:
~ItemLibraryItem();
QString itemName() const;
QString typeName() const;
QString itemLibraryIconPath() const;
bool setVisible(bool isVisible);
......
......@@ -75,7 +75,8 @@ bool ItemLibrarySection::updateSectionVisibility(const QString &searchText, bool
*changed = false;
foreach(ItemLibraryItem *itemLibraryItem, m_sectionEntries.items()) {
bool itemVisible = itemLibraryItem->itemName().toLower().contains(searchText);
bool itemVisible = itemLibraryItem->itemName().toLower().contains(searchText)
|| itemLibraryItem->typeName().toLower().contains(searchText);
bool itemChanged = itemLibraryItem->setVisible(itemVisible);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment