CMakeProjectManager: Remote-ify CMakeFileCompletionAssist implementation

Change-Id: I18aa3d23244dd6475657f43bc18ce83298e278bf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
hjk
2023-09-14 13:23:37 +02:00
parent 726f2730e7
commit efb93d1366

View File

@@ -13,8 +13,6 @@
#include <texteditor/codeassist/assistinterface.h> #include <texteditor/codeassist/assistinterface.h>
#include <QFileInfo>
using namespace TextEditor; using namespace TextEditor;
using namespace ProjectExplorer; using namespace ProjectExplorer;
@@ -39,7 +37,7 @@ IAssistProposal *CMakeFileCompletionAssist::performAsync()
{ {
Keywords kw; Keywords kw;
const Utils::FilePath &filePath = interface()->filePath(); const Utils::FilePath &filePath = interface()->filePath();
if (!filePath.isEmpty() && filePath.toFileInfo().isFile()) { if (!filePath.isEmpty() && filePath.isFile()) {
Project *p = ProjectManager::projectForFile(filePath); Project *p = ProjectManager::projectForFile(filePath);
if (p && p->activeTarget()) { if (p && p->activeTarget()) {
CMakeTool *cmake = CMakeKitAspect::cmakeTool(p->activeTarget()->kit()); CMakeTool *cmake = CMakeKitAspect::cmakeTool(p->activeTarget()->kit());