Skip to content

Commit

Permalink
KitDetector: fix a crash
Browse files Browse the repository at this point in the history
In case a directory does not exist, previously the code crashed
(`$QTDIR/Tools` in our case).

Now it silently works.
  • Loading branch information
diegoiast committed Jan 18, 2025
1 parent df68a31 commit 9f38cd8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/ProjectManager/kitdetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ auto findQtVersions(bool unix_target, std::vector<ExtraPath> &detectedQt,
auto detectInstallToolchains = [unix_target, &detectedCompilers](std::filesystem::path dir) {
// we got something like: c:\Qt\6.7.2
auto tools_path = dir / "Tools";
if (!std::filesystem::is_directory(tools_path)) {
return;
}

for (const auto &subEntry : std::filesystem::directory_iterator(tools_path)) {
if (subEntry.is_directory()) {
Expand Down

0 comments on commit 9f38cd8

Please sign in to comment.