Commit Graph

72473 Commits

Author SHA1 Message Date
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
Orgad Shaneh
9cbf0904db Clang: Remove redundant warning suppressions
They are no longer needed with Clang 12.

Change-Id: I964d53e6a106b38cd32a7f34bbad6e15e0dd7e48
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-30 11:53:57 +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
Miikka Heikkinen
3ac3b61727 QmlDesigner: Ifdef nanotrace.h out if nanotrace lib is not included
Nanotrace headers are not exported to build dir at all if the feature
is disabled, so runtime puppet build can't find them. We have to
ifdef out the header include and define the required macros as empty
in puppet.

Fixes: QDS-6107
Change-Id: I702c3ed5521d30ee0b253d035dea4ea00d00848f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-28 14:03:26 +00: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
Thomas Hartmann
6073f3396c QmlDesigner: Disable crashpad in the qml2puppet
If the host proecess crashes then qml2puppet will also be shutdown.
I suspect this can lead to crash reports of the host application
not properly reported.

Change-Id: Ic503874ce660db3311958ecd0718255a1cf3daea
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-28 12:39:10 +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
Robert Löhning
7a8ca55f77 Squish: Introduce helper function for checking for strings
In Python3 type unicode is unavailable since it's implicit with "str".
The new functions helps porting code.

Change-Id: I5de0fa182acbbaf267ed51f66f658cb9c884f4c5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-28 11:00:35 +00:00
Robert Löhning
4980f71dd5 Squish: Update tests which use "Rename Symbol Under Cursor"
When using this on open files, Creator used to make the changes
but not save the file. Creator 6 now also saves the file unless
it already contained other changes. Because the file is being
saved immediately, "Save All" and "Revert to Saved" cannot be
used in this situation anymore.

Change-Id: I0b8a58d998c54ccceae6d178b2c7a6f6182c7ad0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-28 10:59:39 +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
557489c3fc QmlDesigner: Fix camera frustum initialization for Qt5 builds
In Qt5 builds, we need additional async update at camera geometry
initialization to ensure source camera is up to date and frustum mesh
can be constructed.

Fixes: QDS-6071
Change-Id: I41371ae66fde432b0fdf4b5fee6a0604d005bf63
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-28 09:00:57 +00:00
Miikka Heikkinen
161d25571b QmlDesigner: Change camera id in 3D app template
Id "camera" conflicts with property name on View3D.

Task-number: QDS-6081
Change-Id: If6a06a9aff75620fc657a8285ac6b2b2a1e8ebc0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-28 08:59:15 +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
Aleksei German
35d32c9784 QmlDesigner: Update for QUL metadata
Task-Numbers: QDS-5867, QDS-5890
Change-Id: If27d947d88e34f8479796520dad2bee62a6d0ec9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-27 16:26:01 +00:00
Leena Miettinen
8ace5d3895 Doc: Update info about ClangFormat options
The options are now in a separate tab.

Fixes: QTCREATORBUG-26597
Change-Id: If2d337c132f468897cd71e217205c3db29028f34
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-27 14:58:21 +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>
qds/v3.0.0
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
79fd6510a3 Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: I8b1cdfb72b0e3e583c94447f13d0161b99fa93c1
2022-01-27 09:37:39 +01: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
Eike Ziller
f9de2f2b23 Qt Creator plugin wizard: Bump checkout github action to v2
v1 has security concerns

Change-Id: Ia88cf55197a64af819abe07bdac698a29bec8aeb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-27 08:06:28 +00: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
hjk
1fc83d2a56 Utils: Wrap various file system iteration flags and filters
... into a single class.

This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.

Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-26 13:13:41 +00:00
Thomas Hartmann
3e1095076e QmlDesigner: Split image category only for dialog
If we split the categories on the action level, then
a separate dialog is opened for every image suffix/type.


Task-number: QDS-6076
Change-Id: Ie80203cebca41e8dee4cb5c091b1163a9fde6e26
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-01-26 13:13:30 +00:00
Eike Ziller
c6fdb66b2b Collect Qt Creator debug menu items into common submenu
instead of spreading them over the place.

- rename "Logger..." to "Show Logs..."
- create "Tools > Debug Qt Creator" menu and put "Show Logs", "Inspect
Language Clients" and "Inspect C++ Code Model" there
- add missing ellipsis

That gets rid of the otherwise not useful "Language Client" submenu, and
creates a nicer place for the "Show Logs" item.

Change-Id: I2588b4c93327669579979dfbfce37005ada29dab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-26 12:59:21 +00:00
Alessandro Portale
77749e6e28 QtSupport: Resurrect the "screenshot cropper" tool
After many Years, it is time to refresh "images_areaofinterest.xml".
That is best done with the "screenshot cropper" tool.

Change-Id: Icd07e1c1697e236855d3a03ae8977044d21d78f7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-01-26 12:47:35 +00:00