Commit Graph

80509 Commits

Author SHA1 Message Date
Marcus Tillmanns
0aeec80eeb Docker: Add Filepath::localSource()
FilePath::localSource can return a filepath that represents a local version
of a remote file.

It is used to let the debugger select the local version of a file when
debugging a remote target.

Change-Id: Ieb934ef0d454e8ff55e71df41dca825974d85da7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-12-16 12:27:49 +00:00
Samuel Ghinet
0feeb37ef7 QmlDesigner: Fix textures created from assets can have invalid source
When creating a texture from an image in the asset library, the "source"
for the texture was wrong for images outside of the "content/images"
directory of the project.

Task-number: QDS-8535
Change-Id: I30a28a7cb63748ce0fb81396ca59c7ccc9e83340
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-12-16 12:24:09 +00:00
Artem Sokolovskii
3904539e0d ClangFormat: Fix crash when m_fileName is empty
Fixes: QTCREATORBUG-28600
Change-Id: I3e0d64eb892daa5c63abe7ec81b258bf96fcdb1b
Reviewed-by: hjk <hjk@qt.io>
2022-12-16 12:15:37 +00:00
Artem Sokolovskii
2ffa843d40 ClangFormat: Make clang format checks widget resizable
- Change Form to Grid that looks consistent for
different OS

Change-Id: Ibb5fc3564d8c25457c4bf520acf78b25c542b5ae
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-16 12:15:32 +00:00
Xavier BESSON
3f554f3837 TextEditors: Implement "Follow Symbol" for HTTP urls in string literals
Task-number: QTCREATORBUG-14967
Change-Id: I30923aa94d761b06edb1f67007fd7e2a67065ef0
Reviewed-by: Xavier BESSON <developer@xavi-b.fr>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-16 12:08:37 +00:00
Samuel Ghinet
aaf2e6f0f7 QmlDesigner: Fix asset images becoming invalid after delete + recreate
The problem was that, for "invalid assets" (i.e. pixmaps of assets that
could not be read / did not exist on disk), the "default" thumbnail was
saved in the cache -- and thus, when the asset re-appeared on disk, the
"default" (invalid) thumbnail was shown.

Task-number: QDS-8591
Change-Id: Iec2f3e704c1deef2e7a7c75532518639fdc677e5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-12-16 12:07:26 +00:00
Marcus Tillmanns
e603116abb ClangCodeModel: Remove unused variable
Change-Id: I06ab5d049db40c17e9b730b29934266445d5911f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-16 11:59:58 +00:00
Eike Ziller
994626d1f6 README.md: Add/correct instructions for building perfparser
Change-Id: I7dbdc9a34fb3297957cdb93a6f042c4fb6282eea
Reviewed-by: hjk <hjk@qt.io>
2022-12-16 11:57:21 +00:00
Xavier BESSON
676a4c1ee3 Fix CMakeFormatter
CMakeFormatter was executed on the file on disk before save, which messed things completely up (PipeProcessing seems to expect the file on disk already to be saved)

Change-Id: Idc7b475b5cddeaba4dc7bcc1b7899d73b2692310
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-12-16 11:43:00 +00:00
David Schulz
1eb73e4eb3 Editor: prevent validating line number in unwrapped editor
Checking whether a position is inside the first line is also not for
free. Only check the line number of a cursor position if we expect the
editor to have multiple lines per block or in other words line wrapping is
enabled.

Change-Id: I0e3cb1fbd11c250677f7c11d1a5c780f60085ec2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-12-16 11:34:02 +00:00
David Schulz
f87fccafc1 TextEditor: prevent shaping text for indent depth painting
QTextLines cursorToX indirectly calls shapeText which is not for free.
We just want to have the x position for the line so there is no need to
shape the complete text to get the position of the first cursor.

Change-Id: I0ae636ed8250385b7ac77c6f37d45922bbf2e9bf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-12-16 10:31:11 +00:00
David Schulz
5eeef19743 LanguageClient: resend rename request automatically on changes
Instead of asking the user to trigger the search again button before
being able to trigger the replace operation.

Change-Id: Ie2f0674255249b27d9435fc9df344e3f21bb886a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-16 09:12:01 +00:00
Miikka Heikkinen
f9ecc8b57a QmlDesigner: Ensure all View3Ds are rendered when one is
If View3Ds share resources such as materials, changing such shared
resource doesn't in all cases make all using View3Ds dirty until
one of the views is rendered. For purposes of rendering 2D view, this
is too late, as we determine the list of items to render before any
is rendered.

Fixed the issue by ensuring all View3D items in the scene are added
to the list of items to render if any of them are added to that list.

Fixes: QDS-8346
Change-Id: Ib18ce0d37978857efdb67e15976e1fecdc1b6c96
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-16 08:59:07 +00:00
Burak Hancerli
76565fa8d7 QmlDesigner: add support for multiple qml backends
This patch includes;
 * Fork of original QML runtime as an alternative
   QML backend for QDS
 * Flexible structure for adding/removing different
   types of QML interpreters

Note:
When forking the original QML the config.h is renamed as
qmlconfiguration.h because it was clashing with sqlite and
QmlRuntime.QmlConfiguration uses "magic" name matching.
QmlConfiguration/qmlconfiguration is unlikely to conflict with anything.

Task-number: QDS-8373
Change-Id: Ifaa1b766c717ce12d6b3c9ddbbc0665669797e36
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-16 08:58:34 +00:00
Christian Kandeler
2e6437b8fe ClangFormat: Enable plugin by default
... and remove the compile- and run-time warnings.
Users can easily opt out of using clang-format via the settings dialog
these days (globally and per project), so loading the plugin does no
harm.
As of b88b73d9c1, clang formatting should
work without our custom patch, so there is no need to warn against that
either.

Change-Id: I5336857c6e27d9162084c2dacf187acb0015dc6a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-16 08:41:29 +00:00
Marcus Tillmanns
c0a692a96d Clang: Use clangd from build device
Change-Id: I41184ba267ac82a790835c94623c8b752679ab24
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-16 08:40:57 +00:00
Eike Ziller
34aa8e9e19 PluginSpec: Add a "LongDescription" to plugin meta data
The EmacsKeys plugin had a long description with details on what it
does, which in principle is a good thing, but shouldn't be shown with
e.g. the -version command line argument.

Split the description in a short "Description" (name unchanged for
compatibility), and a possibly longer "LongDescription", using only the
first one for -version, and showing both in the plugin details.

Adapt the EmacsKeys plugin meta data.

Fixes: QTCREATORBUG-17312
Change-Id: I4a4abf51e5e19b71ee73edb14c6a897fbceaf916
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-16 08:29:57 +00:00
Christian Kandeler
858d496113 QmakeProjectManager: Provide generators for Xcode and Visual Studio
Task-number: QTCREATORBUG-28149
Change-Id: I6c012224900de7835c2e617e262db676ddbbd465
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-16 07:55:36 +00:00
David Schulz
c8e1201236 LanguageClient: Do not send out invalid errors
An error is expected to contain an error message so add one that misses
one. Additionally assert when trying to set an error to a response that
is invalid (does not contain message or code.)

Fixes: QTCREATORBUG-28598
Fixes: QTCREATORBUG-27856
Change-Id: I0631433d847610531758d297a93a5c7cdfdc6c1d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-16 07:05:55 +00:00
Jarek Kobus
a86679d00d VcsBaseDiffEditorController: Use setUseCtrlCStub for vcs commands
Change-Id: Id79723afb2ce8d3994a4494263cdde4060aa1917
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 21:06:30 +00:00
Jarek Kobus
0f52acfe1c DiffEditorController: Remove unused stuff
Change-Id: Ie4d5b0b3bac3e46c5db647263757222979b982be
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:56:38 +00:00
Jarek Kobus
d59eca8577 DiffFilesController: Reuse task tree
Change-Id: Ia83cd81dc3dad671c7ec72cdffe882775c7e4508
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:56:04 +00:00
Jarek Kobus
df2d68eb4f VcsBaseDiffEditorController: Remove unused stuff
Change-Id: I34cc9dee686929fb69253ba16ff0fd5fed023ca1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:55:52 +00:00
Jarek Kobus
2d285bc808 SubversionDiffEditorController: Reuse task tree
Change-Id: I7032fece3956d96dbed7432eec63c00fbbf5427c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:55:44 +00:00
Jarek Kobus
b5ebc80370 MercurialDiffEditorController: Reuse task tree
Change-Id: I45cfb00963bcaf5ded2e0d492126138583f10cda
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:55:36 +00:00
Jarek Kobus
817c13c9e1 GitBaseDiffEditorController: Remove unused method
Change-Id: Iff58be30e40a181fc259564415a9850a891b4953
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:55:27 +00:00
Jarek Kobus
c06c6be4ab GitDiffEditorController: Reuse task tree
Change-Id: I6f89a6865ee45eea66a0307c273ef8d76976da3b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:55:16 +00:00
Jarek Kobus
36fd9cb9d5 VcsBaseDiffEditorController: Make post processing reusable
Move creating the post process task into vcs base class
and reuse it in subclasses.

Change-Id: Ibd81d1640524980c0554a5d0ddc41b96ecd7f73f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 20:54:59 +00:00
hjk
6de2b0cbb3 RemoteLinux: Move RemoteLinuxEnvironmentAspectWidget
... closer to its only use. Plan is to compress this further, possibly
using EnvironmentAspectWidget generically.

Change-Id: I1b20b116594dbe51a62d1ecbe7d01638a5d48f77
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 16:13:35 +00:00
Artem Sokolovskii
feb72dd084 ClangFormat: Make formatting mode a project option
- Added the possibility to set formatting mode for every project
separately. The indenter will be switched for a file if the mode
changes.

Fixes: QTCREATORBUG-28188
Change-Id: I4e7f9841c54f9b6763586c16672a10ca36bf843d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 16:12:28 +00:00
hjk
192605f01c Utils: Remove some fallback code that uses a full remote env
... when an empty environment was given. At least for opening
a terminal in the remote linux device setup dialog this was
intentional as the passed env was meant to be the 'diff' that's
then passed via the SSH commandline, which then - independently -
broke due to not properly escaping of too complex values.

Right now, neither way is really correct. The path forward seems
to move towards 'EnvironmentChange' in general, but this will
take some time.

Change-Id: I86ca4da4b30b7b463583e002f2c19d6e6c5541e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 16:09:11 +00:00
Pranta Dastider
51fe3ca59e QmlDesigner: Update component integration instructions for CMake
Starting with QDS 3.9 the cmake projects can download and
add the Qt Quick Studio Components to the application project.
This patch updates that notion into the document.

Fixes: QDS-8603
Change-Id: I7555b04eca72fc09bc9c73b0954f58aec2f3ddd5
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-15 15:48:15 +00:00
Xavier BESSON
9f9c40b29f QmlJsEditor: Implement "Follow Symbol" for qrc paths in string literals
Task-number: QTCREATORBUG-28087
Change-Id: If1e706a96bb9cbb004f826c4d58d7d7f0c306b41
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-12-15 15:35:53 +00:00
Eike Ziller
1faae7dec4 Bump version to 9.0.2
Change-Id: Ibc35cf8f8b388438d34c3b824c9eb97d9eefb9ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-15 15:01:02 +00:00
hjk
31af32533e ProjectExplorer: Better fallback for displayed names
... for inaccessible files. We have a file path already, an empty
string is worse.

Change-Id: I92eefe0a4b45e5cbf3dd28a73211530296a66cbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-15 14:53:25 +00:00
hjk
4ea60589bb ProjectExplorer: Allow opening terminal in run config
... in the environment aspect widget.

Change-Id: Ia9c92c1480b3e11bd227b29222e2aa1f97d24437
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-15 14:52:30 +00:00
Robert Löhning
698a495972 SquishTests: Use existing function saveAndExit()
Change-Id: I2e10de8b454a69b3e4ade7520b4fa00415bcde42
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 14:45:42 +00:00
Christian Kandeler
8b49b091f7 ClangTools: Run clang-tidy and clazy separately
They are two different tools and should not have been merged into a
single runner in the first place.
People can now actively decide to run clazy if they really want to,
rather than getting confronted with its increasingly irrelevant
complaints by default.
We keep the common settings widget for now.

Change-Id: I3c2b1db8c07ff5c128700d4a1deefd710967568a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-15 14:22:30 +00:00
Eike Ziller
01dc87b100 CMake build: Add hint for installing libdw-dev for elfutils
to the CMake output when elfutils is not found

Change-Id: I7ecc83ddadb0ce4bd4f8f9695cbf58443d71ff98
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-15 14:20:09 +00:00
hjk
ca6b14cf01 ProjectExplorer: Funnel environment fetching through device access
Easier nowadays. It's synchronous now, so conceptually worse,
but 'env' is not worse than 'ls', and this is used regularly
all over the place also for larger data sets without being a problem.

Change-Id: I2c2b1db8c07ff5c128700d4a1deefd710967568a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 14:17:36 +00:00
Henning Gruendl
8b1233c11e QmlDesigner: Fix mode switch crash
Task-number: QDS-8599
Change-Id: I4bebd2ff4f2ce93788743304ff335d118e23ce68
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-15 13:56:26 +00:00
Marcus Tillmanns
0b6b31b4ba clangformat: Fix compile error
Change-Id: Icdf4fcbc1c813557513bc1b0e8e8d2228a668e2b
Reviewed-by: hjk <hjk@qt.io>
2022-12-15 13:41:15 +00:00
David Schulz
445c3624ff QMakePM: fix potential crash when accessing deleted members
Fixes: QTCREATORBUG-28370
Change-Id: I1767678221afc0d1a99194bce2d987a226998da5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-12-15 13:27:19 +00:00
hjk
2f7263cd67 QmlProjectManager: More FilePath use
Change-Id: I7af611bdeffb8f06c5f014224c0b6c639a1d8a6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 13:14:48 +00:00
hjk
a1711fc5ba Utils: Add convenience functions FilePath::path{List,Component}Separator
Change-Id: Ib00aace2d5e98fa69a5a23b3950e560aefc662f6
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-15 12:58:09 +00:00
Marcus Tillmanns
eeeb5f0aad ClangFormat: Support remote filesystems
Change-Id: Ic5c06a826154e1bee92e3c283ab508177e86c428
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2022-12-15 12:43:40 +00:00
Miikka Heikkinen
bf4a94d619 QmlDesigner: Fix dragging materials to Model in navigator
Fixes: QDS-8537
Change-Id: I0d63676e9e7fc39166c1cd32a231547161b2f0a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-12-15 12:27:22 +00:00
hjk
5787a22f69 ProjectExplorer: Merge IDevice::{filePath,mapToGlobalPath}
They were doing practically the same. Keep the 'filePath' name for
now until something more fitting comes up.

Change-Id: I96ca4da4b30b7b463583e002f2c19d6e6c5541e6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-12-15 12:26:00 +00:00
Christian Kandeler
67c2570d74 ProjectExplorer: Add infastructure for build system specific generators
Task-number: QTCREATORBUG-28149
Change-Id: I95c5657db5d551bc5708b755418f27ebfb08a6ee
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 12:21:03 +00:00
Miikka Heikkinen
c476a1b807 QmlDesigner: Intercept stray mouse events on popup menus
By default Qt Quick Controls Menu lets mouse events through to the
underlying view if the event is not handled by the menu item.
This is the case for all clicks on disabled items and right clicks
on enabled items.

To prevent unwanted click-throughs, added a mouse area to the
background of StudioControls.Menu that eats all clicks.

Fixes: QDS-8584
Change-Id: I08fa93317ffcaf518b350d44bb555d84741e246d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-15 12:20:24 +00:00