Commit Graph

72811 Commits

Author SHA1 Message Date
Artem Sokolovskii
01e0e43443 Core: Reopen last closed editor
The short-cut to reopen the last closed editor is not set by default
to allow users to set by themselves.

Change-Id: I1f57e34c3b1a30873fd550f5cb008e5640e6a1c5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-30 08:03:41 +00:00
hjk
c96f502c6c Lua: Robustify LayoutBuilder integration
"Executing"  'Row { "a", b, "c" }' with unquoted b  previously crashed.

Change-Id: Ifb505c1a836a6041b05911e322cad596c3969e03
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-30 06:43:14 +00:00
Christian Stenger
8a90428251 Wizards: Fix updating path chooser
Do not update the path chooser from the same slot where the path
chooser gets validated or we end up inside a soft assert of the
path chooser's (locked) guard.
Currently no harm as the project chooser is not used actively
and no page is declared as a sub project on this page yet.

Change-Id: I641bb7da55de5919c772b1fa29693f4fa75d4a7c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-30 05:07:16 +00:00
Artem Sokolovskii
c14845181d ClangFormat: Fix indentation in the middle of line
Before, indentation applies in the middle of the line if an electric
 character is typed.
Now it happens only if the character is typed at the line's end or start
 and if new line character was typed. It should reduce jumping while typing.

Fixes: QTCREATORBUG-30731
Change-Id: I018cb4a03af5e6450be2cd423cb29bd384048871
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-05-29 15:54:04 +00:00
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
Tim Jenssen
c6f40dd05d Qml2Puppet: fix standalone build
Change-Id: I3e72e7e8ffe10f9969da8ab5a6a8cd0a6f3e4738
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-29 14:45:20 +00:00
Alessandro Portale
b6bda47ff9 Debugger: Remove left-over, now unused variable
Change-Id: Ie7829e102f80deaf658a03e748a17ad126973111
Reviewed-by: hjk <hjk@qt.io>
2024-05-29 13:57:32 +00:00
hjk
efae651924 Utils: Introduce a convenience function creatorColor()
... forwarding to creatorTheme()->color(...)

Change-Id: Iefaa043495127b3e500ed225584481d3ec0f8c1f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-29 13:49:25 +00:00
Artem Sokolovskii
d41f15390f ClangFormat: Fix indentation after closing parenthesis
Indentation was incorrect when closing parenthesis
 was typed in the function and empty function is below.
Now it indents as expected, test case was added.

Fixes: QTCREATORBUG-29911
Change-Id: Ic1ccf8cecb0d5723e6ab1a77177d8161119f6a54
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-05-29 13:04:10 +00:00
Christian Stenger
b5dd1330e4 Wizards: Let wizard know its supported project types
Preparation for later to make sub projects aware of the projects
they may be added to.

Change-Id: I95630adca6f756377d939b6c3169ada2c5a93236
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-29 12:45:23 +00:00
Christian Stenger
26030bf0a8 Wizards: Only show error message if not empty
The path chooser may be invalid while initializing the page
and shortly display the empty message before becoming valid.
At the moment no harm, as the path chooser is not used actively.

Change-Id: I0c0701c05262e35f550b40dcb03329b6e2308587
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-29 12:01:58 +00:00
hjk
ded8cf3fdb Lua: Make Layout-derived classes directly show-able
Change-Id: I2bea8187626c239b5b2e9ddb32d291db97ddc9ac
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-29 11:52:43 +00:00
hjk
a1146cbef4 Utils: Fix two deprecation warnings
QSize actualSize(const QSize &size, Mode mode = Normal, State state = Off) const;
    QT_DEPRECATED_VERSION_X_6_0("Use actualSize(size) instead")
    QSize actualSize(QWindow *window, const QSize &size, Mode mode = Normal, State state = Off) const;

Change-Id: Idfe068c7734ac92551b51c323e2cfb3bc221590d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-29 10:37:12 +00:00
Cristian Adam
322944469f CMakePM: Add/remove CMake parameter for "Package manager auto Setup"
The CMake parameter is CMAKE_PROJECT_INCLUDE_BEFORE used in the "Initial
Configuration".

This commit will add or remove the above parameter in the "Initial
Configuration" list.

Previously, the parameter would have been added only on the first time.
Now with project CMake settings this is needed also for already
configured projects.

Change-Id: I7293032ef3e7e6e0ad0b51c68ef5fbe0cab48919
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-29 10:17:15 +00:00
Christian Stenger
62c1a6bee2 QmlProjectManager: Fix includes
Change-Id: I3368dc456dacc863a06821a614d3d40a2ac8000b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-29 09:24:17 +00:00
Christian Stenger
373ad2d9ba QmlPuppet: Fix build without Quick3D
Change-Id: I38bf66d61d3f40ecb2930290ee7966b653aea8a5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-29 09:14:45 +00:00
Marcus Tillmanns
997f0fb624 Lua: Fix Layout.Span & Tab constructor
* Allows to use Span {...} or Span(...) syntax.
* Same for Tab {...} or Tab(...).
* Fixes some documentation issues.
* Adds "withFormAlignment()" and "spacing()"

Change-Id: I05ec0823617e99384e309f34a4861e29045eff94
Reviewed-by: hjk <hjk@qt.io>
2024-05-29 08:33:48 +00:00
The Qt Project
e7cf251abe Merge "Merge remote-tracking branch 'origin/qds/dev'" 2024-05-29 08:10:42 +00:00
hjk
91d0ca304a Lua: Fix off-by-ones in Layouting
Change-Id: I4b29ff453ab29a26ec2300f70c0d1232f30575f1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-29 06:18:03 +00:00
Jarek Kobus
96d4819138 Android: Use Qt::SingleShotConnection
Instead of disconnecting the signal inside the slot.

Change-Id: Ic5b47cd560d2737fb3b347b6c06e69889394e03a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-28 22:18:20 +00:00
Jarek Kobus
c9fac8ca2e Android: Transform AndroidConfig into namespace
Change-Id: I1926758f3dcaffb4de11a85c0873eec7bd2d223c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-28 22:18:12 +00:00
Jarek Kobus
665387bc6d Android: Rename setConfig() into applyConfig()
Get rid of the AndroidConfig arg.

Change-Id: Ifa828d4d9f382eb904d775bab890a801086b8a3b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-28 22:18:03 +00:00
Jarek Kobus
5dd3cff8ef Android: Remove unused methods, hide one method in private section
Change-Id: Ieeddf1ba1b0fca12deb2a3c4cb4d1344eede41ae
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-28 22:17:55 +00:00
Alessandro Portale
7bc65cf9f3 PluginSpecs: Change URLs from http:// to https://
Avoid the redirect that is inevitable nowerdays.

Also, change necessitas.kde.org to www.qt.io, since the orgininal page
is offline.

Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 20:13:29 +00:00
Marco Bubke
95fc49c4ac Add compile options to cmake declarative interface
It offers an clean interface to disable warnings

Change-Id: Ia19360994d7ca439d067d2370d001d5aeae3999d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-05-28 18:22:11 +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
Tim Jenssen
4515fba526 Merge remote-tracking branch 'origin/qds/dev'
Conflicts: src/plugins/qmldesigner/CMakeLists.txt

Change-Id: I250c8e5284ddb0f335c440999b8920762419c89b
2024-05-28 19:06:18 +02:00
hjk
fffa067a00 ClangCodeModel: Fix a qAsConst deprecation warning
Change-Id: I1a4bda015704d6012c8cde14084d51891b0dc0e2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-05-28 16:19:38 +00:00
Tim Jenssen
8790cbc9de Merge remote-tracking branch 'origin/13.0' into qds/dev
Change-Id: I6dcba6ce7a9dec1c14dd6ad27732337c60eb7def
2024-05-28 15:14:38 +00:00
Cristian Adam
1712402b35 CMakePM: Add project CMake settings support
This is useful if projects do not to have "Auto Run" CMake or want to
have Junctions enabled.

Change-Id: I4a636e7bf64fe2d29d15d39fe9aa46807684c716
Reviewed-by: hjk <hjk@qt.io>
2024-05-28 15:03:42 +00:00
Jarek Kobus
97caf327ba LocatorMatcher: Use LoopList element with sub task tree
Change-Id: I92002426421f14ba5705c60418c4c0ac1fd6a7ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-28 14:05:40 +00:00
Eike Ziller
b92ef2c7e7 ProjectExplorer: Fix tracing scope name
Change-Id: I7a47e86b7fe2451ab418f094a5e65a63f9844d25
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-05-28 13:55:09 +00:00
hjk
8ec4acd775 ProjectExplorer: Save environment id after creation
Change-Id: I15e5515aa239d5cd6241444f9647869d9ea98a39
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-05-28 13:27:35 +00:00
hjk
ad2b0954d3 Lua: Add support for Layouting::Label
Change-Id: Id06f082262af1aed4e22d40790ad3ed6ba2b5dd9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-28 12:52:35 +00:00
Alessandro Portale
01040420a7 Core: Export Core::executePluginInstallWizard
ExtensionManager wants to execute the wizard, but it lives in another
plugin.

This change exports the former Core::PluginInstallWizard::exec as
Core::executePluginInstallWizard

Change-Id: I3ba068e9c8351355abfedfb9f6d6879de55b0534
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-28 12:39:06 +00:00
Cristian Adam
43d57eb76f Aspects: AspectContainer emits changed() for contained items
Change-Id: I93e4659a13a1a36c1d4b54ead2770428d396421d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-05-28 12:02:55 +00:00
Marcus Tillmanns
bd50ee7573 Lua: Implement Utils::Lua
Change-Id: Ib5a7f63d1c37b29beb424707962d21102db5927c
Reviewed-by: hjk <hjk@qt.io>
2024-05-28 11:55:07 +00:00
Marcus Tillmanns
06e08178f0 Utils: Add global Lua interface
Change-Id: I8fe5813b7987f3c771a1747b1089fa2d1c717e97
Reviewed-by: hjk <hjk@qt.io>
2024-05-28 11:16:03 +00:00
Marcus Tillmanns
b9f2808384 Lua: Add connection guard
Improves safety by limiting connection lifetime to
lifetime of lua vm.

Change-Id: I508b0814fdda169f5e30d7c3282132e3c622a0a5
Reviewed-by: hjk <hjk@qt.io>
2024-05-28 11:13:20 +00:00
Mahmoud Badri
f752178576 QmlDesigner: Fix examples version handling
Example version should be <= QDS version to show in the examples.

Fixes: QDS-12853
Change-Id: Iaa4e6244a5451e05672f9001a0d74ef84144b1bc
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-28 11:11:45 +00:00
Mahmoud Badri
fa3a6a39d6 QmlDesigner: Rename user bundles json files to just bundle.json
Change-Id: I23440591083146d9630d0beec8a22efbc5339d35
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2024-05-28 11:07:27 +00:00
Marco Bubke
b01e039cec Sqlite: Update to 3.46.0
Change-Id: Ic2b2e75a7b88fa92409118381cf74c00bf120f85
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 11:06:57 +00:00
Marco Bubke
ec2642e362 Utils: Add to_underlying
to_underlying was added to C++23 to get the underlying integer type for
an enumeration.

Change-Id: Ib7262882a47cf4b060cff428bb10a6a65c089fc5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 11:06:50 +00:00
Marco Bubke
72df0a9ced QmlDesigner: Fix wild casts
Never use a cast for a dependency injection. If it can not be null use a
reference.

Task-number: QDS-12883
Change-Id: Ie63a4968f264587a8781f04fa10048e1a7371e44
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2024-05-28 11:06:44 +00:00
Marco Bubke
fd8cef3c6e QmlDesigner: Use the noexcept interface for optional and unexpected
Optional and unexpected have a interface designed after pointer usage.
That cannot throw exceptions. They added continuation too. That is
making it harder to make mistakes.

Change-Id: Ie9d41a2e69c7467a7e4ac4999825aede1326e529
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 11:06:36 +00:00
Marco Bubke
b8322aece2 QmlDesigner: Use error notifier for prototype and extension type name resolving
If the prototype or extension has an unresolved id, it needs to be
checked, if an exported name belonging to the prototype or extension was
updated. In that case the id has to be again resolved.

Task-number: QDS-12761
Change-Id: I7a733662cf37e13e8c2db53dec5a4f3e0a9b6ecf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 11:06:28 +00:00
Christian Stenger
26cfa86969 Cppcheck: Quote file paths
This patch fixes the most common issues with path quoting.

Fixes: QTCREATORBUG-28586
Change-Id: Ia5f400d062a2459f49288fcd4bc316ced2b269e6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-28 10:51:55 +00:00
Christian Stenger
67f18a1a56 Cppcheck: Finish progress bar on fail
Fixes: QTCREATORBUG-27961
Change-Id: If1bbd5b14ec77e8bde1617c692388a2868e3ce0f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-05-28 10:51:49 +00:00
Christian Kandeler
fbdc246ea8 CppEditor: Consider open editors in CppRefactoringChanges::cppFile()
... and get rid of the three copies of that code.

Change-Id: Iee95c1332fc782812f1181ee11f58d0ff4a67c6c
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-05-28 10:50:13 +00:00
Sami Shalayel
ee8ad68f5b Enable qmlls by default
Change the default values for enabling qmlls to true. Don't use the
latest qmlls version by default for now because qmlls will crash on qt
5.15 projects.

Also remove the "experimental" from the checkbox text.

Fixes: QTCREATORBUG-30851
Change-Id: I6cac396817eecb0d3bd071668d0588ec6eef1d4f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-28 10:35:08 +00:00