Commit Graph

69576 Commits

Author SHA1 Message Date
Christian Stenger
67b082b51b QtSupport: Fix host specific handling
When handling qmake on a device we need to take the
device's host os into account instead of ours.

Change-Id: Ice5d11dc5c623be702d1e54d6b3d0c635ff57c7a
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:46 +00:00
Christian Stenger
5d5969b46c ProParser: Avoid the most common hard crash
Whenever we try to access a non-local file we no more
hard crash Qt Creator, instead we silently handle it as
not found.

Change-Id: I3cbc617093c2a6fcb30626e276996430bb3795e5
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:34 +00:00
Christian Stenger
b8bcdd9568 Docker: Correct environment for docker exec calls
Provide way to clean QtcProcess environment which is needed as
e.g. toolchains, build tools, and debugger otherwise run
inside a wrong environment when using docker exec for the
respective process calls.

Change-Id: Ia6de1c90f2134fce260d293a2f6937ab3cfca2ce
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:27 +00:00
Christian Stenger
98ae0d44e6 Utils: Reduce need for resolving of symlinks
Be more strict when checking whether two files might be the
same executable.

As side-effect this reduces the calls to symLinkTarget() a lot
and speeds up auto detection of kits.

Change-Id: I23dc697a34bf93f8bd09cbe7e9d17f829cf0d010
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:20 +00:00
Christian Stenger
8593920f4c Tests: Fix build on Linux and macOS
Amends fd677101a9.

Change-Id: Ie994588f91b3b239080530df417128418a4e36ef
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 05:55:58 +00:00
Thomas Hartmann
493f8b8adc QmlDesigner: Show error message when using imports without version with Qt 5
If the document contains a 6.0 import or an import without version, but the
kit is a Qt 5 kit we show an error message.
Also show an error message if there is no Qt kit at all.

Task-number: QTCREATORBUG-25983
Change-Id: Id87ef47f0d8fbc31d1a8dbe8a471986d7288a4d3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-22 15:51:20 +00:00
Christian Stenger
a0da3ce69f Utils: Move filterEntriesHelper() out of FilePath
Currently only used inside DockerDevice and it fails to build
when building sdktool with old Qt which is still necessary.

Change-Id: Ic48414f0cb8f0955e7561f7484e3ea1c726c816a
Reviewed-by: hjk <hjk@qt.io>
2021-07-22 12:49:45 +00:00
hjk
fd677101a9 Utils: Split FilePath off fileutils.h
This now rather central class deserves a suitably named file(pair).

The rarer used declarations including otherwise not needed includes are
still in fileutils.h.

Change-Id: Ib18d72f16322c03f76023fdefcd5f6da35311b8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-22 11:52:58 +00:00
Christian Stenger
805d19d1ed Unittest: Remove deleted file
Amends baa83725f6.

Change-Id: I9a5d3ad9a17dd37cdc39d05d0065022621219ab1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-22 09:41:34 +00:00
Assam Boudjelthia
45611e841b Android: avoid blocking call to show avd selection for default device
If a user already chose a default device to run, we don't need to create
the whole AVD selection dialog, but rather straightforward to get the
device info if it's already connected, otherwise the dialog opens for
selection as usual.

Change-Id: I5fee9411d755e89da23a8d365f284e8b52808a07
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-22 08:51:46 +00:00
Christian Stenger
dfb0edf4ce Docker: Fix logic and Qt6 build
Change-Id: I3f0ec2cc86f48578e9dcd2ebfaa685cc577141c3
Reviewed-by: hjk <hjk@qt.io>
2021-07-22 08:46:52 +00:00
Thomas Hartmann
c59bddd4df QmlDesigner: Fix crash for QQuickStyleItem
QQuickStyleItem crashes if componentComplete() is called.

Change-Id: I1df1b50f6ba95c0eda1ff8e18de85276a6de04f5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-22 08:06:31 +00:00
Christian Stenger
bbf2dab8cb CMakePM: Fix build on Windows
Amends 3aa324ef1f.

Change-Id: Ieef98239ec4fa029da1541b15229a17beeb513f6
Reviewed-by: hjk <hjk@qt.io>
2021-07-22 07:49:39 +00:00
Thomas Hartmann
c8a6d94a39 QmlDesigner: Fix missmatch of category titles
"My Quick3D Components" was renamed to "My 3D Components".
ItemLibraryImport::quick3DAssetsTitle defines the title in a single place.

Task-number: QDS-4717
Change-Id: Ib96dcb029ce0b74de64ebdc904d890d66c240d2e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-21 14:08:46 +00:00
hjk
1c3b9e2bfe Utils: Remove unused function FilePath::resolveSymlinkTarget()
Change-Id: I7687f094a1e8054ac8298be754e95252db64c022
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 14:05:51 +00:00
hjk
3aa324ef1f CMake: Make CMakeConfig a proper class
Looks a bit more "object oriented" in my book.

Change-Id: I6a3b1b4691ec1c7465f652608678e8f31e7e52a7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-07-21 13:25:30 +00:00
hjk
7aef03134d Utils: Move writeData handling to QtcProcess::start()
So that this doesn't only apply to runBlocking()

Change-Id: I6ef7c72e13a5e214c7476ede942662a9893c843c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 13:05:31 +00:00
hjk
41355d7cd7 Docker: Implement DockerDevice::writeFileContents()
Change-Id: I686eb6da5ec0a59da3b8c5e32e1ff2f9fa9621b2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 12:54:28 +00:00
hjk
9d08e5f173 Utils: Keep write channel open by default if we know we'll use it
Change-Id: I4591f3e7e3b33ef6ea43d6aa9a5c9246c8bfd2ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 12:54:21 +00:00
hjk
2dafeadd0c Docker: Enable DockerDevice::removeRecursively()
With some half-baked sanity checks.

Change-Id: Ic3b9977f2bb8218105c5b7dba26df5cb933840c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 11:11:00 +00:00
hjk
8c1edf2be8 Docker: Juggle messages on the Daemon state button around
Change-Id: I64cef2458e475a8edd796d6a7ca5f3feb8bd0ac0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 10:26:33 +00:00
Henning Gruendl
6fef74a8cb QmlDesigner: Add RGB und HSV picker
* Add modes to color picker
* Add color picker for RGBA mode
* Add color picker for HSVA mode
* Add luminance slider for RGBA mode

Change-Id: I0bb1dbb67b7c18d156eee0d4e07cfa942162f832
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-21 10:25:51 +00:00
Christian Stenger
4895eb346a Docker: Implement symLinkTarget() for non-local access
Change-Id: I895d7e190a556ee582e7c767e7045362e9a7adce
Reviewed-by: hjk <hjk@qt.io>
2021-07-21 10:16:27 +00:00
Christian Stenger
9e015dbaf7 Docker: Let some commands run inside shell
If there is no local access for the docker container we
create lots of explicit docker calls which take time
to be created and executed as this always fires up
another connection to the container.
Currently we expect the container to have a shell and
we already have it in place, so re-use the shell to
execute at least a couple of commands.
This heavily increases the performance of these commands.

Change-Id: Ic778a250a2b3b8c5ce2a8dd6b7fa8c532bc6d4bf
Reviewed-by: hjk <hjk@qt.io>
2021-07-21 10:16:13 +00:00
Cristian Adam
366b4c0199 CMakePM: Consider all the missing expandable CMake variables
CMAKE_PREFIX_PATH and CMAKE_FIND_ROOT_PATH can have multiple
values, and now all the values are taken into account.

Ammends e1a68f2598 which had only
one value with all the items separated by semicolon.

Change-Id: I88d98fbbf165e7e61d70ab4a4e84eb4de4cc9f82
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-07-21 09:53:50 +00:00
Christian Stenger
7ef50ec70c Docker: Use shell to exit container
..and only fallback to calling docker command if this
fails.

Change-Id: I854499f7df8605ffe444c43bc6d1dc0155183627
Reviewed-by: hjk <hjk@qt.io>
2021-07-21 07:39:19 +00:00
hjk
f9893f5883 FakeVim: Update visual marks when mark settings have changed
To test: ":set sm",  "ma", "<Down>",  ":set nosm"

Change-Id: I75d2c3ded04ddf3bc656574a3cff136db144df2b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 06:44:28 +00:00
hjk
cb23530798 Docker: Add a button to list auto-detected kit items
Helps to understand what's going on.

Change-Id: I5b8c591cbd60227cf250932c8654063236eec05f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 06:44:21 +00:00
hjk
2ff446bd25 CMake: Simplify CMakeConfigItem::toBool() use
Change-Id: I60120a152174b7c3751b99ac92d31bdb9c3ab1d9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-07-21 06:25:17 +00:00
hjk
3b779fb8dd CMakeProjectManager: Use "cooked types" in DirectoryData
Less conversions cycles at the price of a few more temporary bytes.

Change-Id: Ibda82e02d7b83944f5db38ac7cf75c4bae4f55ec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-07-21 06:25:06 +00:00
hjk
8a28f43a81 Docker: Implement fallback for DockerDevice::lastModified()
Change-Id: I66923cd06b53ecc6883c3b324fd46d89994572ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 06:24:39 +00:00
hjk
a05414adf6 CMake: Fix remote search of non-standard ninja installations
Change-Id: I9ec636b126b621bb7a676e55a31845328c9e5ba1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-21 06:17:39 +00:00
Christian Kandeler
a7756a72fd CppTools: Fix look-up of top-level virtual function declaration
Fixes: QTCREATORBUG-25749
Change-Id: I7a9e8e406739931df253f14772361f575adbaa3f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-20 14:03:19 +00:00
Christian Stenger
99ae8b19e6 QmlJS: Fix build with Qt5.14
Amends af88a7876b.

Change-Id: If3f45922dd822797d477ac8116b4fcbed86c746a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-20 10:11:42 +00:00
Fawzi Mohamed
864c1da05b qmljs: fix order in BoundName
constructor and field order should be consistent

Change-Id: If698fd66cf67ab54c4be1638f19d758a54e33d5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-20 10:10:40 +00:00
Fawzi Mohamed
2f13810633 qmljs: update gen-parser.sh and related patches
ensure that the script works with the current source
* update manual patches
* use reverse patches to simplify updating procedure
* describe updating procedure

Change-Id: I23f8ee5bd73506df03b8b6b75e535170dff5f2b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-07-20 09:02:25 +00:00
Fawzi Mohamed
af88a7876b qmljs: update Qml parser to parser of Qt 6.2
this is needed (among other things) for
 * null coalescing
 * shebang support

Change-Id: I1b37fd86593f143de8b39c0daf433831a8785568
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-20 09:02:15 +00:00
Fawzi Mohamed
dc654cfcba qmljs: use SourceLocation::length in reformatter instead of isValid
isValid becomes more strict in Qt6.2, meaning invalid (default
initialized) SourceLocation.
Reformatter used it to check for absent (i.e. 0 length) tokens, which
might still be valid (according to the new definition) as they mark
the start or end of an AST element.
Thus use length != 0 instead of isValid() in these places.

Change-Id: I4fbc1466ccef6b4b4e2c1d6b5169189b34dc6ae3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-20 08:43:18 +00:00
Christian Kandeler
42fe70b93e ClangdClient: Fix possible crash
Fixes: QTCREATORBUG-26018
Change-Id: Ib93d6067950b548f6d437bb06cc9f11a8246e105
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-19 13:11:33 +00:00
Christian Kandeler
217dfdda7a ClangTools: Fix clang-tidy command-line construction
Fixes: QTCREATORBUG-26015
Change-Id: I2850e6efa5b75748599f55e8b9c96757582f5cb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-19 12:12:27 +00:00
Cristian Adam
e1a68f2598 CMakePM: Better path comparison for missing expandable CMake variables
Amends 2d8cd0c90c

Change-Id: I2192dfdd7624917e07a2a1cbda9fc5867add7ab5
Reviewed-by: hjk <hjk@qt.io>
2021-07-19 09:44:01 +00:00
Christian Kandeler
0636238429 CppTools: Do not access kits in non-UI thread
Amends 9c3420120e.

Change-Id: Iba8b1069bf4468119c7f518c562e4229141ac66b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-19 08:40:35 +00:00
Thomas Hartmann
ef8f18fb70 QmlDesigner: Do not instanciate ApplicationWindow
Change-Id: I7a57de60aba72823579e986e9ad6278c4a7e84a8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-19 07:53:39 +00:00
Wojciech Smigaj
3af9590db2 Rename "Show Source and Header Groups"
This patch renames the "Show Source and Header Groups" filter to "Hide
Source and Header Groups" for consistency with existing filters such as
"Hide Generated Files".

Change-Id: I34c204f7cae55bab60a50932cf307614987ef2ea
Reviewed-by: hjk <hjk@qt.io>
2021-07-16 19:53:38 +00:00
hjk
486fd8f7d6 Docker: Implement fallback for DockerDevice::directoryEntries()
Change-Id: I57430bc4cf79abfc07ccbe06746a0857e10053da
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 14:37:15 +00:00
hjk
5acbe8d9d8 Docker: Implement fallback for DockerDevice::readFileContents()
Change-Id: I89ca268d226019a21bb73a2f039e781d0f595336
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 14:09:04 +00:00
hjk
c1d95beef6 Docker: Make fallback code less repetitive
Change-Id: I81762ef7e2ee66e9b053d3fcf8676a7920a63e12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 14:08:51 +00:00
hjk
1bde4ddbec ProjectExplorer: Use FilePaths in project tree nodes
Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 13:45:06 +00:00
Thomas Hartmann
a58686cf96 QmlDesigner: Improve .qrc file generation
* Filter for more suffixes and avoid code duplication.
* Always use the project path for file dialogs.
* Allow choosing (existing?) .qrc file.

It is now possible to 'append' to and manage an existing .qrc file.

Change-Id: Ib66751adc49839fd3fae7ac3ee3ae5fa741b7d50
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-16 13:11:54 +00:00
Thomas Hartmann
c395e52c2b QmlDesigner: Disallow ApplicationWindow
ApplicationWindow is not properly working in the design mode
and files using ApplicationWindow are usually not written with
the design mode in mind.

Task-number: QTCREATORBUG-25984
Task-number: QTCREATORBUG-25983
Change-Id: Ia30ec26e9078ca0a9c1da11970202983e15ce4c8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-16 13:11:47 +00:00