Commit 27d34cd0 authored by Eike Ziller's avatar Eike Ziller
Browse files

Fix that locator filters filter did not show entries with same prefix

When setting filters to the same prefix, only one of them was shown in the
locator filters filter (i.e. the in the first entries shown when opening
locator without any input).

Change-Id: If409b5d4292d865318747f2a09610652a80757ca
Reviewed-by: default avatarDavid Schulz <>
parent 7b1c4d65
......@@ -33,6 +33,7 @@
#include "locatorwidget.h"
#include <coreplugin/coreconstants.h>
#include <utils/qtcassert.h>
using namespace Core;
using namespace Core::Internal;
......@@ -83,7 +84,7 @@ QList<LocatorFilterEntry> LocatorFiltersFilter::matchesFor(QFutureInterface<Loca
LocatorFilterEntry filterEntry(this,,,
filterEntry.extraInfo =;
......@@ -93,7 +94,10 @@ QList<LocatorFilterEntry> LocatorFiltersFilter::matchesFor(QFutureInterface<Loca
void LocatorFiltersFilter::accept(LocatorFilterEntry selection) const
const QString shortcutString = selection.internalData.toString();
bool ok;
int index = selection.internalData.toInt(&ok);
QTC_ASSERT(ok && index >= 0 && index < m_filterShortcutStrings.size(), return);
const QString shortcutString =;
if (!shortcutString.isEmpty())
m_locatorWidget->show(shortcutString + QLatin1Char(' '),
shortcutString.length() + 1);
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