Commit Graph

89152 Commits

Author SHA1 Message Date
Tim Jenssen
c0813a5ee7 QmlDesigner: Qt 6.8 fixes
Task-number: QDS-13175
Change-Id: Ic7ac18974c7e3e08758eed0ca50376737d919196
Reviewed-by: Aleksei German <aleksei.german@qt.io>
(cherry picked from commit 5ced40c049)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-04 07:36:48 +00:00
Cristian Adam
bc7b322e8a Wizard: Update GitHub Actions workflow file
* Update CMake and Ninja versions
* Update actions/*@v4 to remove warnings about nodejs
* Update release mechanism
* Enable macOS universal builds

Change-Id: I28d995a6e4b027ed84ae99b477f8bd1fdb52720e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-04 07:08:54 +00:00
hjk
e99eceab5c Designer: Inline designercontext.{h,cpp} into only user
Change-Id: Iff942b13e498b032d5309eef5a46d45503ad1c2a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-03 15:06:08 +00:00
Jarek Kobus
723f425d81 TaskTree: Add docs for logical operators
Change-Id: I6650fc6120894b5cdd3139a4645397aab7faed35
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-07-03 14:06:39 +00:00
Jarek Kobus
81cd85afcf Valgrind: Use conditional API
Change-Id: I71e823e23fce0dd8663560df3967539797dc06e5
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:03:03 +00:00
Jarek Kobus
4ff25b2ae6 TaskTree: Enable passing bool-returning handler into conditions
Change-Id: I67e5239627ba9b64148347e7a3824ce194373b4e
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:55 +00:00
Jarek Kobus
ff1125319a TaskTree: Introduce successItem and errorItem
They are useful in conditional statements to influence
the workflow of a group.

Add tests for nullItem, successItem and errorItem.

Fix some comments in tests.

Change-Id: If0faa579e256d5a943d22cf66fe5208d60a63e0d
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:48 +00:00
Jarek Kobus
e5ccfeaae0 TaskTree: Add more tests for conditional API
Change-Id: I9e381d48d1ccfc86cb041e61100da6c0533c15e3
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:41 +00:00
Jarek Kobus
ef71c022de TaskTree: Introduce conditional API
Change-Id: I002ea7636d12719cb1e27a4666e3869ea2254114
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:02:34 +00:00
Jarek Kobus
0b19c83bed TaskTree: Make it possible to return bool from done handlers
Alternatively to returning DoneResult, for convenience.

Change-Id: Id845190a2a0587048ddb3a6c33019feca8cd0de7
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 14:00:08 +00:00
Christian Stenger
fedb43a5f0 Help: Do not try to open folder
We end up using a system editor or the question which tool
to use when trying to open a fake help item.

Fixes: QTCREATORBUG-31178
Change-Id: I21b7c98a7ea0c2b442ad8b733477c725f96e80e1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-03 13:52:57 +00:00
Eike Ziller
ed86c821a0 Break IMode's inheritance from IContext
IContext has the purpose of matching the current focus widget hierarchy
to active context and context help. We do have actions that are enabled
by mode context and we do have some modes that specify context help, and
modes do have associated widgets.

But the inheritance of IMode from IContext also forces IModes to create
their widgets early which is undesirable.

We already manually add the active mode's context via
updateAdditionalContexts, so we already do not rely on the focus and do
not need the IContext for that. Instead add a context property to IMode
directly.

Also, modes can just create an IContext for their widget if they need it
_when_ the widget is created.

Change-Id: I1178b73ffa7b6e4c25221dca0419c7def78f7bdc
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 12:42:23 +00:00
Alessandro Portale
a1f1451ed1 Welcome[PageHelpers]: Properly load multi-density images
Some icons were pixelated under HighDPI, because missing file extensions
silently broke the multi-resolution loading of icons.

This adds the missing ".png" extensions.

Change-Id: I0cd8883e0ffa1e37a66d25c829ca343160cf3961
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-07-03 11:56:11 +00:00
Cristian Adam
560d63bb37 Wizard: fix Qt Creator plugin wizard
Amends 250d100787

Change-Id: I82b648fefc3bda1a2dab5b83297e024791a805d4
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 11:35:00 +00:00
Christian Stenger
cb299e38e9 Aspects: Fix duplicate global variables
The global variables got added twice for StringAspects.

Fixes: QTCREATORBUG-31183
Change-Id: I3feaf56cbc78bae0bb2da8f5ba5327a2ca038810
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 11:23:08 +00:00
Christian Stenger
49587951aa Debugger: Tweak perspective switcher combo box
On Windows it is hard to figure out which of the items you
want to choose. The popup's menu on Windows just gets the
width of the current item and therefore you may only see
mid-elided items holding a leading and a trailing letter.
This patch makes the popup behave like it does on Linux
or macOS where the width is always wide enough to display
the items correctly.

Change-Id: I53d155fc64b765692c071886cca883f376c86a82
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-03 11:22:49 +00:00
Jarek Kobus
b45e9bdf3a Android: Start avd emulator via detached process
Address the TODO about the process leak.

Before, the process was potentially started in a separate thread.
In this case the done handler of the process could work only
when the thread was still executing, otherwise it couldn't be
invoked because of the missing event loop in a separate thread.
Thus, it was only serving for start process failures which are
raised synchronously.

After the successful start the process thread finished soon,
and then we were losing a handle to the running process.
Later, on shutdown, the process was still running (so a possible
assert from process laucher could have been triggered), and
the emulator process kept running after the Creator shutdown.

This patch executes the emulator process as a detached process.
This makes it possible to continue running the process after
the Creator shutdown without leaking a Process instance.
We also handle the detached process start failure and execute
a message box.

Change-Id: I855d280c257a0cfaca7722a3b1e14d1ead9021f7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-03 10:51:28 +00:00
Christian Stenger
6a2ad83477 Lua: Fix MinGW build
Change-Id: I0d19cf8f9e0e28c0016f5532fdbb1d4b174cfe7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-07-03 10:14:13 +00:00
Christian Stenger
4969fe9921 SquishTests: Add new extensions view as expected
Fixes e.g. accessing the Help view.

Change-Id: If8051ba93d20704670c3bcab60d4d5bcd5d539bc
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2024-07-03 10:14:03 +00:00
hjk
7a678bdf8f Utils: Add function to connect to signals of aspects
Syntactic sugar, similarly to what we have in ActionBuilder, makes
the connect() calls stand less out in user code.

Change-Id: I03d3ff747ef28c31044d804ea7d1e3c83c2e029c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-03 09:56:35 +00:00
Artem Sokolovskii
250d100787 Wizard: Update plugin creation to modern way
- Removed header file and global file as redundant
- Updated github workflow for creating artefacts

Change-Id: I60dc61b660791c57f012e6e38e04b0d84c2cbaf9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-03 09:40:06 +00:00
Christian Kandeler
a425a7dea1 ProjectExplorer: Add support for LLVM/MinGW from the installer
Those are registered as mingw rather than clang.

Fixes: QTCREATORBUG-31156
Change-Id: If4e1d7ceecd9648f768680c92c4cde24c1255600
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-07-03 09:19:44 +00:00
The Qt Project
d3c1cfb49f Merge "Merge remote-tracking branch 'origin/14.0'" 2024-07-03 08:30:27 +00:00
Eike Ziller
eee5411d40 Merge remote-tracking branch 'origin/14.0'
Change-Id: I0d5fd257c10eeb452d8767aba63bb7f7faacd48e
2024-07-03 10:14:34 +02:00
Eike Ziller
5e82334a25 Add Qt version information to developer package
Set a QTC_QT_VERSION variable in the QtCreatorConfig.cmake that we ship
with the development package. It is set to the Qt version that was used
to build that binary package, which can be used for example by
externally built plugins (which need to be built with a compatible Qt
version to that).

Task-number: QTCREATORBUG-31185
Change-Id: I21a94b12da337c46c0d619c8b5f8f9a661ca3525
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-07-03 08:11:28 +00:00
Jarek Kobus
e44ac58a4e TaskTree: Replace global functions with functors
Replace parallelLimit and workflowPolicy functions with
functors in order to make their type consistent with
other global objects, like sequential or parallel.

Change-Id: I0ab2313760a6de1e3fac2b6834774e062ddd5a7f
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 07:37:23 +00:00
Eike Ziller
74eda13a43 Mode: Fix comment regarding contexts
Nowadays all IContext instances of the whole parent hierarchy of the
current focus widget are collected.
Nevertheless it makes sense to just add the current mode's context.

Change-Id: Ia42a693d9b4cd58ac63bb99749b5dfa62f7801aa
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-07-03 07:07:37 +00:00
Jarek Kobus
da218493c7 TaskTree: Introduce a bit more logic (AND and OR against DoneResult)
Introduce AND and OR operators for ExecutableItem
taking DoneResult.

The "task || DoneResult::Success" is an eqivalent to
tweaking the task's done result into success unconditionally.
The "task && DoneResult::Error" is an eqivalent to
tweaking the task's done result into error unconditionally.

Change-Id: Ib9213a786697c1434c37e99e726641baab550523
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 06:53:46 +00:00
Jarek Kobus
d1a4917d29 TaskTree: Compile fix
Fix "Tasking::operator !': redefinition; different linkage" error.

Amends 0f5882f13c
Amends 490410e18d

Change-Id: I5d03b9543c194fc3dc72be89840e70c72f8f2fa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-03 06:53:33 +00:00
Eike Ziller
73e87437c9 Add option to hide individual modes
With e.g. the Extensions mode we add a mode that is probably not
interesting most of the times for most people. The only way to get rid
of modes currently is to disable the plugin that provides it.

Instead add the option to hide modes via the View > Modes menu. Modes
reappear if they are switched to (either via the short cut or other
means, like Debug mode when starting the debugger, or edit mode when
pressing escape often enough).

Change-Id: I56e20849a1f810aea9b5993b04892c915278845f
Reviewed-by: hjk <hjk@qt.io>
2024-07-03 06:06:20 +00:00
David Schulz
bb08762123 Editor: Improve multi text cursor selection
Allow to select text with ctrl+shift+(move operation in a line)

Fixes: QTCREATORBUG-31166
Change-Id: I2ffd02ca4a25e9074cf073d1d7e6639931fe7dc7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-03 04:29:11 +00:00
David Schulz
a2a0a6c481 Editor: avoid overwriting non virtual setReadOnly
the same functionality can be achieved by handling the
QEvent::ReadOnlyChange type event in the TextEditorWidget.

Change-Id: I759c4bcac75e5d572f7a4656bc58c383b9fbc653
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-03 04:28:28 +00:00
David Schulz
2cc5647f38 Editor: replace readOnlyChanged signal with direct call
Change-Id: I3cd2dbdce20c6fe63127281ff836bcc825ae8112
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-03 04:28:22 +00:00
Christian Stenger
79de38d8cb GoCmdBridge: Add to qbs build
Change-Id: Iac64b8e813f90f727c7469073ea491628ab3014d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-07-03 04:09:37 +00:00
Jarek Kobus
490410e18d TaskTree: Introduce a bit of logic (AND and OR)
Introduce operator&& and operator|| taking ExecutableItem
as a second arg.

Both tasks (first and second) execute in sequence.

AND:
- If the 1st task finishes with Error, the 2nd task is skipped
  and the returned item reports Error.
- Otherwise, the 2nd task is executed
  and the returned item reports the 2nd task's result.

OR:
- If the 1st task finishes with Success, the 2nd task is skipped
  and the returned item reports Success.
- Otherwise, the 2nd task is executed
  and the returned item reports the 2nd task's result.

Change-Id: Ib7874a82bd86eeb57fa5d3691b4a9e63a158772f
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 14:50:27 +00:00
Jarek Kobus
0f5882f13c TaskTree: Introduce a bit of logic (NOT)
Introduce ExecutableItem operator!(const ExecutableItem &item).

This operator returns a copy of this executable item
with DoneResult tweaked by negation.

If this item reports DoneResult::Success, the returned item reports
DoneResult::Error.
If this item reports DoneResult::Error, the returned item reports
DoneResult::Success.

Change-Id: Ie609938e92bbc38ddcc66f5bc3244f864e3e59c7
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 14:50:18 +00:00
hjk
43977018b6 CMake: Rename CMakeConfigurationKitAspect{Widget->Impl}
It's not a widget.

Change-Id: I617dd189cbdc815bf9055ab4908dc7239b784e64
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-07-02 14:27:21 +00:00
Jarek Kobus
057a54364d Android: Synchronize startAvd()'s future
This change fixes a possible deadlock on Creator shutdown
after clicking "Start AVD" button from the Android device
settings dialog, and quickly closing the started emulator
window, the settings dialog and Creator (within 2 seconds).

In case of no synchronization we may be starting
new processes in separate thread after the QApplication
has already been destroyed. Blocking run of processes
requires constructing an event loop, which ends up with
the following warnings (and a deadlock):
"QEventLoop: Cannot be used without QApplication"
"QObject::setParent: Cannot set parent,
 new parent is in a different thread".

Add returned future to the global future synchronizer.
Avoid long synchronization of startAvd() on shutdown
by adding an optional future argument to the startAvd() and
pass it to the waitForAvd(). Otherwise, we would need to wait
up to 2 minutes for synchronization to finish.

Change-Id: Ia1d71d309cb2dcdb5e31decfdfdea6df9a117ed5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-02 13:55:57 +00:00
Christian Kandeler
dfbe37542d RemoteLinux: Fix potentially wrong name of deploy tool
... in error messages.
For instance, one could get "rsync crashed" when it was actually sftp,
misleading the user.

Change-Id: I42bcecb8ca21c899ace78eb1397d3e71f2a0bb78
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-02 13:32:09 +00:00
Eike Ziller
67d2789523 Update change log
Change-Id: I963f63601bae4d1723f740be195f12245fd59010
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-07-02 12:50:29 +00:00
David Schulz
e86e5f76a8 ClangTools: properly initialize diagnostic mark without document
After removing the delegating constructor the code in the body of the
called constructor was not executed anymore. Move that code into a
separate function and call it from every constructor to make sure that
the text mark is properly initialized.

Amends d7ed05ae14.

Fixes: QTCREATORBUG-31153
Change-Id: Ic320d470d39a927c3f7027a0041e843cdea5aa9c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-07-02 11:41:20 +00:00
David Schulz
02e3de5bd9 Editor: remove unneeded friend declaration
Change-Id: I710bc165b019e06f0758062b8f32b434d40ce8e7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-07-02 10:50:19 +00:00
Eike Ziller
a4a881eca1 Modes: Make selector style menu items real actions
Allow setting shortcuts etc, and generally unifies the code

Change-Id: I7102be3914209b19b61f06d1166f8d988e797696
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 10:08:27 +00:00
Alessandro Portale
8b1c7d3865 QtSupport: Stabilize Example sets sorting
Design Studio examples entries come without version numbers. The
lessThan implementation was called twice with the same two QDS items.
To my understanding lessThan confused the algorithm by returning
contradicting results.

With this change only different QVersionNumbers are lessThan-ranked.

Change-Id: I24fed43457c1f53c3fea693b20bdf2fd4db44b7a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-02 07:00:52 +00:00
Jarek Kobus
f207707cc9 LinuxDeviceTester: Get rid of unused storage
The storage is now only set, never read -> thus remove it.

Amends 3cd0dad3d4

Change-Id: Icf95c03b923b07ed1a734fe522567d1851231960
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 06:39:39 +00:00
hjk
e28e96eae0 ScxmlEditor: Inline scxmleditorstack.* into its only user
Also de-Q_OBJECT-ify and drop two unnecessary casts.

Change-Id: I8113fc52e96226c3bdd72b36a904775c2fa5f1e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-02 05:53:39 +00:00
hjk
bdcac43936 ExtensionManager: Make some text selectable by mouse
Change-Id: Ic268c80713c4fe7121af32eb0e0bc3ea41ed1660
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-02 05:52:34 +00:00
Christian Stenger
6d4e5a0002 Cppcheck: Treat manual run settings as project settings
Instead of always deriving from global settings store the
settings for the manual run into the project settings.

Fixes: QTCREATORBUG-31092
Change-Id: I7854cff4e71b58225c7e9c1198c4e60128ed07e4
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 05:33:35 +00:00
Christian Stenger
6cb0c69c43 CplusPlus: Silence clang warning
Silences a warning regarding ISO C++20 considering the
overloaded operators as ambiguous.

Change-Id: Ie27a8567899a91ab064a58694105af260addb74b
Reviewed-by: hjk <hjk@qt.io>
2024-07-02 05:33:00 +00:00
Alessandro Portale
157d8f2ca2 Mode icons: Fill the beetle
This reduces the complexity of the beetle, which should make it better
recognizable in various pixel densities.

Change-Id: I1021e497366881847984e32e31c3523207f6498f
Reviewed-by: hjk <hjk@qt.io>
2024-07-01 16:57:27 +00:00