Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
1490aeb0e0 CMake: Use FilePath operations to create error flags
Otherwise remote setups generate unrelated errors.

Change-Id: I11285048b1ac0424c45bed5b61779af6724a7a0f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-08-05 12:23:28 +00:00
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
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
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
Jarek Kobus
cfa8da9ba0 Base unique tokens on global atomic counter
Don't base process token on instance pointer,
as it may happen that the recreated instance may
get the same token again (it happens often when invoking
a function that recreates QtcProcess in sequence).
The consequence may be that on the project launcher side
we may reuse the old process (with possibly broken state)
instead of creating a new one.

Change-Id: I8274691f88ae0eefe008746d944a26f29979bf72
Reviewed-by: hjk <hjk@qt.io>
2021-08-04 16:35:40 +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
hjk
f1b45ca775 Utils: Make FileSaver somewhat work for remote files
Write to a local file first, transfer content when finalizing.

Change-Id: I4740838e049f5a556e286b2a8944634ff7d2b0c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-04 12:49:39 +00:00
hjk
dea2d9886f Core: Make IDocument::checkPermission() work with remote files
Change-Id: I8cabec593ddaaa9a5de66bb6aa2199d0a1a32645
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-04 10:56:53 +00:00
Tor Arne Vestbø
562848f647 Fix warning about format string not being string literal
Change-Id: I54e80b15b7a492acd4ffdb50a28f00511f72355c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-08-04 09:46:13 +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
Eike Ziller
17d716118a Merge remote-tracking branch 'origin/5.0'
Change-Id: I4236e3d2f87d56aea787905f4b78b1f5f933c069
2021-08-03 14:19:44 +02:00
hjk
91d3d83eab Docker: Implement DockerDevice::permissions()
Change-Id: Ib2daf4a631c5c1bf851720b7094f027ce11dd3e0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-03 11:44:26 +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
Tor Arne Vestbø
53b21b7644 Replace uses of deprecated QWARN macro with qWarning
Change-Id: I71ee2cedaf40197ac52f61e74060656fc4b305d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-08-03 10:03:34 +00:00
hjk
95c5a12532 BinEditor: Make it work with remote files
For testing, start Creator with  bin/qtcreator docker://<imageid>/bin/ls

Change-Id: I438dde457b6bfb860939ad928fb4e563a3766aa9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-03 07:47:22 +00:00
Christian Stenger
40aeab6849 Utils: Do not omit scheme and host on Link creation
Change-Id: I864c6145f6a7357e0339b64e1990d516db349ccd
Reviewed-by: hjk <hjk@qt.io>
2021-08-03 07:46:39 +00:00
hjk
a6b73dc501 Utils: Remove unused FilePath::absoluteFromRelativePath
Change-Id: I15dce44696a396b9be8f3bb98a31e0363f1165bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-03 05:46:56 +00:00
hjk
b72582c050 Git: Use FilePath in findRepositoryForDirectory
Change-Id: Ia711377111d529e14ed864669df83e1b1bb2bfc9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-02 14:40:49 +00:00
hjk
ff57cb548d Vcs: Use more FilePath for file paths
Change-Id: I855cde65d034a9647972a7fddf1e8266d7ccfa88
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-02 14:40:33 +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
Jarek Kobus
17f907da9b Implement setStandardInputFile() in ProcessLauncherImpl
Change-Id: I4d77c86ecb750573ce5421ca7300eb27f9f76108
Reviewed-by: hjk <hjk@qt.io>
2021-08-02 13:48:46 +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
Petar Perisin
d005e71da0 Autotest: Add more "without deployment" actions
When debugging tests, if there was no change in code, user should be
able to just rerun tests of his choice. However, currently there are not
so many options to just rerun tests without the build.
This patch adds more options to run tests without deployment, which can
speed up development in some environments

Change-Id: I9f998fee90f2e61a1623bd0840a9d5ddf8eb58d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 10:21:58 +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
622a03f63c Core: FilePathify MainWindow::openFiles()
Change-Id: I2d63d9099a7eb5d7c9ea9f1b7d23555a90e737ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 09:37:39 +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
Jarek Kobus
137df675ca Remove unused static variable
Amends 6b42ec00488e4023bf8708fa9045395ee1224d4d

Change-Id: Iaa83c23d79044c87432461ded8ca7c2fd431fa2a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-02 09:35:12 +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
Jarek Kobus
eca63813d5 Simplify waitForState() implementation
Change-Id: I7bbb06411d0c30ab931cb17b5a1b5940b51e978e
Reviewed-by: hjk <hjk@qt.io>
2021-08-02 07:50:16 +00:00
hjk
5572324a88 Core: Use FilePath in EditorManager::{restoreState,openEditor}
Change-Id: Ica7612aff6eff1ce19d9a9d17065467bae4ef596
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 07:36:33 +00:00
hjk
5731965045 Utils: Use FilePath in DropSupport
Change-Id: Id048d0dab4c58be367a081bb8041214abd6dbf98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 06:59:53 +00:00
hjk
8ec96a1717 Core: Use more FilePath in EditorManager
Change-Id: I21661fd93d0452519c4061ee77fa02b453db9e58
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 05:46:01 +00:00
hjk
ecbd9f4558 VCS: Partially use FilePath in VcsBaseClient
Change-Id: I024b051ab98ece42ec011bd1c92887a946925c1a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-30 13:10:59 +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
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
hjk
44e841c453 Core: Use FilePath in preferredEditorFactories
Change-Id: I16f50b2a5cabc9eed9d895ce6b46efc62fcb336c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 07:07:29 +00:00
hjk
64c9384cb8 Core: Use FilePath in IDocumentFactory::open()
Change-Id: I369f3bba2e0d1d33fed3a29f3c1408429cc7d8f8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 07:07:18 +00:00
hjk
124909c802 Utils: Add a Link::fromFilePath
Change-Id: I766fccd9cb2e12d9248e44052e09df6f09652370
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-30 07:05:35 +00:00