Commit Graph

17 Commits

Author SHA1 Message Date
Christian Stenger
95259ae79d CMakePM: Be more graceful regarding cmake tools
Otherwise we may easily lose registered tools if the device
is currently not available.
This happens e.g. if the docker daemon is not running.

Change-Id: I10156d749bf33d7d789c3fad78bf3acdf1f6fd74
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-10-04 10:59:21 +00:00
Alessandro Portale
fcf9537dc5 Various FilePath::fromString -> fromUserInput changes
Change-Id: Ic9c5e2f5c0375468651557f504b101572b72ac06
Reviewed-by: hjk <hjk@qt.io>
2021-09-23 16:28:54 +00:00
hjk
7c28c4f744 Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.

At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.

Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:34:10 +00:00
hjk
098e616512 CMake: Fix restoration of remote cmake tools
So far this only worked accidentally for cases where a local cmake
was available in a similar place.

Change-Id: I089d2774b3fde00cf369b5524bb98023b6f1aadb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 13:33:17 +00:00
Christian Stenger
b0e0b3ecda CMakePM: Use Utils::FilePath for accessing cmake tools
When storing the cmake tools we otherwise drop auto detected
ones when failing to access them locally.
This makes the cmake tools on docker devices persist on Windows
as long the docker daemon is running.

Change-Id: I5235cf00aff49359a2e20ddc1667bcbb99337092
Reviewed-by: hjk <hjk@qt.io>
2021-07-14 13:27:55 +00:00
Cristian Adam
3340fa88e4 CMakePM: Proper restore user saved CMake tools changes
If you had an auto detected CMake tool from the sdk you would
not be able to change the "Autorun CMake" state from ON to OFF
because the sdk value would always be used instead of the
user one.

Fixes: QTCREATORBUG-25911
Change-Id: Ibe3b393a2b9e4d397251018fda8a9508ad096791
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-28 08:07:42 +00:00
hjk
9e832e3fb9 CMake: Minor code cosmetic
Drop top-level static of consts, namespaces.

Change-Id: Ibc902e41278b78843a8f5aeced8321e76296ca1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:49:17 +00:00
hjk
8e352af0ec Core: Add a default parameter to various ICore::*path functions
Saves some code on the user side.

Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-04-27 06:52:05 +00:00
Eike Ziller
c1f90aeca2 ICore: Change some path API to use FilePath
Change-Id: Id841d6177206a021c9e606ce560b47d1ae6e52b9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-04-26 08:03:47 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Tobias Hunger
5350288e45 CMake: Fix includes all over the CMake plugin
Keep internals internal, remove some unnecessary includes, add
some that should have been there.

This reduces the number of files that get rebuild when working
on CMake internals from over 1000 to about 200.

This patch also moves some code around that ended up being
in the wrong file.

Change-Id: Icd7366ac760dc85031040720418fbb16336dce9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-20 10:05:24 +00:00
hjk
e109b731ad Utils: Rename FilePathList to simply FilePaths
The exact storage type does not really matter here.

Change-Id: Iefec40f0f5909c8e7ba3415db4a11962694e1b38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-12-18 08:43:18 +00:00
Alessandro Portale
89a02029b8 CMakeProjectManager: Make search for CMake in "ProgramFiles" more robust
Also search in "ProgramW6432", so that a 32-bit Qt Creator on a 64-bit
Windows can find a 64-bit CMake installation.

Change-Id: Ia02a8a3e2308fa0dfb422df6969c8313868d3ce6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-28 10:02:19 +00:00
Eike Ziller
ff503740ce Run CMake via canonical path instead of warning
Running CMake via a non-canonical path (including '..' in the path, or
via a symlink) can result in funny errors.

de6faa0f15 added a warning for that
condition. Unfortunately the auto-detection of CMake can return a path
to a symlink (e.g. for CMake from brew on macOS). Also it is helpful to
use a symlink to e.g. manage different CMake versions.

Instead of warning about the condition, and forcing the user to resolve
it manually, simply run CMake via its canonical path when actually
running it from Qt Creator.

Change-Id: I95623b45c5436a6d61c1419b7aba23e2a73a0650
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-08-12 12:54:28 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Tobias Hunger
ba70df8be7 CMakeTool: Fix reading from SDKtool file
Change-Id: Ie1efbfe579c8d41ffd0795deaa3ee3759938862b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-11 10:21:20 +00:00
Tobias Hunger
abc177efbc CMake: Use SettingsAccessor to read/write CMakeTools file
Change-Id: Idcb0d97c8ef4037ea97d8498f935f8631ca30bc5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-10 09:00:14 +00:00