Commit Graph

80529 Commits

Author SHA1 Message Date
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
Pranta Dastider
432c5cd652 QmlDesigner: Update docs for menu items relocation
For the project export features menu items were
grouped and relocated. To keep things relevant
documents were updated.

Fixes: QDS-8510
Change-Id: I93da0aced4ff606e4c53180be7ab07d5aa1004a0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-12-15 12:15:23 +00:00
Samuel Ghinet
8d08409f59 QmlDesigner fix: do not automatically open example project on download
The user might click several example thumbnails, quickly one after another.
This would normally issue multiple "open project" requests, and at the
end the user doesn't know which of them actually opened. This might
also potentially end up in a crash to someone. Fixed this by no longer
opening the project automatically on open.

Also, added a close button, on the progress bar for the downloading
process, which the user can use to cancel an ongoing download. This
would be helpful if the example project was opened by mistake, and the
project is quite big.

Task-number: QDS-7845
Change-Id: Ica3105aac77b8eb01c888f08050bd542599794f9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-15 12:09:39 +00:00
Samuel Ghinet
7e5ecfe8bc Fix glitch in AssetsView when dragging files onto it
Moved the DropArea from the AssetDelegate into the AssetsView, so that
moving the cursor through the delegates no longer denies and then
permits dragging. This glitch happened because the DropArea was inside
the delegate, while the TreeView also has rowSpacing, which are areas
that do not belong to the delegates, and for which you don't normally
have drag & drop support.

Task-number: QDS-8232
Change-Id: If49a384f25bb870105448156f436e048479e880c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-15 11:54:34 +00:00
hjk
ea36472dce Perf: FilePathify PerfDataReader
Change-Id: I253cfd3724a15d40ef39dafd4f4497ca331ad596
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-15 11:35:09 +00:00
Orgad Shaneh
371e674967 Git/VCS: Use ctrlc stub for process execution
This ensures that child processes are also terminated.

Required specifically for Git on Windows, when running in cmd directory,
which spawns a child process for usr/bin/git. On this case, if git takes
long to finish and is aborted while running, the main process was killed
as expected, but the child process remained alive.

Task-number: QTCREATORBUG-27567
Change-Id: I40271eb42cfaefd81f2fe5af138254ab0a2c8da8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-12-15 11:34:59 +00:00
The Qt Project
3a90977da0 Merge "Merge remote-tracking branch 'origin/9.0'" 2022-12-15 11:16:53 +00:00
hjk
b2e4bad49c Cmake: Give a hint on the use of libdw-dev for the perf parser tools
Change-Id: Ia6aed65035856250a496db41cf1ffa81590dc536
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-12-15 11:09:46 +00:00
Eike Ziller
308a12b833 Merge remote-tracking branch 'origin/9.0'
Change-Id: I5b66ee9645904c9e736552d0d2c5f1b7c520dfbb
2022-12-15 12:03:49 +01:00
David Schulz
2d0456f085 LSP: Support remote LSP file paths
Change-Id: If3cf1b8d675ef091427dbcd703c7d14b384a1b3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 09:49:48 +00:00
Christian Stenger
75c43f926b Squish: Stabilize invoking context menu
Try a second time if the wanted menu item is not active when
triggering the context menu the first time.

Change-Id: I742db645542e6775baaa77fbdb1fd5a8e9a120f2
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-12-15 09:11:01 +00:00
Marcus Tillmanns
0b33a08af1 QtSupport: Warn if Link With Qt failed
When installing Qt Creator via

https://download.qt.io/official_releases/qtcreator/9.0/9.0.0/
qt-creator-opensource-mac-x86_64-9.0.0.dmg

The bundle is not writable / no folders can be created in it.
therefor "Link With Qt" would silently fail, as the button is not
disabled, even if the "canLinkWithQt()" returns false.

This also adds a message box to let the user known if the linking
failed.

Change-Id: Ifbc5d170cf81e898eec3ab8b9f53e1a939652b42
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-15 09:08:47 +00:00
Robert Löhning
3874ac236d SquishTests: Stabilize tst_codepasting
Avoid
"Error in type() invocation: Could not
activate toplevel-window for widget"

Change-Id: Ib68a975724ad3824800bdcb542916b6644f1dc7f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:33:25 +00:00
Robert Löhning
7b073efe4a SquishTests: Update tst_QMLS04
Change-Id: I383e8f652ae233df7ed5bef93dcaa9a43fe95f0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:32:58 +00:00
Robert Löhning
bbd5d6c7ae SquishTests: Update FindToolBar
...as seen in tst_CSUP05

Change-Id: I1736a4ec9c69a3db3fc98ea1234b0363ceeaef41
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:32:30 +00:00
Jarek Kobus
7bd26571e4 DiffEditorController: Aggregate reloadRecipe
Instead of declaring virtual getter.

Change-Id: I0f9e995bdff1b7e387e71daaf149a3726b7c09af
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 08:29:04 +00:00
Jarek Kobus
5aedb4ba56 DiffEditorController: Simplify API
Get rid of VcsBaseDiffEditorController::setWorkingDirectory()
and rename DiffEditorController::setBaseDirectory() into
setWorkingDirectory(). Don't pass workingDirectory
inside setDiffFiles().

Change-Id: I6a3a02d5e3ddc23977ed2908cd8d7b8ed51a9ee0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 08:28:44 +00:00
Vikas Pachdha
6ae064619f Add an option to style merge from string data
Task-number: QDS-8601
Change-Id: Icb56e5bc26c6cc3711c304641cce3cbbd6d7c8b2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-15 08:05:12 +00:00
Jarek Kobus
ce161d0b16 VcsBase & dependent: Fix const correctness
And some minor cleanups.

Change-Id: Id0c2df6865ba84c054f0fb97c0ac42a76a128355
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 16:57:14 +00:00
Jarek Kobus
042087ab1d DiffEditor: Simplify internals
Don't pass startupFile arg on every setDiffFiles.
Provide a setStartupFile() separate setter inside
DiffEditorDocument and call it directly from
DiffEditorController::setStartupFile().

Correct updateDescription() implementation.

Change-Id: Ie489431632bdabc61e2c692d09caf7b2e3990764
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 16:52:26 +00:00
Jarek Kobus
ac7a582ca9 FileListDiffController: Don't set startupFile()
We didn't do that before. We did it only for ShowController.

Amends cbcfc0242e

Change-Id: I6ba68bdb6b16204bcc66bdfd63bf7457c713ac28
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 16:51:36 +00:00
Tim Jenssen
973f74b8a0 qmljs: improve readability
Change-Id: I110c2b08bcdfc29b310b84378cd3b119ee7f5f91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-14 16:31:04 +00:00
Thomas Hartmann
f22a8a42a9 QmlDesigner: Avoid infinite recursion
Task-number: QDS-7864
Change-Id: Idc7b44d23ff252a870357bafc2dd072e0b83befd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-14 16:12:58 +00:00
Thomas Hartmann
3066dce3b8 QmlDesigner: Show error message if Qt is less than Qt 6.2 in template
The cmake application template requires Qt 6.2 or higher.
Otherwise we show an error message.

Task-number: QDS-8110
Change-Id: Ib22edae8634727e17edf2bb19594549bd81a49b4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-14 16:11:58 +00:00
Christian Kandeler
d0046ec435 ProjectExplorer: Consider the form "-D key=value"
... when filtering compiler options for MSVC macro extractions.
Otherwise we end up with a stray command line argument, breaking the
call to cl.exe.

Fixes: QTCREATORBUG-28016
Change-Id: I29979a4b968d2056a0feba61fee01d5ddc9aa28f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-14 15:46:43 +00:00
Christian Stenger
e3df0b90d8 LanguageServerProtocol: Fix toPositionInDocument()
Change-Id: I8c7d045a5a884995892a904afe50e443297b951b
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-14 15:30:01 +00:00
The Qt Project
4723848be5 Merge "Merge remote-tracking branch 'origin/qds/dev'" 2022-12-14 15:19:02 +00:00
Tim Jenssen
7f234ed768 Merge remote-tracking branch 'origin/qds/dev'
Conflicts:
  src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.cpp
  src/plugins/qmldesigner/components/contentlibrary/contentlibrarytexturesmodel.cpp

Change-Id: Ieda6242b845387100022b08251283891fb0fbda7
2022-12-14 14:30:09 +00:00
Eike Ziller
fdad6496f4 Fix language selection box
When Qt Creator is installed in a path with underscore.

Amends 451d02c88d

which changed the pattern matching from file name only to the whole
path.

Fixes: QTCREATORBUG-28591
Change-Id: Ice6a7cb34fd2bb98c384a3b7cb573614bb7a43b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-12-14 14:22:21 +00:00
Sami Shalayel
5935536b71 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: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-14 14:04:34 +00:00
The Qt Project
249c3561cb Merge "Merge remote-tracking branch 'origin/9.0' into qds/dev" into qds/dev 2022-12-14 13:39:53 +00:00