CMakePM: Fix location for the junctions folder

Change-Id: If8228304e364e7af85be534589a6101e18741bfa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Christian Stenger
2025-01-22 13:56:59 +01:00
parent 0855a2e14d
commit 39ba32fb60

View File

@@ -580,10 +580,12 @@ void Internal::setupCMakeToolManager(QObject *guard)
CMakeToolManagerPrivate::CMakeToolManagerPrivate()
{
if (HostOsInfo::isWindowsHost()) {
const QStringList locations = QStandardPaths::standardLocations(
QStringList locations = QStandardPaths::standardLocations(
QStandardPaths::GenericConfigLocation);
m_junctionsDir = FilePath::fromString(*std::min_element(locations.begin(), locations.end()))
.pathAppended("QtCreator/Links");
Utils::sort(locations, [](const QString &lhs, const QString &rhs) {
return lhs.length() < rhs.length();
});
m_junctionsDir = FilePath::fromString(locations.first()).pathAppended("QtCreator/Links");
auto project = ProjectManager::startupProject();
auto environment = Environment::systemEnvironment();