diff options
author | Christian Stenger <christian.stenger@qt.io> | 2023-02-08 09:27:27 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2023-02-08 12:21:40 +0000 |
commit | 06b579a75be7924462a3cdfe9ecb8e60b3e01524 (patch) | |
tree | e49649e4892b1ac30512d7b638e8d16a89af6c6b | |
parent | ac252c2d49c6afb2a0f9faac4ffbf2f58e736ce9 (diff) | |
download | qt-creator-06b579a75be7924462a3cdfe9ecb8e60b3e01524.tar.gz |
McuSupport: Fix handling of FilePath
..when expanding variables and macros.
Fixes the plugin unit test on Windows.
Fixes: QTCREATORBUG-28744
Change-Id: I8a047854d6d43e901b01b10660e29b7d6544d0b7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r-- | src/plugins/mcusupport/mcusupportoptions.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index e66c87ff5e..474314b6a6 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -113,8 +113,7 @@ void McuSdkRepository::expandVariablesAndWildcards() } // drop empty_split_entry(linux)|root(windows) QString root = pathComponents.takeFirst(); - if (root.isEmpty()) // Linux - root = "/"; + root.append('/'); // ensure we have a path (UNIX just a '/', Windows 'C:/' or similar) package->setPath( expandWildcards(FilePath::fromString(root), |