Commit Graph

3443 Commits

Author SHA1 Message Date
Cristian Adam
e892a6224f CMakePM: Save document before doing file operations on the CMake
Fixes: QTCREATORBUG-29550
Change-Id: I5ec360a48adce0d51a7fbe1704c7d4a9125bd913
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-05 08:41:43 +00:00
hjk
a475632c66 Utils: Make TreeViews use setUniformRowHeights by default
When applicable, the flag makes a significant difference in
performacnce. However is easily forgotten in cases where it
is applicable, and cases where it is accidentally used are
easily spotted visually. So arguably, opt-out is a better
default than opt-in.

Change-Id: I88aeb05b42533ba4e23c39573a3ddd016343cd55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-05 07:24:21 +00:00
hjk
67212a31ee Utils: Cache theme icon access
These trigger over 120k file exist check on my machine on startup,
just for a handful icons.

Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-01 14:03:33 +00:00
Cristian Adam
07ad848ea1 CMakePM: Replace QDir in CMakeBuildConfiguration
This allows remote support.

Change-Id: I12c991d584baa3762102b8a19179e732a31f192b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-08-31 14:23:10 +00:00
Cristian Adam
246f33c20d CMakePM: Replace QDir with FilePath in fileapiextractor
This allows remote support.

Change-Id: I5ac46b1c2ed0e7e1fcc559522f1fcd902f83b8c0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-08-31 13:06:30 +00:00
Cristian Adam
925b7a3566 CMakePM: Replace QDir with Utils::FilePath in editor
This way we could handle remote files.

Change-Id: I7062445cb743a2838f3c9f1bcff89611127011ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-08-31 13:04:53 +00:00
hjk
41184bc9fc Utils: Use numberedKey(Key, int) more wildly
Will ease transition to a key class that doen's have ::number()

Change-Id: Ib2f2957c916f41b0731a2033422bfbf7e429bcc8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-30 09:57:23 +00:00
Cristian Adam
d9a8eba35d CMakePM: Enable cmake format action only if the tool is present
If the tool is not present the menu action is disabled.
Also add a link to the Qt Creator cmake-format documentation.

Fixes: QTCREATORBUG-29415
Change-Id: I4afb33f0d5ce08975b0964d6bee80dfb41cfcde5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-08-29 13:29:13 +00:00
Eike Ziller
da7c25e8da CMake: Do not print warning if no run device is set
With an iOS kit, there is no run device set if no device is connected,
which triggered an assert.

Change-Id: I9c435c618daab2601973372efb84f9ddbe9c5998
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-29 10:38:12 +00:00
hjk
23149b27ab Utils: Introduce variantFromStore and storeFromVariant
These are functional replacements for
  QVariant::fromValue(QVariantMap) (or QVariant::fromValue(Store)) and
  QVariant::toMap() (or QVariant::toValue<Store>())

We will have a few code paths in the end that need to explicitly
operarate on both QVariantMap and Store (e.g. actual reading/writing
to keep format compatibility etc), so these can't in the end be
simple to/fromValue(OneType) but need an internal 'if' or such.

Change-Id: I954f3cb24fa8fe123162b72bbd25d891dd19b768
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-28 11:16:40 +00:00
hjk
d7d78df9da Plugins: And more Store and Key
After this one, is compiles with the opt-in macro. Not changed yet,
though.

Change-Id: I29a66ecb5daa71d0d97566b81fd9f47d92f6368a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 11:45:22 +00:00
Eike Ziller
c9fd5465eb Merge remote-tracking branch 'origin/11.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I0b0394dd68cf89b2579d623af897f55dc01aeea5
2023-08-25 11:50:14 +02:00
Cristian Adam
bd36af75eb CMakePM: Add F2 jump for CMAKE_SOURCE_DIR and more
This will allow opening CMake files via F2 when using include statements
like: include(${CMAKE_SOURCE_DIR}/cmake/api.cmake)

CMAKE_BINARY_DIR and CMAKE_CURRENT_BINARY_DIR are also supported.

Fixes: QTCREATORBUG-29467
Change-Id: I9adb417d98e8a8fccf6cd3e5038562db02cb28c2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-08-25 08:51:34 +00:00
hjk
8d0aa34bfc Plugins: A bit more Keys and Store
Change-Id: Iee55eeaa881dd9f2047fdbe95ad8d827f4ba34e0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 08:00:02 +00:00
Eike Ziller
f2da62fd22 Fix exclusion of system directories from (DY)LD_LIBRARY_PATH
We should not only exclude children of system directories, but also the
directories themselves.

Fixes: QTCREATORBUG-29478
Change-Id: I1aa18b2faa03d241b8cc43eb157b5fa49285a12b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-25 07:16:35 +00:00
Cristian Adam
6a30ebd01e CMakePM: Only set cmake reply fileWatcher after CMake has run
This avoids the case when CMake would trigger the file watcher when
generating totally different json files.

For example switching branches and doing a build on a big project, like
Qt Creator for example.

The filewatcher would be triggered and the UI would freeze for quite a
while.

Task-number: QTCREATORBUG-29416
Change-Id: I6ff47d8c2553f7718e82d92daae99036f37aca7d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-24 15:23:21 +00:00
hjk
5254765e16 ProjectExplorer: Re-organize KitAspect layouting related functions
Less obscure as it's fairly close to the standard pattern now.

Change-Id: I4680465fbdb9fb6a458c18ef0534e4d8a4a31d1e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-24 08:40:32 +00:00
hjk
6e307be365 Utils: Rename the new Storage to Store
Apparently that's what the young people on the web use for such a thing.

Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-24 05:56:57 +00:00
hjk
dc6b40a5c0 Use Utils::Storage instead of QVariantMap in a few places
Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-23 14:30:50 +00:00
hjk
55b5b8a975 CMakeProjectManager: Fix connection to save tools settings
Amends 4e23f2a6eb.

This should actually not be needed in the end, and rather steered
by the auto registration and settings page apply.

Change-Id: I7f94e776fec4394f539e32e5c527c367251654a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-23 10:47:10 +00:00
Eike Ziller
13fa7703a4 Merge remote-tracking branch 'origin/11.0'
Change-Id: I6c2a1d497aae9bda45c4aae47fb0be6c61c1ec29
2023-08-23 09:30:32 +02:00
hjk
6216c0e924 ProjectExplorer: Don't use object names for KitAspectFactories
Not used. Also the debugger knows the typename and these are
singletons.

Change-Id: I577241876318aa2930bbc36f454846ffa47cb571
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-23 05:38:50 +00:00
hjk
45e3fa1621 ProjectExplorer: Simplify KitAspect::addToLayoutWithLabel()
The parent widget was not used anymore.

Change-Id: I57bb024b770c01efc68bb722623bcc7fb565cfeb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-22 13:14:02 +00:00
Marcus Tillmanns
882397d53d CMake: Remove outdated check
Change-Id: I490a68f9b4719c65b4058f5263b13bc5979fd6b2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-22 13:00:56 +00:00
hjk
4e23f2a6eb CMakeProjectManager: Hide kit aspect factory implementation
Also avoid re-instantiation of factories in the build configurations.

Closer to the setups of the other kit aspect(factories).

Change-Id: I1b74a68287b63ee94ff18106d3a00b23624a601b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-22 12:56:12 +00:00
Christian Stenger
0a83f33bad CMakePM: Remove unused include path
Change-Id: Id48ea93a1b9728c7cd68cfa3f52620a799909371
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-22 12:06:47 +00:00
David Schulz
5122d8addc Merge remote-tracking branch 'origin/11.0'
Change-Id: Idbf5f641aa9db7574cf2a4bd09adb8bcd03da894
2023-08-22 08:10:48 +02:00
hjk
4e0c4b0f23 CMake: Rename cmakekitinformation.{h,cpp} to cmakekitaspect.{h,cpp}
Follow up after renaming the contained classes.

Change-Id: I9393c367abdd4eac487e17676c98a357ff33c98c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-22 05:56:39 +00:00
hjk
8346905a51 QtSupport: Remove unusual access pattern to plugin constants
Change-Id: Ifc21607cd9927e99b5c49f1631d8940725a058fd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-21 07:41:45 +00:00
hjk
ec7abcf98c Utils: Make FilePathAspect::setDefaultValue take a QString
This sets the unexpanded value, so going to a "cooked" FilePath can
at least theoretically break. On the user side it saves a
roundtrip in a few cases, but is more ugly when the input is already
a proper FilePath.

Change-Id: I8a7e8f6d46fcc34c96b55e41d656dca933fbef4e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-17 11:58:41 +00:00
Jarek Kobus
98026b29c6 TaskTree: Get rid of registration macros
Alias task types manually.
Don't require the alias to be inside the Tasking namespace.
Addresses the 22th point of the jira ticket below.

Task-number: QTCREATORBUG-28741
Change-Id: I1bdda7fe5a01e4bcb5052ec328f4e0eace878651
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 10:23:52 +00:00
Jarek Kobus
121d73b30f Utils: Rename ProjectExplorer::Runnable into Utils::ProcessRunData
Move it into Utils lib.

Change-Id: I3b6c16d18439cabddf59afc03116f13c1970102c
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 07:44:34 +00:00
hjk
e02de2ddde ProjectExplorer: More KitAspect related renamings
Change-Id: I10ad7aacaaf7346f91cadec479f4bba8481b1502
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-16 15:09:32 +00:00
hjk
aa25fdcc69 QtSupport: Rename qtkitinformation.{h,cpp} -> qtkitaspect.{h,cpp}
Change-Id: I12229e5e98b468101d32edd35be74bbda0921d89
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 08:59:52 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
Alessandro Portale
4605bf57dd CMakeProjectManager: Deselect "Stage for installation" for BareMetal
There is no CMake install target for BareMetal. Therefore, the "Stage
for installation" option needs to be deseleceted, like it is being done
for other devices.

Amends: 2387e9e37a

Fixes: QTCREATORBUG-29293
Change-Id: Ic0e61ab19318f6383f55e6330b7559a734706a0e
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 14:41:35 +00:00
Alessandro Portale
6f9a97fd13 CMakeProjectManager: Deselect "Stage for installation" for iOS Simulator
There is no CMake install target for iOS Simulator. Therefore, the
"Stage for installation" option needs to be deseleceted, like it is
being done for iOS device.

Amends: 2387e9e37a

Fixes: QTCREATORBUG-29293
Fixes: QTCREATORBUG-29475
Change-Id: I6406446534c1ddedbf01cdab4d074bddc44dc495
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 14:41:28 +00:00
Artem Sokolovskii
3ab2da691d DAP: Add check that cmake 3.27 or higher
If CMake version is lower then 3.27
- Shows the warning in general message
- Starts CMake without debugging
- Stops debugging correctly

Change-Id: Ibb13555c20ae2961c0a3c2ef6ec0fcc25930dddc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-14 13:41:39 +00:00
hjk
e9266f53ec CMakeProjectManager: Rename some of the KitAspect related classes
... and split out the static interface.

Change-Id: I28cdb2765a00d1bd19790f46a3b2b0da8690e929
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-11 07:00:37 +00:00
hjk
fde372b81e ProjectExplorer: Rename KitAspect related classes
KitAspect -> KitAspectFactory
KitAspectWidget -> KitAspect

KitAspect::createConfigWidget() -> KitAspectFactory::createKitAspect()

Possibly not perfect yet, but closer to what it does and is.

There will be follow-ups to rename derived classes.

Change-Id: I226f6f025f1e6462c348b68663f776f5a2e8c42d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-10 13:03:21 +00:00
hjk
0be0772fc9 Merge remote-tracking branch 'origin/11.0'
Change-Id: Ib67c8ecb1865ee31ca6485c9287039ba877c68cd
2023-08-10 10:03:04 +02:00
Cristian Adam
6528bd3eed CMakePM: Find the right AUTOUIC generated header
Amends c4e15769ec

When using ui files in static libraries AUTOUIC reports fake header file
names.

By using the target that includes the source ui file we can find the
correct header file name.

Change-Id: I1c8e0b81ad2c670be87c3620f98bd0f5cce40cd1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-09 09:48:27 +00:00
Artem Sokolovskii
8fcf3a695f DAP: Fix windows support
- Added using named pipe for windows

Change-Id: I45561481d63c5dd81bda14e6ace4fb0374d1b488
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-08-08 13:20:14 +00:00
Marcus Tillmanns
31f7ed44b6 FilePath: Use isSameDevice
Some places compared the scheme and host of a filepath to
decide whether its the same device. This is incorrect and
leads to false negatives. isSameDevice is the correct way
to decide whether two paths are from the same device.

Fixes: QTCREATORBUG-29474
Change-Id: Iced8f434dadb931f6595f47f95647b341c48d3aa
Reviewed-by: hjk <hjk@qt.io>
2023-08-08 13:19:35 +00:00
hjk
f09b61651e Utils: Approach aspect update signalling more systematicly
This was pretty much ad-hoc so far. Now do the actual value proliferation
inside the aspect first and collect information on what changed. Signal
changes in the end centrally. At that time the aspect internal state is
consistent again.

Additional design desision implemented here: setDefaultValue and
fromMap/readSetting do _not_ signal, user code with unusual needs
has to check on its own.

Change-Id: I1e46282558e014f51933d1044a72bf5c67437ec5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-08 12:06:16 +00:00
David Schulz
0ece08c9dc Merge remote-tracking branch 'origin/11.0'
Change-Id: Iad820911996f8daff6ce63b4f0267bd15d35d176
2023-08-08 07:34:26 +02:00
Cristian Adam
c4e15769ec CMakePM: Fix AUTOUIC ui_header.h file code completion
The wrong header was reported to the extraCompiler when AUTOUIC was set.

Fixes: QTCREATORBUG-28787
Change-Id: I92d37e56ee5e45229545184e4f4911764834ed67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-04 15:29:25 +00:00
Eike Ziller
0d15b4cded Merge remote-tracking branch 'origin/11.0'
Change-Id: Ibe5040142ca38fed77ffed163212baf22592e392
2023-08-04 14:57:29 +02:00
Cristian Adam
5646f76ea8 CMakePM: Fix reading ninjaPath from QtCreator.ini
For the special case when the Qt SDK Installer appends the same path to
the key.

Task-number: QTBUG-115754
Change-Id: I87d8f3d8074044f440ed3042bc5fe8356a6c429c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-03 15:08:39 +00:00
Eike Ziller
c9ba87b58b Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/beautifier/clangformat/clangformatsettings.cpp
	src/shared/qbs

Change-Id: Ie614f036ef9529a3cae6366a9313eded988d725c
2023-08-03 11:35:17 +02:00