Commit Graph

68765 Commits

Author SHA1 Message Date
Marcus Tillmanns
84b2862058 Utils: Improve CheckBox layouting
This is not correct either, but the vast majority of Checkboxes
is not added to Forms, so the !form case is a better fallback.

Change-Id: I1375b3e23138fb6d881b2331ecf1d0f3a4f5431b
Reviewed-by: hjk <hjk@qt.io>
2023-05-05 08:52:20 +00:00
Eike Ziller
7724f8653f Merge remote-tracking branch 'origin/10.0'
Change-Id: I7a3925ad8e4f97461b64a70217102ed900430253
2023-05-05 10:39:47 +02:00
hjk
328d4c7295 Layouting: Code cosmetics
Change-Id: I0eea49bc5c39679ca66f73616a98e91546e493c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-05 08:21:34 +00:00
hjk
8b2f9b5d9c Debugger: Option pages code cosmetics
Change-Id: I299b944c95bd803ed143b0c06844ed92f76f856e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-05 07:36:48 +00:00
Karim Abdelrahman
b083a4d55e McuSupport: fix toolchain naming difference between windows and linux
Toolchain naming convention is different in windows "mingw" than in
linux "gcc". That caused the logic to fail on windows and prompt the
user to remove a kit of an existing target.

Task-number: QTCREATORBUG-29003
Change-Id: Ib99a9b38fec30b9a6826874f1acd0bb2f8615e1e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-05 06:31:07 +00:00
Cristian Adam
8854f53a42 CMakePM: Fix duplicated CMake presets kits
QTC_KIT_DEFAULT_CONFIG_HASH was introduced in order to match the
previous CMake presets kits.

This would hash the Qt and the C/C++ compiler paths.

Unfortunately on Linux CMake would pick "cc" and "c++" by default,
whilst Qt Creator uses "gcc" and "g++". The compilers would match from
the Qt Creator point of view, but the hash values would be different.

On mac there is a similar issue with compiler launchers.

This patchset fixes this by removing the hash and fixes also the issue
of allowing broken CMake presets kits (without any compilers), which
were the reason for introducing the hash key in the first place.

Fixes: QTCREATORBUG-29075
Change-Id: Id8dc081febba7bc7023c98055afc6ebfcdc55542
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 15:19:44 +00:00
Cristian Adam
13dd678834 Utils: Fix MinGW build
Amends a0f6e8dc04

The issue is that pthread.h is including <process.h>, which ends up to
utils/process.h since it's first in path.

Change-Id: I525384083b6952aded4b77c29d00d85f084c60f9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-04 15:13:17 +00:00
Tim Jenssen
1f2f223dd7 Merge remote-tracking branch 'origin/10.0' into qds/dev
Change-Id: Ifb5f580cfea7c0d166756938b013a338279d45d9
2023-05-04 13:45:45 +00:00
Christian Kandeler
34ad405d76 QbsProjectManager: Consider cpp.warningLevel in compiler options setup
Change-Id: I6f955691c1fedf319716e98645de50590fb05747
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-04 13:39:21 +00:00
Marcus Tillmanns
ce7bd57926 Core: Fix warning on macOS
Previously the icon was taken from the new file/dir name which does
not yet exists. This lead to a warning message. Settings a fixed icon
fixes this.

Change-Id: I4e7def0dfafd9d62b9a010ff850f3c7ea18c79a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-04 12:16:48 +00:00
Alessandro Portale
d6e22f4375 Examples: Make GridItemImageSize adapt to GridItemWidth/Height
Reduces the magic values a bit, and adds comments.

Change-Id: I9b288663ccfdaffdc2ffd25260d87c97c5dcbde1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-04 11:31:21 +00:00
Christian Stenger
6e2e7a63e6 QmlJS: Allow reset of the customized analyzer
Provide a context menu to reset the enabled and disabled
messages of the static analyzer to the internal default.

Change-Id: I98bde71899ad4de50d0e170bf0d2892b87989ceb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-04 11:03:29 +00:00
Christian Stenger
427640063e QmlJS: Allow disabling static analyzer messages
Provide settings to define a customized set of enabled
static analyzer messages.

Fixes: QTCREATORBUG-29095
Change-Id: Id629e383dd9e3beeef98026759ac66716dc43d23
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-04 10:49:07 +00:00
Marcus Tillmanns
e6081aaa0a Utils: Add TerminalMode::Detached
Change-Id: Ic36845d3469719e17f24602ce80f3e6cfc984fbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-04 10:43:36 +00:00
Jarek Kobus
a059f87754 QtSingleApplication: Introduce QTC_FREEZE_DETECTOR env var
This may help with tracking the freezes in main thread.
By default, when QTC_FREEZE_DETECTOR is set, it detects
freezes above the 100 ms and prints the receiver object
and event type that triggered the freeze.

Change the default 100 ms threshold by setting the
QTC_FREEZE_DETECTOR to some different numeric value.

Change-Id: Ifb68c7648c09a5329f1f2aa39cd7e29e69a76052
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 09:44:16 +00:00
hjk
de247bff2b LanguageServer: Use IOptionPage::setWidgetCreator() for settings
Change-Id: I6d05e739bc1348f09f3df7ab3ae8a701ce137b3c
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-04 08:14:18 +00:00
Jarek Kobus
867b10a06b Remove unused includes of QFutureInterface
Change-Id: I70f5e842801b628c7f9ad4d433334ce04d4e648e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 06:50:36 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
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-05-04 05:52:16 +00:00
Alessandro Portale
e5051bbfde Layouts: Add/remove contentMargins where needed
Some cases were preexisting, some were introduced recently

Change-Id: I0e7e7b74422c420fbf4563d7cbf384e53931c3a0
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:38:33 +00:00
Alessandro Portale
6531dc4569 Layouts: Add missing "br"s to terminate Form lines
This restores the layout of various forms to the state prior to the
LayoutHelper changes.

Change-Id: I9b88229485b257ca7454d688aa0a9b1984206496
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:38:27 +00:00
Jarek Kobus
b3a595fcfe Tasking::CurrentDocumentSymbolsRequest: Rename
CurrentDocumentSymbolsRequest -> CurrentDocumentSymbolsRequestTask
CurrentDocumentSymbolsRequestTask -> CurrentDocumentSymbolsRequest
currentdocumentsymbolsrequesttask.{cpp,h}
-> currentdocumentsymbolsrequest.{cpp,h}

Task-number: QTCREATORBUG-29102
Change-Id: I5a0b0edf67babf6880682a30a2fd973f849b1880
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-04 05:11:27 +00:00
Alessandro Portale
765e8a65ea Examples: Centralize constants in one place
Having all constants in WelcomePageHelpers makes reading the welcome
scren code a bit less interesting.

Change-Id: Idc2e402f33042b49d041c43ecc78a6e8d2d3536a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 19:55:22 +00:00
Jarek Kobus
2a5f2961a7 QDSNewDialog: Don't delete this QObject
Use deleteLater() instead.

Amends a850b1b866

Change-Id: Ib4e5f06b6a052a7bde1a9de45de4288b0ce44fe6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 15:15:12 +00:00
hjk
43e3b41afd Core: Delay creation of settings page widgets
... until they are actually shown.

Change-Id: Ibf47fe57c69557f9c514cc5a7c7c8aff369b1324
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-03 15:14:40 +00:00
Jarek Kobus
1c37aab5bd LauncherSocketHandler: Disambiguate Process name
Rename Process -> ProcessWithToken.

Change-Id: I75920488107f45198590e0b17fa5c9e7679c6192
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 15:14:10 +00:00
hjk
c99d848e53 CMake: Use LayoutBuilder in CMakeInstallStep
Change-Id: Idfc836d04afa29a133d87506d5542716d5d9f542
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-03 14:15:06 +00:00
hjk
99f7679564 Layouting: Make aspects operate on parent items, not LayoutBuilder
LayoutBuilder is meant to be an implementation detail nowadays.

Change-Id: I777ab934d3d405873e819eeddd27428d8c652f9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:28 +00:00
hjk
50084f6b0e Layouting: Handle attach types via setter
Change-Id: I862f5cd109db3582b4f029787ec0cded2da39ce6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:19 +00:00
hjk
70b02d23e1 LayoutBuilder: Rework
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.

Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).

No direct access to the widget in creation, funnel out is
via the new bindTo() facility.

Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:02 +00:00
Samuel Ghinet
971b35f721 QmlDesigner: Remove version from textures URL for the Content Library
The URL for textures should not have a version number.

Change-Id: Ifb0103d8420f9f3b3269657875ca184533700da5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-05-03 13:32:27 +00:00
hjk
3face235d9 Core: Use IOptionPage::setWidgetCreator for shortcut settings
Less boilerplate for the implementation add user code access to
IOptionPage::{apply,finish} is planned to be removed.

Change-Id: Ie160e5bdc330dd6f257521c804a23a9ec453e780
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-03 13:31:13 +00:00
Jarek Kobus
a3a5b8f806 Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}
Follows AsyncTask -> Async rename.

Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:24:20 +00:00
Jarek Kobus
82bc4870b3 Tasking::WaitForBarrier: Rename it into WaitForBarrierTask
Rename BarrierAdapter into BarrierTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I003b09fd71af1bde870f761d365a8cea1858862a
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:07:51 +00:00
Marcus Tillmanns
161228d275 ProjectExplorer: Fix LLDB stdout lines
DebuggerEngine::appendMessageRequested specifies if a newline
should be added, but RunWorker::appendMessage did not use that
information.

Fixes: QTCREATORBUG-29098
Change-Id: I5ab1e489f691038fe1d9ea4a4d4b04429e403e0d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 12:53:26 +00:00
Jarek Kobus
5c254bb5bf Tasking::Streamer: Rename Streamer into FileStreamerTask
Rename FileStreamerAdapter into FileStreamerTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I8e8b773116a4c7203531341074b7c8efcef4f5f8
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 12:47:34 +00:00
Jarek Kobus
187a7640de Tasking::Async: Rename Async into AsyncTask
Rename Utils::AsyncTask into Utils::Async.
Rename AsyncTaskBase into AsyncTask.

Task-number: QTCREATORBUG-29102
Change-Id: I3aa24d84138c19922d4f61b1c9cf15bc8989f60e
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 12:47:28 +00:00
Jarek Kobus
1d69f943aa Tasking::Process: Rename Process into ProcessTask
Rename QtcProcessAdapter into ProcessTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I1902c7176da75db60d70125f505084a2ea5ba774
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 12:47:24 +00:00
Christian Kandeler
d2b3c31e04 Update qbs submodule to HEAD of 2.0 branch
Change-Id: I649138237245120f7dd9448dfdb1027375dbb114
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-03 12:33:59 +00:00
Christian Kandeler
6d805195f6 CppEditor: Force document parser run on change in header dependency
Fixes: QTCREATORBUG-24133
Change-Id: Ica89d4b0922dea5f2bea513ab8e4373bc52f7250
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 12:22:48 +00:00
Cristian Adam
c2e657bbf6 CMakePM: Allow file rename / remove for QtQuick projects
qt_add_qml_module was not consided when looking for existing project
files.

This would fail when qt_add_executable and qt_add_qml_module were used
with the same target name.

Change-Id: Ib7374a3e1213c23aaf12d100a8817a46d57a4303
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 12:20:54 +00:00
Samuel Ghinet
84f75a7ffb QmlDesigner: Fix materials download path not using the configured path
In Preferences, the User can configure the download path for bundles.
However, this configured the path only for the textures, while the
materials kept using the hardcoded path.

Task-number: QDS-9622
Change-Id: Id4ac82f899542eac5c2ce9cc51053113327aef2c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-05-03 12:20:53 +00:00
Cristian Adam
71b3c6950f CMakePM: Parse the CMake file before adding new / existing files
This way the functionality would work even if autorun CMake is disabled.

Change-Id: I54ab47d72664cb42486b260b895f58d37a885cce
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 12:17:57 +00:00
hjk
7b132faff8 Vcpkg: Use IOptionsPageWidget in settings page
Change-Id: I71a20b4120cf0fa93b304c8477d851a143fede04
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-03 12:06:55 +00:00
Cristian Adam
3dd4b98c0c CMakePM: Better Qt import detection
Qt6_DIR and Qt5_DIR CMake variables are additionally checked for
existence.

Qt6_ROOT and Qt5_ROOT are taken into consideration for both environment
and CMake variables.

CMAKE_PREFIX_PATH is also returned from the qmake probe. This fixes the
case when qt.toolchain.cmake is used exclusively.

Task-number: QTCREATORBUG-29075
Change-Id: I6e0c3adf7f5d9860a1cb776371e66dea1dfc26cc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-03 11:38:07 +00:00
hjk
30882d931d Designer: Rename formeditorw.{cpp,h} -> formeditor.{cpp,h}
Change-Id: I90412be98c4c506742c866f8900489a5e33b0e4d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-03 10:20:12 +00:00
hjk
95e8280d12 Designer: Remove FormEditorW class
Just wrapped static functions.

Change-Id: Ic60a2d7185aab5576e48894c74a9314a4b1c2324
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-03 10:07:53 +00:00
Christian Kandeler
a03bea81c7 CppEditor: Remove WorkingCopy::contains()
Most uses involved a double look-up.

Change-Id: Ifeb62ea2361222ed0faad749f44a59735c8d6930
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-03 09:50:53 +00:00
Alessandro Portale
e15b384944 TextEditor: Use icons with better contrast in TextMark tooltip
The "_TOOLBAR" variants do not have a good contrast in some themes. This
also introduces the missing non-toolbar variation for the EYE_OPEN icon.

Fixes: QTCREATORBUG-29087
Change-Id: I64c8c6b7f5696d640c7bea7a431982caacd70050
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 09:20:58 +00:00
Ali Kianian
d823ba2812 QmlDesigner: Assign the correct context to QmlDesigner
The context would be updated when switching between different modes.
Some wrong conditions had caused to prevent this update before.

Before this change:

QmlDesignerPlugin ignores hiding the designer when the new editor is
raised by the editor manager because it hides the designer only when
the current designer is QtQuick. So, the previously opened document
is kept by the document manager, since hideDesigner is not called.
Then, when the user decides to go back to the designer mode,
the QtQuick editor is opened, but the previous document is opened,
so the QmlDesignerPlugin will not call showDesigner (Even if a
different file is opened now).

With this change:

QmlDesignerPlugin calls hideDesigner when a non-QtQuick editor is
raised by the editor manager.
It compares the file paths of the editor and the design document. So,
if they are different, it will try to open and show it again.

Task-number: QDS-9686
Change-Id: I6b962f22a1f3863128ac6a40780fdceeecaec040
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-05-03 09:09:00 +00:00