diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index bc37572a3d3..9f723d70c30 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -114,7 +114,7 @@ void DebuggerKitInformation::setup(Kit *k) // This improves the situation a bit if a cross-compilation tool chain has the // same ABI as the host. if (level == DebuggerItem::MatchesPerfectly - && systemEnvironment.path().contains(item.command().parentDir().toString())) { + && systemEnvironment.path().contains(item.command().parentDir())) { level = DebuggerItem::MatchesPerfectlyInPath; } } else if (rawId.type() == QVariant::String) { diff --git a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp index 07455b9bcad..94f3efcbe78 100644 --- a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp +++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp @@ -104,7 +104,7 @@ void QmakeKitInformation::setup(Kit *k) const Environment systemEnvironment = Environment::systemEnvironment(); ToolChain *bestTc = Utils::findOrDefault(goodTcs, [&systemEnvironment](const ToolChain *t) { - return systemEnvironment.path().contains(t->compilerCommand().parentDir().toString()); + return systemEnvironment.path().contains(t->compilerCommand().parentDir()); }); if (!bestTc) { bestTc = goodTcs.isEmpty() ? possibleTcs.last() : goodTcs.last();