diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-02-11 16:22:48 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-02-18 16:46:08 +0000 |
commit | d3deefc3a4306e5b8882c7388f2ef1684dc0d922 (patch) | |
tree | 1866a3a84ee3cb35c3f25b25f00f6683577fd9cb /src/plugins/qmljseditor | |
parent | fa5fdef6e1dcf22ec8896f9330068760091b044d (diff) |
Core: Streamline SearchResultWindow interface
That is, make SearchResultItem the one data type for adding search
results.
This will allow us to add additional properties to search results
without adding more and more parameters to a bunch of functions.
Change-Id: Ic2740477ae47449cee75caa2525727fe2b460f91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r-- | src/plugins/qmljseditor/qmljsfindreferences.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp index 05b45688bf4..4d4fe5c7b94 100644 --- a/src/plugins/qmljseditor/qmljsfindreferences.cpp +++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp @@ -1008,11 +1008,11 @@ void FindReferences::displayResults(int first, int last) } for (int index = first; index != last; ++index) { Usage result = m_watcher.future().resultAt(index); - m_currentSearch->addResult(result.path, - result.line, - result.lineText, - result.col, - result.len); + SearchResultItem item; + item.setFilePath(Utils::FilePath::fromString(result.path)); + item.setLineText(result.lineText); + item.setMainRange(result.line, result.col, result.len); + m_currentSearch->addResult(item); } } |