Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
74e35d68a8 Utils: Add a convenience function to fill clipboard and selection
Relieves the user code side from repeated code which then tends to
get forgotten.

Change-Id: I079f97a658b55f3c79111df1946b8d72863ce513
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:05:17 +00:00
Jarek Kobus
a13a83b65d ExecuteFilter: Connect to done() signal instead of finished()
Change-Id: I36e8ed92fc57f67da51acc7712a939bf8d7a78c6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 11:37:55 +00:00
Christian Kandeler
6fee34887b Valgrind: Fix test build
Amends 25b1c59f74.

Change-Id: Ibbc2ab6aca74e8bffa97bca53909daf2240a3eab
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 10:22:00 +00:00
Christian Kandeler
b6adaab3ea CompilationDatabaseProjectManager: Fix flags extraction
The code would blindly remove all "options" starting with /, which meant
that all file paths arguments got lost on Unix-like hosts.

Fixes: QTCREATORBUG-22949
Change-Id: I43e2b1e57ed0e9ced9da8fa46d98d9ac25f83d13
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 10:20:38 +00:00
Bartlomiej Moskal
917f0d151b Android: set release flag when signing apk
Currently, signing a package by androiddeployqt automatically implies
the --release option, but there is a fix that removes it from being set
by default. To prepare QtCreator for the upcoming change and not to
change its behavior, we need to manually add the --release option to the
argument list.

Change-Id: I31df1b8252a4444afde95a043848391590f4db82
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-20 08:47:30 +00:00
hjk
27ce8d6177 FakeVim: Simplify calling external processes
Change-Id: I5157e2e73654df8bef65d72b7209c487e8b0c881
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-20 08:42:51 +00:00
hjk
d783b4d5ff ValgrindRunner: Remove ValgrindRunner::setDevice
The device can now be determined from the debuggee's file path.

Change-Id: I2b24d6e325f74826a644d02a9e418576c4e9b436
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-20 08:08:25 +00:00
Jarek Kobus
13c7513024 QueryRunner: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I57adabc52b38be6b22a4d7380e6fbaaae3192201
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 08:00:59 +00:00
Jarek Kobus
1d67bf597f DocumentClangToolRunner: Remove no-op call to disconnect
A call to disconnect() prior to object destruction is no-op.

Change-Id: I719d84d5fde43038c80bd2fc164ffe5e0aab1fec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 07:52:48 +00:00
Christian Stenger
fd5bcea5f6 QmlJS: Enhance member lookup
Check for the alias when performing a member lookup on an
import.

Fixes: QTCREATORBUG-26714
Change-Id: If3febb7d6de9fa2663cdda0143d4aa3590312ca5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-06-20 07:11:31 +00:00
hjk
e980d87b50 Debugger: Fix LLDB start on Ubuntu 22.04
The LLDB (14) installation on Ubuntu 22.04 is broken, see
https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1972855

Work around by using a corrected PYTHONPATH when starting LLDB.

Change-Id: I9bede8f146c32f60247ca3416a14cf9ccf4b0fb6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 06:55:57 +00:00
David Schulz
3b8b247f88 Python: ignore windows store redirectors
Change-Id: Ife5c13549d73156550a7ce4b5436f1e5a19503fa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 06:16:08 +00:00
Cristian Adam
498418bbc9 CMakePM: Treat .h files as compile group language header types
CMake splits sources files into groups "Source Files" and "Header
Files".

CMake also has compiler groups when source files are compiled
differently.

Qt Creator is mapping the compiler groups as RawProjectParts.

In order to get the header files as part of a RawProjectPart the target
sources (which contains all sources) is mapping the header files that
match the mime type of the compiler group language type.

.h header files were considered ambigous headers, and in this
commit we treat them as the compile group language header.

Fixes: QTCREATORBUG-27117
Change-Id: If68e847846cc270f06fc2231ec44a29ea6a987c1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-19 09:45:05 +00:00
Jarek Kobus
91d1ed25c2 LldbEngine: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: If82a7c79bba9bd3457d07fbc212f6b007699b0f0
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 21:45:23 +00:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +00:00
hjk
dcd3d9e717 Docker: Simplify (unused) settings page code
Change-Id: I57496f1f3150b91681724878772227ef25b65789
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-17 12:40:51 +00:00
hjk
644b51a699 Utils: Add more correct comment to QtcProcess::cleanedStd{Out,Err}
Change-Id: I50202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-17 12:40:34 +00:00
hjk
eb411dfeb0 RemoteLinux: Fix rscync deploystep with multiple dirs
This was quoting them into a single argument, failing if there was more
than one.

Change-Id: Idc099970f3b747918adf7559b95e749940aad11a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-17 12:16:09 +00:00
hjk
6517e3bbe3 Valgrind: Simplify connection setup
It's static 1:1 nowadays.

Change-Id: I0bdc62bda4aade6753b04c42d95fbbdf70c37386
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-17 12:12:20 +00:00
Christian Kandeler
120f3872d2 CppEditor: Add an enum to the code style preview for braces settings
So the user gets feedback for all the checkboxes by default.

Fixes: QTCREATORBUG-27268
Change-Id: I3518a7693bf31ce6c48a12905b77713c591e1853
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-17 12:10:42 +00:00
Christian Stenger
74a7e9f00c QmlDesigner: Fix test build
Amends 50aadacb6e.

Change-Id: If6cd7a1fc4df380693f3c4deee8791ed9863672a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-17 11:49:36 +00:00
hjk
8295714ff6 Utils: Shuffle PathChooser expansion responsibility around
Change-Id: Iaee0c21e8e1c99cc034bee5b892587d3137b5508
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-17 10:19:59 +00:00
Jarek Kobus
f1ff0a90e0 DocumentClangToolRunner: Delete later the old runner on runNext()
Don't delete the old ClangToolRunner directly from its signal
handler when calling runNext().

Change-Id: I55e72c1cced9ecbce492d00896d6fa161df02fd0
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-17 10:17:55 +00:00
Alessandro Portale
f873ad1cf0 Debugger: Ensure termination of lldb.exe
LLDB 12.0.8, which is included in NDK 23.1, hesitates to termiate when
being told to. Calling QtcProcess::stop() and using CtrlCStub on Windows
helps with that.

Amends: 17ff9317cd

Fixes: QTCREATORBUG-27723
Change-Id: Ie9d4ed23a833019f445c1517983c90ae899fbf39
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-17 10:13:47 +00:00
Eike Ziller
016321f0c8 Merge remote-tracking branch 'origin/8.0'
Change-Id: I9f41e115adb25c08acc01110b6027020eff1a1e7
2022-06-17 11:29:14 +02:00
Mahmoud Badri
d080e6331f QmlDesigner: Parse material library on model attach
Parsing has to happen so material in an old project are correctly
appearing in the material views. Using a timer to wait until it is ok
to create the material editor node. Otherwise errors happen.

Change-Id: I54b532211f8a865c5183fab0fd8c12e5f15b983a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-17 08:47:04 +00:00
Christian Kandeler
db451f7778 iostool: Fix qbs build
Change-Id: I5a33a247152d779d89a5e607cd42ab7030ae528e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-17 08:12:14 +00:00
Eike Ziller
bd2a994434 UpdateInfo: Improve URL for "Qt blog" for new Qt releases
Use the URL that shows all release blog posts, which increases chances
for the user to find the right one without hassle.

Change-Id: Ia34b4de031223dd8b856be3cf1596fe1db274e54
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 08:09:04 +00:00
Eike Ziller
65e043961e CMake: Fix missing path to ninja for ExternalProject_Add
ExternalProject_Add runs CMake not during the CMake run of the toplevel
project, but instead it runs CMake for the external project during the
build step. And while ExternalProject passes the CMAKE_COMMAND on to the
external project, it does not do so for the CMAKE_MAKE_PROGRAM.

Make sure that the make program is also found when configuring the
external project during the build step, by adding the path to ninja to
the build environment, instead of just the CMake process.

Fixes: QTCREATORBUG-27495
Change-Id: I672ec04881387a7411836ab94655176b7a5fb681
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-17 07:31:01 +00:00
Eike Ziller
addcfa6dc7 CMake build: Fix issues with sharing qmldesignercore files
When adding the .ui files from qmldesignercore.cmake to
tst_assetsImport and tst_merge in the qtquickdesigner repository,
AUTOUIC for some reason gets the output location for the
generated ui_*.h headers from: It puts them into
qtquickdesigner/tests/qtcreator/src/plugins/qmldesigner/designercore/
instances/
instead of into the corresponding *_autogen directory.

That leads to both tests wanting to generate the same file, and
ninja complains with

ninja: error: build.ninja:78635: multiple rules generate
qtquickdesigner/.....

Do not use AUTOUIC for these .ui files, but instead add them manually
with qt_wrap_ui.

Change-Id: I1d60fae95739335a87f8196ed2a686a0633165b2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-17 07:28:13 +00:00
Marcus Tillmanns
35707f8674 android: fix call TaskHub::addTask from wrong thread
Fixes: QTCREATORBUG-27105
Change-Id: I3be5e09e66642f8405979f601eee0db7b6a530e8
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 07:15:02 +00:00
Marcus Tillmanns
e3fd840f98 iostool: Improve deployment speed using delta deploy
The iostool did always deploy the whole bundle, without taking
into account whether anything has actually changed. This meant
that for big bundles anytime the user starts the application
on his device, a full deployment was done.

For a ~1GB bundle this would take around a minute on a recent
Mac and iPhone 12.

This fix uses a new function from the mobiledevice framework
called AMDeviceSecureInstallApplicationBundle.
This function takes a new parameter "ShadowPathKey" which points
to a directory where the last deploy state is captured temporarily.

Before deploying to the device, the function compares
what is to be deployed against the last deploy state and
only deploys the parts that actually changed.

QtCreator provides a temporary folder for this. Due to this,
the initial deployment still does a complete deployment as
no state is available yet. All subsequent deployments
take the captured state into account.

For backwards compatibility, the old deployment method is left intact.

Fixes: QTCREATORBUG-24371
Change-Id: I4df6aa79d41b34c326d78be7952d7eeb23774648
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-17 07:09:45 +00:00
Piotr Mućko
fd68b1c58e McuSupport: Update renesas flash tool path env variable
Change-Id: Ib5375ef2d5ab049313ccfbeb0fd3763d3baa8004
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-17 06:54:53 +00:00
Piotr Mućko
2bdb75ac7a McuSupport: Pass versioning from json to McuPackage ctor
Use versions parameter from JSON kits.
Instead of setting version in separate step pass it directly
to ctor.

Change-Id: I7ac9017d56dafa316f95ba4c504dcb0af641dbdc
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-17 06:54:24 +00:00
Alessandro Portale
b2af450cdb Debugger: (Re-)Fix start of Android lldb from NDK 23.x on Linux
In order to help lldb locate libpython3.9.so, we need to point
LD_LIBRARY_PATH to the right lib/ path inside the NDK.

Amends: b54bf8ad86

Reason for amend: The "prepend" use-case of Environment::prependOrSet
failed due to the undefined separator. Now, use
Environment::prependOrSetLibrarySearchPath instead, since that handles
the separator and knows the environment variable name.

Fixes: QTCREATORBUG-27297
Change-Id: I770a6335a7a26c65d23c930f7d6f9795b3dc52b5
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-17 06:19:55 +00:00
David Schulz
e052d75987 Core: FilePathify WindowTitleHandler
Change-Id: I905a193e70b199cbbd483e76e14c7f9fd2b179ef
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 04:22:23 +00:00
Jarek Kobus
3ab822739d FetchContext: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I16e0de8422be989bf56cc6c5b865966f97013731
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-16 20:49:04 +00:00
hjk
af4a6b1a74 Debugger: Use ProcessResultData a bit more
Instead of its individual items.

Change-Id: Icd668a61de1c2de676e0a44769f1c1bb5375c523
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-16 15:43:25 +00:00
Jarek Kobus
aa117f9955 QbsSession: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I164338c17acf6ec0eff5c514d6919a27c3feaae8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-16 15:09:55 +00:00
hjk
5ee880ce5e Utils: Add a few convenience functions to work with process output
Change-Id: I45acea77ccfdc15b1be9693c1658890865383c16
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-16 14:43:21 +00:00
Mahmoud Badri
568004e121 QmlDesigner: Detect asset drag'n'drop support based on property type
Handle property support for asset drag based on property type rather
than name in order to support properties with any name
(like lightProbe).

Change-Id: I20fd422119db96aebd505b47888c97f0d94bf7f9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-16 14:05:10 +00:00
Miikka Heikkinen
221376aa38 QmlDesigner: Reset puppet when material is added
This is workaround for material rendering issues in quick3d when a
material is shared by multiple windows.

Fixes: QDS-7096
Fixes: QDS-7118
Change-Id: I64fe2e51c5dda8e238502e5d926b6938b7b0731a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-16 13:54:41 +00:00
Jarek Kobus
25b1c59f74 ValgrindRunner: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I8eda3a01d73c87bd2673b40723e563ec3ce3a01c
Reviewed-by: hjk <hjk@qt.io>
2022-06-16 13:16:43 +00:00
Cristian Adam
01d3b69719 cdb: Use CtrlCStub for cdb.exe
This makes sure that any processes started by the debugged project in
cdb are also closed when the debugger should be stopped.

It happened to me in the past that while debugging Qt Creator in Qt
Creator and closing the debugging session tens of uic.exe were left as
zombies. And for some reason they started consuming CPU time.

taskkill /f /im uic.exe was the needed command to handle the situation.

Change-Id: I498381e793405854f7c02e9fec6b6e4718c75c25
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-16 12:39:56 +00:00
Jarek Kobus
1558a81ac1 MesonProcess: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I94b5b55795110ea4bdc90fd5da88585bd28f1b32
Reviewed-by: hjk <hjk@qt.io>
2022-06-16 12:28:07 +00:00
Artem Sokolovskii
5d8f13bfd4 CppQuickFixes: Add "auto" as local declaration incase cxx11
Add local declaration function add "auto " incase
cxx11 features are enabled.

Fixes: QTCREATORBUG-26004
Change-Id: I10da77e8baa52740b1c4df5a21d78ac5f0d1c5d6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-16 11:43:47 +00:00
hjk
189fe7fab3 ClangTools: Simplify process rampdown
This is now taken care of in the desctuctor of QtcProcess itself.

Change-Id: I51e65344e6d2cae4498e292e4ad6a586c68b0539
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-16 11:20:56 +00:00
Artem Sokolovskii
706dc654b9 CppQuickFixes: Add function getDeclaration for AddLocalDeclaration
Change-Id: Ie2d5c5de6b871a855b95efe7c633b28d6ed5c512
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-16 11:20:20 +00:00
David Schulz
677a8fe34a Coco: remove unused parameter
Change-Id: If4af2b10df1260d6f3806a5f1f6f1a442609f8d5
Reviewed-by: hjk <hjk@qt.io>
2022-06-16 10:42:15 +00:00
David Schulz
21e254baca ClangCodeModel: return absolute path to fallback client from path
Change-Id: I9731aca47975e47756042fb8ed42c2f648e365ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-16 10:26:53 +00:00