Commit Graph

74059 Commits

Author SHA1 Message Date
Cristian Adam
88781a003f CMake: Qt Creator Static build support
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.

Fixes some symbol clashes when all plugins are linked into the same
executable.

Support for actually loading static plugins will be added in a separate
commit.

The feature is controlled by QTC_STATIC_BUILD which by default is OFF.

Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
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-04-29 07:16:53 +00:00
David Schulz
58b0a5056c Editor: Allow selecting a group of whitespaces with double click
Fixes: QTCREATORBUG-24607
Change-Id: I993e2c3a8f1054fc6787cca8e22704fb5b2ab9d1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-29 07:12:23 +00:00
Jarek Kobus
703dbd9c79 QtcProcess: Add a warning when starting a process in non-QThread
When a QProcess is being started in a thread that doesn't have
event dispatcher installed, e.g. in a thread started with
std::async(), the process signals are emitted only from inside
QProcess::waitFor...() functions, but not emitted spontaneously.
This may cause issues when adding the running process into the
ProcessReaper, as the implementation of the latter relies on
signal emission and doesn't use blocking API of QProcess.

Currently there is one case like this: ProcessCreator::createProcess()
of clangsupport library.

Change-Id: I823a139b356f62fee9e0e5d6fc8326301c36b449
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-28 20:15:30 +00:00
hjk
b971c27312 Utils: Use a somewhat better fallback when no environment was set
Change-Id: Ic92b7b2bf50ecfed4790393a763b17bb988e892c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-28 16:21:59 +00:00
Jarek Kobus
cdae5bdebd LinuxDevice: Don't use SshRemoteProcess for shell
Use simple QtcProcess for it.

Change-Id: Ie73a287cc4bf37a0fba273f3fe355626ff1c27f6
Reviewed-by: hjk <hjk@qt.io>
2022-04-28 15:13:41 +00:00
Jarek Kobus
d1d2477605 LinuxDevice: Restart shell when ssh parameters changed
Change-Id: I96fa7de4f8314ccd3c78bee165b722fdbba6e8d0
Reviewed-by: hjk <hjk@qt.io>
2022-04-28 13:57:08 +00:00
hjk
a06721fe71 QmlPreview: Remove last use of RunControl::runConfiguration()
Change-Id: I7853b3bce952004abaac9145b28deb049b5d09cc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-28 13:54:50 +00:00
hjk
4d8ef8d6e1 ProjectExplorer: Inline some ApplicationLauncherPrivate functions
To help with future re-organization.

Change-Id: I8fd87d3e792f8e5be86aaa0bc9754eae9b92b328
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-28 13:09:22 +00:00
hjk
b3c4d2c1aa ProjectExplorer: Streamline ApplicationLauncher result handling
Change-Id: Ieac41c3d6dda19f829d1294732897d8385ef0d8e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-28 12:04:27 +00:00
Christian Kandeler
e045af7e69 ClangCodeModel: Remove libclang-based outline support
Change-Id: Ic7a7b0cfe1d3eb822dbad610fc84f29676404505
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-28 11:34:46 +00:00
Christian Kandeler
52d9def5e9 ClangCodeModel: Remove libclang-based tooltip support
Change-Id: I63d934fc3d480e3c5198e7db1a595b3309e89533
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-28 11:26:04 +00:00
Piotr Mućko
7cef593ec0 McuSupport: Extract settings handling to a class
Change-Id: I671098f14d7bc13255dc130a4de1ab97d5bdab94
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-28 10:29:20 +00:00
David Schulz
e675bb7860 QmlProfiler: Use annotions instead of custom icons on marks
To display the relative cost in the editor a custom text mark icon was
painted with a custom width factor for qml profiler marks. Move this
textual information into a line annotation and be a bit more verbose
what kind of information was collected in that line.

Change-Id: I863c2afa52f2acdf19ffcab3dfc95af566ac0efe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-28 10:10:39 +00:00
hjk
3cfee28022 ProjectExplorer: Use one function for done() in application launcher
This only shifts the 'if' down one level.

Change-Id: I2c049d9a38d786698c728e88d15b0129eba35aed
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-28 10:03:19 +00:00
Knud Dollereder
9195d0dd2c Improve Animationcurve editor
- Prevent insertion of invalid animation ranges that may cause DS
  hanging
- Properly update the toolbar when switching to a different qml file
- Show an informative text instead of the empty curve editor when
  the current file does not contain a timeline
- Move the toolbar into its own class
- Add an implentation to the "Set Default" button

Fixes: QDS-6543
Fixes: QDS-6542
Fixes: QDS-6545
Fixes: QDS-6544
Change-Id: Id6bc1457627ea23a670e74ea335fbb475711b9a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-04-28 10:01:46 +00:00
Christian Kandeler
f2c267f328 ClangCodeModel: Remove libclang fallback for "follow symbol"
... and "switch between declaration/definition".
It's either clangd or built-in code model now.
Use the opportunity to dissolve the pointless FollowSymbolInterface
class hierarchy, which introduced a confusing parallel inheritance
chain.

Change-Id: I792ad55656c5dd9f10c6b4db7c5c36cf7be45125
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-28 09:47:52 +00:00
Jarek Kobus
8e586dfa02 AbstractProcessStep: Connect to QtcProcess::done() signal
Instead of connecting to finished() signal.

Change-Id: I2c1266bf699f54053fde37bb7ff22a93131e6b11
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-28 09:44:36 +00:00
hjk
f01ebebb93 ProjectExplorer: Use plain QtcProcess in DeviceUsedPortsGatherer
Instead of DeviceProcess.

Change-Id: I0e1dedf63faad7dbfca5b6c58fbfe72c7ef2c052
Reviewed-by: hjk <hjk@qt.io>
2022-04-28 08:49:33 +00:00
Alessandro Portale
1811b381eb ProjectExplorer: Prevent out of range access on recent projects list
ProjectExplorerPlugin::recentProjects() filters out non-existent files.
Because files could at any time be removed/renamed, we cannot presume a
certain, constant length of the list when calling recentProjects() a
second time.

Fixes: QTCREATORBUG-27399
Change-Id: I3f09830896b308e251881c855abb552b6022695f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-28 08:36:00 +00:00
hjk
aa3bdcb427 Utils: Add a QString-based write to QtcProcess
Centralize some boiler plate and warn about best-guessed cases.

Keep the QByteArray based access as writeRaw()

Fixes: QTCREATORBUG-27445
Change-Id: I948d80fba78b36cf85cc73664175ab05eb7707d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-28 08:20:11 +00:00
Mahmoud Badri
a984e9c097 QmlDesigner: Fix possible crash on exit
Crash log:
https://sentry.io/organizations/the-qt-company-00/issues/3227370374/?project=5421708

Change-Id: I73b574d565cc1f66ddec1fedcb96e3acd7c1ad72
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-04-28 07:33:47 +00:00
Eike Ziller
c892157862 Bump version to 7.0.2
Change-Id: Ib503b94b747698ab9ba9650c9eb0a3e44d6ca968
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-28 07:21:04 +00:00
Eike Ziller
93401c9c81 UpdateInfo: Retrieve output of maintenancetool calls separately
ShellCommand doesn't support retrieval of individual sub-jobs.
Simply use chained QtcProcesses and add a progress item directly.

This gets rid of fragile hacks that were needed to combine the output of
the two calls into a valid XML document.

Change-Id: I426c74f5fd2c522850daf9c077bfd09ce3f88bb1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-28 06:12:42 +00:00
Jarek Kobus
dea5dec04b PerfTracePointDialog: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I82d9a2fbd583a6b1ffce2083369f683c9a208c18
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-27 15:04:53 +00:00
David Schulz
26df1852d0 LanguageClient: do not highlight unknown tokens
If the language server registers token types for unsupported tokens do
not use the default text style for those tokens since it might overwrite
correct syntax highlighting.

Thanks to Alex Drozdov for providing a patch

Fixes: QTCREATORBUG-26193
Change-Id: I5d70763bc1e9434ffc6241d94f50f3bb3852e62c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-27 12:16:00 +00:00
David Schulz
fabbf88db5 LanguageClient: add support for two additional token types
Change-Id: I46f80af0da8cb42262842b5243630fa0087d564a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-27 12:15:55 +00:00
Jarek Kobus
41c2e23129 GerritModel: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: Ibd5afa812cc9f8781984b649c9cb85a8703e9c8e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-04-27 12:09:07 +00:00
hjk
9daad02b92 ProjectExplorer: Work around warning when building without tests
"AutoMoc: .../plugins/projectexplorer/sanitizerparser.cpp:0:1:
note: No relevant classes found. No output generated."

Change-Id: Iab2900761fc4362bb88d5ab464c963df69873cbc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-04-27 11:42:12 +00:00
Piotr Mućko
f995b6c961 McuSupport: Hide packages w/o label
Change-Id: Ic8937399f800e98dac743b9d9caeac414d5216a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-27 11:15:47 +00:00
Jarek Kobus
c8a2e4aaa2 RemoteLinuxEnvironmentReader: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I357b95db5889c09d036abdb76ca9f014be7a9cf5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-27 11:12:10 +00:00
Piotr Mućko
1587896537 McuSupport: Use FilePath in version detector
Change-Id: I54d04881c0b759caeaa83156c606a539369f482b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christiaan Janssen <christiaan.janssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-04-27 10:38:58 +00:00
hjk
6e5415e95f Ios: Move runControl's runConfiguration calls further up
The data is now pulled out of the runconfig directly instead of relying
on the indirection using the runconfig pointer inside RunControl.

This is only barely better, but gets rid of one direct user of
RunControl::runConfiguration().

Change-Id: If93576ba25ea9f3ddbeae2535217f5c2f361eaf6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-27 10:03:57 +00:00
Mats Honkamaa
2090d043db Doc: Update import 3D assets docs
- Update screenshot
- Remove .blend from supported formats
- Update info about the Import asset dialog
- Some other updates to content and structure

Task-number: QDS-6670
Change-Id: Ia123c5c5b5648a356e9608d923ba1e57c40c8832
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-04-27 09:57:53 +00:00
hjk
5ed95d7088 Utils: Suppress warnings in MimeType code
Change-Id: I90c8650ccea850a2d3329700ef4f772dc44d9c63
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-27 09:31:41 +00:00
Eike Ziller
0d586e96ec Merge remote-tracking branch 'origin/7.0'
Change-Id: Ica0f410a8248722cef95a9cbf3929a2d29bf91c0
2022-04-27 11:19:31 +02:00
hjk
0da130c4ef Python: Apply 'static' pattern for singleton members
Plus some cosmetics.

Change-Id: Ia2c8f425f0491fbe6a0bbf2e508857a5550e4d38
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-27 08:55:02 +00:00
hjk
28cfdf388a Promote previously python-specific InterpreterAspect
... and drop PythonRunConfiguration, which is a plain RunConfiguration now.

Change-Id: I540cb738180fc1424f730d6d1998886915ce527b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-27 08:54:22 +00:00
hjk
9a6d8aebe7 CMake: Even less indirection
Change-Id: If9990f81e4150802dd08e0fc17a1faceb32e0cc6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-04-27 08:54:08 +00:00
Kai Uwe Broulik
b748f531ee ManhattanStyle: Check widget being not null
In case someone calls styleHint(SH_Widget_Animation_Duration)
without a widget.

Change-Id: If331f2365050b18fd6b06ce764c9ccbc7eede08a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-27 08:47:02 +00:00
Tasuku Suzuki
3fe7a56013 ProjectExplorer: Set focus to Kit filter on Kit Selection
Change-Id: I6acc3d620d3b254e31527164aa1ddb0831f50ee9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-27 08:19:28 +00:00
Tasuku Suzuki
142a41c6c8 ProjectExplorer: Add more space for Kis in new wizard
Tweak layout on Kit Selection page to show more Kits at a time

Change-Id: I94b2eafa0c214f64bc719a57cbfedb07b0ae7b78
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-27 08:19:01 +00:00
Eike Ziller
c865fe50f2 Mimetypes v3: Improve performance
When looking up mimetypes by glob or magic, we may not add a mimetype if
it was overwritten by another provider that did not find a match.

The patch that implemented that was very inefficient, because a huge
list of "handled mimetypes" was created that needed to be checked,
every time a mimetype was determined.

Instead inform each provider about their overridden mimetypes once after
loading the mimetypes.

Amends 98b1e82d2b

Fixes: QTCREATORBUG-27319
Change-Id: I409856c272c334798d7a71ce590ff2d4f69c71a1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-27 07:39:24 +00:00
Jarek Kobus
74b1623acd PythonUtils: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I02fefe01cfc4be6ef996c7c8b98b36137217504e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-27 06:26:45 +00:00
Jarek Kobus
8d2c9aa8d4 LinuxDevice: Implement shared ssh connection
Change-Id: I1897f0a468e477e0be61767d4bad0086d59fb075
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-26 17:36:01 +00:00
Jarek Kobus
c81a7b5c70 QtcProcess: Add processChannelMode() getter
Use ProcessInterface's setup data when handling
readyRead signals. In this way the user may still
change this setting, also when QtcProcess is running,
as a preparation for the next run. In this way this
works like all other QtcProcess mutators.

Change-Id: Ie80475e322162ce109fb95468ce858f9c98eefa9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-26 16:29:41 +00:00
hjk
88d148f01f CMake: Move error and warning handling
... from CMakeBuildConfiguration to CMakeBuildSystem.

Less back-and-forth this way.

Also, prefer plain buildConfiguration() over cmakeBuildConfiguration()
back-pointers.

Change-Id: Ie1341302ecc10e53d71ca68b7b6eb5f46cfdad5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-04-26 16:01:00 +00:00
Cristian Adam
8c050eaad9 CMake: Set the build directory change after Browse
As an user I expect when I select Browse for the build directory
that after the directory has been chosen it will be taken into
consideration.

Amends 1d600101ee

Fixes: QTCREATORBUG-27407
Change-Id: I331b6095c176f57ca8e4c73c0b378a11ce3d6dbc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-26 13:24:48 +00:00
Eike Ziller
3211d064e0 Merge remote-tracking branch 'origin/7.0'
Change-Id: I3da1b663a570682201afbe644d6f9299019aae21
2022-04-26 15:22:35 +02:00
Thomas Hartmann
099f02b5db QmlDesigner: Add new way to load fonts to template
StudioApplication will load the correct font in time.
This only works for Qt 6.

Task-number: QDS-3286
Change-Id: I2d97ca19bace8e13c7a4df355d1addb7267e117c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-04-26 12:09:34 +00:00
Thomas Hartmann
1f5ede1543 QmlDesigner: Do not show error while type information is incomplete
Task-number: QDS-6546
Change-Id: I1c295fc3417f7bb83d8cc0e751e1893cd74d8d4f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-04-26 12:09:17 +00:00