Commit Graph

88653 Commits

Author SHA1 Message Date
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
Marco Bubke
ba0f65937f Add changelog to appdata.xml release
Change-Id: I6f8472c5e36e808373d390ee23b05cba9d814c91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-18 12:54:37 +00:00
Marco Bubke
fe67cd3956 Fix errors and warnings in appdata.xml
{
    "errors": [
        "appstream-missing-developer-name",
        "appstream-failed-validation"
    ],
    "warnings": [
        "appstream-summary-too-long",
        "appstream-screenshot-missing-caption"
    ],
    "appstream": [
        "W: io.qt.QtCreator:29: screenshot-default-missing",
        "E: io.qt.QtCreator:~: desktop-app-launchable-missing"
    ],
"message": "Please consult the documentation at
https://docs.flathub.org/docs/for-app-authors/linter"
}

Change-Id: Ief1cb6300c0976962bfbf436db9d69bc4a97850c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-18 12:54:29 +00:00
David Schulz
5f8ffd66ff QmlJSEditor: fix assigning outline toolbar widget
Instead of adding a second toolbar widget, replace the current one. This
avoids weird situations where you get two outline toolbar widgets, one
provided by qmljseditorwidget and another one provided by qmlls.

Turning the language server on deletes the combobox created by
qmljseditorwidget, such that qmljseditorwidget has to recreate
its combobox after the language server stopped being in use.

Also make sure that m_outlineCombo is set to nullptr after it gets
deleted, such that late jumpToOutlineElement and
updateOutlineIndexNow() calls do no try to attempt stuff on an already
free'd pointer.

Change-Id: Ie323a7b3e7a4d5e24407fcedf8383dd2f0efe525
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-06-18 11:23:13 +00:00
Christian Stenger
441ce652e7 Lua: Small tweak of wizard file
Change-Id: Ifef368aa646589d75f761c9893a18fa77b1b179c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-18 10:56:41 +00:00
David Schulz
c246cb8708 LanguageClient: postpone unreachable server error reporting
Since the overall nature of the communication is asynchronous calling
functions might not expect that an error is reported from within the
sendMessage function.

Fixes: QTCREATORBUG-31054
Change-Id: Ie73510eb632408a9f7a9367c3a3e47ad021da7fe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-18 10:50:38 +00:00
Leena Miettinen
c1c462ab11 Doc: Mention "Compiler Explorer Qt & C++ Source" template
Task-number: QTCREATORBUG-30604
Change-Id: I9f21d21086cff38923a2ef2f398d68b2f8652470
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-18 07:52:44 +00:00
Robert Löhning
70538bf38c SquishTests: Handle and report missed breakpoint instead of crashing
Change-Id: I28756803149828da871d48303ac0c989a2e99f7e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-17 14:46:31 +00:00
Leena Miettinen
becb0af00a Doc: Add more topics to \ingroup creator-how-to-manage-kits
- Add links to the kit management topics from other topics
- Always use \l{Kits} to link to Preferences > Kits
  This has lived a little, as I've changed the category names

Change-Id: Ibcb137824a23bfe7e320a215eb461f689c43db77
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-17 14:33:45 +00:00
Eike Ziller
56f2b1f1e8 Process: Add information about main thread to logging
Add a note if a process is started on the main thread. That adds
essential information to "blocking without event loop".

Task-number: QTCREATORBUG-31068
Change-Id: Iaf3bab88b79391c4ddc17d18a81e6d8ab712d22d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-06-17 14:11:48 +00:00
David Schulz
d22a95bc54 Debugger: fix some qtVersionAtLeast checks
Change-Id: I681927fe5e086738f7635f7e578238c448dca2a2
Reviewed-by: hjk <hjk@qt.io>
2024-06-17 13:04:41 +00:00
David Schulz
d30dda07a1 Debugger: fix PyType::resolved function call
Change-Id: I9301d7875bec68ccde5ccd480b12c0dc86b082f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-17 13:04:28 +00:00
Eike Ziller
8bbc72a017 Merge remote-tracking branch 'origin/14.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I325f21db9bac247a02cb14452f190b378147f581
2024-06-17 13:54:25 +02:00
Cristian Adam
29ce8fa009 LLDB-DAP: Fix assert messages
Amends 0cb8760338

The assert messages look like this:
```
Debugger::Internal::DebuggerEngine(0x3170607a0, name = "LldbDapEngine")
"EngineRunRequested"
SOFT ASSERT [09:46:50.984]: "state() == EngineRunRequested" in /Users/
cristian/Projects/QtCreator/repo/src/plugins/debugger/dap/dapengine.cpp:
205
SOFT ASSERT [09:46:51.313]: "state() == EngineRunRequested" in /Users/
cristian/Projects/QtCreator/repo/src/plugins/debugger/
debuggerengine.cpp:1300
Debugger::Internal::DebuggerEngine(0x3170607a0, name = "LldbDapEngine")
"InferiorRunOk"
```

Change-Id: Iceb7350c1997c9ce5d07818aff7a1f39c2abe271
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-17 08:51:23 +00:00
Leena Miettinen
e8a85f9974 Doc: Describe options for updating Python Language Server
Task-number: QTCREATORBUG-30604
Change-Id: Ie41a971271e3f350218d45777ed081bc23167f91
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-17 08:47:36 +00:00
Cristian Adam
1ba52d1daa LLDB-DAP: Handle source mapping and additional debugger startup commands
This way we can step into Qt source code, and run startup commands like
`process handle SIGSEGV --notify true --pass true --stop true`

Change-Id: I495c1ef1554157989f4013473c22217e2d980053
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-17 08:36:52 +00:00
Artem Sokolovskii
76e176afe6 Core: Fix "Show All Kits" button appears after configure project
"Show All Kits" now button appears when project has been just
 configured.

Change-Id: I68c61aa56aca27c98afb60ada4a4d900db404a6c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-17 07:43:24 +00:00
David Schulz
32fdd72f14 ASM: Fix build on windows
Change-Id: Iee491d09aca54160ea59a34b12f2ce061852b51e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-17 05:44:44 +00:00
David Schulz
963e55f3db Debugger: remove unneeded size cache lookup
Change-Id: I1d16c4d8d1436fe252269439e4059c6cd9886d81
Reviewed-by: hjk <hjk@qt.io>
2024-06-17 04:27:39 +00:00
Christian Stenger
e5844211ab PE: Fix adding first project for subdirs project
Change-Id: Iab2d463d7b138e9a6d4c9bf10e94556ea9a10d77
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-17 04:05:38 +00:00
Christian Stenger
4ff0f93abc QbsPM: Be less aggressive when providing proposals
Change-Id: I3826651030a3ec1c8293625c4c99c0ee31a97a5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-17 04:05:10 +00:00
Leena Miettinen
70941abad9 Doc: Add Type Hierarchy to the list of supported LSP features
Task-number: QTCREATORBUG-30604
Change-Id: Ic8925e990a14a38383f465295d857d15221693df
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-14 14:46:57 +00:00
Leena Miettinen
096c4ae18d Doc: Describe Open With > Qt Design Studio for .ui.qml.files
Task-number: QTCREATORBUG-30604
Change-Id: I4049e6717cb3e0811bed78a15a9be9c1fdda28d2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-14 14:02:02 +00:00
Cristian Adam
0cb8760338 Debugger: Fix LLDB-DAP attach to process
Change-Id: I464db537d85de7bce943334379b6ce499b32dc2b
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-14 13:06:16 +00:00
Jarek Kobus
ba73e3e50a SubDirFileContainer: Add optional filtering function
Change-Id: Icf972babadc87dbc681ca282984b82484afc68c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-14 12:43:01 +00:00
Jarek Kobus
81ed276828 IosToolHandler: Don't call stop() from the other thread
Task-number: QTCREATORBUG-30633
Change-Id: I0ddb354dbd3be685919b98589a5f0d534bd30dbe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-14 12:39:47 +00:00
Christian Kandeler
eb7332fb8b ProjectExplorer: Allow to create corresponding header/source file
... from the project tree context menu.

Task-number: QTCREATORBUG-24575
Change-Id: I65a9daf237cbbcfcfdf2b7b67191c249695a6b7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 12:39:09 +00:00
Eike Ziller
f22660facb Bump version to 14.0.0-beta2
Change-Id: I1ca19c9cb6f7d8bfec665300c23389ba22e93c1e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-14 12:33:32 +00:00
Leena Miettinen
a3a543a55f Doc: Add use cases for Add Curly Braces quick fix
- Update and add examples
- Make punctuation in the topic more consistent
- Add a link to the docs to the change log

Task-number: QTCREATORBUG-30604
Change-Id: I723af29117a4b35a70eed61058c5d43da285242d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 12:02:02 +00:00
hjk
625fd895ce Fix more metatype related deprecation warnings
QT_DEPRECATED_VERSION_6_0
static int type(const QT_PREPEND_NAMESPACE(QByteArray) &typeName)

Change-Id: I6a085c6d370b6d65193dc09d4318765de81a8ce3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 11:00:32 +00:00
Christian Stenger
36531a1068 Cppcheck: Fix handling of settings
We need to distinguish between the global settings and the
settings used for a manual analyzer run.

Fixes: QTCREATORBUG-28951
Fixes: QTCREATORBUG-30615
Change-Id: Ic2dabd14e4d06d77bebcedd9e653f54a4d179c82
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-14 10:47:03 +00:00
Cristian Adam
8a7402c7cd Debugger: Allow GDB/LLDB DAP debugger as native C++ debugger
This would allow manual registration of a GDB/LLDB DAP debugger from a
CMake configure preset as follows:

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

This way I can configure a project with a toolchain that uses a DAP
debugger (not every gdb/lldb has python bindings) and have debugging
working out of the box.

Change-Id: Id9bff26b6544b7af99caccb18cdbe0edb334218a
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-06-14 10:36:44 +00:00
Christian Kandeler
834e0867b0 Update qbs submodule to HEAD of 2.4 branch
Change-Id: I21173a7408dd40dbe12a142d01956cbb784d4ce7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 10:32:25 +00:00
Leena Miettinen
f1fd60077c Doc: Add example of Convert Function Call to Qt Meta-Method Invocation
Task-number: QTCREATORBUG-30604
Change-Id: I9245b4eb35f6cc951ba70583a628870b53040e7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 09:40:55 +00:00
Eike Ziller
a2a5cab07c Merge remote-tracking branch 'origin/14.0'
Change-Id: I240ecca23ec82e54699fcf11ba1d801d0a8c09f0
2024-06-14 11:27:59 +02:00
Christian Kandeler
44927d7cdc BareMetal: Do not ignore compiler flags
... when querying pre-defined macros.

Task-number: QTCREATORBUG-24040
Change-Id: Icd3625aaedb374048673c9eb239819b245dfdaa7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 08:32:26 +00:00
Christian Kandeler
c41c3619b1 BareMetal: Add missing pre-defined macro
Task-number: QTCREATORBUG-24040
Change-Id: I8d3a8f263cdee1d7971d339a56e30a6742b45bc5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 08:31:40 +00:00
Christian Kandeler
9e4fc34e79 QbsProjectManager: Consider common compiler flags
... also for non-GCC and non-MSVC toolchains.

Task-number: QTCREATORBUG-24040
Change-Id: I4133c4dac8183012e1bc6fd8a037f75a50d3a166
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-14 08:30:45 +00:00
Leena Miettinen
9aeb396836 Doc: Describe Preferences > C++ > Code Style > Statement Macros
Task-number: QTCREATORBUG-30604
Change-Id: I8ce44b3ed677076801d3ec96cdf33704a97f4efe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-14 07:29:20 +00:00
Leena Miettinen
ad2b6eeeb3 Doc: Describe Preferences > C++ > Code Model > Enable indexing
Task-number: QTCREATORBUG-30604
Change-Id: I93e2e251f58e335c6f4491fd9e7e84e69528611e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-14 07:29:13 +00:00
Cristian Adam
dcaa55200b Debugger: Add "LLDB Dap" preset
lldb has a dap interface since a while now. The "GDB Dap" preset is not
compatible, since gdb uses the same executable and lldb has a "lldb-dap"
(previously "lldb-vscode") executable.

Change-Id: I4105223659de093f0ee44129527c4830d21a3090
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-13 15:02:45 +00:00
Leena Miettinen
45f262f92c Doc: Describe new Clangd preferences
- Updated screenshots
- Added option names and location to the change log

Task-number: QTCREATORBUG-30604
Change-Id: I1554d6b7dbd588619eb992ef906d1bcef056f8c5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-13 14:30:19 +00:00