forked from qt-creator/qt-creator
CMakePM: Show link for Ctrl + mouse for functions/macros in editor
Amends 4d358ae337
Change-Id: I7f89a1c2e4a32ec8944995074d0198e960a9d798
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -210,8 +210,12 @@ void CMakeEditorWidget::findLinkAt(const QTextCursor &cursor,
|
|||||||
|
|
||||||
// Check if the symbols is a user defined function or macro
|
// Check if the symbols is a user defined function or macro
|
||||||
const CMakeBuildSystem *cbs = static_cast<const CMakeBuildSystem *>(bs);
|
const CMakeBuildSystem *cbs = static_cast<const CMakeBuildSystem *>(bs);
|
||||||
if (cbs->cmakeSymbolsHash().contains(buffer))
|
if (cbs->cmakeSymbolsHash().contains(buffer)) {
|
||||||
return processLinkCallback(cbs->cmakeSymbolsHash().value(buffer));
|
link = cbs->cmakeSymbolsHash().value(buffer);
|
||||||
|
link.linkTextStart = cursor.position() - column + beginPos + 1;
|
||||||
|
link.linkTextEnd = cursor.position() - column + endPos;
|
||||||
|
return processLinkCallback(link);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Resolve more variables
|
// TODO: Resolve more variables
|
||||||
|
|||||||
Reference in New Issue
Block a user