Commit Graph

9 Commits

Author SHA1 Message Date
Marcus Tillmanns
eca7044361 Utils: Add std::expected implementation
Adds a std::expected implementation that is compatible with >= C++11.

FilePath::fileContents and FilePath::writeFileContents as well as
FilePath::copyFile are changed to return std::expected.

A couple of macros have been added to aid in using the expected types.

An auto test was added showing how to use the library.

Change-Id: Ibe3aecfc1029a0cf13b45bf5184ff03a04a2393b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-14 10:39:29 +00:00
Cristian Adam
fb94873765 CMakePM: Use Utils::Environment for Presets environment
Utils::Environment takes care of the case insesitivity of the key of
environment variables on Windows.

Change-Id: I624340d30c6b170b5d0a86791f26a4841a0b2fb7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 20:56:15 +00:00
Cristian Adam
869597884d CMakePM: Merge cacheVariables, environment for inherited presets
cacheVariables, environment (and others) collection fields need to be
merged when having inherited presets.

Fixes: QTCREATORBUG-28360
Change-Id: I3d2b84355fad9ffa2dc4629ece7d42f7b482a859
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 20:54:49 +00:00
Cristian Adam
bf83f63a13 CMakePM: Add installDir CMakePresets support
Is part of CMakePrests v3, and slipped at the implementation time.

Task-number: QTCREATORBUG-24555
Change-Id: Id3ce90c0a979d44287fc03ae1dd49a64e964cdf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-21 13:09:35 +00:00
Cristian Adam
ee4c998ff3 CMakePM: Add supprot for CMakePresets version 3
This includes Condition and toolchainFile

https://cmake.org/cmake/help/v3.21/manual/cmake-presets.7.html

Task-number: QTCREATORBUG-24555
Change-Id: I1026390af67b2be1aa0c3b02b654fc19442d3c89
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-30 08:34:07 +00:00
hjk
ab4c9b9679 CMake: Move to Tr::tr
Change-Id: I169da93b5184351cb915d4c198fd33318fcfe06f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-30 06:56:21 +00:00
hjk
55ed34ced8 CMakeProjectManager: Use QList in PresetsData
Less impedance when interfacing the rest of the code.

Fixes

     warning: comparison of integer expressions of different signedness:
     ‘std::vector<....>::size_type’ {aka ‘long unsigned int’} and
     ‘qsizetype’ {aka ‘long long int’} [-Wsign-compare]

Change-Id: If5e1e770e2ed170aa4259963fa7ca0d6642190d9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-09-29 10:44:34 +00:00
Cristian Adam
e02f4a0518 CMakePM: Add support for build CMake presets
This patchset will add support for version 2 of the CMakePresets
feature that has been implemented in CMake 3.20

https://cmake.org/cmake/help/v3.20/manual/cmake-presets.7.html

Task-number: QTCREATORBUG-24555
Change-Id: I08934243cc04487d38c4b59c2ad4a4a8d0484492
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-28 21:24:53 +00:00
Cristian Adam
2ab1e76ca9 CMakePM: Add support for configure CMake presets
This patchset will add support for version 1 of the CMakePresets
feature that has been implemented in CMake 3.19

https://cmake.org/cmake/help/v3.19/manual/cmake-presets.7.html

The tests/manual/cmakepresets contains a manual test example for this
feature.

Task-number: QTCREATORBUG-24555
Change-Id: I93aba1ab4f090613d0b21d970b5b651d12c922af
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-14 11:50:49 +00:00