Commit Graph

77702 Commits

Author SHA1 Message Date
Cristian Adam
2f39b51bdc CMakePM: Make "Autorun CMake" a global setting
The "Autorun CMake" is only visible in the Tools settings page when
the user clicks on CMake tool.

This is not very visible and it doesn't have to be per CMake version.

Change-Id: I57ded0b2e6a3ecb731bb8bc1495b6b61bc04c8b6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-05 14:37:50 +00:00
Jarek Kobus
2a2455a6fa Don't call FutureProgress::setKeepOnFinish(HideOnFinish)
This is the default behavior so no need to set it explicitly.

Change-Id: I7248a7a3890fa7fd947b8e42fccc70383d46ca3a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-05 14:26:03 +00:00
Jarek Kobus
45c98836a9 ProcessProgress: Add setKeepOnFinish()
Change-Id: I327cf309081d432b11a85bd98bc9f42de65313da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-05 14:22:42 +00:00
Jarek Kobus
fdb9cb905b QMakeStep: Use TaskTree for running qmake step
Change-Id: I8737a0fe3f8857db4e171001a73adde842d05d44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-01-05 14:14:59 +00:00
Jarek Kobus
acd55c0677 AbstractProcessStep: Provide API for running TaskTree
As an alternative to calling AbstractProcessStep::doRun().

Change-Id: I53142b7470a3e2aed0e219300fb3e0b4621630db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-01-05 13:53:13 +00:00
hjk
c022f53b88 QtSupport: Consolidate Qt version macro expander setup a bit
Change-Id: Id8f08d335beb3f6aef682b84f62cd9bdb50dd057
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-05 13:25:23 +00:00
Alessandro Portale
4e0b4fcc92 QtQuick Application wizard: Add "QDS style project" option
This adds a checkbox labeled "Design Studio style project" to the
Wizard. With that selected, the project is generated via the "General /
Empty" templates of QDS with Qt 6.2 as target Qt version, 1920x1080 form
size, the "Material" QtQuick.Controls style ("Light" Theme) and CMake
project format.

At the same time, the preexisting QtQuick Application wizard in Qt
Creator now also focusses on Qt 6.2 and CMake. TS file generation is
removed for now, can be added later, but then using the i18n setup
feature of QQmlApplicationEngine (instead of a QTranslator in main.cpp).

The wizard now focusses on the QML CMake API. In order to filter the
kits accordingly, the flag "QtSupport.Wizards.FeatureQtQmlCMakeApi" was
added.

Task-number: QTCREATORBUG-28436
Change-Id: I80bc5585f31ec82c64f845701c768f8a07e000da
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-05 13:09:59 +00:00
Cristian Adam
be1c5cab96 Fix static build of Qt Creator
When is QTC_STATIC_BUILD set to ON add_qtc_library will add a
<target_name>_STATIC_LIBRARY define, otherwise <target_name>_LIBRARY is
added.

Since Sqlite uses two libraries now both SQLITE_STATIC_LIBRARY and
SQLITEC_STATIC_LIBRARY need to be checked.

Change-Id: I07c4de01627754534da7e37d1261db37779df296
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-05 13:07:27 +00:00
hjk
4b237c0e98 ProjectExplorer: Return FilePaths for SessionManager::projectsForSessionName()
Change-Id: Ie168973e872ea105c7eb46ff7f58fb34883364b1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-05 11:07:14 +00:00
hjk
ac9023e851 Utils: Make Utils::withTildeHomePath a FilePath member
Gets .osType() right in remote cases.

Change-Id: I6397996062d976d7db690c5729dd4faa1f459563
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-05 10:17:10 +00:00
Eike Ziller
55fa109b59 CMake build: Use version-less Qt targets
Since we do not support Qt < 5.15 anymore, and as a first step
for getting rid of our special FindQt5.cmake.

Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-01-05 10:13:16 +00:00
hjk
894685d501 Debugger: Make calling std::function details skippable
Change-Id: I03415209557589a15d66e2ee4fd531f0f02bf5bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-05 10:10:21 +00:00
Cristian Adam
5e9f8b30d4 Utils: Add defaultValue getter for Aspects
Does the variant conversion based on the aspect type.

Change-Id: I2127a5a4202c3a60b946492b90a78beabaa11aed
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-05 10:02:02 +00:00
Eike Ziller
098c717678 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qtsupport/qtoptionspage.cpp

Change-Id: Ic8ada9fd47f5eb62e751b6188a45b95ddb36122d
2023-01-05 09:47:06 +01:00
Jarek Kobus
ea35ed9ffe AbstractProcessStep: Merge finish() with processFinished()
Change-Id: Ied15ec3ee9d3bcc80b03b2589d101c65f2fd062a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-05 08:43:21 +00:00
Christian Stenger
6832200313 Debugger: Add missing stretch
Amends 2b97f69796.

Change-Id: I44ddf368990c7ebbeeb5c07569ac5811a56f3c10
Reviewed-by: hjk <hjk@qt.io>
2023-01-05 08:42:10 +00:00
hjk
b9bba49275 Docker: Fix typo in test files
Change-Id: I4e7c0c0612d9dca8c815c5a378436574c4456a00
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-05 08:05:16 +00:00
Jarek Kobus
850d5e6a06 GerritModel: Reuse ProcessProgress
Change-Id: I229ab2cbb8137b6e1debe86eaa462110fdcc337e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-04 18:16:36 +00:00
Jarek Kobus
330a748f17 GerritPlugin: Reuse ProcessProgress
Get rid of unneeded State enum, future watcher and future
interface.

Change-Id: Id217d557c9051479cd3da872c1661c163cdf3a21
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-04 16:40:24 +00:00
Artem Sokolovskii
9320fb611a tracing: Remove foreach
Change-Id: I74f17198a9f98f958924214ad2058e295b313373
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-04 15:23:00 +00:00
hjk
ad7fe6fa1c Utils: Drop commonPath(QStringList)
There's FileUtils::commonPath(FilePaths) nowadays.

Change-Id: I26e30d61eb80cb457458791e9ad049356f18de98
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-04 12:38:17 +00:00
Alessandro Portale
9441865714 Android: FilePath-ify AVD handling code
Change-Id: Id08414f8fb9ce7f4fac5221cd24392e25f02f00d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-01-04 10:46:14 +00:00
Eike Ziller
34c206c700 Debugger: Also ship asm highlighting file
For highlighting disassembly views.

Amends b41abc94bb

Change-Id: Ifb5ddd50661459eb9deda9c2a419943777b1068c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-01-04 10:22:16 +00:00
hjk
b81d3d5cd2 ProjectExplorer: Use FileUtils::commonPath instead of strings
Change-Id: I917912fe441d1b72466c02ff9f3e743daa4eff92
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-04 09:40:26 +00:00
hjk
ba42169e8a Core: Convert promptoverwritedialog to FilePath
Change-Id: I4c1fc7b8c8956f671a3beef8834fe8039333482e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-04 09:40:10 +00:00
Orgad Shaneh
a3d1ef4e89 PatchTool: Preserve CRLF when reverting a chunk
Fixes: QTCREATORBUG-12690
Change-Id: Ib408a33bd1bd69ebc27a029025313eaf7bdf4f18
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2023-01-04 09:19:21 +00:00
Eike Ziller
0a74a1e99e Properly support relative paths in Link with Qt UI
Relative paths are resolved based on the applicationDirPath, so reflect
that in the path chooser too.
Also, do not resolve relative paths in the path chooser to absolute
paths when writing to the settings.

Change-Id: Iaeffa2cad1e145adbbc5c918b5f8ff14f6f2b31e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-04 08:44:08 +00:00
hjk
48990c9400 Qmake: Use FileUtils::commonPath instead of the string based version
Change-Id: Ib7dce9ed26b6ca280767e88ada2bcff52c8a5684
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-04 08:04:46 +00:00
hjk
1b43a4a1bd Core: Partially convert basefilewizardfactory.cpp to FilePath
Change-Id: I68abf990c2125e09228598fff151cbae9910ca44
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-04 07:39:22 +00:00
hjk
fffd732edc GLSL: Fix file licenses
Amends a7956df3ca which accidentally dropped the (L)GPL part.

Change-Id: I75ab5013925bac6563a782c5e19676d39accc1e0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-04 07:36:50 +00:00
hjk
38a6ab6cd6 AdvancedDockingSystem: Fix file licenses
Amends a7956df3ca which accidentally dropped the (L)GPL part.

Change-Id: I22e3f5cdb12b15ee777524cac04aa888606026c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-04 07:31:44 +00:00
hjk
6b2b52937d Debugger: Check for skippable frames early
This avoids unnecessarily opening of files with functions that
are skip.

Change-Id: Ie435949ad4033444ad5814a91109f33e022711d0
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-03 16:13:29 +00:00
Jarek Kobus
2afb31f371 ExtraCompiler: Hide some methods in protected section
Replace setCompileTime() with updateCompileTime().

Change-Id: I0ab2262787fc1a6c374e8e2b524f1cfad05fcbbf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-03 16:03:23 +00:00
Eike Ziller
5344bec59b Add support for plugin paths set by the installer
This is important on macOS, where we cannot install optional plugins
into the app bundle, because that would break code signing.
Instead the install settings in the signed bundle sets a custom plugin
path outside the bundle, and the installer puts optional plugins there.

Task-number: QTCREATORBUG-26705
Change-Id: I8b36752471d16dfc5828e87e20254f39ab985ca2
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-03 15:59:40 +00:00
Artem Sokolovskii
d2f1ac542f modelinglib: Remove foreach usage part 2
Change-Id: Ia898cc019a0534a97d20a3dc48e69c6617773766
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-03 14:45:31 +00:00
hjk
e1ae96647d Debugger: Save a few cycles in watch data
Change-Id: I1fada2767bedb5c9a90bd8f4f2db6b2c881f111e
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-03 14:28:43 +00:00
hjk
b00442e946 Utils: Make FilePath doc sources a bit more unitorm
Change-Id: I1250cc4bdb354827836b2193bcb64af6fd7f596f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-03 14:28:07 +00:00
Eike Ziller
b41abc94bb Fix highlighting of debugger disassembly view
The disassembly view uses a custom MIME type that derives from x-asm,
but that didn't trigger highlighting.

Make the generic highlighter look at the parent MIME types if no
highlighting was found for the MIME type itself.

Generalize this "go breadth-first through the parents" that was already
used for resolving editor factories.

Change-Id: Ia054058a8c06b9d8849384e79ee3b83fbc12279c
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-03 13:57:00 +00:00
Artem Sokolovskii
15fa9e7096 FileFinder: FilePathify
Change-Id: I7a4bcb05f85058ddcaf0c69c01b0587116410d95
Reviewed-by: hjk <hjk@qt.io>
2023-01-03 13:39:49 +00:00
hjk
09df8dfe44 Utils: Add a bit more and fix some FilePath explanation
Change-Id: I3655fee683ec2e9a48cc9141597398c6ea4d6110
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-03 13:09:31 +00:00
Eike Ziller
e38d1f06bd Fix that Utils::sorted could modify input container
Utils::sorted had overloads for "const Container &", "Container &&", and
"const Container &&", but for _templated_ types "Container &&" does
_not_ mean "rvalue reference", it means "rvalue or lvalue reference"
(e.g. "universal" reference).

That means that for non-const lvalue references that "Container &&"
overload was used, which modifies the input container. Which is a fine
optimization for rvalue references, but is wrong for lvalue references.

Add another overload explicitly for "Container &" before the
"Container &&" overload, and add some tests.

Also fix the compiler warning that triggered the investigation:

warning: local variable 'container' will be copied despite being
returned by name [-Wreturn-std-move]
note: call 'std::move' explicitly to avoid copying

Amends 13f40f5471

Change-Id: I14461fde5fc51a8bb679fd72b886e13b18c47e7b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-01-03 13:01:36 +00:00
Eike Ziller
5a4092106e Utils: Remove old MIME database implementation
The new one has been in use for long enough now, that we
don't need the old one for regression testing anymore.

Change-Id: I20a4a1dae483b1fee345ea4ec8e31509f6877047
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-03 13:00:33 +00:00
hjk
0a3f66c790 Android: Consolidate AvdManagerCommand use
Change-Id: I8b15f6807a6d0d38f668d56e11f75b34a8c3a722
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-03 11:09:17 +00:00
hjk
b02d1fd0e9 QmlDesigner: Avoid warning for unused parameter
Amends 0887174727.

Change-Id: I978550293533632950072256750571fd258f7dac
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-01-03 11:09:11 +00:00
Artem Sokolovskii
a5bee6e3ae tests: Remove foreach usage
Task-number: QTCREATORBUG-27464
Change-Id: I0e42da9b04793be959ad050fdecc0c78c98d9fcd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-03 10:53:15 +00:00
Eike Ziller
cead76f378 JSON wizards: Fix "span" with combo boxes
Combo boxes have "suppressName" set, but if they have span set too, we
still need to use addRow instead of addWidget.

Reorder the if conditions. The previous code didn't make much sense,
because it first checked for suppressName, and then for hasSpan, but
inside hasSpan it checked for (!suppressName) again, which could never
be false.

You can see this in action in the File > Qt > JS File wizard.

Change-Id: I976227f80277642823620e41aba605c8570aed44
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-03 10:30:03 +00:00
David Schulz
e79a0ab49b Editor: increase text cursor visibility on indentation depth mark
Reduce the alpha of the marker if a cursor is at the same position as
the marker.

Fixes: QTCREATORBUG-28645
Change-Id: I01b1825fd3f393dcc75cc58d64a31f22e50e2648
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2023-01-03 10:21:02 +00:00
David Schulz
f0dba78f48 Editor: fix crashing on updating snippet selections
The final selection is not tracked in m_selections and needs to be
handled explicitly. Also add an assert preventing unconditionally
accessing an out of bounds element of m_selections.

Fixes: QTCREATORBUG-28631
Change-Id: I1898418b1126bdaffccbdf0e483e2c659d191917
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-03 09:58:07 +00:00
hjk
2e52f4d8ef CppEditor: Work around an endless loop
Change-Id: I9fdcead4e3770e9feec4124a0b1b8e7aa1c53b70
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-03 09:40:08 +00:00
Eike Ziller
bd679b61d1 German translation: Fix error message when installing plugin
%1 resolves to "Qt Creator" or "Design Studio", and the message means
that no plugin for that application was found in the extracted zip.

Change-Id: I1f07a3557bdac7dcabf26206aa12fabac0ca272d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-01-02 15:15:34 +00:00