forked from qt-creator/qt-creator
move find usages to TextEditor
In preperation for supporting find usages by the language client plugin Task-number: QTCREATORBUG-21577 Change-Id: I7a6da3a9d53478c1d486e0ddc5829c9ea09a2a20 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -431,10 +431,13 @@ static void findRenameCallback(CppEditorWidget *widget,
|
||||
search->popup();
|
||||
}
|
||||
|
||||
void CppEditorWidget::findUsages()
|
||||
{
|
||||
findUsages(textCursor());
|
||||
}
|
||||
|
||||
void CppEditorWidget::findUsages(QTextCursor cursor)
|
||||
{
|
||||
if (cursor.isNull())
|
||||
cursor = textCursor();
|
||||
// 'this' in cursorInEditor is never used (and must never be used) asynchronously.
|
||||
const CppTools::CursorInEditor cursorInEditor{cursor, textDocument()->filePath(), this};
|
||||
QPointer<CppEditorWidget> cppEditorWidget = this;
|
||||
|
||||
Reference in New Issue
Block a user