forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14'
Change-Id: I70504e096be620434f38cd990c593950da8b24ba
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
#include <texteditor/textmark.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/delegates.h>
|
||||
#include <utils/changeset.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -373,8 +374,13 @@ void QmlJSEditorWidget::updateUses()
|
||||
return;
|
||||
|
||||
QList<QTextEdit::ExtraSelection> selections;
|
||||
foreach (const SourceLocation &loc,
|
||||
m_qmlJsEditorDocument->semanticInfo().idLocations.value(wordUnderCursor())) {
|
||||
QList<SourceLocation> locations
|
||||
= m_qmlJsEditorDocument->semanticInfo().idLocations.value(wordUnderCursor());
|
||||
// code model may present the locations not in a document order
|
||||
Utils::sort(locations, [](const SourceLocation &lhs, const SourceLocation &rhs) {
|
||||
return lhs.begin() < rhs.begin();
|
||||
});
|
||||
for (const SourceLocation &loc : qAsConst(locations)) {
|
||||
if (! loc.isValid())
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user