forked from qt-creator/qt-creator
LocatorWidget: Turn the new LocatorMatcher implementation on by default
Change-Id: Id9dab7ff68a710a8406879ecf4658cfb09e8f76e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -54,7 +54,11 @@ const int LocatorEntryRole = int(HighlightingItemRole::User);
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
static bool isUsingLocatorMatcher() { return qtcEnvironmentVariableIsSet("QTC_USE_MATCHER"); }
|
||||
static bool isUsingLocatorMatcher()
|
||||
{
|
||||
const QString value = qtcEnvironmentVariable("QTC_USE_MATCHER", "").toLower();
|
||||
return !(value == "false" || value == "off");
|
||||
}
|
||||
|
||||
bool LocatorWidget::m_shuttingDown = false;
|
||||
QFuture<void> LocatorWidget::m_sharedFuture;
|
||||
@@ -975,11 +979,13 @@ static void printMatcherInfo()
|
||||
static bool printed = false;
|
||||
if (printed)
|
||||
return;
|
||||
if (isUsingLocatorMatcher())
|
||||
qDebug() << "QTC_USE_MATCHER env var set, using new LocatorMatcher implementation.";
|
||||
else
|
||||
qDebug() << "QTC_USE_MATCHER env var not set, using old matchesFor implementation.";
|
||||
printed = true;
|
||||
if (isUsingLocatorMatcher()) {
|
||||
qDebug() << "Using the new LocatorMatcher implementation (default). In order to switch "
|
||||
"back to the old implementation, set QTC_USE_MATCHER=FALSE env var.";
|
||||
return;
|
||||
}
|
||||
qDebug() << "QTC_USE_MATCHER env var set to FALSE, using the old matchesFor implementation.";
|
||||
}
|
||||
|
||||
void LocatorWidget::updateCompletionList(const QString &text)
|
||||
|
||||
Reference in New Issue
Block a user