Commit Graph

62421 Commits

Author SHA1 Message Date
Christian Kandeler
268f4ac406 LanguageClient: Merge adjacent change events
This saves a lot of data going over the wire.

Change-Id: Iac1220c72797643ba09bf90b02f7b5155cda4b0f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-14 10:05:10 +00:00
Christian Kandeler
719f51445e ClangCodeModel: Use dedicated completion assist provider for clangd
The pure LSP-based implementation is too inflexible with regards to
activation characters.

Change-Id: I386a60b80f59e1b48254d55c2a47f1a1ffe1f97f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-14 09:11:33 +00:00
hjk
d1478a94be ResourceEditor: Use more FilePath
Change-Id: I1bc1582243104ec55ad1dd5c365d22565d332cb9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2021-09-14 08:36:01 +00:00
Christian Kandeler
50046dbc54 CppEditor: Fix "decl from def" quickfix with templated return type
We must treat return and parameters types of the function differently
from the function itself with regards to template parameters. This was
already done for parameters, but not for the return type.

Fixes: QTCREATORBUG-26248
Change-Id: I44cf6f0bda7b5e3c38f9f73e13f51f2c12ab7dc4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-14 08:22:27 +00:00
Christian Kandeler
1faff324cd LanguageClient: Remove spurious declaration
Change-Id: I400d446172680e7ee5ec6764a46faf8e2fee5baa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Alp Öz <aoz@qt.io>
2021-09-14 08:21:30 +00:00
David Schulz
af4b84b52b ModelEditor: replace QFileInfo api with FilePath
Change-Id: I3081932e679c3f0b70e0a476fae887ff332d5b14
Reviewed-by: hjk <hjk@qt.io>
2021-09-14 07:44:29 +00:00
hjk
f6f7f410dd Utils: Remove Utils::FileUtils::renameFile()
There's FilePath::renameFile() nowadays.

Change-Id: Id37f24910f0c608ccfa6e52c5608c6707353a073
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-14 07:22:45 +00:00
hjk
64324db662 Utils: Remove FilePath::isChildOf(QDir) overload
After replacing its use in the two remaining places.

Change-Id: I6900ccdaf4ba4cf035e59b1222f06b037e7da512
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-14 07:22:08 +00:00
David Schulz
7acb8e90f3 CMake: create generated file paths without QDir::cleanPath
Change-Id: I49913032fb95aff8357da7aa077eabd5907d53ca
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-14 05:07:52 +00:00
David Schulz
3369948b1a CMake: use FilePaths to generate relative source entries
Change-Id: I5df67517e269d650166f72a625e5835e780fca9d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-14 05:07:46 +00:00
hjk
4aea533fe5 Utils: Remove compatibility typedef SynchronousProcess
Change-Id: Iad80129668142bd518fc8c88bf03a7b3afd8be47
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alp Öz <aoz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-14 03:29:08 +00:00
hjk
cb4f75426d ProjectExplorer: Remove one constructor overload of DeployableFile
Change-Id: I87e444349129e9370b5fec505444723d36e21448
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-14 03:28:48 +00:00
The Qt Project
e65827c04a Merge "Merge remote-tracking branch 'origin/5.0'" 2021-09-13 17:06:43 +00:00
Eike Ziller
3d4d7c7e14 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
2021-09-13 17:03:55 +02:00
hjk
64f439fdaf Utils: Sprinkle [[nodiscard]] across FilePath API
Change-Id: I896a08df417acd113c0953edb78edd364da5265e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-13 13:57:13 +00:00
Artem Sokolovskii
c941f7d0f5 Font settings: Add import and export functions
Fixed: QTCREATORBUG-6833

Change-Id: I23eec56aeb53ed10dd7f04c071318f5cc335b14e
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-13 13:11:36 +00:00
Andre Hartmann
c572ca0e87 VCS: Remove unused local variable
Why didn't this give a warning?

Change-Id: I866aa5ddf3107866bcf5da395f1312e50e75561c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-09-13 13:08:07 +00:00
David Schulz
0057c73080 CMake: use FilePaths to parse source and build dir
Change-Id: I59523a525fd07402e3ade6cd6b7eaee69aa5abe0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 12:59:46 +00:00
David Schulz
ed8b87d4f6 CMake: correctly track remote cmake files
Change-Id: I6685ed7ba77282d9d5154ba4192841f5bd093783
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 12:59:33 +00:00
Christian Kandeler
99790aaa42 CppEditor: Do not format strings in the basic highlighter
... if a semantic highlighter is available.
Otherwise, raw string literals can introduce formatting artifacts, in
particular when using clangd.

Task-number: QTCREATORBUG-26211
Change-Id: If76c173fa98188930221e89e2665b66deb91c5e0
Reviewed-by: Alp Öz <aoz@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-13 12:13:52 +00:00
Christian Kandeler
a0bf5448a1 TextEditor: Fix clearing of semantic highlights
This was broken for multi-line results, potentially erasing the
formatting of continuation lines. This is particularly relevant for raw
string literals.

Change-Id: I68092f57024422137ca5483d1be17e02294f7a9f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-13 12:13:34 +00:00
David Schulz
0caa8cbd60 Docker: reset process working directory if it needs a device
Change-Id: Ided00a328279b7b82814dcbb79434063ed7ec5f6
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 12:00:20 +00:00
David Schulz
8edbba43aa ProjectExplorer: Fix build dir path
Clean path on a remote path like docker://foo removes double slashes and
results in docker:/foo. Which can not parsed as a remote path by
FilePath::fromString

Change-Id: Ia7ed6ae63e609d2cb5fc2e9bc886c6fb721b4ccd
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 11:18:49 +00:00
David Schulz
3efd048dfd Utils: Use FilePath to create settings directory
Change-Id: I5d80933f2f8240d515d007979f146db65358a243
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 11:17:42 +00:00
David Schulz
66a7f8d527 QtSupport: Use FilePath api to detect Qt special names
Change-Id: I1b95c049a63cdbb69c873e675d6e93722b1c422e
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 10:44:11 +00:00
Jarek Kobus
686603ae83 Remove unused includes of QThread from cpp files
Change-Id: I61b8e9182bf03fa96d2aabe399a6c93964fc8d03
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 10:37:20 +00:00
hjk
10807aed88 Utils: Introduce PathChoser::absoluteFilePath()
As we have a valid context to resolve relative files here
this is a good source for absolute files that don't depend
on QFilePath::absolute{File,}Path or similar.

Change-Id: Iaf592aa746023f80de517703e32e6b80a3d0fd7e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2021-09-13 10:10:15 +00:00
Eike Ziller
a060ea2ec8 FilePath: Fix fromStringWithExtension
Amends a04e1eaf84

Change-Id: I440e8b79d52f0a77ef1ee1aae278c34e815e877a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-13 09:59:27 +00:00
hjk
704b0af8db Replace some PathChooser::setFile with setFilePath
Change-Id: I9a135e27d97b6706ea199b60a0b0b28838c77dcc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-13 09:47:56 +00:00
Jarek Kobus
f72c4cb8ac Ssh: Re-base SshProcess on top of QtcProcess
Change-Id: I266820e0e2ea12d6e4a5a83a679a7279fab9cd83
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 09:26:09 +00:00
Eike Ziller
90ec06c27e sdktool: Fix sanity check for Qt 6
Qt 6 happily converts a QString into a QVariantList, so the check if the
existing value is convertable to a QVariantList is no longer strict
enough.

Utils::PersistentSettingsWriter/Reader luckily only uses QVariantList
explicitly, so instead check if the type matches QVariantList
explicitly.

Change-Id: I52858308db3b0bef518d2b1b370668f0f4845d73
Reviewed-by: Alp Öz <aoz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-13 06:26:33 +00:00
Andre Hartmann
4da225f7af VCS: Fix commit message verification for empty subject
For commit messages with empty subject and
full body no warning was shown so far.

Example:

 "

 This is now considered as commit message with
 a very short subject, but was valid before.
 "

Change-Id: Iee24b022cd53dc9d2eb71f47571221e4dda9ba08
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-09-11 15:04:05 +00:00
Alessandro Portale
7d3f59c995 WebAssembly: Fix emcc execution for some emsdk versions on Linux
In order to run emcc 1.39.8 on Ubuntu 20.04., the PATH environment
variable must not be empty, because the emsdk wrapper scripts depend on
it.

Therefore, in WebAssemblyEmSdk::version(), we don't start anymore with a
clean environment bu with the related device environment.

Task-number: QTCREATORBUG-26199
Change-Id: I8b7603ef8126ebaef0fa4ed9e254296623c945e9
Reviewed-by: hjk <hjk@qt.io>
2021-09-10 15:34:24 +00:00
Vladimir Serdyuk
5d1d6c83a4 iOS/CMake: Fix running non-Xcode targets and targets in subdirectories
Improve support for running iOS bundle built with CMake introduced in
3a294f670d.
Currently it supports only Xcode generator and does not work if target is
created in a subdirectory.

This patch adds support for non-Xcode generators (tested with Ninja) and
targets created in a subdirectories with any generators.

The solution is not pretty due to the need to keep qmake compatibility.
Would be glad to refactor if there's more correct approach.

Change-Id: Ieaf7e3186ab55cadc643d9bd3d94442f9ac72228
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-10 15:23:27 +00:00
Jarek Kobus
33f1a96005 Control the lifetime of SshProcessManager
Make it possible to control when the SshProcessManager is
being constructed / destructed. Expose public constructor.

Since different singletons depend on each other, we need
to control the order of creation and destruction of them.

The order of creation is like that:

1. QCoreApplication
2. ProcessReaper
3. ProcessLauncher
4. SshConnectionManager

The order of destruction must be opposite to the above.

Change-Id: Ice07eb751cd61c03cb461816fa1b74ab040a53de
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-10 14:02:21 +00:00
Jarek Kobus
2bdbaaa2fd Remove code that tried to handle SshConnections in non-main threads
The SshConnection wasn't used in non-main thread anyway and the
implementation couldn't work properly in multiple threads.

Fix "acquire" typo in variable and class names.

Make SshConnectionManager a child of application object, so that
it will be deleted together with it.

Replace forever with ranged for loop.

Change-Id: I3c3592eb5ce20b463d5a656f94cadaccccf652dc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-10 13:58:09 +00:00
Cristian Adam
be2466dfa7 CMake: Remove major version number dll suffix
This was done to have qmake parity when we compared the qmake and cmake
release builds.

Since we are past that now, and the cmake build is the one used to do
releases, we can drop the number from the dlls.

Change-Id: I60d1b368daf4258884c239204c2e3c18f244e930
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-10 12:43:19 +00:00
Alessandro Portale
2fc0ce4843 Utils: Introduce QtcProcess::toStandaloneCommandLine()
The goal is to make a QtcProcess incl. environment, working directory,
executable and arguments testable, e.g. in a terminal. The new
toStandaloneCommandLine() returns a string containing the command line
for a call of "env" the data of the QtcProcess instance as parameters.

To be used like:
  qDebug().noquote() << qtcProc.toStandaloneCommandLine();

..and the debug output can be pasted into a terminal.

Change-Id: Ib6cbea290e1eff3279d6e0a67076a624312af879
Reviewed-by: hjk <hjk@qt.io>
2021-09-10 11:49:07 +00:00
Eike Ziller
f6ede253c7 iOS/CMake: Fix building for iOS device
Fix detection if a kit is an iOS kit.
iOS device kits do not have a device set, if no device is currently
connected. So we would end up with the normal desktop macOS CMake
configuration instead of the special iOS one.
Just check for the device type like before, and guard the else branch
with its own check for macOS target device.

Amends a71d725e46

Change-Id: I829e549e5743ec2b358713f2df6d9cd5e32f6b70
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-09-10 11:44:47 +00:00
Jarek Kobus
8b5192cf75 Remove unused QMakeProjectManager::ApplicationLauncher
Change-Id: Ibd3075e7f730121ef3cd94ca441b64181e44326d
Reviewed-by: hjk <hjk@qt.io>
2021-09-10 11:40:09 +00:00
Laszlo Agocs
0caf69cc52 Migrate to fixed add_shaders prefix handling
One way to get rid of the "qml" in there is to use BASE.
An alternative would be to update the file paths in the source code.
Here we chose the former.

Change-Id: If49cb584aea022d5d74b2348ec99ed831b715111
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-10 11:03:53 +00:00
Thomas Hartmann
47cae5555f StudioWelcome: Remove cluster tutorial videos
Those videos are outdated.
Also removing the thumbnails.

Change-Id: I07e3215db8a47d9f2e8b28f187b529b81630a4dd
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-10 10:54:53 +00:00
hjk
7cc4e27184 Debugger: Don't wait for responses for flushing dummy commands
As this is also used after -exec-continue we won't see a result
before the next stop and consequently run into the watchdog
timeout regularly.

Change-Id: Ibb7e42ae1810d4d9f536cf755219fba6d8aa0f96
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-09-10 05:34:32 +00:00
Christian Kandeler
939cc5af21 ProjectExplorer: Give build systems a name
... and make it accessible through a variable.

Fixes: QTCREATORBUG-26147
Change-Id: I0601c09a74360b91fe8421876207a8f4ae9d75b6
Reviewed-by: hjk <hjk@qt.io>
2021-09-09 14:41:56 +00:00
Christian Kandeler
e010fd2f48 LanguageClient: Add "Clear" button to LSP inspector
It's helpful to be able to watch new messages from a certain point
onwards, and not be distracted by older ones.

Change-Id: I0506dad24d4b970652117d7e704ebfb4b49cad74
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-09 13:57:41 +00:00
Aleksei German
f2642e6f3c QmlDesigner: Limit Style switch in MCU mode
Task-number: QDS-4954
Change-Id: Iba840ec00c938c09f79c390f0d81fa3006b4f7a9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-09 13:47:00 +00:00
David Schulz
335a74353f CMake: parse remote json files
Change-Id: I2dd8e160140e6eba35b9968d5afb0953c5cfa43c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-09 12:43:35 +00:00
David Schulz
f12409fbd6 FilePath: add [[nodiscard]] to FilePath::cleanPath
Change-Id: I546db0a73b21bc6fe76d6439e0df0bef479106b8
Reviewed-by: hjk <hjk@qt.io>
2021-09-09 12:36:02 +00:00
David Schulz
04763a307d Clangd: prevent adding refactorings for outdated documents
Change-Id: I658662dca345e1ae209a4d74e145b59c44417b00
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-09 11:46:12 +00:00
Christian Stenger
13be5e7eb4 QmlJS: Fix crash
Fixes: QTCREATORBUG-26151
Change-Id: Ibfc2a17f0eb8eb7c4804045dba9a1963249ba860
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-09-09 10:16:09 +00:00