Commit Graph

80147 Commits

Author SHA1 Message Date
Robert Löhning
7b073efe4a SquishTests: Update tst_QMLS04
Change-Id: I383e8f652ae233df7ed5bef93dcaa9a43fe95f0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:32:58 +00:00
Robert Löhning
bbd5d6c7ae SquishTests: Update FindToolBar
...as seen in tst_CSUP05

Change-Id: I1736a4ec9c69a3db3fc98ea1234b0363ceeaef41
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 08:32:30 +00:00
Jarek Kobus
7bd26571e4 DiffEditorController: Aggregate reloadRecipe
Instead of declaring virtual getter.

Change-Id: I0f9e995bdff1b7e387e71daaf149a3726b7c09af
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 08:29:04 +00:00
Jarek Kobus
5aedb4ba56 DiffEditorController: Simplify API
Get rid of VcsBaseDiffEditorController::setWorkingDirectory()
and rename DiffEditorController::setBaseDirectory() into
setWorkingDirectory(). Don't pass workingDirectory
inside setDiffFiles().

Change-Id: I6a3a02d5e3ddc23977ed2908cd8d7b8ed51a9ee0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-15 08:28:44 +00:00
Vikas Pachdha
6ae064619f Add an option to style merge from string data
Task-number: QDS-8601
Change-Id: Icb56e5bc26c6cc3711c304641cce3cbbd6d7c8b2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-15 08:05:12 +00:00
Jarek Kobus
ce161d0b16 VcsBase & dependent: Fix const correctness
And some minor cleanups.

Change-Id: Id0c2df6865ba84c054f0fb97c0ac42a76a128355
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 16:57:14 +00:00
Jarek Kobus
042087ab1d DiffEditor: Simplify internals
Don't pass startupFile arg on every setDiffFiles.
Provide a setStartupFile() separate setter inside
DiffEditorDocument and call it directly from
DiffEditorController::setStartupFile().

Correct updateDescription() implementation.

Change-Id: Ie489431632bdabc61e2c692d09caf7b2e3990764
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 16:52:26 +00:00
Jarek Kobus
ac7a582ca9 FileListDiffController: Don't set startupFile()
We didn't do that before. We did it only for ShowController.

Amends cbcfc0242e

Change-Id: I6ba68bdb6b16204bcc66bdfd63bf7457c713ac28
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 16:51:36 +00:00
Tim Jenssen
973f74b8a0 qmljs: improve readability
Change-Id: I110c2b08bcdfc29b310b84378cd3b119ee7f5f91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-14 16:31:04 +00:00
Thomas Hartmann
f22a8a42a9 QmlDesigner: Avoid infinite recursion
Task-number: QDS-7864
Change-Id: Idc7b44d23ff252a870357bafc2dd072e0b83befd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-14 16:12:58 +00:00
Thomas Hartmann
3066dce3b8 QmlDesigner: Show error message if Qt is less than Qt 6.2 in template
The cmake application template requires Qt 6.2 or higher.
Otherwise we show an error message.

Task-number: QDS-8110
Change-Id: Ib22edae8634727e17edf2bb19594549bd81a49b4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-14 16:11:58 +00:00
Christian Kandeler
d0046ec435 ProjectExplorer: Consider the form "-D key=value"
... when filtering compiler options for MSVC macro extractions.
Otherwise we end up with a stray command line argument, breaking the
call to cl.exe.

Fixes: QTCREATORBUG-28016
Change-Id: I29979a4b968d2056a0feba61fee01d5ddc9aa28f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-14 15:46:43 +00:00
Christian Stenger
e3df0b90d8 LanguageServerProtocol: Fix toPositionInDocument()
Change-Id: I8c7d045a5a884995892a904afe50e443297b951b
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-14 15:30:01 +00:00
The Qt Project
4723848be5 Merge "Merge remote-tracking branch 'origin/qds/dev'" 2022-12-14 15:19:02 +00:00
Tim Jenssen
7f234ed768 Merge remote-tracking branch 'origin/qds/dev'
Conflicts:
  src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.cpp
  src/plugins/qmldesigner/components/contentlibrary/contentlibrarytexturesmodel.cpp

Change-Id: Ieda6242b845387100022b08251283891fb0fbda7
2022-12-14 14:30:09 +00:00
Eike Ziller
fdad6496f4 Fix language selection box
When Qt Creator is installed in a path with underscore.

Amends 451d02c88d

which changed the pattern matching from file name only to the whole
path.

Fixes: QTCREATORBUG-28591
Change-Id: Ice6a7cb34fd2bb98c384a3b7cb573614bb7a43b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-12-14 14:22:21 +00:00
Sami Shalayel
5935536b71 qml code model: load builtins import
LinkPrivate::linkImports() would either load the <builtins> or the
<defaults> module, but only process the <defaults> module in
LinkPrivate::populateImportedTypes().

Note: The <defaults> module (from the package '<default>') is the
QtCreator magic replacement for the actual <builtins> modules
(from the package 'QML').

This means that if the <defaults> were loaded, then QtObject would
be recognized as an object from QtQuick.
On the other hand, if the <builtins> were found, then neither
<defaults> nor <builtins> would have been imported and QtObject
would not have been found in the imports (because neither <defaults>
nor <builtins> would have been imported).

The "<defaults>-found" situation happens right after a "reset code
model" while the "<builtins>-found" appears when the qml code finally
found the <builtins> package, usually after running cmake or when a
project was freshly opened in Qt Creator.

Instead, always try to load both <defaults> and <builtins> module.

Also, fix the builtins.qmltypes (that contains the qt creators magic
types) to reflect that Component and QtObject
are both available from the QML package (the <builtins> module), as
else one cannot import QtObject from QtQml after a code mode reset.

Fixes: QTCREATORBUG-28287
Fixes: QTCREATORBUG-28375
Change-Id: I67084a169dc5ca8ec2474b721dbef83cd47037c7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-14 14:04:34 +00:00
The Qt Project
249c3561cb Merge "Merge remote-tracking branch 'origin/9.0' into qds/dev" into qds/dev 2022-12-14 13:39:53 +00:00
Tim Jenssen
db4bbfdf4b Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: I4305c3b37814cc3a926e8e56cabe5f8935f8f2c0
2022-12-14 13:39:31 +00:00
Eike Ziller
a3fe24d192 Merge remote-tracking branch 'origin/9.0'
Change-Id: I5298a6529921568ec32c0fe0c009c273263b0f5d
2022-12-14 14:25:38 +01:00
Jarek Kobus
c5668952ae GitBaseDiffEditorController: Simplify internals
Remove initialize() method and do it inside reloader method.
When reloader is being executed the workingDirectory is already
set.

Amends bfcd1149eb

Change-Id: I600daaff8d15f3bdb822789623947b31df0b7edd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-14 12:54:09 +00:00
Jarek Kobus
cbcfc0242e FileListDiffController: Reuse task tree
This makes it possible that staged and unstaged
tasks are run in parallel, so the result is to be
expected earlier.

Change-Id: I0b99d17a55e39f2178d6ebed208e29fbaaa8aa5e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-14 12:53:47 +00:00
Jarek Kobus
1ee4b0e583 CorePlugin: Don't call mutable expressions inside QTC_ASSERT
In order to conform to the theory: "Removing all
QTC_ASSERTs and QTC_CHECKs should not change anything".

Change-Id: I95593962486e1de1b980f17b8f924d6f98fa8e80
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-14 12:36:12 +00:00
Jarek Kobus
72e19f0919 Android: Don't call mutable expressions inside QTC_ASSERT
In order to conform to the theory: "Removing all
QTC_ASSERTs and QTC_CHECKs should not change anything".

Change-Id: Ie8ef58533dfbeec00eaf45d42bcb731d8e2a3136
Reviewed-by: hjk <hjk@qt.io>
2022-12-14 11:58:40 +00:00
Jarek Kobus
bd170f3748 Ios: Don't call mutable expressions inside QTC_ASSERT
In order to conform to the theory: "Removing all
QTC_ASSERTs and QTC_CHECKs should not change anything".

Change-Id: Ieed804e44f4ca78a020444eb3f73d64d1bbdc916
Reviewed-by: hjk <hjk@qt.io>
2022-12-14 11:58:35 +00:00
Orgad Shaneh
038847709c Git: Suppress all output for instant blame
Change-Id: I5ad295cef22d0448f79d9187df85b582287b2835
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-12-14 11:54:05 +00:00
hjk
7971a83730 RemoteLinux: Give path line edits a bit more space
... in device settings.

Change-Id: I8c640b40a3505e97bdab955c14f22fe8017da3fa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-14 11:39:51 +00:00
hjk
7b08e79913 ClassView: Proliferate FilePath use
Change-Id: I4a8a18d6045557e31571970d671f3cc3f4374493
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-14 11:38:12 +00:00
Orgad Shaneh
2119dd4397 Git: Do not show progress bar and the command on instant blame
Change-Id: I22d06d0359d82d086062be4990b51858754b9145
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-12-14 11:04:18 +00:00
hjk
bf060b426f RemoteLinux: Use remote path choosers for gdbserver and qml paths
Change-Id: Ibf65b08bc1cb9d92a6e7561bd1e97a3e13ea5a7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-14 10:58:21 +00:00
Pranta Dastider
e46141dcd0 QmlDesigner: Update the tooltips for QDS view Components
Update the tooltip text for Qt Design Studio view
type of components.

Fixes: QDS-8310
Change-Id: I1b56e5bc26c6cc3711c304641cce3cbbd6d8c802
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-14 10:52:58 +00:00
Marcus Tillmanns
eca7044361 Utils: Add std::expected implementation
Adds a std::expected implementation that is compatible with >= C++11.

FilePath::fileContents and FilePath::writeFileContents as well as
FilePath::copyFile are changed to return std::expected.

A couple of macros have been added to aid in using the expected types.

An auto test was added showing how to use the library.

Change-Id: Ibe3aecfc1029a0cf13b45bf5184ff03a04a2393b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-14 10:39:29 +00:00
Jarek Kobus
13c7283c0e GitBaseDiffEditorController: Remove interactive branch expansion
Branches are now being automatically expanded.

Change-Id: I6c8986f39fe0ceb71841a2fea46b6038123240b7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 10:22:00 +00:00
Jarek Kobus
85b645f144 ShowController: Make showing branches a part of show process
Change-Id: I23d994fd489fc6a6f02419452ad2b07c756a9cd3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 10:21:53 +00:00
Jarek Kobus
eef9cb458b DiffEditorController: Make it possible to setup task tree
Instead of reloader function. Use task tree for ShowController.
Make diff processing a part of task tree.

Change-Id: I732d0a14eaf8de7ce0d1be891fb4700b22ea24b7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-14 10:21:44 +00:00
hjk
041c59e90f QmlProjectManager: Support running on RemoteLinux
This adds a per-device qml run time path and enables X11 forwarding
via a run configuration aspect.

Task-number: QTCREATORBUG-28074
Change-Id: Iae5e724f44dba876d7a12443b3b89f85cd28f3df
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-14 10:01:54 +00:00
hjk
4159c4b5d5 CppEditor: More migration to FilePath
Change-Id: I261b713671e00bb567f61b4ee5ecf6fa83473bff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-14 09:14:12 +00:00
hjk
9bac0d7f4c Utils: Be a bit more informative in failing FilePath accesses
Change-Id: I2e30998d2d5cd3159b28996d1102c65cbb9ad03b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-14 08:34:51 +00:00
Eike Ziller
5cb1a29af2 German translation: Some cleanup
Make some things more consistent:

- Systemumgebung löschen -> bereinigen
- Mitglied -> Member
- gegenwärtig -> aktuell (or gerade)
- Alles auf/einklappen -> Alle auf/einklappen
- Tool-Tip -> Tooltip
- some spezifisch -> abhängig

- fix "_Run_ Without Deployment" to be a verb
- make translation for "No updates found" shorter, because it appears in the status bar

Change-Id: Ieb7b56f03883eb5c18d7de79e997b24a17c56001
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-14 08:32:57 +00:00
hjk
8e8afd3cf6 Utils: Remove FilePath::fromUrl()
Even though the concepts are similar, direct conversion is
usually neither desired (lossy) nor needed.

Change-Id: Id5c9e69d0597ed867cbda25f3fc4619a9fe90966
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-14 08:27:23 +00:00
Marcus Tillmanns
af881688e5 Debugger: Fix name of "mac_stdtypes.py" file
It was incorrectly assumed that the types were only used on macOS.

Change-Id: I8acc326fe63d4cb96b764da1262355d24494f337
Reviewed-by: hjk <hjk@qt.io>
2022-12-14 08:25:37 +00:00
hjk
89403daf4e Utils: Skip roundtrip through QUrl in FileCrumbLabel
Change-Id: I4796070ef2a3bb0b4d778c5b0db224574dbf4823
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-14 07:22:36 +00:00
hjk
dbaade3b47 ClearCase: Re-use FilePath::removeRecursively()
Change-Id: Iac0e8fcd774c366289b0f854e8b4c310dd109901
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-14 07:04:48 +00:00
David Schulz
e0b1f694e3 Editor: Fix deleting with numblock delete in multi text cursor
Fixes: QTCREATORBUG-28584
Change-Id: Ib65a933b61536d9a6342e82c51779c2a91983ec8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-14 06:20:05 +00:00
Christian Stenger
75177f4c34 SquishTests: Expect some more error message
Change-Id: I33f359673e6d23f0188072db891db08dafa72ace
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-12-14 05:06:25 +00:00
Pranta Dastider
bfffa32f1e QmlDesigner: Update the tooltips for QDS Component Components
Update the tooltip text for Qt Design Studio component
type of components.

Fixes: QDS-8313
Change-Id: I503e10a60f1d59f9a2e6b693c9f886254c3dabcd
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-13 16:36:18 +00:00
hjk
f9e373bba7 RemoteLinux: Add a per-device setting for qml runtimes
Task-number: QTCREATORBUG-28074
Change-Id: I8d1ea1908685212a8aba79ade39a2abf77e05409
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-13 16:36:05 +00:00
Jarek Kobus
354f67f11a AbstractProcessStep: Remove two virtual methods
Remove stdOutput() and stdError() virtual methods.
Connect to addOutput() signal in subclasses instead and
filter for desired channel.

Change-Id: Ifd9a2e4ff037776caa706bbdb9634992060172ff
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-13 16:23:49 +00:00
Jarek Kobus
9f53ba5795 AbstractProcessStep: Devirtualize processStartupFailed()
Since the base implementation of processStartupFailed()
is always calling finish(false), we intercept this inside
QMakeStep::finish override and set m_needToRunQMake accordingly
instead of overriding processStartupFailed.

Change-Id: I1d42d0034521dfad55e5a7e75a2ab234ca76c88d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-13 16:20:53 +00:00
hjk
d726615546 RemoteLinux: Move X11Forwarding aspect to ProjectExplorer
Pretty small and self-contained, and will avoid an explicit dependency
of the QmlProjectManagerPlugin on RemoteLinux.

Task-number: QTCREATORBUG-28074
Change-Id: Ia3c1bb6a887336040ac6e87c3d52570bbe2bc01f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-13 16:05:17 +00:00