Commit Graph

69993 Commits

Author SHA1 Message Date
Jasmin Fazlic
ec013afe00 endless loop when tokens do not represent a lambda
Fixes the endless loop when traversing the callstack
while debugging and the tokens do not represent a lamda.

for example:

 `return Class{}(var);`

Change-Id: I2c4dbf9df24046158147a04347aa435a7ccd02bc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-05 11:50:34 +00:00
Henning Gruendl
c116b25709 QmlDesigner: Add collapse/expand all to sections
Add the functionality to collapse/expand all section in the property at
once by calling a context menu on one of the section headers and
choosing the appropriate menu item.
Make some adjustments in Assets and ItemsView so it won't collide with
the context menus used there.

Task-number: QDS-4757
Change-Id: Ied9dabdbb4359a05b654bfc2a26829da46700239
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-05 10:00:42 +00:00
Christian Stenger
1e901c5d61 Utils: Add helper function
Recurring pattern for local Windows paths.

Change-Id: I4deb7e42012a06281c6081a63415eaeb60203157
Reviewed-by: hjk <hjk@qt.io>
2021-08-05 09:57:35 +00:00
hjk
9810d3aca7 CMake: Fix warnings for docker related items
Paths to build related items seen by cmake are always relative to
device cmake runs on, i.e. the build device, so they should not
have global prefixes like docker://abc.

Change-Id: Ia919dc6a0cc6430d42e75cc6424311ce6ed47e44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-05 09:52:39 +00:00
Robert Löhning
b543ed4068 Squish: Raise minimum Qt version for Qt Quick apps
5.12 is the lowest available version in the wizards now.

Change-Id: Ib8de3470188316b01ff521d6e66162baaa8db0af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-05 09:08:51 +00:00
Thomas Hartmann
269143a0d9 App: Replace DisableHighDpiScaling with HighDpiScaleFactorRoundingPolicy
AA_DisableHighDpiScaling is deprecated and ignored in Qt 6.
The next best option is to use Qt::HighDpiScaleFactorRoundingPolicy::Floor
instead.

Change-Id: Ic279ac34f744dec2558624799809007bbb638431
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-05 08:23:38 +00:00
Alessandro Portale
6595650804 App: Use the same high dpi scale factor rounding as Qt 5 does
After brief usage of a Qt 6 build of Qt Creator under non-rounded
scaling factors such as 150% or 175%, all kinds of rendering artifacts
are noticeable.

Proper support of these scaling factors requires fixes in several
places. This change is the quickest alternative fix/workaround: restore
the behavior of Qt 5.

Fixes: QDS-4739
Fixes: QTCREATORBUG-25862
Change-Id: Ia8bfda088ee20ebbe08cb4f79325d5a51ef7124b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-05 07:56:05 +00:00
Henning Gruendl
3bf5be3c46 QmlDesigner: Update look of empty pane
* Remove section
* Center the hint label vertical and horizontal

Change-Id: Ia52f7af9c0d6f2fa8099efbf9dd80ff94a5f29aa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-04 21:58:38 +00:00
Henning Gruendl
65055989f9 QmlDesigner: Fix a couple of undefined warnings
Change-Id: I6bf62904a3fc4b45252f3859d6996c28b459d949
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-04 21:58:29 +00:00
Henning Gruendl
e9b2613f5e QmlDesigner: Fix blocked state binding
Change-Id: I75bcf77c7f5e5f4314db0e5b5872325c5ec34377
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-04 21:57:43 +00:00
Henning Gruendl
77aca0df94 QmlDesigner: Fix text editor template
Change-Id: If0db1055d5564f5696448e962f569d797e1ea222
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-04 21:57:23 +00:00
Jarek Kobus
c525bb15d7 Fix a possible crash in ExecuteFilter
Refactor the process lifetime inside ExecuteFilter.
Before there was only one process instance during
ExecuteFilter lifetime.
However, the drawback was that when the old task
was still running and we wanted to start a new one,
we had to kill the old one and wait for it to be finished
(so we had to wait unnecessarily). Now we are using
Core::Reaper for removing old running processes.
We also recreate a process for every task and delete it
on task finished.

Fix a possible crash when starting a process times out.
Before we just removed the task from the queue, but it
could happen that we still receive the finished() signal
from the process - and the assumption that task queue
isn't empty inside finished() method didn't hold.
Now we behave the same as in case of ExecuteFilter::accept().
If the process timed out we put it into the reaper.

Fix the ProcessReapers destructor. In case we have put there
a process it won't change its state until we enable event
delivery. So, in order to help it we process events after sleeping.

Task-number: QTCREATORBUG-26084
Change-Id: I8a16b4d64f9c6a07aef45767458e69dff1dd83bc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-04 16:34:43 +00:00
Eike Ziller
c82a37bb24 SilverSearcher: Look harder for 'ag' executable
Search in Qt Creator's PATH setting and also pass the modified
system environment to the process.

Fixes: QTCREATORBUG-26044
Change-Id: I7ba0b9c216ce4fba7b230b072e4b111ff54655e9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-04 15:11:54 +00:00
Henning Gruendl
d199b0ea8c QmlDesigner: Componentize property editor pane
* Componentize the part of property editor pane which is used in
  QtObjectPane, ItemPane and Object3DPane
* Update QtQuick import version in ConnectionsSpecifics and
  QtQml/QtObjectPane

Change-Id: I9590da2208bbf36c444cc72e8e0bc9159d07e4ce
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-03 21:05:33 +00:00
Thomas Hartmann
4a4e124b07 QmlProject: Add simple way to change between Qt6/Qt5 kits
The feature is only available in QDS mode.
This adds a combobox to the run configuration which allows
the easy selection of a Qt 5 or Qt 6 kit.


Task-number: QDS-4733
Change-Id: I53fae9fe4bc415e5b1e8d385ef85ed81b8010b3a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-08-03 20:24:31 +00:00
Thomas Hartmann
9b17a2b283 QmlProject: Prefer Qt 6 kits if the project is flagged as Qt 6 project
A .qmlproject can contain 'qt6Project: true'. If this is the case
we prefer a Qt 6 kit, otherwise we prefer a Qt 5 kit.

We only change this behavior if Qt Creator is in QDS mode.

We should prefer desktop kits in any case.

Task-number: QDS-4734
Change-Id: I90f6628cd071db01f2add068fd776774f7be133e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-08-03 20:24:21 +00:00
Miikka Heikkinen
9425a2fbb8 QmlDesigner: Add info box when dragging material under imported 3D node
Materials of imported 3D components are not exposed outside the
component, so the materials cannot be modified by dragging a material
under the component node. Instead materials must be modified inside
the imported component itself.

Added an info box to inform users of this if they attempt to drag a
material under an imported 3D component. The info box also provides
a button to directly go into the component in question.

Fixes: QDS-4691
Change-Id: I6d859fd4716a0c23a465a91c3067534521a910aa
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-08-03 12:31:40 +00:00
Christian Stenger
f0bc9036f8 ClangD: Fix possible access violation
Change-Id: I6b54dcdb42f9f9e2c3a9fd686146d253dcdfa40c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-03 11:43:39 +00:00
Christian Kandeler
d6acd21fc0 ClangCodeModel: Get search term for "Find References" from clangd
QTextCursor's understanding of a "word" does not always correspond to
what will actually be searched for (e.g. "operator+").
By doing a symbol info request first, we make sure that the string
displayed to the user in the search widget is really what clangd is
searching for.

Change-Id: I8be6e6122e5ed76334c4e6fc5b41debed96b6a40
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-03 11:16:33 +00:00
Christian Stenger
bcab54172e Debugger: Fix registering QC as post mortem debugger
Change-Id: Ia8746b93fc3e03601fa0abdb73366a6fc03fb138
Reviewed-by: hjk <hjk@qt.io>
2021-08-03 11:07:46 +00:00
Christian Kandeler
b152f3ace8 CppEditor: Do not produce invalid code when escaping string literals
Fixes: QTCREATORBUG-26003
Change-Id: Ie4d0ae85cc0ae2d1d45ae0bedbf0212d217aa69b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 14:29:39 +00:00
Cristian Adam
1bf9900aed CMakePM: Remove QT_QMAKE_EXECUTABLE warning
By referencing it in the auto-setup.cmake script.

Fixes: QTCREATORBUG-26072
Change-Id: I8b2d06f08da96cfa498f818db4c2428702756516
Reviewed-by: hjk <hjk@qt.io>
2021-08-02 13:58:20 +00:00
Cristian Adam
17505a6d12 Locator: Allow macro expander for custom commands
This allows locator commands like:
! ctest --test-dir %{ActiveProject:RunConfig:WorkingDir}

Fixes: QTCREATORBUG-26070
Change-Id: Ie4399018d0eeb085aaff1f1b9cf9f54d2cb98f40
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-08-02 13:57:52 +00:00
Ivan Komissarov
9bd4e160a9 Update Qbs submodule to the top of 1.20 branch
Change-Id: I06a6b60c7411a72a9ef223efd3b8f33caa80a744
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-02 13:15:57 +00:00
Mahmoud Badri
ed759b4100 QmlDesigner: Allow asset unselect using Ctrl + click
Fixes: QDS-4740
Change-Id: Iad81714eafe4de7e1e129d2139796d954935c088
Reviewed-by: Miina Puuronen <miina.puuronen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-02 12:04:15 +00:00
Henning Gruendl
ed80753466 QmlDesigner: Add tooltip to annotation buttons
Task-number: QDS-4152
Change-Id: I0f3b6cd556e5c1bba55f38e82ab97cd55f044035
Reviewed-by: Tanja Remes <tanja.remes@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-02 09:56:44 +00:00
hjk
21fff1a9d1 CMake: Fix a crash
Amends a71d725e.

Change-Id: Ifef7629650d119bfde997afbe3c60742a322b8ed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-08-02 09:38:01 +00:00
hjk
c6e66a466e CMake: Fix crash with Android when no Qt version is set
Change-Id: I4090add40d621251b795dc090b43ca5f6acb3015
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-08-02 09:37:54 +00:00
hjk
5f0834e7ee ProjectExplorer: Make Session Manager dialog a bit larger
So I don't have to scroll around.

Change-Id: I9b9c94fd21f06b828908468ef1fc2b89bb53f10f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-02 09:37:08 +00:00
Christian Kandeler
f84e4ea8cc CppTools: Fix semantic highlighting
It turns out the parentheses information for the TextEditor has to be in
order of occurrence in the document.

Fixes: QTCREATORBUG-26068
Change-Id: I5335160f81355bac6b1431cad25a31b70f03e8f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 08:21:50 +00:00
Henning Gruendl
6839ad0118 QmlDesigner: Update alignment buttons
* Fix spelling in type name
* Add missing justify option and adapt layout
* Add property enabling setting scope
* Update icon font

Change-Id: I8070abd43724ad7e140bab7166e4f1c3d828d07d
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-02 07:56:14 +00:00
Henning Gruendl
0771fba5f9 QmlDesigner: Move ComponentSection to HelperWidgets
Change-Id: I6edcc461c3014fc2721c1248f600170acb509c44
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-02 07:55:58 +00:00
Thomas Hartmann
98fd0fc01a QmlDesigner: Fix custom scrollbar for Qt 6
Task-number: QDS-4666
Change-Id: I054ea088f4e7f4806eba35b211c441b58f4128c0
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-07-30 13:22:23 +00:00
Christian Kandeler
861d24bbd8 Clangd: Make code model warnings less intrusive in fallback client
Just like we do for project-less files in the non-clangd case.

Change-Id: I88c9c856fb524c6eab8289b8890f7fb4d8dc8645
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 09:42:48 +00:00
Robert Löhning
140c267181 Squish: Update tst_simple_analyze
Deal with Build menu items which all look the same now.

Task-number: QTCREATORBUG-26002
Change-Id: I120f0f0b6f0ee0451636635313cff6d7bd53706b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 09:27:52 +00:00
Robert Löhning
60a77e64f5 Squish: Substitute tilde in Qt version settings
Creator doesn't seem to handle it anymore.

Change-Id: I9398193e1b3ceafa2bf05c2cbd85a757aaca3306
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 09:27:12 +00:00
Miina Puuronen
13a6f756b7 QmlDesigner: Implement Delete File for Assets Library
It is now possible to delete assets from Assets Library using the
Delete File context menu option. Before deleting we ask for user's
confirmation, warning them the file might be in use somewhere. This
question can be toggled on/off from Options.

Task-number: QDS-4488
Change-Id: Idc33d0ee5895a17b983b61a2b8cd5d9ea2c95c25
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-30 07:53:42 +00:00
Alessandro Portale
6cb62bc94e App: Remove unused function
Not only was "copyRecursively" copy/pasted, it is also unreferenced (by
others than itself).

Change-Id: I500fa42d31f5dbf97b2cb7ba5c144249c157ce57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 07:24:04 +00:00
Christian Stenger
fe65998351 Utils: Fix readDataFromProcess()
The internal handling of output gets in the way when trying
to read output from a process synchronously.
Make usage of the internal one instead of relying on the
original output handling.

Fixes: QTCREATORBUG-25958
Change-Id: Ie96b5e8d17799a613ff15a52a23a8bdc31cb2939
Reviewed-by: hjk <hjk@qt.io>
2021-07-30 04:49:15 +00:00
Thomas Hartmann
20641caa3a StudioWelcome: Add debug output
Add debug output if download fails.

Change-Id: Icb28aa2ed9f7d7e7fdb9a83fe875cc933af8fa49
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-29 16:12:40 +00:00
Christian Kandeler
c999b6066f ClangCodeModel: Start a fallback clangd for files without a project
These were still being served by the old code model even when clangd
support was enabled.

Change-Id: I5f01b6a7071b90c374750f93435299755cabe3e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:33:45 +00:00
Christian Kandeler
2e7891bedd CppEditor: Fix possible crash when following typdefs
It's probably also a bug that we don't resolve the identically-named
struct correctly, but at least we don't crash anymore.

Fixes: QTCREATORBUG-26047
Change-Id: I272e76460c87906c9df23aaf7f37953b451bf1a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:12:29 +00:00
Christian Kandeler
e36d54bdd7 QtSupport: Fix moc output parser for Qt 6
Fixes: QTCREATORBUG-25959
Change-Id: Iba03fd31b1759ae99bd6567003b020e8ad35872f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:08:09 +00:00
Orgad Shaneh
7fc6af4ad6 ProjectExplorer: Do not generate new directory when original is in-place
If the original configuration is not a shadow build, there is no reason to
generate a new directory name when cloning the configuration.

Change-Id: Ie84ee01ac70c69161e65a0b58cdfbfbe1a1630ab
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-29 10:56:24 +00:00
Orgad Shaneh
b56c872b27 ProjectExplorer: Translate empty shadow directory to source directory
... on recovery, just like it is done when checking the shadow build
checkbox.

When a pro.shared file has empty build directories (because having a path
doesn't make much sense for shared files), the directory remained empty in
the UI, and the shadow build checkbox was checked.

Change-Id: I3930ecd3c3747a8793ae4eea20c3c0d92b0b5848
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-29 10:47:13 +00:00
Christian Kandeler
2798c11d1d CppEditor: Fix switch statement completion
... for the case where the value is retrieved via a call to a template
function whose scope does not include the template type.

Fixes: QTCREATORBUG-25998
Change-Id: Ie33817f445fb53595b783f716093637926297549
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 10:28:14 +00:00
Christian Kandeler
ec9f972355 QtSupport: Use named capture groups in output parsers
The regular expressions are easier to understand this way.

Change-Id: Iae225b0214b12833ae6d6094e70250700a1c0e52
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 10:10:33 +00:00
Christian Kandeler
7657470cc6 QtSupport: De-noise regexes in output parsers a bit
Use raw string literals to reduce the number of backslashes, and remove
unneeded QLatin1String wrappers.

Change-Id: I3b359e238311987d60e0307bad66c9c37f44b777
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 10:10:02 +00:00
Miina Puuronen
2935f79efc QmlDesigner: Change category order in Component Library
Added prefix for Qt Quick categories so "Basic" is sorted on top.
Rest of the categories are sorted alphabetically.

Task-number: QDS-4721
Change-Id: Ibdb1a77b121e2af729b9ec6b2acf5349a361b05b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-29 09:38:23 +00:00
Christian Kandeler
1b1e18a869 ClangTools: Make sure clazy doc URL corresponds to tool version
Note that this will only work with clazy >= 1.10. For earlier versions,
we fall back to the master branch documentation, as before.

Fixes: QTCREATORBUG-25869
Change-Id: I7a8188eda15c4e0548bfaa63aa90f721aa44d6c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 09:28:05 +00:00