Commit Graph

80529 Commits

Author SHA1 Message Date
Ali Kianian
0887174727 QmlDesigner: Add "Group/Single selection" to the 3D context menu
- "Toggle Group/Single selection mode" option is added to the
3D Editor's context menu.
- All 3D actions are pushed into a map and are accessible by
View3DActionType as the key.

Task-number: QDS-8200
Change-Id: Ia5071ef8901b926ee4e4889fd840fc49c859bccd
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-12-19 14:34:40 +00:00
Miikka Heikkinen
970af9e64d QmlDesigner: Fix state preview rendering with multiple View3Ds
Multiple View3Ds with shared resources such as materials don't always
properly dirty themselves when a shared resource changes. Work around
this issue by rendering the base state twice if there are multiple
View3Ds.

Fixes: QDS-8618
Change-Id: I3840a082ff8e55557afe5a5f139382d82cd6b184
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-19 14:13:21 +00:00
hjk
d53842d512 QmlProjectManager: Re-organize fallbacks for runtime search
This was getting messy.

Change-Id: Idce960b393fa02c5a032bb3a0c93929604d77f17
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-19 14:00:55 +00:00
hjk
6a4123a96f QmlProjectManager: Even more FilePath use
Change-Id: I4990b9171598d7f277f8e8e5a2b3e0fb1a3375d0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-19 14:00:39 +00:00
hjk
5c7c102f3e QmlProjectManager: Fix starting .qmlproject on Boot2Qt
The "qmlscene" is called "qml" nowadays. Also give device settings
more priority to cover cases where there is no Qt build setup at all.
For this case, also demote the missing Qt build version from "Error"
to "Warning".

Task-number: QTCREATORBUG-28074
Change-Id: Ic44d2bee1965493925d21317d12d5c1f66ace88b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-19 13:59:38 +00:00
Amr Essam
08d4eab619 QmlDesigner: Create menu for Effects creation in the Asset Library
- Add menu item for effect creation instead of new file dialog
- New effect dialog with validating qml file name with qml naming conventions
- Open Effect Maker automatically when an effect is created

Task-number: QDS-8490
Task-number: QDS-8578
Change-Id: I04b075a0b283318906f309c7d394eda48577ae74
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-19 13:57:59 +00:00
Cristian Adam
a0afd51f3f CMakePM: Add "CMake Install" deployment step
This commit adds a "CMake Install" deployment step, which is using
"cmake --install" command.

"cmake --install" command has been added in CMake 3.15, this is why the
minimum CMake version has been updated to 3.15.

Note that CMakeBuildSystem::makeInstallCommand is still using cmake --
build --target install due to a CMake bug regarding "Ninja Multi-Config"
generator, which doesn't intall all binaries via "cmake --install".

Fixes: QTCREATORBUG-25880
Change-Id: I504674c380055d8ef136d344a78b80c17ecf9765
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-19 13:57:43 +00:00
Cristian Adam
2eb2aa13ae Qml2Puppet: Fix configuration when qml2puppet is disabled
Setting a property on a non existing target is a no go.

The changed done in 5b6bf29143 got somehow
removed by 036948c628

Change-Id: Id6d09b27817fa2c1f2c2c13127994710f5a2981a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-19 13:57:28 +00:00
Sami Shalayel
90b8e482c9 qml code model: load builtins import
LinkPrivate::linkImports() would either load the <builtins> or the
<defaults> module, but only process the <defaults> module in
LinkPrivate::populateImportedTypes().

Note: The <defaults> module (from the package '<default>') is the
QtCreator magic replacement for the actual <builtins> modules
(from the package 'QML').

This means that if the <defaults> were loaded, then QtObject would
be recognized as an object from QtQuick.
On the other hand, if the <builtins> were found, then neither
<defaults> nor <builtins> would have been imported and QtObject
would not have been found in the imports (because neither <defaults>
nor <builtins> would have been imported).

The "<defaults>-found" situation happens right after a "reset code
model" while the "<builtins>-found" appears when the qml code finally
found the <builtins> package, usually after running cmake or when a
project was freshly opened in Qt Creator.

Instead, always try to load both <defaults> and <builtins> module.

Also, fix the builtins.qmltypes (that contains the qt creators magic
types) to reflect that Component and QtObject
are both available from the QML package (the <builtins> module), as
else one cannot import QtObject from QtQml after a code mode reset.

Fixes: QTCREATORBUG-28287
Fixes: QTCREATORBUG-28375
Change-Id: I67084a169dc5ca8ec2474b721dbef83cd47037c7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-19 13:53:59 +00:00
Artem Sokolovskii
5cc77c4bf1 qmleditor: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ic6d667d97a9708963f7c3e21aa9598ffe0f9c7b7
Reviewed-by: hjk <hjk@qt.io>
2022-12-19 12:44:36 +00:00
Cristian Adam
70b3388684 CMakePM: Allow relative compiler paths for presets
You can have a preset with the PATH environment variable modified and
with CMAKE_C|XX_COMPILER CMake variables only as "gcc.exe" and "g++.exe"

Qt Creator now will search in PATH after the compiler file names and
work as expected.

Fixes: QTCREATORBUG-28602
Change-Id: I8520f6fcf5e542600fab08228d04d3709d3a8e8f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-19 11:52:37 +00:00
Christian Stenger
a7d8c4889e QmlPuppetCommunication: Fix cmake file for lupdate
lupdate cannot handle conditional source files.
Fixes target ts_untranslated.

Change-Id: I4110df9c8d935e3d10446cc8cc3b5d10d192e612
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-19 09:53:30 +00:00
Eike Ziller
456b8b69f9 build_plugins.py: Create signed package for plugins
On macOS if SIGNING_IDENTITY is given.
Creates an extra <plugin>-signed.7z, to not interfere with existing
build setups.

Change-Id: I8ec7f5cbeb14fb749d5d62398916629b83bdb833
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-16 14:59:06 +00:00
hjk
e42d24fca9 CppEditor: FilePathify some of the refactoring operations
... and adjust surrounding code.

Change-Id: I1d36e5a0c6ba14a1d9b8fd59340f1bb2a1e45ad1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-16 14:27:50 +00:00
Christian Kandeler
edd0e97ce1 ProjectExplorer: Fix wrong include
Change-Id: I5cc697749ad0abc92b633cb71f6c1a86c3627b24
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-16 14:22:35 +00:00
Henning Gruendl
cb187d7912 UpdateInfo: Fix long "show details" list
Task-number: QDS-7599
Change-Id: Ib3114b7284ae591e140d4e42739760fe7e13fae5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-16 14:03:07 +00:00
Samuel Ghinet
965fa9450c QmlDesigner: Fix cancel button not reverting background color
In the 3D view, when the user experiments with different background
colors, but then decides to cancel, upon pressing the Cancel button and
closing the dialog, the last color picked remained set.

This happened on Qt6.4 and not on Qt6.3. The reason for this was the
usage of Array.isArray() on an object exposed from C++ to QML of type
QVariant that could hold either a QList<QColor> or a a QColor. It looks
like there is no supported way from qml/js to see if a variable is a
list / sequence or a scalar. So the best way would be to always work
with QList<QColor> even though in most cases only one single QColor is
being used.

Task-number: QDS-8143
Change-Id: Ia7e8e1facad24439ad244305c213bb12e286105b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-12-16 13:59:25 +00:00
Mahmoud Badri
bb37d782ca QmlDesigner: Optimize requesting an image info for tooltips
Avoid loading an image for the sole purpose of getting the dimensions.
Also small relevant tweaks.

Change-Id: I3d11175340cb77d3634fe7e69481ad26db8a74ef
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-12-16 13:34:33 +00:00
hjk
674aad728e RemoteLinux: Hard-code /bin/sh for use in Open Terminal
... when changes to the environment are requested.

Ideally, that should be the user's chosen shell on the device,
but ssh does not support the case of specifying shell variables
without also giving an executable.

Short of playing tricks with /etc/passwd, getent, or env, use
/bin/sh which is guaranteed to exist.

Change-Id: I8d4b87f2a94eb9614d85dcacebd539ac645dc33d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-16 12:50:49 +00:00
Marcus Tillmanns
223bec26a1 LanguageServer: Add tooltip to file pattern
Change-Id: Ic404636bda45e9ff7ff3639232ebddfbfaf821c6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-16 12:28:32 +00:00
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