CMakeProjectManager: Do not use dynamic allocation for CMakeTool

ammends 87197be604

Change-Id: I600c0c26b3301607360f93ff6075f7c7d4a1b438
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Cristian Adam
2021-02-05 14:38:41 +01:00
parent 87197be604
commit a8db7721eb

View File

@@ -144,14 +144,14 @@ public:
m_pathIsFile = fi.isFile();
m_pathIsExecutable = fi.isExecutable();
auto cmake = std::make_unique<CMakeTool>(m_autodetected ? CMakeTool::AutoDetection
: CMakeTool::ManualDetection, m_id);
cmake->setFilePath(m_executable);
m_isSupported = cmake->hasFileApi();
CMakeTool cmake(m_autodetected ? CMakeTool::AutoDetection
: CMakeTool::ManualDetection, m_id);
cmake.setFilePath(m_executable);
m_isSupported = cmake.hasFileApi();
m_tooltip = tr("Version: %1<br>Supports fileApi: %2")
.arg(QString::fromUtf8(cmake->version().fullVersion))
.arg(cmake->hasFileApi() ? tr("yes") : tr("no"));
.arg(QString::fromUtf8(cmake.version().fullVersion))
.arg(cmake.hasFileApi() ? tr("yes") : tr("no"));
}
CMakeToolTreeItem() = default;