Commit Graph

76686 Commits

Author SHA1 Message Date
Leena Miettinen
5e6c7089d8 Doc: Describe how to declare files in projects
Including using OTHER_FILES for qmake projects.

Fixes: QTCREATORBUG-27157
Change-Id: I802000c90472464430d1335b9e962c6691cc567a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-02 11:27:26 +00:00
Jarek Kobus
bd6e75c171 PdbEngine: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I9fff11875a680240e63db1663299680f885dbdfc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-02 11:17:42 +00:00
Christian Kandeler
356b43e9aa ClangCodeModel: Stop communicating with clangbackend
Change-Id: I9a5f4e7f0f94d33de9816cb643e6ec88cbf9ca15
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-05-02 10:36:58 +00:00
Christian Kandeler
6da7babc4a ClangCodeModel: Remove libclang-based completion and function hints
Change-Id: I742fb14b1aba3ba1f35a5c80bf553d2a735cac48
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-02 10:31:05 +00:00
Eike Ziller
f8a04666d5 Editors: Fix that actions were applied to wrong editor
We delayed switching the "current editor" by the double-click interval
to fix opening editors in extra editor windows from the project tree
etc. This leads to the weird effect that after switching the focus
between editors even within the same window was only applied after a
delay.

Instead just delay setting the current editor by "two events". When
clicking into a window, Qt sets the focus in two phases.

1. First the focus ends up in the focusWidget() in the new window, which
possibly is the editor that was active before in _that_ window
2. Only during the next event processing does Qt set the focus to the widget
that the user clicked into, which could be a non-editor widget, like the
Projects tree

We may only change the current editor if the focus didn't move away from
any editor in (2). So we need to delay setting the current editor until
after the next event processing.

Amends 22c67db406

Fixes: QTCREATORBUG-27479
Change-Id: I3d9197176a2d7ce50e5f29a1ce1b2efef52232d0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-02 09:47:38 +00:00
Artem Sokolovskii
efd25fb43f Utils: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ic72d173d95376276df8d1f08abdaec8370aff2ba
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-02 08:54:36 +00:00
Eike Ziller
5dcfe401a3 ExtensionSystem: Add support for static plugins
Loads all plugins that are known via Q_IMPORT_PLUGIN()

Change-Id: I3c1fe223ce6e4dcdb7729f5ab3e782e78bca5afc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-02 08:48:57 +00:00
Thomas Hartmann
c3d04642e1 QmlDesigner: Properly parse variant type
If a property actually is a variant we have to properly parse
the string and convert it to the correct type.
Booleans and numbers were not probably converted.
This did not create many issues, since the conversion happened
later, but it broke copy and paste and merging.
In Qt 5 this conversion seemed to happen mostly automatically.

Boolean literals have to be handled explcitly, since e.g. "10"
is technically true and can be interpreted as boolean.

Task-numbner: QDS-5944
Change-Id: I35c7cae7041667c7eac81e36a285a394263b35a4
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2022-05-02 08:35:30 +00:00
hjk
b425273ea8 Pass BuildConfiguration to Qml related build aspects constructors
Less weird then before.

Change-Id: Ia36663721085132e6a2876783749d96d9a3983a3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-02 08:27:28 +00:00
hjk
a579fa52ee ProjectExplorer: Rename some RunControl functions
Change-Id: Ia86a50100ddfd465d548863ae8d58033a5dbafc0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-02 08:10:28 +00:00
Christian Kandeler
b86c0a13e6 ClangCodeModel: Remove libclang-based references support
Change-Id: I53d10c37eac1ec5a46b904a2e2eb959311f852fa
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-05-02 07:52:43 +00:00
Christian Kandeler
998a8d7369 ClangCodeModel: Remove some dead code
Left over from recent libclang removals.

Change-Id: I24eff39615d9e2701bc42dccc5f096a89b7fa783
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-02 07:52:12 +00:00
Christian Kandeler
b52fac7148 ClangCodeModel: Remove libclang-based diagnostics and highlighting
Change-Id: Ib7c423884b76c27a6350ddea611919d3352fb80e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-02 07:51:51 +00:00
Eike Ziller
15f3b46133 Fix mime type parsing with Qt 5
The behavior of QStringView::mid is slightly different between Qt 5 and
Qt 6, so use Utils::midView which was created exactly to cover that.

Change-Id: Ia084e93c36fb152ac725f1b8eaa38a07dfb939e1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-02 06:29:52 +00:00
Jarek Kobus
317452ee8c PerforceChecker: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I111ea0c0bf7a68a4aa016ae789ee6ee269403808
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-05-02 06:18:49 +00:00
David Schulz
176dbff127 LanguageClient: support sorting outline combo box items
(cherry picked from commit 505358cb82)
Change-Id: I793700e770c830b729d0e8780fc4cbac79c01c0f
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-05-02 04:44:35 +00:00
David Schulz
8245ed30ae LanguageClient: support sorting outline widget items
(cherry picked from commit 46a012bc11)
Change-Id: Iead37c07f09c2f961d506caef76562fb1b3dc308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-02 04:43:43 +00:00
David Schulz
4661a4946d LanguageClient: select innermost outline widget item
Reuse the code that selects the innermost item in the outline combobox
also in the widget so the behavior is consistent.

(cherry picked from commit b97204ebb6)
Change-Id: Ie7c32ba4e6c5cbdd608da207e515c737e3bd91e6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-02 04:31:40 +00:00
Jarek Kobus
645d71b3db PerfProfiler: Use QtcProcess instead of IDevice::createProcess()
And pass a device path to command instead. The QtcProcess
should automatically select the device's process implementation
when the process is running.

Change-Id: Id3fed8656999af58ce1a5ba0632f94c3dc76ab04
Reviewed-by: hjk <hjk@qt.io>
2022-04-29 15:57:51 +00:00
Jarek Kobus
ddb4ecae32 RemoteLinuxEnvironmentReader: Fix fetching remote env
This can be tested in run settings for the app on remote
device after expanding environment details and pressing the
"Fetch Device Environment" button.

Change-Id: Ic488eaae5a40443380ddfd8b01af3e92f2557e5d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-29 15:57:45 +00:00
Jarek Kobus
709492ef11 LinuxDevice: Use LinuxProcessImpl for opening terminal
Don't use SshDeviceProcess anymore for opening linux terminal.
Fix running the empty command so that it opens ssh shell.
Don't leak terminal processes on shutdown.

One issue is that terminals are closed when closing settings,
as settings dialog operate on a copy of device, and in case
of no modifications applied the copy is being deleted.
The current workaround is to press the "Apply" button
before closing the settings dialog. This issue is to be
addressed separately.

Change-Id: I3c48b035daf1d099a1e8fa0762a6d6d0eca9592c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-04-29 15:57:20 +00:00
Eike Ziller
1eabb6f185 Locator: Save history of execute filter
Fixes: QTCREATORBUG-27381
Change-Id: I2a053e4e2e978034fcbfc15a6ecfff04a057ffaf
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-29 12:22:57 +00:00
Christian Kandeler
57fbf9bef9 CppEditor: Consider -include flags from the project again
The fallback for build systems without a dedicated property for this got
lost somehow in 9c3420120e.

Fixes: QTCREATORBUG-27450
Change-Id: I70768220523693b9423a8256cef3d79f4d9dfd58
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-04-29 12:02:22 +00:00
hjk
62f6c1e1d6 ProjectExplorer: Remove now-unused RunControl::runConfiguration
Change-Id: I312277813763d264dc7904042bbe6005350c3870
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-29 11:44:55 +00:00
Christian Kandeler
c21774f0a7 ClangCodeModel: Remove libclang-based locator filter
Change-Id: I1c588a7bfdee773662d1956e9a998040794b8c9d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-29 11:35:10 +00:00
Christian Stenger
2e725b4869 Fix qbs build
Amends 88781a003f.

Change-Id: I5b44d89cc1b536d0d533cd29fc3a06005a7c80d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-29 10:15:21 +00:00
Brook Cronin
61008bcd47 Rework QtDS Splash Screen to show telemetry options
* clean up Design to a more minimal style
* remove some unused components

Change-Id: I37af39a1cae6b6f14f769383ac73c00570729f4f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-04-29 08:36:25 +00:00
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