Commit Graph

62421 Commits

Author SHA1 Message Date
Henning Gruendl
bd51b4fdc2 QmlDesigner: Add tooltips to UrlChooser
* Add tooltips with thumbnails to UrlChooser enable preview of image
  formats and meshes
* Add property editor image provider which makes use of the image cache
* Add mesh image cache collector in order to create thumbnails for
  meshes and built-in primitves
* Fix typo in explicit image cache image provider
* Add return value in time stamp provider if provided file does not
  exist

Change-Id: I2290d2ace87ddd90e9899e343f2ad1ecd2993fdf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-08 17:30:01 +00:00
Henning Gruendl
1c6fa83648 QmlDesigner: Change FileResourcesModel
Change FileResourcesModel to have one list of FileResourcesItem with
properties absoluteFilePath, relativeFilePath and fileName instead of
having two separated lists.

Change-Id: Ib4b4884a6739658434844d2adb9c05c3871104e7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-08 17:29:49 +00:00
Artem Sokolovskii
6d1478e1db Clang Format: Fix misplaced cursor after undo
Fixed behavior, when after undo function cursor, jumps
to the start of a file.
Join the undo block generated by auto format with the
last available undo block. This will place the cursor
at the last edit position instead of the document
beginning when triggering undo.

Fixes: QTCREATORBUG-27608
Change-Id: I1bb630af00e997ac53f178594445293ceebcfa26
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-08 13:17:18 +00:00
Christian Stenger
d291008322 GitLab: Display link to global settings in project settings
Change-Id: I18208c44f9538c31fae4df61f2e0d93c1efcc319
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 12:39:33 +00:00
Orgad Shaneh
dd7dd3462a Utils: Fix MSVC warning
incompatibility between int and quint64

Change-Id: If85eb13e4c6ff68a9b02dc036a971f03bab73d1b
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:19:11 +00:00
Jarek Kobus
de6fd1b1b1 QtcProcess: Refactor killTimer
Before we were installing the timer inside the process
interface handler. The issue was that when the handler was
moved into another thread, the timer was restarted (that's
what happens with all timers when they are moved into another
thread).

The fix is to keep the timer inside the caller thread and
detect inside waitForSignal() whether a timer was started.
In case the remaining time for kill timer is less than
a timeout for waitForSignal, we split the waiting into two
parts and execute kill() in meantime.

Change-Id: I2c18805593fe2f73d816cce40dbb45bf58a50715
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:13:13 +00:00
Jarek Kobus
224f580924 Move SignalType into processinterface.h
Rename it into ProcessSignalType. It's going to be
used in new interface.

Change-Id: Ifbab8bbb601f14ecbf65d940e524c558d5f1d7a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:03:29 +00:00
Jarek Kobus
cf47ad361d QtcProcess: Get rid of NoSignal synthetic value
Refactor flushing methods.

Change-Id: I1b98de58e8ddacfa5ff7e1627c5011c0bd207a8b
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 12:03:22 +00:00
Artem Sokolovskii
674f62d481 ProjectExplorer: Add possibility to keep link visible
Added possibility to keep link to global settings visible when
checkbox is invisible.

Change-Id: I724f1c1997b640b2277c4004acd24d5f6cca9faa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 11:43:20 +00:00
Jarek Kobus
493573b879 QtcProcess: Make reaper timeout customizable
Add a setter and getter for reaper timeout. This makes it
possible to customize the timeout for the reaper after which it
should call kill() when previous terminate() was unsuccessful.

This setting is also used for QtcProcess::stop().

Change-Id: I653a3ad107ae4173bb8254c85cfc07886bf6a9c6
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 11:21:42 +00:00
hjk
b6db9d8152 Gitlab: Some layout code cosmetics
Take advantage of the aspects' setLabelText.

Change-Id: I00060a02393fb90557f0f4dd01411fd3928c4c19
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-08 10:43:15 +00:00
hjk
6aa94e1e17 Qmake: Show more error if qmake runs but without output
At the same time, use the more descriptive FilePath::displayName()
instead toUserOutput().

Change-Id: I9bcca84b1f0be025c511b6fbf58c7308c9ffd60f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-08 10:42:39 +00:00
hjk
08952180a1 Boot2Qt: Fix creation of full command line
Task-number: QTCREATORBUG-27673
Change-Id: Idd1bf676ef7ec0821da938274b03d7529100b2e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-08 10:42:15 +00:00
Evgeny Shtanov
3b373eecd4 reformatCharacter: int to QChar conversion segfault
Debugger, watchhandler: incorrect type conversion:
Converting from `int` to `unsigned int` can lead to a situation where
the result is too large to be represented as a `QChar`.

Task-number: QTCREATORBUG-27107
Change-Id: I7873635f7a1ef29f62339ffe23b4dd84cb089e2b
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 09:56:12 +00:00
Christian Kandeler
49bb40f19e ClangCodeModel: Move "follow symbol" into its own class
Change-Id: Ic64c7275debaa59c524f349fd38460f47f826ecd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-08 09:48:17 +00:00
Jarek Kobus
457fe4eb87 DiffEditor: Drop Utils:: prefix when using namespace Utils
Change-Id: I640447bcd90bba4281b2b945f53c54040060d3bc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-08 09:16:42 +00:00
Brook Cronin
04b3962daf QmlDesigner: add new timeline animation icon
Change-Id: I69efb2ed5a56fbf1848d00963ae70002f11b2e75
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-08 07:52:52 +00:00
Eike Ziller
9ab0510eaf Aspects: Update of combo box when changing TriState value
Call SelectionAspect::setValue instead of skipping it and calling
BaseAspect::setValue directly. That takes care of updating the combo box
state.

Amends c8829ff5b3

Change-Id: I55e90459c2b54da09883f746b61b19d46acfdf92
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>
Reviewed-by: hjk <hjk@qt.io>
2022-06-08 07:52:22 +00:00
Tapani Mattila
0b404c9c7a QmlProjectManager: Load QDS landing page content when it is needed
Task-number: QTCREATORBUG-27583
Change-Id: Ib329816f7282b0c6f88d78d62a0c9f34c961e509
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-08 07:43:52 +00:00
Eike Ziller
1445e4180f TextEditor: Fix action text
It adds the next match to the selection (as a multi-cursor selection),
not the selection to the next match.

Change-Id: I7520cb3b765562fac2dd45fce5d3b0e4ee7c22c7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-06-08 07:41:35 +00:00
Xavier BESSON
bcf43e56b4 Label error for line length setting in QML editor
Change-Id: I637ef8b5aebfb05ebe9c132b3c6a60f170337c57
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 07:31:13 +00:00
David Schulz
b4b779d641 TextEditor: fix indent length calculation for rewrapParagraph
Fixes: QTCREATORBUG-27602
Change-Id: I43650be75807c9954eeabca4dbe6749de493f523
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 05:56:36 +00:00
David Schulz
33167f7f50 TextEditor: use tabsettings to get indent column
Change-Id: I23c84194633ba5cb485fefb6195fcbb3ad37d95a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-08 05:56:30 +00:00
Eike Ziller
f26da75f41 Merge remote-tracking branch 'origin/8.0'
Change-Id: I360d367eff4c3d91bbcb60d293c3135f810e84d3
2022-06-07 16:36:30 +02:00
Miikka Heikkinen
7269aafbd8 QmlDesigner: Ensure material library is created when needed
Added material library accessor to AbstractView, which creates the
material library and moves existing materials under it in case it
doesn't yet exist. Also added material assignment function to
AbstractView. The reason these were added to AbstractView instead of
being handled e.g. via custom notification in material editor is that
they need to be called from multiple different views in the same
transaction that triggers the need of material library.

Fixes: QDS-7081
Change-Id: If2bb884f87d04c9f3599c2342df66ef51ec238ee
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-07 14:14:56 +00:00
Eike Ziller
4ded73583d DeviceShell: Fix compile issues
- fix warning deviceshell.cpp:222:59: warning: suggest braces around
  initialization of subobject
- add missing dependency to app_version to tests

Change-Id: I6d61f26cbc6f51b28175257ab7d0f4d2b491fecb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-07 13:36:25 +00:00
Jarek Kobus
ec63e694d8 DeviceShell: Don't store a shell script on remote side
Execute a script directly on remote side instead.
Storing it always into /tmp/shell.sh may potentially break
when 2 or more shells are being started for one device at
the same time.

Change-Id: I2b8c94ef531fa4916383355a312421a3a18bfcad
Reviewed-by: hjk <hjk@qt.io>
2022-06-07 13:21:06 +00:00
Marcus Tillmanns
b82f321c9a texteditor: Add Select Next Match respect find settings
To increase the usefullness of the function, this change
adds the current search settings to the find() call.

This way the "case sensitive" and "whole words only" is taken
into account when searching for the next occurrence of the
selected text.

Change-Id: Ia4b28e84c39b9298d2dcbfa381ccf19d8137bfc6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-07 12:25:56 +00:00
Miikka Heikkinen
d2cc440c68 QmlDesigner: Add checkerboard background in navigator preview tooltip
Checkerboard helps visualizing alpha channel in previewed images.

Fixes: QDS-7060
Change-Id: Idb0139f8d8fcbf595bbfba3b333cd3d49f18d8af
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-06-07 12:06:10 +00:00
hjk
4c5f9dcbd4 RemoteLinux: Use more FilePaths in install step
Patch is self-contained, no functional change intended.

The transition is, however, not complete yet as the would break
the consumer side currently.

Change-Id: I04b7d919dffbfb9237863e6166247305c20f1091
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-07 11:47:30 +00:00
Eike Ziller
0ea2789ba1 Merge remote-tracking branch 'origin/8.0'
Change-Id: Id95539a7eb3ab68b8c387664b430576e37b68ac4
2022-06-07 13:15:16 +02:00
The Qt Project
f97d72f4ea Merge "Merge remote-tracking branch 'origin/7.0' into 8.0" into 8.0 2022-06-07 10:51:20 +00:00
David Schulz
047a955bac LanguageClient: fix sync with in outline widget
Fixes: QTCREATORBUG-27595
Change-Id: Id5404b90151519baff0024ad3eaca7d2b0a236b0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-07 10:33:28 +00:00
hjk
39b1e0009d iOS: Fix compiler warnings
warning: loop variable ‘extraArgument’ creates a copy from type ‘const QString’ [-Wrange-loop-construct]
  507 |         for (const QString extraArgument : extraArgs) {
      |                            ^~~~~~~~~~~~~

etc.

Amends 1241761035

Change-Id: I883f675bd42a38fb4547a6b1c06dba6c5db1938c
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-07 10:31:52 +00:00
Christian Kandeler
a167bd9ad2 Do not pass Utils::LinkHandler by rvalue ref
There is nothing special about this type that justifies it sticking out
everywhere it appears.

Change-Id: Iccdc95163d477db8a031d0d520f28fea26432a44
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-07 09:22:30 +00:00
Marcus Tillmanns
0135c47849 device: Use multiplex script to allow multithread support
Previously the runInShell and outputForRunInShell methods were
exclusively processed single threaded, meaning all calls
were processed sequentially. With the multiplexed
helper script we can now run multiple processes simultaneously.
( see tst_manual_deviceshell )

Additionally the new script allows us to capture both
stdout and stderr from commands which was not possible previously.

Change-Id: I52f4fb46d872dc274edb9c11872d2f6543741b34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-07 09:22:14 +00:00
Eike Ziller
84ff5eb169 Merge remote-tracking branch 'origin/7.0' into 8.0
Change-Id: Ib669e2e993c4675a7382f721ccb7d6ecff11fc20
2022-06-07 10:28:37 +02:00
hjk
13146fb0bd RemoteLinux: Remove indirection in RemoteLinuxDeployConfigurationFactory
Change-Id: Iec5fc2cc8e31c5a6e2181b62e9b00c46aca94d0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-07 08:15:34 +00:00
hjk
5dddc42f70 ProjectExplorer: Rename column headers in DeploymentDataView
Local and Remote are not quite right anymore, it's more generic
"Source" now.

Change-Id: I06e8985d4515bfeae3c31c8fcff6bd188916df86
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-07 07:40:09 +00:00
David Schulz
2029fe8c99 LanguageClient: fix todo
Change-Id: Ia6b3b5fe6e595c32a8b8a13b869f3178afb37ed8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-07 06:29:42 +00:00
Thiago Macieira
9fb8b4af81 Fix GCC 12 warning about use of uninitialized value
False positive, it couldn't be. `ok` could only become true if
var.toInt() was called, which means some value was assigned to `value`.
But anyway, we can simplify this because QVariant::toInt() returns 0
when it sets ok to false.

classviewutils.cpp:78:50: warning: ‘value’ may be used uninitialized [-Wmaybe-uninitialized]
   78 |     return SymbolInformation(name, type, iconType);
      |                                                  ^

Change-Id: Iba16e8ea451b444ab213fffd16f4918c45228f2c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-06 15:53:20 +00:00
Miikka Heikkinen
d0af1c0316 QmlDesigner: Fix typo in module name in subclass checks
Change-Id: I3c235a742450640869128500c21824c7b96a8ee5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-03 14:39:27 +00:00
Miikka Heikkinen
92a3ebd3ef QmlDesigner: Fix crash on project load
Creating material library node in response to model change
notifications is problematic, so don't do that.

Fixes: QDS-7075
Change-Id: Ib688d71223a851b8a98e1c8fcfe598f6decdaf16
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-03 13:29:24 +00:00
Christian Kandeler
5693c518bc Utils: Rename ProcessLinkCallback to something less clumsy
Change-Id: Icce4995f4aa886524dc3eedb7cf9ba72adbe8783
Reviewed-by: hjk <hjk@qt.io>
2022-06-03 13:23:28 +00:00
Christian Kandeler
21c215f83c ProjectExplorer: Make BuildSystem:Name variable available
... for use in the default build dir template.

Task-number: QTCREATORBUG-26147
Change-Id: I1a32d60e0d5e2db514ac315c48c615c55ccda51f
Reviewed-by: hjk <hjk@qt.io>
2022-06-03 13:20:08 +00:00
hjk
8d659cb7db RemoteLinux: Slimmer interface of custom command deploy step handling
Change-Id: Iad10d6bd111c9f06adb510aae19e861bbce3425d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-03 12:33:09 +00:00
Christian Stenger
fe63fb2881 GitLab: Add hint what link to gitlab is for
Change-Id: I5ee32fac4a2a73b3b40438d1697071491c17ac94
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-03 11:40:37 +00:00
David Schulz
bcfa338fff TextEditor: stop HoverHandlerRunner on focus out
Since we might get a result for a hover request after Qt Creator lost
focus we need to prevent showing tool tips for a Qt Creator in the
background.

Change-Id: Iaa0eafdfe9340d2623fc4632dfc685463fd0d53a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-03 11:39:43 +00:00
Fawzi Mohamed
9276523a35 qmljsscanner: fix fallthough in nullish coaleshing
Change-Id: I05c03be4025f7c49d613c350f17cb108ae752ae6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-03 11:28:38 +00:00
Jarek Kobus
c7c6b70cbe QtcProcess: Add stop() method
This method works like close() with the difference that
after calling stop() we are still going to receive
signals from QtcProcess, especially done() signal.

This method isn't blocking, so a calling it is fast.
Just after calling this method QtcProcess is still
in the same state and done() signal should be delivered
asynchronously. It's safe to call waitForFinished() after
calling stop() with the desired timeout.

Calling stop() in a row with waitForFinished() is a good
substitute for stopProcess().

Change-Id: I1df55beb7f89c9b73203c9ba4bc276a4060600a5
Reviewed-by: hjk <hjk@qt.io>
2022-06-03 10:49:06 +00:00