Commit Graph

68765 Commits

Author SHA1 Message Date
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
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
Eike Ziller
ce291a0bc2 Core: Fix appearance of mutltiple status bars
There should only be one.

Fixes: QTCREATORBUG-29691
Change-Id: I02b4aaec35d6a35b0130cdbc9d933aed9cfb8132
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 09:02:47 +00:00
Marcus Tillmanns
67e4c280aa Utils: Fix connection
Change-Id: I88090c4200cec2a80d6b871b9b443ad7891573e1
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 08:02:17 +00:00
Orgad Shaneh
91a9410aa3 DAP: Fix MSVC warning
conversion from 'size_t' to 'int', possible loss of data

Change-Id: Iaea0dde9be1bec467dd788058dc7b64c7af33da4
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-10-04 07:14:42 +00:00
Amr Essam
340a1c1156 QmlDesigner: Generate the effect qml code
Task-number: QDS-10811
Change-Id: I5f0e969ee21ae49580c2632da483f5701dab9c41
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-04 07:11:42 +00:00
Cristian Adam
895c588dd6 Core: Brings back revision in About dialog
The revision is part of the Utils::appInfo() structure. Make sure to
display it when is set.

Change-Id: I0dece3bdd011127f63974b963e35f73834416b6c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-04 06:46:12 +00:00
hjk
47c4aa36a7 Utils: Add default move to Utils::Key
coverity complains otherwise.

Change-Id: I9d552782561addcb74e3b72d2d71cd0b5f2114ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-04 06:31:59 +00:00
David Schulz
8404f05ce6 CppEditor: use the corrrect link callback when looking for type
Also fixes an unused argument warning.

amends 80633a59aa

Change-Id: I6be122c44010a612d95a20dd987aac6e73a08430
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-04 06:02:24 +00:00
Miikka Heikkinen
d08b4bcb31 QmlDesigner: Fix snap drag issues
Dragging to exactly (0,0,0) value wasn't registered as the null vector
got discarded when splitting it into subproperties.
Scale snap was snapping always to higher interval when new scale was
less than one, so it would never snap to zero.

Fixes: QDS-10652
Change-Id: I65135c258feeb10b9b17ea621e4d65c1d97e1794
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-10-03 08:17:06 +00:00
Amr Essam
84bbfec651 QmlDesginer: Add functionality effect preview
Also some refactoring and fixes to the model

Task-number: QDS-10811
Change-Id: If27b2e8e9bac4d46200ed37bf0aec8255ee19022
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-10-03 08:14:58 +00:00
Cristian Adam
298921be2d CMakePM: Do not show the same tooltip on mouse pointer change
Let's say you move the mouse left and right on the keyword, we shouldn't
flicker showing the same tooltip to the new position.

Change-Id: I45b69578d377384422535ce5f33f81bc916a42e2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-02 21:32:50 +00:00
Marco Bubke
0ad9b6fb3a Utils: Modernize SmallString
std::to_chars should now be supported by all compilers. The assert is
not needed because there are already tests for the extreme cases. It is
anyway bad style to have asserts in code under tests.

Change-Id: I5dbfa462168766e40fffa1f1780a167f1f37e72a
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-10-02 20:23:01 +00:00
Marco Bubke
5aea0da742 Sqlite: Update to 3.43.1
Change-Id: Ife5e6be8d88dec33cc7bfb236006468bb3a49ab0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-02 20:22:27 +00:00
Marco Bubke
1177bb4b1f QmlDesigner: Add PropertyComponentGenerator
Task-number: QDS-10578
Change-Id: I2c20f5aaa6ebfe7736012a02d4c4596589007866
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-02 20:22:10 +00:00
Marco Bubke
3a0eff9e79 QmlDesigner: Add mechanism to refresh meta infos
Change-Id: I894d26387afb32ccf1b8623976f7e6d9b19c0d80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-02 20:19:22 +00:00
Marco Bubke
f995624204 QmlDesigner: Remove studio plugin
The plugin is only used for a configuration file. It is the only place
which provides that configuration.

So we remove all that code and hard code that list.

Change-Id: Idb58772c9fa7ffaa955e49842fe55a25a9a154ed
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-02 20:18:57 +00:00
Marco Bubke
8c4f3d4970 QmlDesigner: Fix missing updatedProjectSourceIds
Otherwise we get constraint errors in the project storage later because
we try to insert a entry instead of updating it.

Change-Id: I25941a30c6d35e189153e49d5092e85ae0c7e683
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-02 17:11:32 +00:00
Cristian Adam
3956d5b279 CMakePM: Remove caching of CMakeTool
No need to cache the value of the CMakeTool, since it causes issues with
the update mechanism.

Task-number: QTCREATORBUG-29683
Change-Id: Id5925b9a90d6010aa09b4a2f7b5ed3d447f5cd7a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-02 15:56:55 +00:00
Jarek Kobus
07e758147b CMakeFileCompletionAssist: Fix a crash on completion
Avoid calling not-thread safe functions from inside
the CMakeFileCompletionAssist::performAsync().

Move calling these functions before the asyncRun, collect
the needed data inside the PerformInputData structure
and pass it to the other thread instead.

Fixes: QTCREATORBUG-29683
Change-Id: I56127163a47339bc45d47f3a7d2c76d518b640f7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-10-02 15:47:51 +00:00
Alessandro Portale
25feb7db89 Android: Adapt SDK tree view to Android Studio
This adds a category for "Android API 34" and puts the nicknames into
quotes. This makes the tree look like in Android Studio's most recent
SDK manager.

Change-Id: If80ea5738da208151fe22e307183752b68d2b550
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-10-02 14:51:44 +00:00
hjk
b5f73e6dbd ProjectExplorer: Simplify autodetection of SDK clang toolchain
We know what it looks like pretty well. This also makes
the other detection calls more similar.

Change-Id: I421826c94c637fdc35781f60ad0e0b4c6ee7b650
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-02 14:38:10 +00:00
hjk
a931ebf1e5 ProjectExplorer: Simplify gcc options re-interpretation interface
Change-Id: I6fc293389e301d7ec36a897c856a0e2d57e35964
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-02 14:37:52 +00:00
hjk
195c6810c6 ProjectExplorer: gcctoolchain.cpp code cosmetics
Change-Id: I3bd569c63a0a583260daef0ef79462dfdc60358d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-02 14:26:48 +00:00
hjk
35f865fa7b Core: Remove mainwindow.{h,cpp}
Interface was moved to icore.h. The initial worry that lots of code
need changes was apparently unfounded.

Change-Id: I53a494d1ca914c7b1b16500c979029d06f5ab5f6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-02 13:44:51 +00:00
hjk
3d7cf53a1e Core: Ramp down MainWindow in it's ICore::pimpl function
Change-Id: I7c4934248ea4794f7d4eb95f98d19994b56fa0f1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-02 13:27:04 +00:00
Cristian Adam
3705b4b609 CMakePM: Navigate to find_package CMake files
Fixes: QTCREATORBUG-25524
Change-Id: I6dc7dc1b2d0da06ceba0314438d3bd12467a3223
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-02 12:50:32 +00:00
Jarek Kobus
bc5a2dbf14 CtfVisualizer: Do some cleanup
Remove unused headers.
Use using namespace and drop unneeded namespace scopes.
Replace QVector with QList.
Return default constructed objects in default return statements.
Avoid empty arg brackets in some lambdas.
Use default member initializers.

Change-Id: I11e62a291be3fa5bde4156e7a316765ee697b852
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-02 12:43:33 +00:00
hjk
5c52bdd0e9 Meson: Hide plugin class definition in .cpp file
Not meant to be used outside.

Change-Id: Ic9de5cd19d01e25c2d24ee3b03dd60c61fc6f205
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-02 12:24:37 +00:00
Miikka Heikkinen
00cef940c0 QmlDesigner: Sync also skybox for scene environment in 3D view
If scene environment sync is specified for the 3D view background, we
now sync also skybox instead of just the clear color.

Fixes: QDS-10775
Change-Id: I3e8bd3b8155a4fbe476ca348761d56955a62f7c4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-02 11:55:02 +00:00
Cristian Adam
762b0518a2 CMakePM: Handle include(CMakeFileWithoutSuffix) navigation
Check that the function operating upon is "include" and then match the
word under cursor with a file from the project.

Change-Id: Ia0131f08515c56582a1fb02a59d6b2e41ac04288
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-02 11:05:36 +00:00
Artem Sokolovskii
44836247ca DAP: Fix coverity warning
Change-Id: Ieb8cc7133b9b2dea4a4d97ec109f82dac28f7950
Coverity-Id: 1568465
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-02 10:41:10 +00:00
Ali Kianian
01a4f087c6 QmlDesigner: Use Studio.Models as the source of the CollectionEditor
QtQuick.Studio.Models JSON and CSV components are used as the source
of the Collection Editor.
Collections are placed underneath the sources in the collections view

Task-number: QDS-10809
Task-number: QDS-10462
Change-Id: Ia0c9cb587c462fcba98934b15068582f3f9c19c5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-10-02 09:52:42 +00:00
hjk
064ebaf0a4 ProjectExplorer: Move autodetection checker creation
... to a later point in time, closer to its use.

Change-Id: I578f818a9e11f0cbdbaece58a4b2b55ed482f65e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-02 09:25:11 +00:00
hjk
58c8fe823c ProjectExplorer: Simplify autoDetectToolChain parameters
This leaves us larger freedom on what tool chain to construct
later in the process, hopefully allowing us to handle real GCC
and MinGW in one pass.

Change-Id: I6b0ca1af428129924cef0ae31d684e6bc2735213
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-10-02 09:23:13 +00:00
hjk
eb9d2d8f17 ProjectExplorer: Remove timing test code
Amends 1c5ecec393.

Change-Id: I679da19b5c7cdb6d401ee396d11e0df37d6cc026
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-02 08:30:28 +00:00
Orgad Shaneh
96abaa9d5d Meson: Add missing member initialization
Coverity-Id: 1568464
Change-Id: I13baf0f7c807475d4a8452771579407565d6a3e2
Reviewed-by: hjk <hjk@qt.io>
2023-10-02 08:22:48 +00:00
Miikka Heikkinen
42f231e4a2 QmlDesigner: Fix 3D view grid color when there are objects behind it
Fixes: QDS-10803
Change-Id: Ibbe1c9d308031b941df42750eb4f75cb2fe43c13
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-02 08:11:46 +00:00
Orgad Shaneh
b004a78645 ClearCase: Remove pointless function argument
Change-Id: I5545090a5f28994b126cedd97496678d891f5184
Coverity-Id: 1568460
Reviewed-by: hjk <hjk@qt.io>
2023-10-02 08:09:08 +00:00
Cristian Adam
15903ad17a CMakePM: Allow http(s) Url navigation
The CMake snippets do have comments with the origin of the snippet and
this patchset allows navigation to the url in question.

Change-Id: I6eb2565e8f7b9100a1cc19dbf8ccda430c698613
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-29 17:03:45 +00:00
Marcus Tillmanns
0c806f1359 QtSupport: Fix VersionData cache
Change-Id: I90d2b7d152123118b6244c86539868d185fde51b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-29 16:45:57 +00:00
hjk
1c5ecec393 ProjectExplorer: Rewrite GccToolchain candidate identification
Change-Id: I9555588b64e0beeafc854d13a43dd0fad32662e2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-29 14:00:26 +00:00
hjk
61270e910f Core: Swap ICore and MainWindow "ownership"
Change-Id: Ibfa223da0f4d5195ae2f2783352346ca72b920bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-29 12:11:38 +00:00
hjk
8ba5174415 Utils: Make UnixUtils a namespace
Change-Id: Id60c4165cf88af03d4010ee19cedc4bad39285e5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-29 11:40:51 +00:00
David Schulz
278ce651a2 LanguageClient: fix crash on inspector widget destruction
Avoid calling functionality of the LspInspectorWidget while it is
destructed by resetting the reference before the deletion.

Change-Id: I335cd1154fe4654be888a0d8cf02a0f6642edcb7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-29 11:27:26 +00:00
Artem Sokolovskii
fee2fb638b DAP: Fix start CMake debugging without executable
Task-number: QTCREATORBUG-29630
Change-Id: Ib7acb7d231fe45d52f816de9d8c85897e2808aec
Reviewed-by: hjk <hjk@qt.io>
2023-09-29 11:11:48 +00:00