Commit Graph

62421 Commits

Author SHA1 Message Date
Thomas Hartmann
af24e428f2 Rename 'output pane' to simply 'output'
Change-Id: If45e053a32855bca68dc71cb5da22f981146e45b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-01 19:25:27 +00:00
Eike Ziller
58f6ceeac4 Mimetypes v3: Never detect anything as application/x-zerosize
- That mime type is pretty useless
- If there are two mime types that match a file by glob pattern, the
  mime database implementation will find the best matching mime type by
  data of *all* mime types and take that instead (this doesn't make
  sense btw).
  That means that if .h is matched by c-hdr and c++-hdr, empty .h files
  are detected as mime type application/x-zerosize, which is pretty
  useless

Re-applies 09716d64b3

Change-Id: I2c50719863bca0dd16f92b582062502568f36c5a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-01 13:17:06 +00:00
Eike Ziller
490568385f Mimetypes v3: Re-introduce regexp as MIME magic option
Re-implements d8055b62f4

This extends the freedesktop standard, which really is lacking in many
ways.
Adds a type "regexp", which interprets the "value" as a
QRegularExpression with MultilineOption and DotMatchesEverythingOption.
The range/offset is the range of the sub-string that is matched against
the regular expression. If the value for the end of the range is
omitted, or the same as the start, the whole string is matched against
the regular expression. The mask is ignored.

Can be chosen as the type when editing MIME magic in the MIME type settings.

Change-Id: I1690d43a83848ec0cf8aeea5be20b7cde7cdc27b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-01 12:51:18 +00:00
Tim Jenssen
d2b39c800f qds: add missing spaces to user visible text
task-number: QDS-6379
Change-Id: Ibe84b5526413e8294f13a46d4760101e18d0ab08
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-01 12:39:25 +00:00
Mahmoud Badri
85eae98e6e QmlDesigner: Allow deleting multiple selected assets
Also small relevant cleanup to the code.

Fixes: QDS-6312
Change-Id: I31ed0204ad9ae541a822cc4b58ef303aa3da7a68
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-03-01 11:59:43 +00:00
Christian Kandeler
8247f4f3dd ClangCodeModel: Do not highlight objects in method calls
... as output arguments with clangd.
We might want to do so in the future, but right now it's not intended.

Task-number: QTCREATORBUG-27111
Change-Id: Ie6941f18943a1d6942901c526c62999cba6c1125
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-03-01 10:14:32 +00:00
Christian Kandeler
c5187da4ab ProjectExplorer: Respect leading whitespace in custom output parsers
Leading spaces are often relevant and must not be trimmed.

Task-number: QTCREATORBUG-26892
Change-Id: Ie5c119a2c4df22f2c7bae2c9abaf5362d51c8c4e
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-03-01 10:12:25 +00:00
Christian Kandeler
41038ba8cf ClangCodeModel: Do not highlight argument of operator*
... as output parameter with clangd.

Task-number: QTCREATORBUG-27111
Change-Id: I5def562dcb9b8b0dac036fd46ed7e996c0297c95
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-03-01 10:04:16 +00:00
The Qt Project
d935c44f41 Merge "Merge remote-tracking branch 'origin/7.0'" 2022-03-01 09:36:16 +00:00
Mahmoud Badri
c7d2b8d5cb QmlDesigner: Don't process folders when opening a standalone Qml file
Only assets on the same level as the open Qml file are visible.

Fixes: QDS-6374
Change-Id: I51a1bad06ae98e5aa708517816c21395073859d1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-01 09:23:22 +00:00
Miikka Heikkinen
17710da67c QmlDesigner: Fix hotkeys for particle play and restart
The hotkeys overlapped transform gizmo hotkeys.

Fixes: QDS-6300
Change-Id: I3a87f2cedb218fbecea5641c86265f413487cef7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-01 08:57:23 +00:00
Thomas Hartmann
d7c330d454 Fix crash when widget was not created
We only create the actions in case the widget is actually created.
m_projectModel and m_sessionModel are intialized as part of the
SessionsPage widget.

Task-numnber: QDS-6332
Change-Id: Ib127de69ca4057c229bf977c012e5cd2b2a53f0d
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-03-01 08:55:05 +00:00
Eike Ziller
4e705c6fdc Mimetypes v3: Re-implement setMagicRulesForMimeType
Allow changing, adding or removing mime magic in the settings.
Not implemented for BinaryProvider, since we don't use that for Qt
Creator.

Re-implements part of afa2212f8d

Change-Id: I5992cbd48bdbf2813487781fb10f5dc803b5739e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-01 08:16:49 +00:00
Eike Ziller
4cb04ad798 Merge remote-tracking branch 'origin/7.0'
Change-Id: If390b9264dba14c6c71752a0de84ab7ff881b2c5
2022-03-01 08:59:05 +01:00
Björn Schäpers
0803390a83 QbsProjectManager: Directly delete project parser
It holds a pointer to the future which is deleted directly 3 lines
below. And a signal (taskStarted) can come to the parser before it gets
deleted, then accessing the deleted future. Which results in a
segmentation fault.

Change-Id: I468c6477023488d6d922d6bf621cba886740d8f4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-28 19:29:56 +00:00
Jarek Kobus
0dfcc97a3e SshRemoteProcess: Rename done() -> finished()
Change-Id: I9c22d075f50b0a2a171cbda11c7579e4735f3f4e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 16:12:27 +00:00
Eike Ziller
590ae0e954 Mimetypes v3: Re-implement magicRulesForMimeType
We need to check the providers, most specific first, if they define the
mime type, and then return the magic rules from that.
Shows mime magic information in the settings again.

Not implemented for BinaryProvider, since we don't use that for Qt
Creator.

Re-implements 178b023f94

Change-Id: I5000a3fb8f329c18cd657357180794695728fe5e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-28 15:39:27 +00:00
hjk
92de389a61 QtcProcess: Fix crash when logging process stats
Change-Id: I204366a008dea91d1b2b946689c7598fe9ab009c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-28 14:52:23 +00:00
Jarek Kobus
7b234e0fae QtcProcess: Introduce virtual emit* temporarily
Introduce emitStarted, emitFinished and emitErrorOccurred
virtual protected methods for QtcProcess subclasses.
It makes it easier to connect to self signals and
filter out the unneeded emissions. This is a temporary
change until QtcProcess is de-virtualized.

Amends ff68923846

Change-Id: I784676458e86314e092366e3b3b1244dfe2712f3
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 14:52:15 +00:00
Christian Kandeler
d60c8787cd CppEditor: Only open refactored file in editor if we have a position
It's just confusing to the user otherwise.

Fixes: QTCREATORBUG-27114
Change-Id: I127d97ca165af0eb751cd6479d0ec0ffec480c17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-28 14:24:31 +00:00
Jarek Kobus
7b5dfcd6cd SshRemoteProcess: Get rid of error arg from done() signal
Prepare for signal rename done() -> finished().

Change-Id: I81a7bd0a4826ce6200f4af47ba5868ceedb42206
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 14:21:47 +00:00
hjk
fc3b9b5ab3 Docker: Remove traces of direct file access
Change-Id: Id0c11a584a5b75626bb04023893d76fbe2216ade
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-28 13:44:48 +00:00
Thomas Hartmann
09f9ed14eb QmlDesigner: Always initialize design mode widget in QDS mode
This ensures all actions are registered after startup and
accelerates opening the first .ui.qml file.Adding

Managing the actions does not belong to the DesignModeWidget.

Task-number: QDS-6326
Change-Id: I02cb4a6d9e5a88d8136eb58fed7882177d7a15e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-02-28 13:14:20 +00:00
Jarek Kobus
9cf7350f1f Get rid of DesktopDeviceProcess
The only addition was the reimplementation of interrupt().
However, this method was never used in codebase.

The only potential usages of DesktopDeviceProcess are in:
PerfConfigWidget, LocalPerfRecordWorker, PerfTracePointDialog
and DeviceUsedPortsGatherer through a call to IDevice::createProcess(),
and in all of these usages interrupt() wasn't called.

Change-Id: I4069e35e6370fdd494671abcf19e2733fdb3eaf3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 13:10:51 +00:00
Jarek Kobus
8af62eb256 DeviceProcess: Minimize the usage of DeviceProcess
DeviceProcess doesn't provide any public API, so
replace all usages of it with QtcProcess.
Keep using DeviceProcess only for reimplementations.

Change-Id: I35a14251a81dd0dde426f56ca2e809b527cc863c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 13:10:42 +00:00
Alessandro Portale
736cca6a40 Welcome: Fix issues with handling of mouse presses on tags
1) Handle all clicks anywhere on the item area. If a tag gets clicked,
   handle that, otherwise always open the item.

2) Ensure that m_currentTagRects is up-to-date. It sometimes contained
   the tag list of another item. Now it is handled in the same way as
   m_blurredThumbnail.

Task-number: QTCREATORBUG-27106
Change-Id: I394ceb55987f903d17254225b69cae347021f78c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-28 13:03:55 +00:00
Thomas Hartmann
89194dbe72 StudioWelcome: Show restart dialog if option is changed
Change-Id: Ic52167cecc771718063a27d73874e737597ff7f0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-28 11:48:26 +00:00
Jarek Kobus
e327007bd8 DesktopDeviceProcess: Don't set Writer by default
Leave it for the user of the process to call
setProcessMode(ProcessMode::Writer) when needed. It appears
no user needs it to be writer (no call to write() from
user side).

Change-Id: Idf0ac874c49e2e9634dc2b57e7d79cd7e9f09435
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 11:45:17 +00:00
Jarek Kobus
9f367e3498 PerfTracePointDialog: Use QtcProcess::setWriteData
There is only one write() after process has started,
so use setWriteData() instead.

Change-Id: I060b79926d9163d96d0bd1380b630191524daa96
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 11:45:07 +00:00
Jarek Kobus
3cfb242acd Remove unneeded includes of ports gatherer
Change-Id: I528e77a3464de59cd703b1800f2ba3187daa41c1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 11:27:50 +00:00
Eike Ziller
ea908bb941 Fix Qt5 based build
Change-Id: If6dfe191a1da52e9bd8ff04d86c5fe3dbda426b9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-28 11:20:20 +00:00
hjk
a8c36bd547 SdkTool: Change style of test initialization for devices
Easier to see what's going on and easier to extend.

Change-Id: I3c95d4b56fef8ae9dfd017ad98f9c12dbeae2242
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-28 11:17:53 +00:00
The Qt Project
bf037d7b51 Merge "Merge remote-tracking branch 'origin/7.0'" 2022-02-28 10:49:14 +00:00
Cristian Adam
2f77dc3415 CMakePM: Proper handling of the extra generator
CMake fails if it has -DCMAKE_GENERATOR:STRING=CodeBlocks - Ninja

It expects separate values:
  -DCMAKE_EXTRA_GENERATOR:STRING=CodeBlocks
  -DCMAKE_GENERATOR:STRING=Ninja

Fixes: QTCREATORBUG-27060
Change-Id: Ia2b5bdc425e569118d689b7223fbef5f953d98a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-28 10:36:17 +00:00
Christian Stenger
59d659b2ef McuSupport: Enable tests with qbs build as well
Change-Id: I2f547e20234b6d31587241daadc7eedeecdc3e15
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-28 10:22:58 +00:00
Christian Kandeler
1ae417fe57 Update qbs submodule
... to HEAD of 1.22 branch.

Change-Id: I8f813794dca90f99bd46edaa8e9931628eacf4b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-28 10:12:12 +00:00
Christian Kandeler
adf97c4b70 QbsProjectManager: Consider cpp.cFlags and cpp.cxxFlags
Amends 0dc87382e9.

Change-Id: Idb65fb3ab5a528c4cb2ad7a49a9ef02c0ab09dc7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-28 09:41:59 +00:00
Christian Kandeler
22fb18c0a8 LanguageClient: Speed up DiagnosticManager::showDiagnostics()
- Do project file look-up only if we have diagnostics.
- Move hash access out of the loop.

Change-Id: I9dd03dbfe8d7515e731cbeb0ce51639d9df993b4
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 09:40:08 +00:00
Eike Ziller
feb7ac6a9b Mimetypes v3: Re-implement MimeType setPreferredSuffix
Used by the CppEditor to set the preferred suffix for C/C++ files
according to Options > C++ > File Naming.

Change-Id: I1b0c862a17febf742202433ee677fcccc1aa511b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 08:42:45 +00:00
Eike Ziller
98b1e82d2b Mimetypes v3: Fix issues with providers overriding mime types
from other providers. Providers are sorted by "most specific first". If
some provider already contains some mime type, and didn't find e.g. a
match, another provider down the line may not add a match for that mime
type.

An example are the text/x-csrc and text/x-c++src mime types. We override
the versions in freedesktop.org.xml in the CppEditor plugin.

The freedesktop version of text/x-csrc has a magic for "#include" at the
beginning of the file, which we removed. A file foo.wxyz that starts
with "#include" should not open in our C++ editor, but without this
patch it does.

If you remove some extension/globpattern from the text/x-c++src mime
type in our mime type settings (Environment > MIME Types), for example
"*.cc", files with that extension should no longer open in our C++
editor. Without this patch they do.

Change-Id: I88049dce7ec2c8e57612f88464c6ce611336132d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-28 08:42:30 +00:00
Eike Ziller
d295d16ab5 Merge remote-tracking branch 'origin/7.0'
Change-Id: I809383e6c060701a2751197a8bf16add92bfaf0d
2022-02-28 09:21:18 +01:00
Christian Stenger
4e57609dc7 PE: Avoid device compilers while handling local toolchains
...and fix environment used when processing them.

Change-Id: I457c31e195f41ca2edf105229f2818dddd2f5df0
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 05:58:36 +00:00
Thomas Hartmann
49a7ada03f QmlDesigner: Remove superfluous code
Change-Id: I0f2c746130b768844307798007fc1192e0dd2939
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-25 19:53:52 +00:00
Jarek Kobus
1cb4017e71 SshRemoteProcessRunner: Don't buffer stdOut and stdErr
It's already being buffered inside SshRemoteProcess.

Change-Id: Iaee7e9f04f93196a1016d0e2d55a17ee88d35530
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-25 18:35:30 +00:00
hjk
32590af686 Docker: Accept more ways to identify a docker FilePath
Accept (percent-encoded) repo:tag, the image id or the device id as
host() part of a docker FilePath.

Task-number: QTCREATORBUG-26856
Change-Id: I27d374be31d54bab77d129e19884b7f7fd93daa0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-25 15:33:56 +00:00
hjk
4ca780ccb3 Utils: Use simplistic percentencoding for host parts of FilePath
Host parts with true slashes (as possible currently for docker ids
using the repo:tag style) breaks parsing in FilePath::fromString.

This provides a means to use such names nevertheless.

Task-number: QTCREATORBUG-26856
Change-Id: Iba3568c5708fe495d0dd657540f30a2519e7f45f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-25 15:33:47 +00:00
David Schulz
f334bd422e ClangCodeModel: prevent text mark annotations in non project files
Since non project files get opened in project specific clients now, the
check whether we should add annotations needs to make sure that the
marks file is part of the client project.

Change-Id: I2790d0f7feb39162686efd06bb3542684d289b95
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-25 13:01:40 +00:00
Christian Stenger
65a6853aec QbsPM: Avoid QFileInfo for paths that may non-local
Change-Id: I08b0b2c298c8f175e0c0a2d5e87691354afa46e5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-25 12:18:27 +00:00
Christian Kandeler
61351da56a ClangCodeModel: Add convenience function
... for creating a highlighting result from a clangd AST node.

Change-Id: Ie1fcfeee5d6b4c562143fce56498ce92a7b4fddb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 11:53:59 +00:00
Christian Kandeler
64a1bf6c43 ClangCodeModel: Properly highlight built-in defines
These are not reported as semantic tokens, so consult the AST

Task-number: QTCREATORBUG-27111
Change-Id: I38efcfbdc3197173a50033a74a1bc631eaa8d2c1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 11:53:39 +00:00