Commit Graph

74059 Commits

Author SHA1 Message Date
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
Mats Honkamaa
2a4c149e49 Doc: Update docs related to Library, Assets, and Components view
The Library view has been removed and replaced by the Assets
and Components view.

Task-number: QDS-6216
Change-Id: Iad2454196898ca0d6631a6bd6261c02d1bad98ac
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-28 09:05:23 +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
Leena Miettinen
8828e6c22d Doc: Update info about custom wizards
Some option values in the wizard used as an example have changed
and some new options have been added.

Task-number: QTCREATORBUG-26610
Change-Id: I7cf3f5f6d45e4854e547a2fd2bb41b24642578ae
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-28 07:47:29 +00: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
David Schulz
4d10a2df36 Editor: only start block selection if alt and shift is pressed
Since it is a selection the shift modifier should be part off the
shortcuts and the old block selection also required both modifiers.
Additionally this prevents creating a block selection by accident when
there are no items in the editor history since alt + arrow left is
mapped to go back in history by default.

Change-Id: I46b0753a737f1e1b3c980d2e959bcf7b4733d790
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-25 10:25:30 +00:00
Eike Ziller
9a3431ba88 Mimetypes v3: Never use installed mime data
It gets in the way, e.g. "No plugin can open project type "application/
x-kicad-project"" when trying to open .pro files. Mostly relevant on
Linux, where mime data is actually installed system-wide.

Re-implements 4f5f5d75b4

Change-Id: Ifd34214b99b77720cfc6d22e6702ca6e9ba513dc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-25 10:10:37 +00:00
Eike Ziller
5f70f5e336 Mimetypes v3: Re-implement adding mime types from plugin data
We get mime data specifications in text from from the plugin meta data.
Add mime providers for these.
An obvious example is application/vnd.google.android.android_manifest.
Disable automatic, time-based update of mime providers, and instead
explicitly force reloading them.

Change-Id: I07e3399ca76b1913d79b92375f679ca729c594b7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-25 10:09:25 +00:00
Eike Ziller
3922db8ca9 Mimetypes v3: Reimplement MimeType matchesName
This makes Qt Creator set the right default editor again.
Visible in the MIME Types setting, before this change everything is
opened in the text editor.

Change-Id: I88ffc2e41688c2395925821e1d5d8ffee0d127eb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-25 10:08:06 +00:00
Cristian Adam
47667772c7 CMake: Enable higher compiler warnings for building Qt Creator
The functionality comes from Qt6 and will be enabled only for Qt6 builds.

/w3 level for MSVC, -Wall -Wextra for the rest of compilers.

Change-Id: Ib62a27e50ce37a6a860ba2bfa1bdb80a7ae60ace
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-25 09:54:49 +00:00
hjk
79726e52d6 SdkTool: Add --builddevice option
Useful in a docker context.

Change-Id: I297654a9d65da2ce7d89b4ed8322d2ea0c80b3a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-25 09:32:35 +00:00
Christian Kandeler
1a99f41fe8 QbsProjectManager: Call qbs-config directly
It's slightly faster than going through the qbs executable first.

Fixes: QTCREATORBUG-27102
Change-Id: I13297e700fed43b20e1d1185dbdfc16152584d56
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-25 09:30:06 +00:00
Leena Miettinen
ace0a0d9d1 Doc: Add CLI options
Make the wording and capitalization of existing docs more
consistent.

Task-number: QTCREATORBUG-26610
Change-Id: If241a951ce4df757a1b26524dee412ef44bbfa4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-02-25 08:54:18 +00:00
Eike Ziller
179f393f88 Mimetypes v3: Re-add internal mime database
Qt Creator ships its own copy.
With this change, Options > Environment > MIME Types shows the basic
freedesktop types again.

Change-Id: I420d9d034e31622d5ec7f2492baef5c3f1d93df0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-25 08:52:49 +00:00
Eike Ziller
53aa9daeba Mimetypes v3: Reimplement mime startup phase
Which is used for sanity checking that we don't do expensive things on
startup, e.g. by accessing mime types before registering the plugin
provided mimetypes.

Change-Id: Ib99a5ca3bdd489c86f48dc5fbc83273fc28cc0f9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-25 08:52:22 +00:00
hjk
b178e407a4 SdkTool: Make auto test easier maintainable
Adding new kit items so far required touching test code in several
places.

Also, use more but simpler individual tests to find failing tests
quicker.

Change-Id: I540b93c01a6bdbb85353928713995c262dfc919e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 08:41:05 +00:00
Thomas Hartmann
44aba26a47 StudioWelcom: Slight increase in margin in SplashScreen
Change-Id: I5ea3642134ea9ff76e9dc40cc0319933c26f9fc1
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-25 08:34:47 +00:00
Eike Ziller
c906f57d14 StudioPlugin: Fix build
The header was moved. The old include managed to sneak back in
via f562ebf239 without creating
a merge conflict.

Change-Id: I29c1d42887db7947693ae2bf1f30ff3c982a9d3c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-25 08:34:46 +00:00
Jarek Kobus
ed1301005a Introduce Utils::ProcessInfo
It will substitute ProjectExplorer::DeviceProcessItem.
Add ProcessInfo::processInfoList(), it's going to substitute
LocalProcessList::getLocalProcesses().

Change-Id: I8b51b2221630668c6245da82a58104e7e365dbb3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-02-25 07:51:33 +00:00
Eike Ziller
f562ebf239 Mimetypes: Make implementation switchable between new and old
- configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in
  utils/mimetypes2/
- added utils/mimeutils.h header for the Qt Creator specific static
  wrappers, that also includes the "public" headers for MimeType et al
  from the new or old implementation, depending on configuration
- change all utils/mimetypes/ includes to utils/mimeutils.h
- move the implementation for the wrappers to
  utils/mimetypes(2)/mimeutils.cpp
- also move the MimeDatabase declaration in the "old" implementation
  back to utils/mimetypes/mimedatabase.h

Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 07:19:58 +00:00
David Schulz
967b1d237b ClangCodeModel: remove ClangdTextMark safety net
Since all text mark created by the diagnostic manager get deleted
properly on destruction now, there is no need to react on the client
destruction in ClangdTextMark.

Task-number: QTCREATORBUG-26585
Change-Id: Ifb9b8546c8f0d94debdcf2c8de6081e4e731cfab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-25 05:34:30 +00:00
Tim Jenssen
b58c57fb3f crashpad: disable calling crashpad_handler on arm64
Currently, the none arm handler binary is hanging and
needs further investigation.
Maybe a complete universal build will fix this, and
we can enable it again.

Change-Id: I60b5623d8dda500a3be3efd095f91a9609600324
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-02-24 16:27:34 +00:00
Jarek Kobus
343a567e07 LocalProcessList: Use ranged-for loop
Change-Id: Iae104436f472fd11b2cc09cf074da828a20ab3cf
Reviewed-by: hjk <hjk@qt.io>
2022-02-24 15:57:36 +00:00
Christian Stenger
5ce07a2345 Scripts: Fix uichanges script
Amends 394bfb508f.

Change-Id: I6e933f8bc18298b81b99a716e734d84fbd2b7528
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-24 14:35:37 +00:00
Christian Kandeler
86f1864d3c CppEditor: Catch another project pointer access from a thread
Amends 33108795d6.

Fixes: QTCREATORBUG-27044
Change-Id: I53d716355b0784841fd8d965c8af14fe321c33de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-24 14:28:23 +00:00