- 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>
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>
Also small relevant cleanup to the code.
Fixes: QDS-6312
Change-Id: I31ed0204ad9ae541a822cc4b58ef303aa3da7a68
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
... 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>
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>
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>
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>
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>
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>
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>
It's just confusing to the user otherwise.
Fixes: QTCREATORBUG-27114
Change-Id: I127d97ca165af0eb751cd6479d0ec0ffec480c17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>