Commit Graph

24 Commits

Author SHA1 Message Date
Cristian Adam
968051eb72 CMakePM: Presets: Add ability to register a Debugger via "vendor" field
This adds "Debugger" as a dependency for the CMake Project Manager.

The "vendor" field of a configurePreset can look like:

```
      "vendor": {
        "qt.io/QtCreator/1.0": {
          "debugger": "C:/Qt/Tools/mingw1120_64/bin/gdb.exe"
          }
        }
      }
```

or with all the DebugItem details as:

```
      "vendor": {
        "qt.io/QtCreator/1.0": {
          "debugger": {
            "DisplayName": "GNU gdb 11.2.0 for MinGW 11.2.0 64-bit",
            "Abis": ["x86-windows-msys-pe-64bit"],
            "Binary": "C:/Qt/Tools/mingw1120_64/bin/gdb.exe",
            "EngineType": 1,
            "Version": "11.2.0"
          }
        }
      }
```

Fixes: QTCREATORBUG-30836
Change-Id: Ia89ff29ce5fad713ee8617477ec798bd86f2f811
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-29 15:47:10 +00:00
Cristian Adam
1a5f61adca CMakePM: Set CMakePM project settings via CMakePresets's vendor field
The field name is "qt.io/QtCreator/1.0":

```
  "vendor": {
    "qt.io/QtCreator/1.0": {
       "AskBeforePresetsReload": false,
       "AskReConfigureInitialParams": false,
       "AutorunCMake": false,
       "PackageManagerAutoSetup": false,
       "ShowAdvancedOptionsByDefault": true,
       "ShowSourceSubFolders": false,
       "UseJunctionsForSourceAndBuildDirectories": true
    }
  }
```

Fixes: QTCREATORBUG-25972
Fixes: QTCREATORBUG-29559
Fixes: QTCREATORBUG-30385
Change-Id: Ifac0d10eebda85f8d97e7a1387325a555101ea6d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-28 17:19:27 +00:00
Cristian Adam
69815af272 CMakePM: clang-tidy fix for 'performance-implicit-conversion-in-loop'
Change-Id: I67e5adad19a3454986381c5548bbe96cf1cc1e6a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-20 13:57:28 +00:00
Eike Ziller
a253a2aa95 Tr: Fix lupdate issues
Add missing `Tr::` and use some fully qualified namespaces where lupdate
fails to resolve it correctly.

Change-Id: Ied4ac7bf0438a9080d0b76a9a1f5033dbc94a163
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-18 11:21:52 +00:00
Cristian Adam
6235d9b8cc CMakePM: use string form for architecture / toolset preset fields
Documentation mentions:

"Each may be either a string or an object" and "If no strategy field is
given, or if the field uses the string form rather than the object form,
the behavior is the same as 'set'"

Task-number: QTCREATORBUG-28693
Change-Id: Idd8cdffb94e9a943e0b133a63c628d9d8d54eb20
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-07-05 13:28:28 +00:00
Eike Ziller
7724f8653f Merge remote-tracking branch 'origin/10.0'
Change-Id: I7a3925ad8e4f97461b64a70217102ed900430253
2023-05-05 10:39:47 +02:00
Cristian Adam
3aec6b776c CMakePM: Fix presets condition with a const value
Fixes: QTCREATORBUG-29077
Change-Id: If1ebaa22c07eaa39fb8d4f24c33f26249f17d793
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-27 09:50:24 +00:00
Eike Ziller
fd93ad897f Merge remote-tracking branch 'origin/10.0'
Change-Id: I02df4ad5e4a074f572cd6dd33551864e7c82f51c
2023-04-26 11:07:54 +02:00
Cristian Adam
fa5c352668 CMakePM: Fix boolean cacheVariables parsing
Fixes: QTCREATORBUG-29078
Change-Id: I652343d6d688e36b6d5ecc23e91243b4cecbb87d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-25 12:21:54 +00:00
hjk
2766b4004b Utils: Continue Environment/EnvironmentChange consolidation
Make Environment a stack of changes that gets "expanded" to
a full environment before things are actively accessed.

Later this expansion should be done lazily if possible.

Task-number: QTCREATORBUG-28357
Change-Id: If1c7bfdb9f58b81e71c51ed87ee75d6964a47019
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-24 07:45:35 +00:00
Eike Ziller
0d8d4322b4 Merge remote-tracking branch 'origin/10.0'
Change-Id: Ie591b7130b33a042509e56701384f8ff4d9cb7f8
2023-03-16 11:57:01 +01:00
Cristian Adam
15e1a64764 CMakePM: Add include presets support
Fixes: QTCREATORBUG-28894
Change-Id: I9359cb85c230f2db02f08427af9832f168a32c41
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-03-14 14:47:28 +00:00
hjk
34fd28327d CMake: Use callback-based environment iteration
Hides underlying data structure.

Task-number: QTCREATORBUG-28357
Change-Id: Ib0d7fb70afa820b1bd28d23e12b9379a6de6546b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-03 14:05:07 +00:00
Eike Ziller
379bf65e96 Some fixes in translated strings
- doesn't make sense to translate "%1"
- showPreprocessedFile: "reason" contains full stop, put at the end
- add missing closing >
- remove whitespace at the end of translated string
- added missing quotes and full stops
- Remove some control text from tr

Change-Id: I5537c3d12d038e25e2209af1198129fbf959b43c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-02-15 12:45:48 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
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