Commit Graph

62421 Commits

Author SHA1 Message Date
Mahmoud Badri
25fa5540ea QmlDesigner: Implement adding and removing asset folders
Also corrected assets view margins and few relevants tweaks.

Task-number: QDS-5795
Change-Id: Ieeb68584bcb261422f48ec1a865f510a00c251f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-31 14:57:22 +00:00
Christian Kandeler
a77f5d41b4 CppEditor: No longer refer to clangd as experimental in the UI
Change-Id: Iadfbdf23a92ee551fff03f5eb5b8a1b2b15b0870
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-31 13:58:16 +00:00
Orgad Shaneh
2ee739b362 Git: Fix bad access to temporary storage
+ limit the fix to cases with HOMESHARE.

Change-Id: Ic108ab49eb3b64d5e1d302466c74610acc412175
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-01-31 12:49:40 +00:00
Jarek Kobus
74ea443ebf LinuxDeviceProcess: Remove unused setRcFilesToSource()
Change-Id: Ica834cbecfa481a3a6c94519a9799c4b917d49a1
Reviewed-by: hjk <hjk@qt.io>
2022-01-31 09:33:57 +00:00
Jarek Kobus
f7c9dac3a7 SshDeviceProcess: Don't store exitCode
Change-Id: Id957dc7b0e71d0d1376716cb2b63c83d43cc1a14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-01-31 09:32:11 +00:00
Miikka Heikkinen
d48a4bd60f QmlDesigner: Add 3D editor visibility toggle actions
Added toggle for showing selection boxes, camera frustums, and icon
gizmos.

Fixes: QDS-5954
Change-Id: I97e12a3a04b9a1a1af5851e382f36c58ee869f45
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>
2022-01-31 09:15:32 +00:00
hjk
fd49c1d567 Android: Compile fix for Qt 5
Amends 49443d689.

Change-Id: Idadb794b85bebff9678b54f55f8b9822719a8d8a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-31 08:45:35 +00:00
Jarek Kobus
773f8a5bbe SshDeviceProcess: Don't buffer stdOut and stdErr
It's already being buffered inside remoteProcess.

Change-Id: I5fd90df600454563342aaf142d21df28a404d9ba
Reviewed-by: hjk <hjk@qt.io>
2022-01-31 08:24:49 +00:00
hjk
9ec997b376 ProjectExplorer: Base DeviceProcess on QtcProcess
... instead of having a member.

Change-Id: I75e8d7600eb17c7528fe9525d2e1aa871b282ad9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-31 07:44:24 +00:00
hjk
330dfa7e84 ProjectExplorer: Use a QtcProcess member in DeviceProcess
All derived class have one one way or the other. Mid-term plan
would be to actually base DeviceProcess on QtcProcess and to
potentially dissolve it completely later.

Change-Id: Ie3bc48dcdc30bc2da5557ad26babf6959a3efa04
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-31 07:44:16 +00:00
Christian Stenger
36a2bffc54 PE: Fix warning from QCssParser
Change-Id: I28ccf4f8b6d102dc03b198c057ccf222bf0a5836
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-31 05:51:34 +00:00
Alessandro Portale
49443d689e Android: Detect available Ndk platforms also for recent Ndk versions
In order to detect the list of platforms that an Ndk installation
supports, AndroidConfig::availableNdkPlatforms iterates through the
directories of the Ndk.

The directory structure of the Ndk changed in the recent versions. So
that the detection that works with Ndk 19 does not work with Ndk 23.
Also, the new directory structure is split up by Android ABI. And the
lists of supported platforms differ between ABI.

This change adds detection for the new structure, in case that the
old implementation fails to return a list. It also adds an autotest
that covers the old and new detection of supported platforms.

Fixes: QTCREATORBUG-26772
Change-Id: I6e584963f51feca0bf90c7ed3a9fdb03cb5d39e6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-30 19:11:45 +00:00
Alessandro Portale
d087fe424d Android: Set debugger sysroot also for recent Ndk versions
Android debug support specifies the sysroot inside the used Ndk.

Recent Ndk versions have a different folder structure which moved the
sysroot location inside the Ndk to somewhere else. This change adds
finding the sysroot in the new directory layout in case it cannot be
found in the traditional location.

Instead of Ndk version checks, this code uses FilePath::exists to see if
the sysroot is valid.

Fixes: QTCREATORBUG-26814
Change-Id: I37db3043e405b83168d7c80c522d31bc148e458c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-30 18:13:45 +00:00
Christian Kandeler
f51928d438 Update perfparser submodule
Change-Id: Ief0eb584f4fc9f8ff68fdc138e63fddfd7e1e697
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-28 15:12:29 +00:00
Mahmoud Badri
d5eab11359 QmlDesigner/StateEditor: Improve adding new states
- Added a big add button at the end of the states list.
- Small add states button jumps in (bottom right) when the big button
is out of the view.
- View scrolls to the end when a new slide is added.

Task-number: QDS-5973
Change-Id: Ida96bd663cc0caf32889638fbf4ac9f617916368
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-28 14:35:17 +00:00
Mahmoud Badri
0d3ef2489d QmlDesigner: Add some states view improvements
- Added a gray border around unselected states.
- States resize to fit view height.
- States are centered vertically in the view.
- Removed collapse option, auto collapse when space is small.
- scroll bar always at the bottom.
- Overshoot list ends.
- Added margins around the states.
- Add states button: make it small and docked to the bottom right.
- Add states button doesnt take space from the view.

Change-Id: I4fc96f4341a6e4a0c70509240b7aed9c7890ec4d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-28 14:29:41 +00:00
Eike Ziller
116b498b34 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/libs/ssh/sshremoteprocessrunner.h

Change-Id: I4ce088c68704845ec8ec6feaad10bf747e415bec
2022-01-28 14:59:08 +01:00
Cristian Adam
ff66f501f2 CMakePM: Do not flush CMake parameters model on parsing complete
The flush there was as a "hack" for the case:

1. failed initial configuration (CMAKE_GENERATOR as Ninja2)
2. successful configuration

The current configuration would get current items with unexpanded
values e.g.: QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}

But flush also removed the expanded values of the selected
initial parameters from CMakeBuildSystem::updateInitialCMakeExpandableVars

This is useful when CMAKE_CXX_COMPILER changes or
CMAKE_PROJECT_INCLUDE_BEFORE gets a new path to the new Qt Creator.

Change-Id: I480ce141d043d8ba6001fa47a54b066762b6a128
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-28 13:54:28 +00:00
Cristian Adam
0923d8676e CMakePM: Display CMake kit mismatch values in Settings page
updateFromKit() is now called on parsingFinished and the configuration
values that differ from the ones in the Kit's CMake configuration
will be displayed in red.

The "Initial Configuration" page will display the mismatches between
kit's CMake configuration and initial parameters.

The "Current Configuration" page will display the mismatches between
the initial parameters and the current CMake parameters.

The Tooltip is displayed with a bit of more space between values
for more readability.

Change-Id: I6ebfa71951cf979ab08f097befed2d43b74e4d6e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-28 12:42:25 +00:00
Alessandro Portale
9e2554b660 Use Utils::Archive instead of java's jar in AndroidSdkDownloader
The exctraction of the downloaded commandlinetools zip file via java's
jar tool did suddenly not work anymore on Windows. The exit code of
jarExtractProc in AndroidSdkDownloader::extractSdk would be != 0.

Instead of fixing the jar usage, this change replaces it with the
recently added Utils::Archive.

That has the advantage that it preserves the file permissions while
exctracting, so that we can also get rid of setSdkFilesExecPermission.

Another advantage is that the SDK can be extracted even before a jdk
has been selected.

Change-Id: I99cc2aff8e183108eb11dbf96f06557e5b299d56
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 12:35:45 +00:00
Christian Kandeler
abe09bfd76 ClangCodeModel: Adjust cursor for following destructor symbols
... with clangd. More specifically, for the case where we switch between
declaration and definition of a destructor. Since clangd expects the
cursor before the "~" character, we move it there.

Fixes: QTCREATORBUG-26809
Change-Id: I8ea6a060bea3545c963cb8ebbe2d3ae3a18da2d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-28 12:34:48 +00:00
Jarek Kobus
dd527a3890 SshRemoteProcessRunner: Remove unused command() method
Change-Id: If45ea80b892cb683aa3737dd73244fa4b669abc4
Reviewed-by: hjk <hjk@qt.io>
2022-01-28 12:26:01 +00:00
hjk
3769169b8e Utils: Introduce a struct for QtcProcess ctor arguments
We'll need a lot of combinations.

Change-Id: Ic92ad6fba1d96c42571be76f7c24b253f210b132
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-28 12:20:35 +00:00
Jarek Kobus
1d15a934cd QtcProcess: Get rid of useTerminal
Remove SshRemoteProcessRunner::runInTerminal() method,
it wasn't used anywhere (just in test).
Remove QtcProcess::useTerminal, as process should be
created in TerminalOn mode when there is a need for terminal.
Add a parameter to
SshRemoteProcess::fullLocalCommandLine(bool inTerminal)
as this may still be needed when running application
through ssh from terminal (ssh -tt option).

Change-Id: I71911082fcca190b82a1106a2ca1ca48dc5d4c79
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 95a9b22f6f)
2022-01-28 12:19:12 +00:00
Jarek Kobus
95a9b22f6f QtcProcess: Get rid of useTerminal
Remove SshRemoteProcessRunner::runInTerminal() method,
it wasn't used anywhere (just in test).
Remove QtcProcess::useTerminal, as process should be
created in TerminalOn mode when there is a need for terminal.
Add a parameter to
SshRemoteProcess::fullLocalCommandLine(bool inTerminal)
as this may still be needed when running application
through ssh from terminal (ssh -tt option).

Change-Id: I71911082fcca190b82a1106a2ca1ca48dc5d4c79
Reviewed-by: hjk <hjk@qt.io>
2022-01-28 11:56:30 +00:00
Alexander Drozdov
5c53dc5e13 Ssh: fix crash on freed memory access
At the cleanup() method we must remove connection from the m_connection
list to avoid access to the freed memory from the
removeInactiveConnections() that caused Qt Creator crash.

Change-Id: I8195f05e903819e3e3b48b2f72fd71047c5a1636
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-28 09:46:22 +00:00
Miikka Heikkinen
94a17f1e7e QmlDesigner: Fix 3D picking of RuntimeLoader loaded models
RuntimeLoader creates the loaded nodes dynamically, similar to
Repeater3D and Loader3D, so handle it similarly as well.

Fixes: QDS-6053
Change-Id: Iece15254e720cfc0a6796b182ef00c3a773cf35d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-28 08:58:49 +00:00
Christian Stenger
5887d13d46 Docker: Fix crash while removing auto detected toolchains
Change-Id: Id0cf4346b97f54247ad81ae0d93a42935dca8a0f
Reviewed-by: hjk <hjk@qt.io>
2022-01-28 07:09:24 +00:00
Christian Stenger
5c1b4d2b48 Debugger: Fix removing auto detected debuggers
Do not remove items while iterating over the tree
or we may crash when removing more than one.

Change-Id: I007672be94a7e6449cf25c965c07ca714049ae97
Reviewed-by: hjk <hjk@qt.io>
2022-01-28 07:09:15 +00:00
Alexander Drozdov
3869487a47 Allow to build ClangFormat plugin with CLANGTOOLING_LINK_CLANG_DYLIB
Some Linux distributives provides moders clang without separate libs
compiled, like libClangTooling and so on. Just provide libclang.so and
libclang-cpp.so.

Qt Creator provides way to handle such clang installation by
pointing flag CLANGTOOLING_LINK_CLANG_DYLIB=On for CMake. But
ClangFormat still keeps from building. Fixed it.

Change-Id: Id420f82c47c4205c8cd631aa04be6771628984be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-27 22:20:58 +00:00
Orgad Shaneh
707e7ba41f ClangFormat: Suppress warnings from llvm
Change-Id: Id79abc3ea87576a681d86a7c1bd3be957acc299f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-27 20:15:15 +00:00
Eike Ziller
a89f6919d2 StudioWelcome: Only replace wizards when running as Design Studio
Task-number: QTCREATORBUG-26936
Change-Id: I11c14bd916a7139fc4d133b8b3b8a79fa7770409
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-27 12:24:46 +00:00
Tapani Mattila
a117a558fe CMake generation: Streamline confirmation dialog
Task-number: QDS-5991
Change-Id: I1cec8650703ca5de936739d1adbba77d0b64562e
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>
2022-01-27 11:00:04 +00:00
Christian Stenger
95595db7d1 Docker: Drop handling of critical pattern again
Drop lately introduced handling of critical pattern and
just drop the critical pattern instead for now.
Brings back gdb when auto detecting debuggers.
Amends 22dd26bc76 and 181e74ebc3.

Change-Id: Icde46e9bfa82d5cf1252e46f1e0a84b638927473
Reviewed-by: hjk <hjk@qt.io>
2022-01-27 10:53:48 +00:00
Christian Kandeler
5c1dc40b6c CppEditor: Switch on clangd by default
Also change the corresponding settings key to force-enable it with
existing settings.

Fixes: QTCREATORBUG-22917
Change-Id: I3b5f54bf5d4261c6e4250245f44c4c360a911e5e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-27 10:47:35 +00:00
Christian Kandeler
6993bc7382 Fix various warnings
Change-Id: Iea85f4b890ce7700e8b3632de4656cf848729a36
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-27 10:42:23 +00:00
Alessandro Portale
859fa57648 ProjectExplorer: Sort loaded sessions by time in reverse
Fixes: QTCREATORBUG-26939
Change-Id: I2152dbf7c06dbdc511b4db143efe3375cdad04f1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-01-27 10:25:36 +00:00
hjk
4e34921451 ProjectExplorer: Rename DeviceProcess::error to errorOccured
That's what QProcess favors nowadays and QtcProcess uses.

Change-Id: Ie9492ae62f23e35a8a70f72196c3d1b6bc50cbdc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-27 10:12:38 +00:00
Alessandro Portale
a386725c6c Utils: Support sorting by QDir::Time in FilePath::dirEntries
Amends: f9c97d23c7

Task-number: QTCREATORBUG-26939
Change-Id: I9122d51af102547086687b1b9c6cb1553b609673
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit ec0513bf4b)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-27 09:22:06 +00:00
hjk
0813a08b1e Docker: Re-do auto-detection of Qt
This now properly iterates into subdirectories when selecting the
"Search in selected directories" option for the auto-detection
so it works with Boot2Qt images that don't put Qt in PATH, but
somewhere under /opt

Change-Id: Ifc337c0169d4b98b4e894a5d7e8286f171e0c569
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-27 09:08:33 +00:00
Eike Ziller
0c0bd8777a Merge remote-tracking branch 'origin/7.0'
Change-Id: Icaa605bcaa44ad50a98a63251cb4553bfd411b0a
2022-01-27 09:41:53 +01:00
Eike Ziller
79fd6510a3 Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: I8b1cdfb72b0e3e583c94447f13d0161b99fa93c1
2022-01-27 09:37:39 +01:00
Alessandro Portale
ec0513bf4b Utils: Support sorting by QDir::Time in FilePath::dirEntries
Amends: f9c97d23c7

Task-number: QTCREATORBUG-26939
Change-Id: I9122d51af102547086687b1b9c6cb1553b609673
Reviewed-by: hjk <hjk@qt.io>
2022-01-27 08:36:02 +00:00
Christian Stenger
181e74ebc3 Docker: Fix iterateWithFind()
Amends 22dd26bc76.

Change-Id: I0be8d8236795a9e93ab93f89df56fd14e378e6e6
Reviewed-by: hjk <hjk@qt.io>
2022-01-27 08:24:08 +00:00
Eike Ziller
3c63395d78 Merge remote-tracking branch 'origin/master' into 7.0
Change-Id: I717f2002c159557fdb6225b8259db26dd57c8da1
2022-01-27 09:10:46 +01:00
Christian Stenger
c492b29a45 Nanotrace: Make nanotrace commonly usable
CMake's auto symbol export is a plain hack and does not work for
other build systems.
Besides fixing some non-working implicit conversions when using Qt5.15.

Change-Id: I80b77a4ebf8cad30c78c1c2ef2034e62d2063399
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-27 05:38:48 +00:00
hjk
abbd6cdc8c CMake: Use CommandLine to create the initial default parameters
This has at least theoretically the potential to get quoting in
"cross" configurations right. Since the consuming side is not ported,
there should be no noticeable differences yet.

Change-Id: I933ded4b1c9645055d3114d53f3d1b95b5c5539c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-26 18:09:31 +00:00
Christian Kandeler
f2819878b1 ProjectExplorer: Fix crash in toolchain dialog
This amends 6cec0e2033, which did not take the bizarre code in the
derived class into account.

Change-Id: I508d483c8d38b2b99b3901ac0603c1bc016ee0ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-26 15:46:14 +00:00
hjk
2b6f26dee2 ProjectExplorer: Use a lambda for DeviceFactory::create()
Somewhat slimmer interface on the user code side and follows
existing practice.

Change-Id: I20ed8f5a00591265d32ea9ce93e1f1bbc76d2437
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-26 14:51:09 +00:00
hjk
f6cb638345 ProjectExplorer: Make Tasks a QList, not a QVector
That's what it is going to be in Qt6 anyways.

Change-Id: I8a059fc0e4d8bb5a1e3138071613b1d72a08d15b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-26 13:16:25 +00:00