Commit Graph

88532 Commits

Author SHA1 Message Date
Sami Shalayel
2809b27be8 doc: document new qmlls checkbox for older versions
Also document the new behavior in the documentation about enabling
older qmlls versions.

Task-number: QTCREATORBUG-31088
Change-Id: I619119f5fec077a50712566bd8fa32b414e239dc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-21 07:31:46 +00:00
Sami Shalayel
3b558792eb qmlls: ignore versions from Qt 6.7 or below
Do not select qmlls executables from versions below 6.8 by default,
as those have less features than QtC's builtin codemodel. Add an
option to re-enable using qmlls versions from Qt 6.7 or below,
which is off by default.

Fixes: QTCREATORBUG-31088
Change-Id: I56bfd39bc980996a92232cbcb424252d755cdfc0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-21 07:31:38 +00:00
Leena Miettinen
2f2ed24092 Doc: Update info on CMake presets
- Described overriding CMake project settings in CMake presets
  or a CMakeLists.txt.shared file
- Added an example of setting debuggers
- Added an example of cross-compiling and running on the wine emulator

Task-number: QTCREATORBUG-30604
Change-Id: I04f26d98e21b1a1a214de5ab4451ac1e758e489e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-21 06:39:36 +00:00
Christian Stenger
1ab00ae5ec Fix Qbs build
Amends f5dde31558.

Change-Id: I409b872ccab2bfe825df3c993aaf942d327e9381
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-21 05:26:08 +00:00
Marcus Tillmanns
b32d23de35 ProjectExplorer: Add FileAccessFactory
Change-Id: I2468934bae03f352b8011224f345795ba8941862
Reviewed-by: hjk <hjk@qt.io>
2024-06-21 05:18:40 +00:00
Marcus Tillmanns
04f56b01d4 Docker: Add "isContainerRunning"
Change-Id: I2e22f5fb0ed86b0f7d61dc47c23696c00ec875ea
Reviewed-by: hjk <hjk@qt.io>
2024-06-21 05:18:32 +00:00
Marcus Tillmanns
366aaf5f78 Utils: Add detection "aarch64"
Change-Id: I493afbd30a10fc027239022826bc5cb09424851d
Reviewed-by: hjk <hjk@qt.io>
2024-06-21 05:18:25 +00:00
Marcus Tillmanns
a1a6ccbf1c Utils: Add FilePath::watch
Change-Id: I1e5706f22aaa072c68b97496896cfa6d244d9849
Reviewed-by: hjk <hjk@qt.io>
2024-06-21 05:18:16 +00:00
Christian Kandeler
729c803758 ProjectExplorer: Ensure environment from aspect is always up to date
Otherwise our (intential) delay when updating the environment from the
text edit can lead to surprises for the user.

Fixes: QTCREATORBUG-31052
Change-Id: Iaba8c496094ad95d8c099c67c0805317f32a2936
Reviewed-by: hjk <hjk@qt.io>
2024-06-20 15:36:07 +00:00
Cristian Adam
561dbbf5de LLDB-DAP: Add "env" to "launch" command
On Windows where there are no RPATHs we need to pass the environment to
the "launch" event, otherwise applications can't be started.

Also only add "sourceMap" and "preRunCommands" if the arrays are not
empty.

Change-Id: If631d36db8e28d2c30962b4e9c6a3aa3162000a1
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-20 14:34:49 +00:00
David Schulz
805c687dbc ProjectExplorer: add rescan action to workspace project context menu
Change-Id: I7a823853c3681da5ec5019a3f66bd98aa1c81cb2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-20 14:05:31 +00:00
Ralf Habacker
94663d0db7 cmake: Add support for custom startup programs for executable targets
CMake supports the use of custom startup programs that are provided
in the IDE to simplify execution.

If the build system provides launchers, these are provided as an
additional selection field of the run configuration including an
entry without launcher.

As of cmake version 3.29, the start programs are extracted from
the API of the cmake file. For older cmake versions, a launcher
is initialized from the cmake variable CMAKE_CROSSCOMPILING_EMULATOR,
if available.

Fixes: QTCREATORBUG-29880
Change-Id: I4345b56c9ca5befb5876a361e7da4675590399ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-20 13:40:21 +00:00
David Schulz
6b1e7eff93 Editor: Do not add to history twice for double clicking bookmarks
Activating a bookmark via a double click resulted in both signals
getting emitted doubleClicked as well as activated, and both were
connected to BookmarkView::gotoBookmark. So the goto code was executed
twice resulting in adding the position to the navigation history twice.
Fix this by only connecting to activated since this is always emitted
alongside the doubleClicked signal as well as when the item is activated
by keyboard.

Fixes: QTCREATORBUG-30842
Change-Id: I48ea50afa105f81a2be8ac94096dd29164fce5fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-20 13:21:03 +00:00
Eike Ziller
987d292414 Disambiguate "Executable:"
"the executable" versus "the file is executable"

Fix translations where both variants were available (i.e. that used the
adjective for the translation in Core, but the noun elsewhere).

Fixes: QTCREATORBUG-31059
Change-Id: Id140612f201cea1feca007557bbedf030cfdf504
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-20 10:58:20 +00:00
Christian Stenger
267f392977 Dumper: Fix dumping QLocale
Change-Id: Ib34970549c147c593f39023ec0aed53885af6ce0
Reviewed-by: hjk <hjk@qt.io>
2024-06-20 10:44:20 +00:00
Christian Stenger
b1b27d4a49 Dumper: Fix dumping QDir
Change-Id: I5b02e8b0a000efe1c3bbbc22f7e624ea218e1cfc
Reviewed-by: hjk <hjk@qt.io>
2024-06-20 10:44:13 +00:00
Cristian Adam
cd3729b4aa DAP: Handle failed "launch" response
On Windows if the application being debugged has missing dlls it will
not be able to be started by the debugger.

Now the user will be informed that the application failed to start.

Change-Id: I0a76a8c6cd122970b00adec371b254adc60915c0
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-20 09:56:45 +00:00
David Schulz
6e648ee931 Lua: fix "conversion from 'size_t' to 'int'" warning
Change-Id: Ibb6b17f82ebf992a48b29570c829376ef142ea10
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-20 09:19:33 +00:00
Eike Ziller
f5dde31558 Move the shipped Lua plugins to the resources directory
On macOS, files in Contents/PlugIns/ need to be codesigned individually.
Since Lua plugins are not really binaries, per Apple's documentation
that is to be avoided (and we currently only sign executables there).

Just move Lua plugins generally to the resources directory, like we do
for other scripts like the debugger Python scripts, and load them from
there.

Change-Id: Idabd6b7c0c7c6e842b1752488cb7073f00e7be49
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-20 07:40:46 +00:00
David Schulz
3f1906dc20 Debugger: add cdbext stub file
... and add some typing infos to the cdbbridge

Change-Id: If85bc75976c869332ef658c32615f6b110459048
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-20 06:45:48 +00:00
Leena Miettinen
450397f12d Doc: Update screenshots of environment editor
Support for user comments in the editor was already
described in an earlier change.

Task-number: QTCREATORBUG-30604
Change-Id: I69f147681211256be9e25cf63c5b0b8dbd15f452
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-20 06:45:00 +00:00
Leena Miettinen
113275118e Doc: Describe overriding values from Preferences > CMake > General
Collect the settings to a table with links to where each setting
is documented.

Task-number: QTCREATORBUG-30604
Change-Id: Ia06076cdd7f51851f58307119716b4ed3cef630e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-20 06:44:44 +00:00
Marcus Tillmanns
611f6bdbea Lua: Don't destroy lua state too early
The Lua state needs to stay alive as long as any references to it
may be alive. Therefore this patch leaves the destruction to the end.

Fixes: QTCREATORBUG-31087
Change-Id: Ic49723575f7d2fe474cba9546845b65d57d7dcd0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-20 06:22:26 +00:00
Christian Stenger
8404bb5c81 Lua: Add images to qbs build
Change-Id: If898960c5e195ddcf733e847f09ea1301a48de11
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-20 06:16:35 +00:00
hjk
1563e0173e TextEditor: Fix some deprecation warnings
QT_DEPRECATED_VERSION_X_6_1("Use setFontFamilies instead") inline void setFontFamily(const QString &family)
    { setProperty(FontFamilies, QVariant(QStringList(family))); }

Change-Id: I22f48abf783404a80e9d8d604d1ff886c2a55f14
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-19 14:26:42 +00:00
hjk
39570fb675 Utils: Rename PathChooser::rawFilePath() to unxepandedFilePath()
That's what the implementation does, and judging from the using code
wasn't quite clear.

Change-Id: I4ca776ba4da83a36162adad2dd595eb39eb0f43d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 14:26:05 +00:00
Christian Stenger
282960528e Valgrind: Remove no more needed fix
This was needed to fix the handling of the project settings,
since 044c1f686c no more needed.

Change-Id: I960078b0ca39739ad566caeba46edf1a5050ebef
Reviewed-by: hjk <hjk@qt.io>
2024-06-19 11:47:58 +00:00
Christian Stenger
044c1f686c PE: Fix handling of settings
Amends 81f8a3fd7d.

Fixes: QTCREATORBUG-30680
Change-Id: I47c2c50f1acb1888dc8e3514e942ebefaf87e6ca
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-06-19 11:12:35 +00:00
Leena Miettinen
b0428120c4 Doc: Describe the option for hiding unconfigured kits
Task-number: QTCREATORBUG-30604
Change-Id: Ia36c9734937cb7de4e07b417ef36dee178f24f3c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 11:11:11 +00:00
Christian Kandeler
d7ed05ae14 ClangTools: Do not assume there is a corresponding open document
... when creating a TextMark.
Amends 2ad12b5b2c.

Change-Id: Ic748012dadda0fc94814176589a3bdff20cb4cd6
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-19 10:30:37 +00:00
David Schulz
1eb2535c62 ProjectExplorer: fix warnings of projectnodeshelper.h
Change-Id: I79ed8b4ac9fa3e8c25438678011e455bfedbaabc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-06-19 10:24:33 +00:00
Marco Bubke
dd962c2989 Docs: Add option to build docs by default
Change-Id: I6cb8c2b163f5d01040952aecced287334d616976
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 09:01:02 +00:00
David Schulz
6b8a41b1ba Debugger: fix manual list template arguments
'res' is not part of the function anymore, the result of the split is
directly written into self.type_template_arguments_cache since
67072d3f5b

Change-Id: Ib76b1f82a4f807e54fbb3cec96b317c36011bf51
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-19 08:56:48 +00:00
David Schulz
745b32d10c Debugger: optimize QStandardItem dumper for cdb
Change-Id: I97f448da86f03edf82f0f1543e8c784d1f3a5f8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-19 08:56:40 +00:00
David Schulz
66413dc06f Debugger: do not overwrite qtNamespace in the cdbbridge
Change-Id: I11a95710867fd0a6b5a2956a9f8f4a86932038dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-19 08:56:29 +00:00
David Schulz
4ded08dd38 Debugger: defer type resolve again for the cdb debugger backend
Task-number: QTCREATORBUG-29833
Change-Id: I671359f84d3f4d78d051f6a087776ceab7d7460d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-06-19 08:55:20 +00:00
Christian Stenger
1aa4b401f1 PerfProfiler: Fix construction of arguments
Change-Id: I683ee5a9a23a222fc80f1972c64262c5d91228e9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-06-19 08:42:40 +00:00
Jarek Kobus
51c9611268 ProjectNodesHelper: Some cleanup
1. Make internal scanForFiles() static.
2. Make it a non-template method.
3. Pass const QFuture<void> & instead of non-const QPromise<Result>,
   since we use it here just for isCanceled() checking.
4. Simplify setting a concurrent call data by eliminating the
   intermediate lambda.

Amends c5564559cc

Change-Id: I4b7e3be6e8428c913920e66f2c00800055e83fde
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-19 08:39:42 +00:00
Jarek Kobus
15e510abcf TaskTree: Make use of the trivial DoneResult handlers
Change-Id: I71915fc50f073cc90b0fb2562bb82e9c4a73ccd1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 08:32:37 +00:00
Jarek Kobus
33eb5f509c TaskTree: Make it possible to pass DoneResult as a done handler
This patch addresses the 38th point in the bugreport below.

Add tests for it.

Adapt docs and warning messages accordingly.

Task-number: QTCREATORBUG-28741
Change-Id: I276d2d4c3a514147f67252dc5073d79fed94b9ff
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 08:32:27 +00:00
Leena Miettinen
ab78847af8 Doc: Update model editor docs
- Describe new model element properties
- Update screenshots
- Update style

Task-number: QTCREATORBUG-30604
Change-Id: I8b296a610ce330d6c382f10e2ff3d8d9994ad503
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-19 08:25:51 +00:00
Semih Yavuz
e596707a6b preview named colors on hover
ColorPreviewHoverHandler only considered #XXXXXX and Qt::XXX
to preview colors. We can also have named colors that are
constructed from string literals. Add handling for string literals.
Note that this creates preview when hovering over any color related
string literals in the editor regardless of whether they are bound
to color property.

Also fix the crash due to the out-of-bounds access by adding boundary
check.

Fixes: QTCREATORBUG-30594
Change-Id: I5084b743c76beb6f343bd07049e3051a55fe8d53
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2024-06-19 08:12:58 +00:00
Cristian Adam
36e84b1c54 Doc/Wizards: Update minimum CMake version to 3.16
Qt Creator due to the usage of CMake File-API was already requiring
CMake 3.14.

Qt 6.7 now requires CMake version 3.16, thus the version requirement
bump.

Note that Qt SDK is shipping CMake version 3.27.

Fixes: QTCREATORBUG-31079
Change-Id: Ife26d178b80949941cb808a1fbd91389d6d723bc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 08:12:41 +00:00
Jarek Kobus
34044757ef TaskTree: Fix tweaking done result in group done handler
If the onGroupDone() handler returned DoneResult,
this result was ignored by the running task tree.

Fix it so that the optional DoneResult takes
priority over group's workflow policy.

Add tests for it.

Change-Id: I7ffdef2af08337d7214f2c3d4b68153cddaad425
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-19 07:41:38 +00:00
David Schulz
c5caee8be2 Dumper: fix exception string
'...' % ... has 3 placeholder(s) but 2 substitution(s)

Change-Id: I8d0ac49a97d8ff1745240276fa4ef02f73991dbe
Reviewed-by: hjk <hjk@qt.io>
2024-06-19 07:16:51 +00:00
Cristian Adam
b240bfb3db CMakePM: Fix crash when hovering in CMake file without a project
Fixes: QTCREATORBUG-31077
Change-Id: I60526fb37e5d8c7713a5b22dfddb3e52c50fc5f7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-18 15:51:45 +00:00
Cristian Adam
ded397ca55 Sqlite: Fix build with QTC_STATIC_BUILD
Qt Creator was failing with:

```
In file included from /home/jarek/dev/creator-14-work/src/libs/sqlite/
sqliteexception.h:6,
                 from /home/jarek/dev/creator-14-work/src/libs/sqlite/
sqlitevalue.h:7,
                 from /home/jarek/dev/creator-14-work/src/plugins/
qmldesigner/designercore/projectstorage/projectstorageinfotypes.h:8,
                 from /home/jarek/dev/creator-14-work/src/plugins/
qmldesigner/designercore/projectstorage/projectstoragetypes.h:8,
                 from /home/jarek/dev/creator-14-work/src/plugins/
qmldesigner/designercore/include/propertymetainfo.h:9,
                 from /home/jarek/dev/creator-14-work/src/plugins/
qmldesigner/designercore/include/nodemetainfo.h:6,
                 from /home/jarek/dev/creator-14-work/tests/unit/tests/
printers/gtest-creator-printing.cpp:17:
/home/jarek/dev/creator-14-work/src/libs/sqlite/sqlite3_fwd.h:7:7:
error: conflicting declaration ‘using sqlite3 = struct qtc_sqlite3’
    7 | using sqlite3 = struct qtc_sqlite3;
      |       ^~~~~~~
```

Task-number: QTCREATORBUG-30009
Change-Id: Ibc18f16ab304a92f73882c9336eebc2abd54aa44
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-06-18 15:28:59 +00:00
Cristian Adam
a8e2ccdea6 CMakePM: Expand CMake macros in the "vendor" debugger settings
Qt Creator will use the CMake macro expander for the "vendor" string
entries.

This would allow the following CMake preset snippet to work as a CMake
preset user would expect it to:

```
  "vendor": {
      "qt.io/QtCreator/1.0": {
        "debugger": {
          "DisplayName": "LLDB Dap 18.1.7 Debugger",
          "Abis": ["arm-darwin-generic-mach_o-64bit"],
          "Binary": "$env{HOME}/llvm/clang/bin/lldb-dap",
          "EngineType": 1024,
          "Version": "18.1.7"
        }
      }
    }
```

Change-Id: I4ea5ce0b004ff05cebbe3e0ce4b6bcc09c716322
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-18 14:48:21 +00:00
Alessandro Portale
12d222636d Core: Add Tag variant to Core::Button
As specified as Figma component.

Change-Id: Id115fe5703b58902bc7479e966787c969e6b073d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-06-18 14:42:37 +00:00
Leena Miettinen
b08421af2e Doc: Mention how conditions on SCXML transitions are shown
Task-number: QTCREATORBUG-30604
Change-Id: Ib1c7806951d63c558e0a98aea2f618c2c397acaa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-18 13:10:25 +00:00