Commit Graph

62421 Commits

Author SHA1 Message Date
Christian Stenger
7017ad6419 ProcessLauncher: Fix qmake build on Win
Amends 102d5fe46c.

Change-Id: Ibaa314bdd611ee679f06793634615753ec838956
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-30 06:12:52 +00:00
Alessandro Portale
37e118b5ec Core: Base GridView on QListView (instead of on QTableView)
Use QListView with its very capable icon view mode instead of QTableView
in order to layout items in a grid.

This removes the need for the GridProxyModel.
It also leaves the previously self-implemented calculation of columns
count to QListView. Only the ProductGridView still needs to calculate
that.

Change-Id: If6e7f033fc78883930794c1e261aea396ae25190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-29 19:09:58 +00:00
Christiaan Janssen
483a0158e8 McuSupport: fix cmake variable name for McuXpresso
Task-number: UL-5057
Change-Id: I6c5861c33b42ff691c934bb98cecb3677b245134
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-29 17:04:22 +00:00
Christian Kandeler
8c7528212b Fix qbs build on Unix
Amends 102d5fe46c.

Change-Id: Ibe5d8da540544c323ce1b7576c664d14c76e0ed6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-29 14:11:58 +00:00
Cristian Adam
102d5fe46c Utils: Allow graceful termination of reaped processes
Utils::Internal::Reaper class is doing graceful termination of
process. It tries in a loop to first terminate() then kill()
the process and at the end delete the object.

Utils::ProcessReapder::reap should not kill the process directly,
and now that the function works with a QProcess, the special
handling of QtcProcess::terminat() of qtcreator_ctrlc_stub.exe
processes needs to be handled explicitly.

Amends ace765c199

Fixes: QTCREATORBUG-26612
Change-Id: Ia109ec0737a8c605a84e93b6ee3691d843ed5da8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-29 13:03:40 +00:00
Cristian Adam
7a0bdccadf CMake: Remove debug list source files comparison
This was needed in the early days of the CMake port when the list of
source files would change due to being added to the qmake project
files.

Change-Id: I7afd219b24ab7a0d87fce26ba35dac75cf8caa5b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-29 10:34:18 +00:00
David Schulz
6aa2c58842 LanguageClient: remove semantic highlighting proposal
The semantichighlighting proposal from
https://github.com/microsoft/vscode-languageserver-node/pull/367
was replaced with semantic tokens in the final protocol version 3.16.

This reverts 307f1d8e6e

Task-number: QTCREATORBUG-26624
Change-Id: I635f0b4763a197edabf9edf8d9041143dcf531e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-29 09:57:45 +00:00
David Schulz
b38251659b LanguageClient: more log output in the semantic highlighter
Task-number: QTCREATORBUG-26624
Change-Id: Ib276662f1ce2cf355015258c564f6f9c817a3d8a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-29 09:44:58 +00:00
Alessandro Portale
022bf4396c QtSupport: Set a lower single step in ExamplesPageWidget view
By default, the view scrolls by a whole row when using arrow keys or
mouse wheel. With rows with a height as in the examples view, this
causes more of a fast flickering than the impression of a scrolling.

The single step value of 25 which is set by this change makes it look
smoother.

Change-Id: I7fe9fe49dab71cebdfd8b01eef245813783426ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-29 06:36:48 +00:00
Cristian Adam
63fcd6812b CMakePM: Disable "Run CMake" menu entry while building
Configuring a project during build is a recipe for disaster.

Fixes: QTCREATORBUG-26606
Change-Id: I041d9bd76315647439100cadba809d6664d268fa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-26 15:58:22 +00:00
Christian Kandeler
0eaba469cf ProjectExplorer: Add "link back from issues" functionality
... to the app output pane.

Change-Id: I3e11f63a42fb30ae4e40da50d5ba8143ce99cd65
Reviewed-by: hjk <hjk@qt.io>
2021-11-26 15:43:46 +00:00
hjk
304e5c7552 QmlProfiler: Remove unneeded Q_OBJECT in some test
Which apparently also confused my cmake.

Change-Id: I0d3c131616e9aeb1487731900849545f925a0106
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-26 14:35:12 +00:00
Miikka Heikkinen
9f8fcd82fd QmlDesigner: Check file type imports when adding unimported items
When searching for unimported items in component library and dragging
those into the scene, also check if the required import is file type
import.

Fixes: QDS-5545
Change-Id: I389ecb2c5bdbb686832af6eed06b84fe02f12a2f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-26 12:39:23 +00:00
David Schulz
f681296484 LanguageClient: select the innermost item in editor outline
When multiple items in the editor outline match the current cursor
select the inner most item.

Fixes: QTCREATORBUG-26509
Change-Id: Ib4ced177059e3a9914ace35e4cdc34959719091a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-26 10:51:32 +00:00
Topi Reinio
92984571fe Doc: Fix documentation warnings in Extending Qt Creator Manual
Change-Id: Ic9b1644328e10e147c7f08563b8394418a7d7581
Reviewed-by: hjk <hjk@qt.io>
2021-11-25 18:13:51 +00:00
Knud Dollereder
2791e20b6e Enable FormEditor zoom with Ctrl MouseMove
Fixes: QDS-3166
Change-Id: I81fb8620793a97d8bc65eada88f733c1c74ae839
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-25 16:59:09 +00:00
Thomas Hartmann
3d64aa7aa6 QmlDesigner: Check if root element is a graphical item
If the root element is not a graphical item, then we show a proper error
message.

Task-number: QTCREATORBUG-20014
Change-Id: I9c1ccbbeb6765bd098344ceef8024a703a8dc919
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-25 16:56:38 +00:00
Christian Kandeler
08a86169db ProjectExplorer: Generalize issues -> output pane linking
This feature was specific to the compile output pane, but we want
to have it in other panes too.

Change-Id: I110b27af7d0aa23acbc5623d1c0405816250df19
Reviewed-by: hjk <hjk@qt.io>
2021-11-25 15:19:42 +00:00
Miikka Heikkinen
cfaf169ea1 QmlDesigner: Fix node expand state caching for subcomponent edit case
When detaching subcomponent edit model, we just update node expand
state cache for the file instead of recreating it from scratch.

Also, never collapse the current root node when attaching the model.

Fixes: QDS-5557
Change-Id: Id107940daccd9663ec4216de7dc8ae6a5bee8974
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-25 11:19:43 +00:00
Christian Stenger
857ca05ac3 ClangFormat: Fix compile for old LLVM
Using LLVM10 is minimum supported, but some format style
elements have been introduced later, so guard access to
members that are not present in LLVM10.
Amends a997161dd6.

Change-Id: I9513b4fdc1fa5247cd67beaf0122b1b1d5494bbf
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-25 09:34:23 +00:00
Christian Kandeler
1f2e25dd48 ClangCodeModel: Tighten the check for ambiguous calls
... when doing "Follow Symbol" with clangd. Not every call to a virtual
function is ambiguous.
Amends 4fe5be2565.

Change-Id: I7c31644510ca85d430a3e18b2ccad97548f71d54
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-25 09:29:13 +00:00
Vikas Pachdha
f136cd22ad Designer: Fix crash when closing document in design view
Task-number: QDS-5606
Change-Id: Ide3d8439addb42478d4d72201938af75df65bdd9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-11-25 08:35:55 +00:00
Christiaan Janssen
4a50a582e7 McuSupport: default paths for 3rd party dependencies left empty
If QtCreator is installed via the Qt Installer, sensible defaults are
provided at installation time. For not provided software, $HOME
is not a useful default. Leaving the field empty signals the
user that they need to provide one manually, more clearly than
providing an invalid path.

Task-number: UL-4939
Change-Id: I8ef79e563366ebdbea53df8183a1eca82bd7be4a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-25 07:51:12 +00:00
Artem Sokolovskii
a997161dd6 ClangFormat: Synchronize ClangFormat settings with CppEditor codestyle
Added synchronization between ClangFormat codestyle settings and
CppEditors codestyle settings. All changes which will be done in
ClangFormat settings tab settings tabs will be automatically
retranslated to CppEditor codestyle settings tabs and vice versa.

Change-Id: I408d726c12552856e3c1b72d3ba09b77fff83321
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-24 21:35:31 +00:00
Christian Kandeler
85b5a887e8 CodePaster: Remove "make public" property
It's not functional in any of our implementations.

Task-number: QTCREATORBUG-23972
Change-Id: I7c35b548e6069ff31e9a050752cd8267ce8ed7a8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-24 11:54:49 +00:00
hjk
04b1c92767 FakeVim: Fix GUI text for "Smart indentation" setting
Change-Id: Ib347a36dd10a6474aae4da7285f4374593d372f6
Fixes: QTCREATORBUG-26607
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-24 11:29:13 +00:00
Ville Nummela
14d09ea7a3 ProjectExplorer: Display message while fetching process list
Fetching process list from remote device can take a long time, which
might cause impatient users think that something is wrong and cancel
the listing.

Change-Id: Ideee017340811bc5600dd2a66a0afee6d223844e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-24 11:22:40 +00:00
Samuel Ghinet
300ec4119f Fix: Project wizard may not close on project creation if there is an error
The error was: "The executable of the QML emulation layer (QML
Puppet) may not be responding. Switching to another kit might help."

This error / warning condition happens in ConnectionManager::setUp()
in plugins/qmldesigner/designercore/instances/connectionmanager.cpp
when puppet fails to start -
connection.qmlPuppetProcess->waitForStarted(waitConstant) returns
false. This opens a warning message box with the parent of it set as
the active window. This active window happens to be the New Project
dialog QQuickWidget. This somehow prevents the QQuickWidget object
from actually closing on `m_dialog->close()` -- the operation returns
true but the dialog is not closed.

Fixing this involves two steps:
1. On "Create project" hide the dialog box before starting to create
the project, so that the parent of the message box would be set to
the main window.
2. deleteLater() on the m_dialog, because, for some reason, even if
the QQuickWidget is no longer its parent and even if m_dialog has
the flag Qt::WA_DeleteOnClose set, the close() still doesn't
close / destroy the dialog box.

If we do only (2) but not (1) then the message box would appear and
disappear quickly when the dialog box closes.

I have also set variables to null just for correctness.

Task-number: QDS-5531
Change-Id: Ib33be6a2de6174b0439cd1917f3e871ee5d4f52f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-24 11:19:52 +00:00
hjk
56009b8b15 Merge remote-tracking branch 'origin/6.0'
Change-Id: I0eae76ecff1a315877e4fdd471f0de3a3a55f180
2021-11-24 11:37:12 +01:00
Christian Kandeler
153dd2fe0b ClangCodeModel: Fix overly simplistic check
... when doing function call completion with clangd.
We did not take default arguments into account. E.g. the following
declaration:
    void func(int i, int j = int());
was mis-detected as taking no arguments, causing to the cursor to be at
the wrong location afterwards.

Change-Id: I522921721b0cb347ed593c43ed285ca6d02ccfee
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-24 10:00:20 +00:00
Thomas Hartmann
a95a77bcfc InfoBar: Do not suppress info bar if it is closed
Before the patch, any closed infobar was suppressed until Qt Creator was
restarted. With this patch the infobar will just be closed,
as naively expected. To suppress any infobar you have to click
"Do not show again".

Task-number: QTCREATORBUG-26605
Change-Id: I29645e853119286f507cba82c228f372dd80fa64
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-24 09:10:40 +00:00
Thomas Hartmann
a9fc431bd9 QmlProject: Do not allow supression of info bar for qmlproject
Task-number: QTCREATORBUG-26604
Change-Id: I0bde278322150906780dccda734214182fe5100d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-24 09:10:19 +00:00
Alessandro Portale
d0de8b18dd QmlDesigner/Android: Rename designviewer -> qtdesignviewer
"Qt Design Viewer" is the name of the component.

Change-Id: I37228ca32badc4107bb0faa088af5f6afeb9a8ac
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Piotr Mikolajczyk <piotr.mikolajczyk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-24 09:05:34 +00:00
Christian Kandeler
0c53c2daef CppEditor: Do not overwrite extra selections from language client
The broken libclang-based implementation used to remove the correct
results we got from clangd.

Task-number: QTCREATORBUG-26339
Task-number: QTCREATORBUG-26596
Change-Id: I9b7c1214c376b616fe204986ed37c287e2307f81
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-23 16:44:37 +00:00
Christian Kandeler
7498b5523a ClangCodeModel: Fix another mis-highlighting with clangd
Output parameter marking strikes again.

Change-Id: Id98e07e87824a9db435d09482235d56c6808d42e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-23 16:43:37 +00:00
Christian Kandeler
c53e3f4893 ClangCodeModel: Treat function-like macros like functions
... when completing with clangd.

Change-Id: I8ffc0ff7a4a0f819f2ae48aabbb16609eb178178
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-23 16:42:23 +00:00
Knud Dollereder
a6e3b39d40 Retain zoom factor when showing after hiding
The timeline and transition editor where resetting
their zoom factors to 0 in the showevent.
This is now fixed.

Fixes: QDS-5337
Change-Id: Ic4d9b2af7613b4c5c2fd5e9c646df51978fd05f6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-23 16:35:09 +00:00
Henning Gruendl
6f27359f15 QmlDesigner: Make live preview work with AVD
Make the live preview work with Android Virtual Device. This allows to
start the emulator with the currently active project via the live
preview toolbar button.

Task-number: QDS-5383
Change-Id: I3f44ea8fcb6f23d938d9775d78314b23c69768ec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-23 16:32:22 +00:00
Miikka Heikkinen
5841a159c0 QmlDesigner: Fix capitalization of rotBlocked@Internal aux property
The "@Internal" part of aux property must have the "I" capitalized
for it to avoid affecting document modified state.

Fixes: QDS-4802
Change-Id: Ibbf0006ba6c24bad3ad017a72196dac1d366fe94
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
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>
2021-11-23 14:29:51 +00:00
Christian Stenger
37a10f4a2b SdkTool: Fix path handling and adjust expectation
Amends 1a6e6825e6.

Change-Id: I0e0c1bf46951a05d360032e01c15ff8adb31ac33
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-23 10:59:24 +00:00
Henning Gruendl
6eec40264f QmlDesigner: Fix SVG paste action
Fix an issue with the SVG paste action where the SVG uses multiple
classes in one class attribute.

Change-Id: I332ae217cff6b2215c3f63b1d2433a54933f404a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-23 09:22:01 +00:00
Christian Stenger
c65ec79481 AutoTest: Move benchmark icon to Utils
Make it available for others.

Change-Id: I423dec664a263f5586d98ac387b871b6cf8162d9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-23 06:05:09 +00:00
Tapani Mattila
f8f7f47ec3 CMake generator: Make only some files selected by default
Task-number: QDS-5561
Change-Id: I1a76385f55681ba60bdb43eafdede6697893598f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-22 17:07:18 +00:00
Henning Gruendl
590e19acb7 QmlDesigner: Enable environment variable usage
Change-Id: I91ada6d7dfa5e8376333c5ef27fbd72a5484e4f4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-22 15:38:42 +00:00
Tapani Mattila
46c3540961 CMake generator: Add translation contexts
Change-Id: Icdd2ce4626588e6bdcd870cae915ef2f48a85666
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-22 14:11:50 +00:00
David Schulz
53bae17b96 CDB: always set stop reason when handling exceptions
Otherwise we get an unknown stop reason which might get handled
differently in the cdbengine.

Fixes: QTCREATORBUG-26506
Change-Id: Ia1622977631190d43a6b599b58410953cd2add6e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-22 14:09:22 +00:00
The Qt Project
fba36e7620 Merge "Merge remote-tracking branch 'origin/6.0'" 2021-11-22 13:50:12 +00:00
Christian Kandeler
3a03b50c7c CppEditor: Consider not only classes
... when trying to find out whether an include statement needs to be
inserted for a given symbol.
The previous code used to ignore e.g. function declarations, so an
unneeded refactoring operation would be triggered.

Fixes: QTCREATORBUG-26591
Change-Id: I5ce0bb064b6ba76e5977de73ea2697342cf74d7e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-22 13:49:17 +00:00
Christian Kandeler
8f611286f7 Fix some compiler warnings
Change-Id: I9128afcf56bd47cb6627012bb6b0d13395b432ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-22 13:39:08 +00:00
hjk
4de74a67ee Merge remote-tracking branch 'origin/6.0'
Change-Id: I773141d47e3f2b773da51f2e26ef53b93bb28f90
2021-11-22 13:18:08 +01:00