diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-10-20 11:12:01 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-10-20 10:08:01 +0000 |
commit | e652865365814e11dedfb4a3358ce3631ce08266 (patch) | |
tree | 062eaa716a1d43ed3b0d201ff59f55e699e931d7 | |
parent | 9dadffd99759b19c598ca93bfcecf13d21432df3 (diff) | |
download | qt-creator-e652865365814e11dedfb4a3358ce3631ce08266.tar.gz |
Fix line number handling for file based locator filters
We need to create the regular expression based on the split off file
name, not the whole search term.
Task-number: QTCREATORBUG-19129
Change-Id: I4df375e992ce2b9a64a9c8f2c12b953f66a9444e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r-- | src/plugins/coreplugin/locator/basefilefilter.cpp | 2 | ||||
-rw-r--r-- | src/plugins/coreplugin/locator/opendocumentsfilter.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/locator/basefilefilter.cpp b/src/plugins/coreplugin/locator/basefilefilter.cpp index 26db4474cc..31b23a916f 100644 --- a/src/plugins/coreplugin/locator/basefilefilter.cpp +++ b/src/plugins/coreplugin/locator/basefilefilter.cpp @@ -100,7 +100,7 @@ QList<LocatorFilterEntry> BaseFileFilter::matchesFor(QFutureInterface<LocatorFil const QString entry = QDir::fromNativeSeparators(origEntry); const EditorManager::FilePathInfo fp = EditorManager::splitLineAndColumnNumber(entry); - const QRegularExpression regexp = createRegExp(entry); + const QRegularExpression regexp = createRegExp(fp.filePath); if (!regexp.isValid()) { d->m_current.clear(); // free memory return betterEntries; diff --git a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp index 8a7c6718f8..aacf80e88a 100644 --- a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp +++ b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp @@ -61,7 +61,7 @@ QList<LocatorFilterEntry> OpenDocumentsFilter::matchesFor(QFutureInterface<Locat QList<LocatorFilterEntry> betterEntries; const EditorManager::FilePathInfo fp = EditorManager::splitLineAndColumnNumber(entry); - const QRegularExpression regexp = createRegExp(entry); + const QRegularExpression regexp = createRegExp(fp.filePath); if (!regexp.isValid()) return goodEntries; |