Commit Graph

68765 Commits

Author SHA1 Message Date
Eike Ziller
9144ab75f4 Add test for examples parsing
Change-Id: Id2ec8afcdbdff97e12b32b836c955552589081c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit 87b5176fd2)
2023-04-13 07:14:05 +00:00
Eike Ziller
ac17e0e2ad Convert Examples model to FilePath
Change-Id: I56219d2f9516662b32d45fd9b2108a0ad34113cc
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 255afd45bf)
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 07:13:50 +00:00
David Schulz
e6e9405cc9 TextEditor: remove redundant semicolon
Change-Id: Iac82849a858bd567ff1230ec8c0ea48b5ef47e17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 06:52:04 +00:00
David Schulz
f773c09f33 TextEditor: fix crash on reload
Since TextDocument::openImpl potentially processes events it could
delete TextMarks. So tracking them in TextDocument::reload can be
considered unsafe. Track them in TextDocumentLayout instead and remove
the tracked mark if it gets deleted while reloading the document.

Task-number: QTCREATORBUG-29004
Change-Id: I9d0478e9c763b49f145c1bbaeed1a0b602757014
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-13 06:09:10 +00:00
Semih Yavuz
78cf563142 reformatter: fix formatting of js directives
Fix the miscalculation of the start / end of the js directives lines.
Also small optimizations on usage of increment operators. Add a unit
test.

Fixes: QTCREATORBUG-29001
Change-Id: I38923f137dca5c0b89d474cd747a64ec11e62fd9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-12 11:50:43 +00:00
Jarek Kobus
8175d5abda onResultReady: Provide a context object for all usages
Remove overloads for onResultReady() and onFinished()
that don't take context object.

Change-Id: Iaec538bcccd29e22791ec65cc95b4b87640708c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-12 11:05:16 +00:00
Eike Ziller
3ba769fb46 Fix saving of hardlinked files
Our atomic write involves writing a temp file and renaming that (which is
the only way to achieve something atomic). This creates a new inode, and
disconnects any hardlinks.

Note that the existing implementation for file paths with needsDevice
already keeps hardlinks intact, because even though it first writes into
a local temporary file it then writes the content directly into the
target with dd.

Check the number of hard links via system API and fallback to unsafe
writing if there are any, for desktop paths.

Fixes: QTCREATORBUG-19651
Change-Id: I3ce1ee81f339f241f0a2c9aa6f2259cb118ebef6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-12 08:47:53 +00:00
Jarek Kobus
59c1fae60b DirectoryFilter: Hide public methods
Make most of the public methods of DirectoryFilter
protected. Move connection to project manager signals
into AllProjectFilesFilter c'tor. Remove unused
DirectoryFilter::directories().

Change-Id: I66d16c2c90188de6a03fb072fed6c87ea3d9ce4c
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-04-11 14:03:19 +00:00
Alibek Omarov
abe7738811 CompilationDatabaseProjectManager: Add missing GCC include flags
GCC also accepts -iquote and -idirafter flags to set include path.

Change-Id: Id8088faa4cfcfb9d6005ad13527c0bc26dc4feb3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-11 12:29:05 +00:00
Eike Ziller
584874f15f Move examples manifest parser in separate function
and file. To make it auto-testable.

Change-Id: I19d263bf080a0089eb9a4ec0f379c52446771c0a
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 7e75097447)
Reviewed-by: hjk <hjk@qt.io>
2023-04-11 11:56:42 +00:00
Jarek Kobus
205fb14a43 ClientRequestTask: A few fixes
1. Rename ClientRequestTaskAdapter into
   WorkspaceSymbolRequestTaskAdapter as it's adapting
   the WorkspaceSymbolRequestTask, not the general
   ClientRequestTask.
2. Rename the registered name inside Tasking namespace
   into SymbolRequest, as WorkspaceSymbolRequest
   may collide with the class defined inside workspace.h
   header. We also aim for rather short names inside
   Tasking namespace in order to not to be too verbose.
3. Register the adapter with QTC_DECLARE_CUSTOM_TASK,
   not the task itself.
4. Fix isRunning() assert inside start().
5. Drop check for Client::locatorsEnabled() inside
   preStartCheck(), as that's being done beforehand
   when needed.

Amends 8e9b893325

Change-Id: I7cef290e18d5d86b48aa17d548a058bf35fd31ec
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-11 08:14:57 +00:00
hjk
25f7dfac25 ProjectExplorer: Remove FileTransferDirection
Only 'Upload' is in active use, and the direction determination
gets fiddly when more than one remote device is involved.

If there'd ever be a real need for a 'Download', I add / reimplement
that as a separate case in FileTransferMethod.

Change-Id: I51580a180aae6f0ed5904ff1b828c9ffd6da658c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-06 17:09:08 +00:00
Burak Hancerli
69902addf1 QmlProjectManager: Fix the build error coming from -Werror
Change-Id: I46601bcbb9ce358d34211fdea76707abcb5ca709
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-06 15:43:33 +00:00
Miikka Heikkinen
e82898a184 QmlDesigner: Implement basic lights baking support
It is expected that user manually specifies all necessary light baking
related properties, including exposing them from subcomponents if
needed.

qlmdenoiser that is used to denoise generated light maps is a third
party application. It can be found here:
https://git.qt.io/laagocs/qlmdenoiser

Fixes: QDS-9403
Change-Id: Ida6fc142440b9ffa8cc97d578f85d8b76cb4b43f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-04-06 15:19:23 +00:00
Christian Kandeler
6536ea7f05 Update qbs submodule to HEAD of 2.0 branch
Change-Id: Ie07019ff0a93394a3738b5e0dc5718e74668992d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 13:43:12 +00:00
Alessandro Portale
3eb60d80e5 Android: Skip "Make Install" and "Build APK" if not ProductType::App
If the target's product type is not "App", the "Make Install" and "Build
Android APK" build steps need to be skipped.

Fixes: QTCREATORBUG-26980
Change-Id: Ia8bb61d407d040b851a74bad3d23876a7d31af73
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-04-06 13:32:41 +00:00
Samuel Ghinet
2175b976fb QmlDesigner: Fix material no longer downloadable if once canceled
Task-number: QDS-9618
Change-Id: Ic3bb6594611dc51e34e0a6e4456749539b1cf211
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-04-06 13:06:56 +00:00
Marcus Tillmanns
d05faf64f4 Terminal: Correctly parse url links with empty path
Previously urls such as http://google.com were appended to the current
dir, as FilePath::isAbsolute would return false since there is no path.

Change-Id: I17546aed322a74f6b8cbcc166d37608fd809fd1e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 13:06:11 +00:00
hjk
46b9cd952a Debugger: Add skeleton for a debugger adapter protocol using engine
- Support the launch of an application
- Support continue/pause an application
- Support add breakpoint only after an app is launched
(I.e. preset breakpoints won't work)
- Support stop the debug session
- "Remove one break breakpoint" works but removes all breakpoints

ToDo:
- Polish the transition between stages
- Fix breakpoints handling
- Add support "Step in", "Step out" and "Step Over"

Task-number: QTCREATORBUG-27279
Change-Id: I5c32ce713f5a0f19cc3b9d995cbbadd8adf6a413
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-06 13:04:43 +00:00
Marcus Tillmanns
45c2e3fe58 Copilot: Add insert next word action
Fixes: QTCREATORBUG-28959
Change-Id: Ied53ad5676133e2eb71988ecfcce90c5ad77e3c3
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-06 12:52:55 +00:00
hjk
a8a9bf1713 ProjectExplorer: Be more generous on what the manual copy step accepts
That's a manual fallback for odd cases, do not artificially restrict usability.

Change-Id: I6e5433559534ae1d7be29a218442b46c306b2bed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 12:49:09 +00:00
Artem Sokolovskii
e0be80a19d ClangFormat: Change Override check box name and ToolTip
Change-Id: I3d80ca3c2fd9dd6210220eca0db1ecec5dad9f0e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-06 12:03:48 +00:00
hjk
2c3373172b RemoteLinux: Simplify RsyncDeployStep implementation
Change-Id: Ife6eb2d1f7ab2202e7ddc6c13c68f3ed09403553
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-06 11:51:04 +00:00
Artem Sokolovskii
028686b419 ClangFormat: Grey out Clang-Format Style config when not overridden
Add feature to grey out the Clang-Format Style configuration widget
after unchecking the 'Override' checkbox.

Change-Id: I94bbb1f4436f3caeaed55d49582211257e480d0d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-06 11:20:29 +00:00
Marcus Tillmanns
166c0d6558 Terminal: Safety checks
Change-Id: I095ca03dcc7bf943638d7ce785c658c0fed3b2f1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 11:20:29 +00:00
Marcus Tillmanns
392c13be11 Terminal: Enable by default
Change-Id: Ic21d4f0431c5999a3671dd1afe04fa27c3d816fe
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-06 11:20:22 +00:00
Marcus Tillmanns
ccbab62461 Docker: Make end of auto detection obvious
Fixes: QTCREATORBUG-28819
Change-Id: I2d93c472ed7b29329642cb8052b6f7b980d017d9
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-06 11:20:12 +00:00
Marcus Tillmanns
6583f27caa RemoteLinux: Fix double-remote terminal process
Change-Id: Ibfc6b6f2ce218be39ca0aa9fc582516b0efe4536
Reviewed-by: hjk <hjk@qt.io>
2023-04-06 11:20:03 +00:00
hjk
7e63574764 CMake: Disable the default "install into temporary host" deploy step
This is not needed with the new option in the actual cmake build step.

Change-Id: I3bf8bd4ed96c44223ad401406a168d3c8d07fa23
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 10:07:48 +00:00
hjk
4753b658bb CMake: Allow to run staging installation in CMakeInstallStep
User configurable, on by default (only) for cases where build and run
device are different.

The staging dir is by default a randomly named directory on the build
device, but can be changed by the user if needed.

Overall, this does not change anything for a pure local setup (but
would let the user opt-in into staging, too)

Change-Id: Ic1c5fd1f1261e067692710c9e3aa9d821897478d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 10:07:37 +00:00
Marcus Tillmanns
388e516200 Terminal: Improve link copy
* Show link if control key is pressed (without mouse move)
* Copy link on Control+Shift+Click
* Add Copy Link Action to Right click menu

Change-Id: Ide4ff4e77c03e015117c67f09c9d60dedd14dfcb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 09:25:36 +00:00
Christian Stenger
db2c5f87b1 Squish: Prepare perspective for object picker
Visual adaption for the later addition of the object
picker functionality.

Change-Id: Id1c422465d4cebcea9eb366621b57a3c076385cc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-06 08:59:42 +00:00
Marcus Tillmanns
f65206f990 Utils: Rename Port::parseFrom function
It can parse both netstat and cat /proc/net/tcp output

Change-Id: Iafe37be7ace6a1eda068340b1f07e24a71724db1
Reviewed-by: hjk <hjk@qt.io>
2023-04-06 07:18:28 +00:00
Marcus Tillmanns
3cd5e32e9c Debugger: Start debugserver for remote macOS
Change-Id: I5f713892dfbaaaecb7459c288df109bfe337f891
Reviewed-by: hjk <hjk@qt.io>
2023-04-06 07:14:45 +00:00
Marcus Tillmanns
522de9bfd7 Devices: Unify Port Gathering method
All devices that support it use the same mechanism to gather ports
so this patch removes the individual implementations in favor
of a single one in IDevice.cpp.

This patch also removes:
* canAutodetectPorts() as it was not used.
* Port::parseFrom...Output as they are not used anymore.

Change-Id: I8ecedec2d71e60985402387982c64311c5a651e6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-06 06:58:44 +00:00
David Schulz
f5c41a7f83 Python: Allow installing multiple pip packages in one task
Change-Id: If6cc1373cd38c07b29ac48fa51bf0ed35d6f104b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 04:44:55 +00:00
Assam Boudjelthia
4b73de5580 Android: allow non-integer platform sdk versions
Some of the more recent SDK platform versions don't follow
the form android-xx (x being integer) and can contain non-integer
characters or other sections such as android-33-ext4, which were
not showing on the list of SDK platform versions in the project's
settings.

Task-number: QTBUG-112465
Change-Id: I3de14c4f1b15a64dcced48c6e8817efbda6677bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-05 17:38:45 +00:00
Ali Kianian
4dfe3d31eb QmlDesigner: Use icon-fonts as the source of backspace icon
The backspace icon used to be drawn by painter lines, and this method
is replaced by an icon-font symbol.

Task-number: QDS-9513
Change-Id: Iaa19f286bc961d71ddc182bd2c431bc024c7aa79
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-05 15:18:38 +00:00
Burak Hancerli
66d72433a6 QmlProject: Refactor QmlProjectManager
- feature: JSON based project manager plugin
- feature: functionality to write QmlProject file
- tests: tests for QmlProjectItem

Task-number: QDS-8810
Change-Id: I8989e54577e9cd883bd76346e22774cc7f7ed93f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 15:13:43 +00:00
Ali Kianian
4871e472c4 Fix the wrong condition for the menu style
Change-Id: I9a3b2602c4baaa7f2d7cba20bcc94b04f093ceef
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-05 15:12:46 +00:00
Semih Yavuz
5b220e3a49 Fix typo in method name
Change-Id: Icd8c057fa55cf1fb5d7cba7ab283237a20ab091f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 12:49:01 +00:00
Jarek Kobus
55cdfeab97 GenericGdbServerProvider: Fix a warning about unused variable
Amends 617d93761e

Change-Id: I7f9d89f8ff10e1618e9a02912a6c993311e9622b
Reviewed-by: hjk <hjk@qt.io>
2023-04-05 12:30:03 +00:00
Jarek Kobus
37f2d68464 CppModelManager: Pass context object into signal connection
Change-Id: I6b66fbc6300597534a1498e4abbd8c3162cee73e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 12:29:47 +00:00
hjk
14ecda9ca2 ProjectExplorer: Rename BuildStepFactory::cloneStep{,Creator}
It clones the functor to create the step, not a step as such.

Change-Id: Ie07b321e28fae888bb800a574a717251f3661a2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-05 12:24:21 +00:00
hjk
aa5472ac1b RemoteLinux: Hide GenericDeployStep implementation
And un-export its factory. Re-use down-stream is now done via
step ids instead by inheritance, so the implementations do not
have to be visible anymore.

Change-Id: I258adf7ede404b1eeedb8d703238b1a8b4793302
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-05 12:20:31 +00:00
hjk
25c33be9f4 Boot2Qt: Switch deploy step creation to clone-by-id
This finally cuts the compile-time dependency on individual
factories or even step implementations.

Change-Id: I764d489231762982dad803ce1cad9aca6352f1d9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 12:15:48 +00:00
hjk
7265fd479c ProjectExplorer: Add more functions to find FolderNode children
Will be used to avoid some of the temporary lists created by
FolderNode::{file,folder}Nodes.

Change-Id: Iac4bd1473a480971230a0d2426b993afb82648e0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-05 12:11:01 +00:00
Alexander Drozdov
617d93761e BareMetal: add ability to connect to already running GdbServer
Allow GenericGdbServerProvider connect via TCP to the already running
GdbServers. Useful for the remote debugging for BareMetal devices
like Xilinx UltraScape+ PSU: Xilinx provide his closed hw_server
component that allow a Gdb connections.

Change-Id: Ifd3af542a83d3357db366d6842461c2b2e49c4e5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-05 10:51:05 +00:00
Jarek Kobus
e22d79fbb5 ClangModelManagerSupport: Drop namespace scopes
Change-Id: Id8d9474a35e367469b435d10b3eba0700dffc304
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 10:48:54 +00:00
Christian Stenger
36ca97d32b PE: Silence soft assert
Change-Id: Ie07d261cc49a20fd57d885e9be9d63c4b4a8743f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-05 10:11:34 +00:00