Commit Graph

85691 Commits

Author SHA1 Message Date
Marco Bubke
05aa1e76da QmlDesigner: Don't add invalid nodes in the prototype chain
Change-Id: Iab74a079c5ab507a370c5ab7014c81061eb3d878
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-10-05 10:02:03 +00:00
Cristian Adam
bda5c6a228 CMakePM: Preserve newlines in multi-line error messages
This way the popup message is not spanning the whole screen.
Testable with find_package(Qt7 REQUIRED).

Change-Id: I3f1943b603baa02c55f2f8f63c75908468e69d9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-05 09:59:39 +00:00
Marco Bubke
0775bf3339 QmlDesigner: Fix crash in NodeMetaInfoPrivate::create
We changed the QHash and then accessed the invalid iterator.

Change-Id: Ia6f4536cff92776b8d74f96224dee84e3b28fac3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-05 09:46:02 +00:00
Cristian Adam
08cebc7e08 CMakePM: Fix crash when runing qtcreator -test CMakeProjectManager
Change-Id: I3535c1edd0c72eba3c1bcd50234baeb4c1acecc5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-05 09:25:48 +00:00
Christian Stenger
1d449ad7d6 SquishTests: Fix CSUP test
Function completions nowadays provide the special tooltip holding
the variations of argument lists if it is an overloaded function.
Check for it and if it is present just close it to avoid an endless
loop.
(When processing the file we use 'Cursor Down' to navigate through
the file but if the tooltip is open we just toggle between the
overloads and process the same line again and again)

Change-Id: I21742c5a460cf1537151e30c3135bebb83695703
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-05 09:14:38 +00:00
Alessandro Portale
718de1bf78 App/Core: Only set DPI rounding options if default not "Unset"
Instead of making the OS specific decision whether to set DPI rounding
options or not in several places, leave the OS specific check to
StyleHelper::defaultHighDpiScaleFactorRoundingPolicy() and test for
"Unset".

Change-Id: I37ab4a0c643d1b1597e5f45496510f2f36f1a386
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-05 09:03:13 +00:00
Alessandro Portale
dbfaa6a842 ScreenRecorder: Add gdigrab as alternative option on Windows
Some ffmpeg binaries come without the ddagrab filter, e.g. the ffmpeg
binary that is contained in the latest ImageMagick package for Windows.

Therefore, offer the older and omnipresent "gdigrab" device option as an
alternative, chosable via ComboBox in the settings.

Change-Id: Idc5f8e2a6597d93f79a603733456f83a90c31505
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-05 09:02:54 +00:00
Ali Kianian
be84072066 QmlDesigner: Keep the unsaved collections open while switching
Task-number: QDS-10813
Change-Id: Ia61260eb6ab23036142b5645a1288baf25f2eaf8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-05 08:56:37 +00:00
Marcus Tillmanns
d79c69918f Docker: Add clangd path to sdktool
This patch also allows the user/installer to supply a path without
the device root, to make it easier for the installer.

Fixes: QTCREATORBUG-29694
Change-Id: I641b06dd2f4a9d94079fb26f2ed949c5246c1c1e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-10-05 08:54:23 +00:00
hjk
664be8ed48 Utils: Remove an QTC_ASSERT
In principle that'd be fine there, but the host equality is too strong
in some cases (isSameDevice should help), but it also still gets fed more
or less random content to create display names. Finding the exact
condition is tricky, and the remaining path is good enough.

Change-Id: I4ec29c2f259a7b761d00012bcd9a6d69a057043c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-05 08:45:41 +00:00
Artem Sokolovskii
a1ac447d90 DAP: Fix highlighting changed variables
Change-Id: Idae543ba3af1a7c02c22d6619857cf0cf8b04f28
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-05 08:14:19 +00:00
Alessandro Portale
64870f9163 Utils: Move defaultHighDpiScaleFactorRoundingPolicy() to StyleHelper
... from HostOSInfo. A better suited place.

Amends: 3726f0d6c1

Change-Id: I5ba052603ae438b9347f1091088f0d105d19f587
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-05 08:05:53 +00:00
Miikka Heikkinen
1c76217a70 QmlDesigner: Fix helper grid rendering issues
We can't use SCREEN_TEXTURE to apply fade as it doesn't contain
transparent objects. However, it turns out it's not actually necessary
if the grid itself is also transparent (opacity 0.99 is sufficient),
so SCREEN_TEXTURE use was removed.

Fixed all components of the helper grid to have same bounding boxes, as
it appears bounding box of the mesh is relevant to alpha calculations.
Now subdiv lines of the grid no longer randomly change their alpha
values when just orbiting the camera.

Orbiting the camera also caused constant property updates on the grid
material due to float math rounding errors, so round the result to
five significant digits there.

Limited the grid area to 30000 units as there is not much point
in bigger grid due to the fade and very large objects can cause other
issues.

Fixes: QDS-10821
Change-Id: I65c31e99a45fd30186dcdcb185f9978b5c1b322e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-05 07:51:24 +00:00
hjk
257af1ebd8 Core: Don't mark two ModeManager functions as slot
Not needed.

Change-Id: I9ed5c1dd8f36e4bec101732f37a10f399d9c2b30
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-05 06:34:36 +00:00
hjk
4e8bcc40e7 ModeManager: Remove unused constructor argument
Change-Id: I7856a832db61a27ab5fdabf79ff9a359acdb866a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-05 06:27:29 +00:00
hjk
58efc778f5 Core: Swap ICore/MainWindow "ownership"
Change-Id: Iba387781624d88f814293af0f7b7ed697da1d822
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-05 06:26:21 +00:00
Alessandro Portale
d0f2d8dd35 ScreenRecorder: Fix invalid "-1" CaptureType setting
This fixes the issue that the SelectionAspect was read incorrectly,
causing an invalid settings entry of "-1".

Also the settings key changed for the quite probable case that some
early testers have the invalid "-1" in their settings.

Change-Id: I97061e2787068bc3bb6cf4bd2d7b0aab767598d5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-04 20:40:25 +00:00
Alessandro Portale
f630964139 ScreenRecorder: Make the "Stop" tool button icon red
This is more consistent.

Change-Id: I717b85fa696b29d8a6d5cfff2cd583ecb44a445e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-04 20:40:07 +00:00
Alessandro Portale
4feafe9db2 ScreenRecorder: Assign "Tools/Record..." a menu icon
Change-Id: I66102d5919c83f50145d549c0ae39ff447309b33
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-04 20:39:52 +00:00
Cristian Adam
4875b25e31 CMakePM: Use the cmake logo for actions
Change-Id: Id19c8405e44218ad62da4d60b3d6eb71637033ad
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-04 15:15:24 +00:00
Jarek Kobus
0aa8322206 McuSupport: Remove unused method
This basically reverts e39c6d4f41

Change-Id: Ia0d40addc03ddefa9c1c74d8ac615ffb4f15508e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-04 14:41:39 +00:00
Tim Jenssen
97ca8cc270 Core: add ICore::isQtDesignStudio()
Change-Id: I3aed97b62abd05b283ac327be210af75f173383d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-04 14:39:39 +00:00
Eike Ziller
ed59fd06b0 Add change log for 12.0.0
Change-Id: Ie12a4248d79e416ef0781561962b1ad1ee246957
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-10-04 13:57:06 +00:00
Cristian Adam
f81bf72924 CMakePM: Fix assert with non CMake projects
Amends 7028e27a81

Change-Id: I5d1e29abf19135aea8a401f2b971767f8a308c28
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-04 13:56:47 +00:00
hjk
ae4852a3ea Core: Rename MainWindowPrivate to ICorePrivate
Mechanical, plan is to move m_mainWindow there and switch
around construction.

Change-Id: Ic7936623586ac68c2cdd69a40042262802579d23
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 13:48:14 +00:00
Marcus Tillmanns
34fdac0d84 CMake: Improve remote parsing speed
To improve the speed of parsing the result of a remote
cmake call, we move the file fetching and parsing into a
mapped concurrent call.

We also first uniquify the list of files to remove duplicates.

Fixes: QTCREATORBUG-29618
Change-Id: I18108928ba3b5f4f8ec3d5610b216c5ccf060877
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-04 13:40:36 +00:00
Marcus Tillmanns
39354fd5e1 Docker: Add missing display style for extraArgs
Change-Id: I09150ee63ab9911e4f1ae555575b068e4f93d5fa
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 13:34:34 +00:00
Alessandro Portale
3726f0d6c1 Core: Add a setting for HighDpiScaleFactorRoundingPolicy
In Qt 6, the API and environment variables intended to influence the
HighDPI behavior changed quite a bit. Until recently, (see "Amends"
change), Qt Creator still supported the Qt 5 options instead of the Qt 6
options.

With Qt 6, HighDpi support is always enabled. Just the DPI rounding
policy should be set by user or application.

This change adds a ComboBox in the General settings, which allows to
select a DPI rounding policy:
  https://doc.qt.io/qt-6/qt.html#HighDpiScaleFactorRoundingPolicy-enum

The default setting is "PassThrough", which is the default policy for Qt
6, and which is also the default in Qt Creator since version 11.0.2.

Amends: d1deeb2c0d

Fixes: QTCREATORBUG-29501
Change-Id: Ib19b40cb3945cecc71b7c10f42fa2b06b3cc6153
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 13:08:40 +00:00
Eike Ziller
7a748d90dc Merge remote-tracking branch 'origin/12.0'
Change-Id: I1357c2ebc588240c90cdf7542fc277f771c3463b
2023-10-04 14:49:12 +02:00
Christian Kandeler
70f4d9bda0 ClangFormat: Lower the file size threshold
E.g. cppquickfix_test.cpp in Qt Creator is ~260KB, and editing it is
quite sluggish with ClangFormat enabled.

Change-Id: Ifa0db8198b8c15fd03571176b9e94f046da3e44d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-10-04 12:37:32 +00:00
Artem Sokolovskii
9af8ecd935 DAP: Fix dap engine selection with the translated strings
Change-Id: I051c1f7e9776922a98f7c54676c237c63984050d
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 12:36:00 +00:00
Marcus Tillmanns
6cd2e6de0c Utils: Fix StringAspect TextEditDisplay
Remove the unnecessary re-setting of the text edit
content due to the undo => edit => undo => edit
connection.

Fixes: QTCREATORBUG-29688
Change-Id: I7838ed594ae3741df757fa5eb3cdd90506428be3
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 12:34:17 +00:00
Marcus Tillmanns
c50f9a9273 Docker: Move rootPath into Settings
Change-Id: I11aa1d928281b13ccb136b907c9eb8f98582fd28
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 12:34:10 +00:00
Marcus Tillmanns
c999f4f880 Docker: Fix threading
Make sure that the container state is synchronized
with the main thread.

Change-Id: I8b50a380779038b273a1eb6645aa08309e90bc56
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 12:34:04 +00:00
Marco Bubke
a88caa00c7 QmlDesigner: Ensure uniqueness of node meta info
We test for equality by the pointer. To ensure it is uniqueness we now
search for the qualified name. If we get a hit, we use that instance. We
have to add the qualified key too into the cache to make it work.

Change-Id: I7f09203aad5591c41798902a75fc971ece7e1c05
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-04 11:47:41 +00:00
Marco Bubke
a4a8fd5b81 Utils: Extend transform for container insertion
You can now return a container and it will be appended to the result
container. That has the drawback of generating temporary container but
if we get them already it makes the code much more readable than a raw
loop.

Change-Id: Ibcd38e85ef759c18cd8da0fac0185f0f6fc123e2
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 11:47:26 +00:00
Artem Sokolovskii
759535be1a ClangFormat: Regenerate clangformatchecks for clangformat 17
Fixes: QTCREATORBUG-29690
Change-Id: I9bbe0c531087824fc160bae210c8444b3ac67ba5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-04 11:32:18 +00:00
Marcus Tillmanns
43f770b087 Terminal: Pull upstream shellintegration scripts
Change-Id: Ic0fed1a56ec635351716dca1e410050990d2dd98
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-04 11:13:46 +00:00
Pranta Dastider
7ae61da78d QmlDesigner: Update Custom property editor tab document and screenshots
This patch updates the custom property editor tab documentation
from the Connections view. It also includes new images to
present the newly design custom property in the document.
Images were added in "webp" format.

Fixes: QDS-10816
Change-Id: I37a1471477f0f58138819511aa18abe4d6b54e2f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-04 10:34:07 +00:00
Alessandro Portale
fc93f7d1b7 ProjectExplorer: Move cmake icon from Vcpkg to ProjectExplorer
Other plugins that depend on ProjectExplorer will use it, for example
CMakeProjectManager.

Change-Id: Ic5cb0ecac4e06ad04da7590f7759bf1ccdd59b3a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-04 10:31:42 +00:00
Marco Bubke
3a73272e79 QmlDesigner: Don't put asserts into code under tests
Just write tests for it, so can handle that states gracefully. Otherwise
the tests will crash for an assert.

Change-Id: I275e73e3678a5cce7799146ee005244e6402181a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
2023-10-04 10:29:30 +00:00
Marco Bubke
f12e484056 QmlDesigner: Remove typeName() usage from TextToModelMerger
Task-number: QDS-10266
Change-Id: I81a8ff71f1e3b118bf472b266d4038ab85d6d617
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-04 10:29:13 +00:00
Marco Bubke
975a282130 QmlDesigner: Ensure that indirect imports are deleted too
If we import an indirect import can be added too. So if we remove that
import we have to remove the related indirect imports too.

Change-Id: I4cb09fdc8986c473db2a8194766778956bc7069a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-04 10:28:56 +00:00
Marco Bubke
ebe1c889b7 QmlDesigner: Integrate component generation
It is only activated if the project storage is activated

Task-number: QDS-10578
Change-Id: Id93673eba470aa37a249072b3ef9e0231499095a
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-04 10:28:35 +00:00
Marco Bubke
95d40394da Utils: Add C++ 20 converter function to_array
That can be quite useful to create arrays:

struct MyReallySpecialType
{
  std::string_view name;
  std::string_view expression;
};

std::string_view getExressionCArray(std::string_view name)
{
  static constexpr MyReallySpecialType list[] = {
    {"Left", "true"},
    {"Center", "execute(%1)"},
    {"Right", "false"}};

   auto found =std::find_if(
     std::begin(list),
     std::end(list),
     [&] (const auto &entry) { return entry.name == name; });

  if (found != std::end(list))
    return found->expression;

  return {};
}

std::string_view getExressionStdArray(std::string_view name)
{
  static constexpr auto list = Utils::to_array<MyReallySpecialType>({
    {"Left", "true"},
    {"Center", "execute(%1)"},
    {"Right", "false"}});

  auto found = std::find_if(
    std::begin(list),
    std::end(list),
    [&] (const auto &entry) { return entry.name == name; });

  if (found != std::end(list))
    return found->expression;

  return {};
}

Change-Id: Ifc737edb72d7a5f63b26203a5f22bfde19b5c2bc
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-04 10:27:28 +00:00
Cristian Adam
51a650f30b ClangTools: Fix clang-tidy documentationUrl for version 17.0.0
Change-Id: I6fd71fd5a390316a5c523865b6b1e866d8450e2e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-04 10:21:01 +00:00
hjk
8d7a42095b ProjextExplorer: Combine gcc and mingw compiler search
Instead of running detection for (non-mingw-)gcc and mingw twice
and discarding "non-matching" results, run detection once and
determine the subtype afterwards.

This practically halves the time for their detection except
for Mac hosts where only mingw was searched before.

Change-Id: Id5c43c82125ca95570b890fef7ccd59d1edd5a6e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-04 10:11:13 +00:00
Marco Bubke
ce6cc4aa4b QmlDesigenr: Fast fix because reviews takes so long
Fixes: QDS-10822
Fixes: QDS-10823
Change-Id: Iaf2d44b30fb67e8a06a274aea066c33f9f2939d7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-10-04 10:02:17 +00:00
Pranta Dastider
d663096090 QmlDesigner: Update Bindings editor tab document and screenshots
This patch updates the Bindings editor tab documentation
from the Connections view. It also changes the old images to
present the newly design bindings editor in the document.
Images were added in "webp" format.

Fixes: QDS-10764
Change-Id: Id2b3a141b1aa40c8a141e1600bfa91fab9095347
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-04 09:41:09 +00:00
Cristian Adam
7028e27a81 CMakePM: Add Debugger -> Start Debugging -> Start CMake Debugging
This is where the user would expect it.

It is an action, so the user can assign a keyboard shortcut if needed.

Change-Id: I4c6db3b1dafb5fb173a07c21d271715310a2b091
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-10-04 09:32:23 +00:00