Commit Graph

62421 Commits

Author SHA1 Message Date
David Schulz
52770b746e LSP: fix hover request result
According to the protocol a hover request can also return a Null as a
result. Reflect this in the protocol implementation and adapt usages.

Change-Id: I14ce71639c64b6de00e9c1198617083c1a3de9eb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 12:36:44 +00:00
David Schulz
2b8d96465a Coco: fix warning overriding virtual functions
Change-Id: I8c7d6619a9f277fa14a5e0e4d28175155fd0dd95
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-16 11:36:55 +00:00
Christian Kandeler
8c8e9e55b1 CppEditor: Refactor "assign to local" quickfix
Mostly to separate type and name deduction. No functional changes.

Change-Id: I87858f06bec73fbc59a0359769bd37038176b3ad
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 11:29:56 +00:00
hjk
0d733e68b5 ProjectExplorer: Create Runnables with full device paths in RunConfig
... instead of fixing them later in the ApplicationLauncher as used
by all SimpleTargetRunners.

The mapping to device paths happens now in the default commandline
getter on paths from the ExecutableAspect. This is (only) wrong in the
case of (local) custom runconfig with a device present, so this needs
a custom commmandline getter not doing the transformation.

Change-Id: I525bc0ea59b5e7caf7a445a1a723d6f5b152162d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 10:57:43 +00:00
Jarek Kobus
ef2c551121 GenericLinuxDeviceTester: Make some order in implementation
Change-Id: I83a3c2880b055d0d74af402df876748975a7450e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 10:34:54 +00:00
Jarek Kobus
4634b058fa AbstractUploadAndInstallPackageService: Use FileTransfer
Use LinuxDevice::transferFiles() instead of SftpTransfer.
Get rid of unused now PackageUploader.

Change-Id: Ibea4557c3e003cd9d7d3692db5bec6b82dcad71a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 10:34:44 +00:00
Jarek Kobus
8eb12ea614 CMakeProcess: Fix stopping the CMake process
Calling QtcProcess::terminate() doesn't guarantee that
process will be terminated, especially on Windows we may
ofter wait for it forever. Replace the call to terminate()
with close(). After calling close(), the process will sooner
or later be terminated (or finally killed) - that's the job
for ProcessReaper.

Since the current code relies on receiving the finished() signal
after calling a stopping method, we need to call the expected
handler (handleProcessDone()) after calling the QtcProcess::close(),
as afterwards we can't expect receiving any signal for the possibly
running process anymore.

Refactor the code so that we connect do QtcProcess::done() signal
instead of connecting to QtcProcess::finished() signal. This
guarantees that the handler will also be called when process
failed to start. Handle this case in done() handler, too.

Rename CMakeProcess::terminate() into CMakeProcess::stop()
in order to avoid confusion on what method we have chosen to
stop the process in fact. That's the implementation detail.

Get rid of some QFuture related handlings from public API.
Use them directly from inside CMakeProcess d'tor.

Get rid of public state() method, as it seems it's unused.

Increase the responsiveness of small [x] icon of the running
cmake task (reduce the timeout of 500 ms into 50 ms).

Fixes: QTCREATORBUG-27518
Change-Id: I15cac3990079ad1cae0bbe22ac2a6e64cfb659a0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-16 10:30:48 +00:00
Artem Sokolovskii
e30652ae55 ClangFormat: Build fix Qt 5
Change-Id: I5afec32314263dfa9db6f36b8871b43fde47f698
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-16 09:51:38 +00:00
Jarek Kobus
92f20c5711 GenericDirectUploadService: Use FileTransfer
Instead of using SftpTransfer.

Change-Id: I0732e1472efe3db10291078319b23211973c86d2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-16 09:33:04 +00:00
Christian Stenger
4076f6c385 QmlProjectManager: Fix compile with Qt5.15
Amends 92c93c388a.

Change-Id: Iff025dbf7feb6c84dd7eb88ccea14e8e12e69a2f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-16 09:20:17 +00:00
hjk
6ea8a76e44 Utils: Consolidate port parsing methods
Change-Id: I137e9faa2c5f18e9ade0e2c59d73811d682abf13
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-16 08:43:16 +00:00
Jarek Kobus
f8d637dc71 LinuxDevice: Add createFileTransfer() method
The method returns FileTransfer object. This should substitue
SftpTransfer. It is going to handle rsync transfer, too.

Change-Id: I082cf21581ac387e42bb3594604facafe32d7492
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 08:40:52 +00:00
Christian Stenger
d9005be8a2 Utils: Use new mimetypes implementation when using qbs
It is default for the cmake build, so switch for qbs as well.

Change-Id: Icb325c58e587ecee2c621bf68c191869520e963a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 08:24:44 +00:00
Alessandro Portale
86708dbdde Improve various HTML-based tooltips
A couple of tooltips in Qt Creator, contain rich text (HTML). These
tooltips tend to have line breaks in unfavorable places, making the
content sometimes hard to read.
This is fixed in this change by using: style="white-space:pre"

Another issue with some tooltips is that they show key/value definitions
in a <table>, which, especially with longer keys makes looking up the
value quite hard. Also the length of the key column is dependent on the
(translated) content.
This change implements an alternative: using "description lists" <dl>,
which indent the values nicely independent from the key length.

Fixes: QTCREATORBUG-27553
Change-Id: If047627193413f23d868c52f005f22aa9a0752a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-16 08:17:45 +00:00
Tapani Mattila
92c93c388a QmlProject: Move project file pattern searches from StudioWelcome plugin to QmlProject plugin
Task-number: QDS-6930
Change-Id: I63345b539efdafa754671aef46ad808999914edb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-16 08:05:22 +00:00
Christian Kandeler
e2890aa1ff LanguageClient: Take quickfix range from cursor selection
We must respect the selection the user made, otherwise code actions
might not work correctly.

Change-Id: I39142047f90f3d7c85aefbfa960e59d413e4be38
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-16 07:52:20 +00:00
Christian Kandeler
1e25be0cfd ClangCodeModel: Suppress broken clang fix-it (again)
This time with clangd.

Fixes: QTCREATORBUG-18593
Change-Id: I26cedec0dcdf07c46ae96a5d714df128dfcd2d26
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-16 07:50:30 +00:00
David Schulz
6006ec8180 Coco: Add coco hoverHandler if diagnostics are visible
Change-Id: Id0a72fe0fc8a79e30e87fc7a0632eeb41338e73c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 07:39:06 +00:00
hjk
1a019ca02a Debugger: Fix path to uninstalled gdb data
Affects only self-build gdb.

Amends adf1243ed9.

Change-Id: I0b8380f27c14e155629aaf7235721aa80c0a3d45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-16 07:35:01 +00:00
Orgad Shaneh
b1fc92f8b6 Sqlite: Fix MSVC warning on build
cl : Command line warning D9025 : overriding '/W3' with '/W0'
cl : Command line warning D9025 : overriding '/W3' with '/W0'

Change-Id: I1be9e569aee98046b81db63d99d75d725bfa9c15
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-16 07:15:59 +00:00
Orgad Shaneh
a19ebd97cd InfoBar: Initialize member on default ctor
Reported by Coverity.

Change-Id: I00f166af79400d373c0fdf2c2db2b6d8b3d29b16
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-16 07:06:54 +00:00
Eike Ziller
562cca8ed6 Help: Unregister URL handler for qthelp before deleting it
Qt 6 warns if that is not done.

Change-Id: If0b9f36e35544d1a1d8a45b8c06005cef3940ebb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-16 07:05:11 +00:00
Artem Sokolovskii
b634ec77fc ClangFormat: Fix override checkbox doesn't affect behavior
Override checkbox allows use clangFormat settings
from widget even if there is .clang-format file in
file's folder or parent folder.
It works for global settings and for project settings.

Change-Id: I03152f4b0e1b62b3ac038024e76cc9082fa37ec3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-16 07:00:07 +00:00
Orgad Shaneh
ab66f81a61 Utils: Initialize DeviceShell member on ctor
It is initialized in start(), which is called in the worker thread.

Reported by Coverity.

Change-Id: I385b185c220f5be20cc312eb960658c2de770a9c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-05-16 06:49:25 +00:00
Christian Stenger
d78da50f46 Git: Export GitClient and GitPlugin for re-use
Change-Id: I3635af18ec9e5e134219dd8d336b5b78a013d8cb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-05-16 04:21:58 +00:00
Orgad Shaneh
d78ebf69ba VcsBase: Fix MSVC warning
qhash.h(1138) : warning C4723: potential divide by 0

Change-Id: I368ec727d08d5e0bb333099a3536d97c65503e7d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-05-15 16:58:14 +00:00
Thomas Hartmann
11f55c7173 QmlDesigner: Add simple tracing to AssetsLibraryModel
Change-Id: I5306ce637e44ac275411fdb60c5e83f96039ec62
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-13 15:05:13 +00:00
Thomas Hartmann
96144d12bb StudioWelcome: Download data from Qt.io
We try to download new updated data from Qt.io
if it is newer.

In any case we provide a default that comes with QDS.

I removed the check for QmlData, since they should not be required
and they stop FileDownloader from running from "pure" C++.

Task-number: QDS-6886
Change-Id: I1332c194286e6e91dfcd1c6605931f1ed020bc29
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-13 14:46:54 +00:00
Cristian Adam
d0a9b873cb ProjectExplorer: Include symlinks for compiler import name matching
On macOS /Library/Developer/CommandLineTools/usr/bin/cc is a symlink
to /Library/Developer/CommandLineTools/usr/bin/clang, and should not
be matched as a GCC toolchain.

Fixes: QTCREATORBUG-27523
Change-Id: I8885a263b46fa8d8a8145f7c0faa31f21aae920a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-13 14:44:20 +00:00
David Schulz
b2e2421d2d ClangCodeModel: remove duplicates from clangd quickfix assist
Do not report quickfixes with a diagnostic since those are already
collected by the ClangdQuickFixFactory as builtin quickfixes.

Change-Id: I8d29a08b823291f8beaa762c09b7d29a4b9d0384
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-13 14:19:13 +00:00
Artem Sokolovskii
85d2159e41 CorePlugin: Remove foreach / Q_FOREACH usage part 2
Task-number: QTCREATORBUG-27464
Change-Id: I4767c333c2724c954e63a7297c5013d11ae71777
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-13 13:35:04 +00:00
David Schulz
1bfd5da024 LanguageClient: Track quick fix assist processor
Same as for the completion and function hint processor, these processors
need to be tracked so they get cleaned up on client destruction.

Change-Id: Ib24eb8c652e7a44d8b79e1edddda9ad659d145a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-13 12:59:55 +00:00
David Schulz
089e1edcbf LanguageClient: run quick fix assist on lightbulb click
This will bring up a list of all possible quickfixes instead of just the
last one.

Task-number: QTCREATORBUG-27514
Change-Id: I9066c701f9aab404d26075803b4f62f71078016b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-13 12:40:28 +00:00
David Schulz
4f29bd5613 ClangCodeModel: Fix positioning lightbulbs for diagnostics
Set the diagnostic to the containing code action when generating
refactor markers. This makes sure the light bulb is displayed at the
diagnostic and not the edit location.

Change-Id: I46ac7a19879d2358eb49f5cb1b695ee10a0c682d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-13 12:40:05 +00:00
Eike Ziller
1dd2eea25c Git: Fix compiler warning
Remove unused lambda capture

Change-Id: I623aff7800279d9f9d6088230b76c0f5db59fc2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-13 11:37:58 +00:00
Knud Dollereder
4d58f8dee8 Make the curveeditor state aware
Fixes: QDS-6872
Change-Id: I2fe733bf6c25d3517ff80d122977113e10bac627
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-13 09:46:43 +00:00
Artem Sokolovskii
40d2c283c2 QmlDesigner: Remove foreach / Q_FOREACH usage in designercore
Task-number: QTCREATORBUG-27464
Change-Id: Ib1e693df7e3690b7cf3e6dc42e1d18a05a8f46d6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-13 09:31:11 +00:00
Artem Sokolovskii
427c26d900 QmlDesigner: Remove foreach / Q_FOREACH usage in componentcore
Task-number: QTCREATORBUG-27464
Change-Id: I89d78d131a11b84b592d3d10577fe1ea4c7a6b4c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-13 09:31:05 +00:00
Artem Sokolovskii
597a9dccb3 QmlDesigner: Remove foreach / Q_FOREACH usage in formeditor
Task-number: QTCREATORBUG-27464
Change-Id: Ib477df666eb798b302b7a6915bb98f798b7a04ed
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-13 09:30:59 +00:00
David Schulz
59a77a4965 TextEditor: add text cursor to assist interface
This will allow us to request assistance for a specific selection
instead of just the position.

Change-Id: Ib8e5b32d4a8f2936e5a6f1b7ac968d7f1d8d9de6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-13 09:18:53 +00:00
Eike Ziller
1402b16451 Sqlite: Disable compiler warnings for 3rdparty sources
Change-Id: Id4fb3ca1c051b54d4bf449a11adff8c1492fc980
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-05-13 09:02:06 +00:00
Eike Ziller
b4caecae3e Ios: Fix compiler warnings
- avoid deprecated API
- remove unused variable

Change-Id: I33850ea2dda523900ead191542eadf65338d5210
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-13 09:01:55 +00:00
Eike Ziller
3791d732f0 Perforce: Fix compiler warning
Remove unused lambda capture

Change-Id: I4beeba43bbb9edab3dcbe70c97e0e6c666d023c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-13 09:00:49 +00:00
Eike Ziller
f29c53b4f6 Help: Fix compiler warnings
Some unused arguments

Change-Id: I2b2794971840b70ae013bbf1de93970dd75ceeb1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-13 07:31:22 +00:00
Christian Kandeler
db1f2c8dd9 LSP: Do not copy a message before sending it out
Change-Id: I58cc1f50b504bf21ea4ee9f99edba2ae8dc1ca1c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-13 07:19:15 +00:00
David Schulz
fa577eb049 ClangCodeModel: pass ClangdClient to text mark constructor
Change-Id: Ie7b9c23365648fcf6034175e0e18970d342e25e6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-13 05:06:46 +00:00
Ihor Ivlev
04f1a0d6ab Remove unused local variable in LookupContext::fullyQualifiedName
Change-Id: Icbec0969eab0651481ca752541dbee98fb363630
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-12 20:10:48 +00:00
Fawzi Mohamed
82b2878fac qmljseditor: preserve state when reformatting
Only editing position was preserved (and incorrect column) when
reformatting qml, preserve also scoll position (and correct column
position).

Fixes: QTCREATORBUG-25507
Change-Id: Ieaec2c5390e437f32b4b97b2bbb47975895f96d8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-05-12 15:20:08 +00:00
Orgad Shaneh
086b47afee Git: Fix compilation with Qt5
Change-Id: Ib35095ccdacd13eaf2f599c9b47f7934c5d02591
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-05-12 12:41:11 +00:00
Artem Sokolovskii
51be3be2ea ProjectExplorer: Remove foreach / Q_FOREACH usage part 2
Task-number: QTCREATORBUG-27464
Change-Id: Ibfacf5a3b9789a3cf0ea229d1b0d22639101bf9a
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-12 11:12:03 +00:00