Commit Graph

3443 Commits

Author SHA1 Message Date
Cristian Adam
c0dfb3ce57 CMakePM: Hide QML clutter project files
Hide some of the QML files that we not marked as generated by the Qt QML
CMake code

Fixes: QTCREATORBUG-29631
Change-Id: I01fb571c0c3ff7d8a3861ddaaf7c6d6817c8cc51
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-04-18 13:14:17 +00:00
Cristian Adam
01538332da CMakePM: Treat all default CMake source groups as …
… "Header|Sources Files" groups
Amends f76e0de7bc

Change-Id: I5e19427a481e87fb4d9761e3fad1727df52ca28b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-18 10:16:24 +00:00
Eike Ziller
0fe7350368 Merge remote-tracking branch 'origin/13.0'
Change-Id: I0892d8e54930bb5a65dc51117b8ca7d70ce300a3
2024-04-17 13:29:02 +02:00
Cristian Adam
fa29657881 CMakePM: Rename source files in set_source_files_properties calls
Fixes: QTCREATORBUG-30174
Change-Id: I80b33c1193f4cd579abd295657dc223aad5801ea
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-16 09:16:18 +00:00
Cristian Adam
f76e0de7bc CMakePM: Do not show subfolders for custom source_groups
CMake does have a few default source groups (cmMakefile.cxx):
  this->AddSourceGroup("", "^.*$");
  this->AddSourceGroup("Source Files", CM_SOURCE_REGEX);
  this->AddSourceGroup("Header Files", CM_HEADER_REGEX);
  this->AddSourceGroup("Precompile Header File", CM_PCH_REGEX);
  this->AddSourceGroup("CMake Rules", "\\.rule$");
  this->AddSourceGroup("Resources", CM_RESOURCE_REGEX);
  this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$");

This commit will get Qt Creator to display the actual subfolder
structure only if the CMake setting "Show subfolders inside source group
folders" is set and for "Source Files" and "Header Files" source groups.

Any other source group or a custom source group defined by `source_group`
will not get this treatment, since this what the oder IDEs (e.g. Visual
Studio) and what the users expect to have.

Task-number: QTCREATORBUG-27432
Fixes: QTCREATORBUG-30620
Change-Id: I3c30814df2f76d18ee5fd4fd1356d4dfc4b9b09b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-04-15 13:08:40 +00:00
Cristian Adam
4a95a2d63d Revert CMakePM: Treat all sourceGroups as sourcesOrHeaders project nodes
This reverts commit 973e9dcf90.

Fixes: QTCREATORBUG-30602
Change-Id: I9db6dc6d3fbd7d9a5e48a25bca725a4f86124318
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-15 13:08:30 +00:00
Eike Ziller
310d3cc041 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/remotelinux/linuxdevice.cpp

Change-Id: Iad28a1bfa4632922931d351d2fe27757cf21dec3
2024-04-15 08:33:39 +02:00
hjk
abd538507a ProjectExplorer: Make settings access more direct
A step towards aspectification.

Change-Id: Iabf5e56e993449dc482d1d2ab6eeb2885243ab3e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-04-12 11:48:29 +00:00
Sami Shalayel
1e3750c5be qmlls: add checkbox for generating qmlls ini files
Add a checkbox to the qmljseditingsettingspage that generates qmlls
ini files by default for new projects.

If this checkbox is checked, then initial CMake configurations (when
enabling a kit for a project) and reconfigurations (when pressing the
"Re-configure with Initial parameters"-button) will set
QT_QML_GENERATE_QMLLS_INI to ON if QT_QML_GENERATE_QMLLS_INI was not
set yet.

Fixes: QTCREATORBUG-30394
Change-Id: I58f89558d25ef107e501bd67702f26554bd6aeaa
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-04-11 07:22:20 +00:00
Cristian Adam
ac97ab1abf CMakePM: Add build artifacts to the PATH env variable
Projects that have dll artifacts need to have the build paths added to
PATH so that the dependent executables would start.

Previously the code checked only if the dlls were present on disk, now
it also checks if the dlls are part of the project's build artifacts.

Fixes: QTCREATORBUG-30644
Change-Id: I924753ffaf0a9720acb70585ccd589abab1b9cc1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-04-09 12:59:15 +00:00
David Schulz
411100b037 TextEditor: remove text editor action handler
Give each editor a context and register editor actions individually for
that context. This removes the need to tell the action handler the
current editor. Additionally all actions are now available in editor
widgets outside of the EditorManager.

Change-Id: I0109866b180889762f8bd8aa07874d8d7c55bfa6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-09 10:52:26 +00:00
Marcus Tillmanns
0e30918955 CMake: Add hint about additional error messages
Change-Id: I1eaeacb1fe67d534209ecef5a01fe6d41caddb62
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-04-04 05:37:23 +00:00
Marcus Tillmanns
cb29aeff50 CMake: Don't ignore writable test
Change-Id: I49ba7a14f26eca0575b38a634124be5e53c0134f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-04-04 05:37:18 +00:00
Marcus Tillmanns
24511d755f CMake: Add hint about missing docker mounts
Change-Id: Id046496b1c9907dfdfedb36c6bec1b121428f37a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-04-04 05:37:11 +00:00
Eike Ziller
90e1d96019 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc
	qbs/modules/qtc/qtc.qbs
	src/plugins/remotelinux/linuxdevicetester.cpp

Change-Id: I8434e41dcfbb50f6ed032a3e0af1591eb19b79eb
2024-03-20 15:05:58 +01:00
Cristian Adam
2c598814bb CMakePM: Always set the comiplers from the CMake Preset probe
In cases when a CMake project is using a CMake preset with a toolchain
file, the CMAKE_C|XX_COMIPLER value was not set in the CMakeCache.txt.

This commit makes sure that the cache from the CMake preset probe
contains CMAKE_C|XX_COMPILER values.

Task-number: QTCREATORBUG-30474
Change-Id: I63ac6fe2b043e49dda98e286b6d85950e34be920
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-18 11:56:18 +00:00
Eike Ziller
c19f97bd23 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/cmakeprojectmanager/cmaketool.cpp
	src/plugins/python/pythonutils.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: Ia3e35c763ff9475d17ad922718b54152209893b8
2024-03-14 11:35:07 +01:00
Cristian Adam
52c39d007f CMakePM: Do not crash with CMake presets and no CMake tool
If no CMake is found, show an error message (reusing an existing
translated string).

Fixes: QTCREATORBUG-30505
Change-Id: I6e3037ee97dfba21791191483fffab769a451125
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-13 12:32:54 +00:00
Cristian Adam
8713919f31 CMakePM: Fix dll path addition for MinGW
Amends 0d8a542b4f

Fixes: QTCREATORBUG-30529
Change-Id: Ic786f1e7075ef68cf9d590d27ef90b9d1e8631b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-12 21:37:48 +00:00
Marcus Tillmanns
4e8bdd610b Utils: Remove PresistentStoreCache
It turns out caching the information is unreliable due to a variety of reasons.
We remove the cache for now as its less dangerous than trying to fix each
use case.

Change-Id: I8238166486a2fb29c101f700af1c8d7e4ad7a172
Reviewed-by: hjk <hjk@qt.io>
2024-03-12 14:24:05 +00:00
Eike Ziller
1b97fdc100 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/debugger/gdb/gdbsettings.cpp
	src/plugins/perfprofiler/perfprofilerruncontrol.cpp

Change-Id: I0d5b914f9d9b5499920a5db484ef77af6ae748d5
2024-03-12 09:27:39 +01:00
Volodymyr Zibarov
5895ad5659 [cmake] Fix follow symbol for add_subdirectory to not jump to target
Skip targets list if function name is add_subdirectory

Fixes: QTCREATORBUG-30510
Change-Id: I8c601fb2134fc8a9b2814df01f6ec5eec380c51a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-03-11 09:00:51 +00:00
Eike Ziller
8abc95331f Merge remote-tracking branch 'origin/13.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/plugins/cppeditor/cppcodemodelsettings.cpp
	src/plugins/cppeditor/cppcodemodelsettings.h

Change-Id: I54937c39b06897a72a105e4e0a8b5f8a76c38e26
2024-03-06 15:10:15 +01:00
Cristian Adam
cf8a8974ed CMakePM: Suppress error message for valid build preset
Fixes: QTCREATORBUG-30373
Change-Id: I2e2ec83c0b14d188096ace61468435ccbd36d84b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-03-04 10:34:29 +00:00
Eike Ziller
832fde9e0e CMake: Exclude non-project CMake files from search
All the CMake files the belong to packages found with `find_package` are
part of the project tree, but we shouldn't include them when searching
through "files in the project".

Set listInProjects to false for these files.

Fixes: QTCREATORBUG-30372
Change-Id: If39d477f14dc3207f4e2dd66b2f3969811dbd863
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-03-04 09:01:02 +00:00
Eike Ziller
6c2df76737 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/android/androidsettingswidget.cpp

Change-Id: Ifcb16aa16c7bc2792de25d0ee7a22cf0e39a05f8
2024-02-29 12:44:58 +01:00
Cristian Adam
0d8a542b4f CMakePM: Only add paths with dlls to PATH
Skip adding object libraries paths to runtime PATH.
Also add only the paths that contain the dll files.

Fixes: QTCREATORBUG-29662
Change-Id: I58cd9b24c6c079b99ed51ae2ebd315a1aa195f04
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-28 18:33:37 +00:00
Eike Ziller
5af531cd39 Utils: Fix build with MSVC with C++20
Rename process.h back to qtcprocess.h

MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.

There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have

Simply use a name that doesn't conflict.

Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-28 08:09:05 +00:00
Leena Miettinen
0bcc5378e5 CMake: Fix setting label and tooltip
Change-Id: Ia5ca9472054ec366110086bf79f630c5716b83fb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-02-26 12:49:43 +00:00
Cristian Adam
2d7af40007 CMakePM: Consider envvar QTC_CMAKE_USE_JUNCTIONS
This envrionment variable can be set globally or locally for a project
via '.shared' configuration.

See https://doc.qt.io/qtcreator/creator-sharing-project-settings.html
for details.

Task-number: QTCREATORBUG-30385
Change-Id: Ie28caac8f4232678c5761b54ce370d1aeb139389
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-02-26 08:59:51 +00:00
Cristian Adam
c9208932d7 CMakePM: Don't show anything but CMake Preset Kits during initial configure
This is for projects that use CMake Presets, and matches the expectations of the users using CMake Presets.

The user can still enable a Kit from the left list of Kits, which is not filtered.

Amends 87c67fc6d7

Task-number: QTCREATORBUG-29535
Change-Id: If97eef867a687c877b1cbd08cd4537fe6459136f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-21 13:08:19 +00:00
Cristian Adam
7f1e16172a CMakePM: Traverse the whole inheritance tree for Presets
Regarding QTCREATORBUG-30288, before this change I was getting on macOS
presets for Linux and Windows.

Fixes: QTCREATORBUG-30236
Fixes: QTCREATORBUG-30288
Change-Id: I4772ab7d14dec857b68164d4c24e6e904f20c88b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-12 11:45:15 +00:00
Cristian Adam
87c67fc6d7 CMakePM: Only display CMake preset Kits in the project setup page
Fixes: QTCREATORBUG-29535
Change-Id: I87c16c24a8548efb4374af342947d342e19cc510
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-12 09:55:27 +00:00
Cristian Adam
7454f84901 CMakePM: When using presets only use presets for candidates
Since the CMake presets is built upon Imports, when loading the presets
it's better to only use the candidates from preset Kits and not any
matching Kit that could handle the build directory.

This makes working with CMake Presets a bit easier.

Task-number: QTCREATORBUG-29535
Change-Id: I895e2e9162763e4cf3af5cdef5c9d5b228211fab
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-02-08 17:36:22 +00:00
Cristian Adam
03c19e81ed CMakePM: Only overwrite Qt version for autodetected CMake versions
Amends b360776b1f

Change-Id: I6c52013096f156e05b647ca4c66d1b9bf16872c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-07 08:23:45 +00:00
David Schulz
42c8e82b4d CMakePM: fix optional check
Change-Id: I4145b1f29a63bd69fefb0385aff92c6a23939b5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-07 04:12:01 +00:00
Cristian Adam
86b6d852b4 CMakePM: Allow CMake peset kits refresh without configuring first
This allows the user to reload the presets kits after editing
CMakePresets.json without configuring the project first.

Fixes: QTCREATORBUG-30238
Change-Id: Id448dd8e821591f6357ec9618f114733c13a3121
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-06 18:23:51 +00:00
Jarek Kobus
8bcc78a044 Various plugins: Fix some more C++20 warnings about [=] captures
Change-Id: If20aac4320c84096a07d67cc137886638286acf8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-06 08:34:44 +00:00
Eike Ziller
220237d029 Merge remote-tracking branch 'origin/12.0' into 13.0
Conflicts:
	src/plugins/ios/iosdevice.cpp
	src/plugins/texteditor/bookmarkmanager.cpp

Change-Id: I92931f29c3992054dac84dbfa2dfc0c1bfb31430
2024-02-05 10:52:42 +01:00
Jarek Kobus
f96365194c CMakeToolManager: Fix compile warning about unused function
Amends e7e593b2f6

Change-Id: Ib1d1508294adb3d53a4aa445d00adc39bcc76bbd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-02-02 22:15:34 +00:00
Cristian Adam
e7e593b2f6 CMakePM: Use junctions for source/build dirs on Windows
This way we have fixed small (max 64 bytes) paths for CMake's configure
/ build / install steps.

This allows the user to have longer paths and still compile with MSVC /
GCC MinGW compilers.

Fixes: QTCREATORBUG-26786
Task-number: QTBUG-117413
Change-Id: I0cff6521626dd2ce78d0223d46f0b480e977d5c5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-02 18:51:47 +00:00
hjk
7997d92f0c Core: Add MenuBuilder::setIcon()
... and use it for the cmake formatter menu.

Change-Id: I19fa1c1446ce893ef1c87389848869c6cbfc678a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-02-01 09:02:47 +00:00
hjk
3fad1a21e5 CMake: Use a setup function for kit aspects
Some connects() in the CMakeToolManager ctor triggered accesses
to the s_instance there before it was assigned. Solve the issue
by moving the triggering code (CMakeKitAspect setup) out of the
class.

Change-Id: Ied0fc6b0b0eb87c29503ecb20e337289edecd203
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-30 14:07:38 +00:00
Cristian Adam
f00513835b CMakePM: Allow preset name changing for Reload CMake Presets
Fixes: QTCREATORBUG-30237
Change-Id: I9d2f90d9637b91845dfe0ab619c83ff60dbd986a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-01-30 11:00:26 +00:00
hjk
759ea7695f CMakeProjectManager: Fix action parameter order
Amends 8e071f6bd0.

Change-Id: Id8ef61f20891eac9b8a751aa8131ce6a9e83fadb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-30 09:55:48 +00:00
David Schulz
8b78eb2d22 CMake: report project issues if the CMakeKitAspect is irrelevant
This disables python kits when opening cmake projects in the target
setup page.

Change-Id: I205edd865c0eb6c499368f1d5e9f2c4b4bc8237a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-30 08:27:16 +00:00
Eike Ziller
30d048a256 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/cppeditor/cppfilesettingspage.cpp
	src/plugins/haskell/haskellplugin.h

Change-Id: I880693c2e4986853b7aa600a5b7d6c09ad14634e
2024-01-30 09:19:06 +01:00
hjk
8e071f6bd0 CMake: Use ActionBuilder for buildTargetContextAction
And remove now-empty CMakeProjectPluginPrivate class.

Change-Id: I2b0b28cddb84639a62f90ee1776674cc7808480f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-29 17:19:10 +00:00
hjk
d016ef67b3 CMake: Use setup functions for more plugin items
Change-Id: I48ff764248f29ef2a8f46757cba84705983c7740
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-29 16:33:49 +00:00
hjk
a615b236e5 CMake: Use a setup function for CMakeBuildConfigurationFactory
The class itself is still used by IosCMakeBuildConfigurationFactory.

Change-Id: I9fd979fc8e24c9f032b35c1f3444c28d06f86d0a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-29 16:29:53 +00:00