Commit Graph

80147 Commits

Author SHA1 Message Date
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
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
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
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
Christian Kandeler
89b589c0ea CppEditor: Add quickfix adding a member declaration from assignment
Fixes: QTCREATORBUG-1918
Change-Id: I92c409ba0831edb056d23ae3244f5155876c039b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-03 08:58:44 +00:00
hjk
4704dab394 Core: Allow functors for apply and finish in IOptionsPageWidget
Change-Id: Ibe9f1c3853497885510b9b2493d976812fbe2f93
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-03 08:56:44 +00:00
hjk
f8012b7ac9 TextEditor: Use IOptionPage::setWidgetCreator() for behavior settings
Change-Id: I24629e64b48c08b1321f0ebf3fca21e17a1f69a1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-03 08:49:29 +00:00
Jarek Kobus
b5492953e2 Barrier: Fix the missing export
Amends e46a4eba8d

Change-Id: I72d451151796b342fe97375abb30f9ef433c897e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 07:59:43 +00:00
Jarek Kobus
d4f022be6a LocatorWidget: Turn the new LocatorMatcher implementation on by default
Change-Id: Id9dab7ff68a710a8406879ecf4658cfb09e8f76e
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 07:40:07 +00:00
Jarek Kobus
4b129df44f TaskTree: Enable the fluent interface for Tasks
Make it possible to use the default Task c'tor
and add selected handlers with onSetup/Done/Error()
methods.

Change-Id: I94f5806f347931faa07cff0ade620a3d30777cfe
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 07:05:28 +00:00
Jarek Kobus
5c414c1043 JavaScriptFilter: Reimplement matchers()
Add JavaScriptRequest class that runs evaluation
for a given input data and for a given JavaScriptEngine.
The JavaScriptFilter holds the running JavaScriptEngine
instance.

Features:
- It creates, destroys and runs evaluation of QJSEngine
  always in one, separate thread.
- In case of a busy run of evaluator (e.g. because
  an input data contains a script with an endless loop)
  it's possible now to cancel the task before the timeout
  came. Useful when typing fast inside locator widget.

Add also the JavaScriptRequestTask to be included in
TaskTree.

Change-Id: I866069c72bad17ab899f4aca9a3f6d928738f3a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-03 07:00:11 +00:00
Alessandro Portale
7be8bd07b2 Core: Don't change height of FancyToolButton for target chooser
A freshly started Qt Creator showed a smaller target chooser button
until a project was loaded. When loading a new project, the button
changed its height which caused a noticeable jumping of the layout in the FancyActionBar. After closing the project the higher height
remained.

This change has the effect that the button has the final height right
from the start of Qt Creator and that the jumping disappears.

Change-Id: I6c9ac57c661398ba03d0b31269f62db28672ec91
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-03 06:50:30 +00:00
Cristian Adam
874b1133d9 CMakePM: Allow file rename / remove via variables
Lookup any variables found in the target definition function in order to
find the source files.

This works for something like this:

  set(SOURCE_FILES myfile.cpp)
  add_executable(myexe ${SOURCE_FILES})

Change-Id: I8a47ea64b4efa467074f03ed5e1d1d05b2b1bf00
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-02 19:04:39 +00:00
Cristian Adam
5c2b2966e7 CMakePM: Enable "Add Existing Directory"
This works via "addFiles" and it's supported.

Change-Id: I18d193878c9549581a77d74fd8eb9761c4b08271
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-02 19:04:15 +00:00
Cristian Adam
e2f83c74f4 Revert "CMakePM: Fix compile for gcc 7"
This reverts commit ca04d9afcd.

GCC 9 or later is the minimum required version nowadays, so this piece
of code can be more readable.

Change-Id: I939ee6cd62572d23d5b1de8d113472136752a590
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-02 15:25:22 +00:00
Orgad Shaneh
a548587a0b QbsPM: Fix clang detection in toolchainList
We should only care about the file name. If the file's directory
contains "clang", the compiler is not necessarily clang.

Reported by hjk.

Change-Id: I079c59eca37a9dbaa2ef5d669aee8e185db528f9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-02 14:02:41 +00:00
Alessandro Portale
bdabb68810 Examples: Adapt line color between title and tags to category hr color
"Welcome_ForegroundSecondaryColor" is less likely to burn a permanent,
straight line into user's retina.

Change-Id: Ie6c6f02d8b53c340b322945f0d735177f22ddd56
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 13:19:43 +00:00
hjk
1c2b29b31a Layouting: Introduce a 'bindTo' LayoutItem
... to 'export' the widget being operated on.

The 'Tab' related changes are related, as they affect the order
of execution.

Change-Id: I7aa079f12e49a1dab7c6a49acfae9dc684cfb479
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 11:44:03 +00:00
Alessandro Portale
c192536b64 Examples: Use theme colors for section separator + link
Change-Id: Ia5706dd81c0494f0a7c1a1df346918462b52ba53
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 09:23:41 +00:00
Eike Ziller
66c0c36bc1 Fix compiler warnings
Change-Id: I9b0b4a60d1152142f62bf3f76885cf8019714623
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 09:05:16 +00:00
hjk
3e953f4896 Layouting: Add some example code as show case
Change-Id: I92842c7859514397748e744949688090154772df
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 08:58:20 +00:00
Jarek Kobus
3e0a179d24 ResultsCollector: Fix destructor
It may happen that still running LocatorMatcher is destructed
from the LocatorWidget destructor (i.e. from CorePlugin d'tor).
In this case the global future synchronizer is already reset,
so the d'tor of ResultsCollector can't put running deduplicator
task into the global synchronizer.

Check this case and place the deduplicator task into the global
future synchronizer only when it still exists. Otherwise, blocking
wait for the deduplicator to finish.

Change-Id: Ie788db923808dd91bdfdc4f1f53d336baf7c672a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 08:11:50 +00:00
Jarek Kobus
a5db02c9a7 AllProjectsFilter: Reimplement matchers()
Change-Id: I963929ce121e1dd22e0ea3ef4a72f1654b195066
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 08:00:22 +00:00
hjk
c3a213cc65 FakeVim: Remove QtcProcess use from fakevimhandler.cpp
fakevimhandler.{h,cpp} are meant to be re-usable outside of Qt Creator.

Amends 91605c3.

Change-Id: I569a393d13049ef92ed3ef0c4f69de5232b2fa32
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-02 07:45:43 +00:00
Jarek Kobus
a35fe27188 DirectoryFilter: Reimplement matchers()
Change-Id: I8891d253ba4f2409f3547b49293a35de12c3ee3c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-02 07:43:10 +00:00
Jarek Kobus
5299bca359 CurrentProjectFilter: Reimplement matchers()
Change-Id: Iec838504aa0fc1a08754779a55acb53f57b5bf6c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 07:42:14 +00:00
hjk
fbe9366498 LayoutBuilder: Cut remaining dependency to utils
layoutbuilder.{cpp,h} can now be re-used outside Creator

Change-Id: I306d2d8168d8a09658ea008f4606ca37a0dbbc01
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 07:40:55 +00:00
Christian Stenger
3aefbb37b9 Tests: Fix qbs build
Amends 0b3a0dce88.

Change-Id: I89a301a8780f17c3197ffe99a6cfc9a61d5961b3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-02 07:00:07 +00:00
Jarek Kobus
ce1a9b5990 TaskTree: Add tests for new functionality enabled by Barrier
Test, that it's possible to distribute the barrier advance
in multiple tasks.

The barrier passes after the both advances are triggered.

Change-Id: Ica58f9657ecdf1ba45e1059ea47be0453948e7b9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:54:28 +00:00
Jarek Kobus
c4acd5ce4c TaskTree: Refactor barrier tests
A preparation step before adding new barrier tests.

Change-Id: I83aa8a7788859f98c98885384b52dc3377e01916
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-02 06:54:20 +00:00
Jarek Kobus
68d05b05d9 TaskTree: Remove the old WaitFor, Condition, ConditionActivator
Remove it from internals of TaskTree. It's replaced with the
new mechanism consisting of Barrier, implemented outside of
TaskTree.

The change mostly reverts 29f634a8ca.

Change-Id: I1f2f4100e7c992389a19c3cc9132c3f2980b9bf8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-02 06:54:10 +00:00