Commit Graph

72811 Commits

Author SHA1 Message Date
Christian Stenger
c43508417d Lua: Fix translation context
Change-Id: Id824eaa3c64d31e693828d90d4c0abbe7ce8dda9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-05 07:03:39 +00:00
hjk
dee951cf3e Android: Don't override IContext::widget() unnecessarily
Gets in the way of simplifying IContext handling.

Change-Id: I30961202164062743d9b9ddad34f95b25360f395
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-05 06:50:56 +00:00
hjk
9fcd388c9b QmlDesigner: Remove ineffective code
IContext::context() returns a copy by value. Adding to that does not
change IContext's internal m_context, i.e. these lines are effectively
no-ops.

Assuming that it currently "works", the setup probably happens
elsewhere, and this code is superfluous.

Change-Id: Idf33c769eed98bfa34a6def7649c8280f1551716
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit 756e4dbb24)
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-04 16:30:10 +00:00
Tim Jenssen
d3227dbba8 QmlDesigner: fix missing include
Change-Id: I7499a67e4202b6a4ffbf019b1b32966b4d619875
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-04 16:24:10 +00:00
Alessandro Portale
d6092e41ce Mode icons: Decrease the size of the "Cancel build" square
It is now 8px big and has a corner rounding of 1px.

Task-number: QTCREATORBUG-31080
Change-Id: I7b50707f021160b9de76185aad357000398bf5d2
Reviewed-by: hjk <hjk@qt.io>
2024-07-04 15:12:29 +00:00
Christian Kandeler
04744d61b2 ProjectExplorer: handle compile output in chunks again
Task-number: QTCREATORBUG-30135
Change-Id: I8cc44544ee09475efe5bfb9c44e9495c1b33653f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-07-04 14:44:57 +00:00
hjk
f92cb1ad7d Utils: Separate non-widget related base code from layoutbuilder
Change-Id: Ie7e7d413ed8cd4af8cdfc88c35fbdd9944d5e8b4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-04 12:56:52 +00:00
hjk
2c40765e86 Core: Add a static IContext::attach() function
... to simplify the user code.

Some, but not all, potential beneficiaries are adapted.

Change-Id: Ia7d514a0114a4f99f8ee745523435f5b990bd095
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-04 10:09:53 +00:00
hjk
d58780213d TextEditor: Remove BaseTextEditor::setContextHelp()
This is never called, neither directly nor indirectly via the
IEditor/IContext base classes.

Change-Id: Ie68595598c36dbbc6d0e3eb84aea756ed0e66029
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-07-04 09:58:23 +00:00
Alessandro Portale
9f528acc48 ExtensionManager: Display the compatibility version extensions
Fixes: QTCREATORBUG-31198
Change-Id: I0a715bd4d5a8981fba294bb4556fc31fccf6150b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-07-04 09:52:16 +00:00
Alessandro Portale
d34ca7d2d7 ExtensionManager: Use description text for searching
The current code silently failed to add the description text to the
search role. This change fixes it.

Change-Id: I33e5554ac1ff2b11f9610843b566698551a6e0a1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-07-04 09:51:48 +00:00
Vikas Pachdha
5334158beb QmlDesigner: Add headless QML theme generator
Task-number: QDS-11956
Change-Id: Ibc8058dd5e8ac5f8363efdd9007d267ce2bf9685
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-07-04 09:16:25 +00:00
hjk
62ce36b235 QmlProjectManager: Remove DesignModeContext
This sets no context, i.e. effectively does not do anything.

Change-Id: I5f2e30f61fd5547f71cd69a43667c21ea4d06c77
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-04 07:53:21 +00:00
hjk
756e4dbb24 QmlDesigner: Remove ineffective code
IContext::context() returns a copy by value. Adding to that does not
change IContext's internal m_context, i.e. these lines are effectively
no-ops.

Assuming that it currently "works", the setup probably happens
elsewhere, and this code is superfluous.

Change-Id: Idf33c769eed98bfa34a6def7649c8280f1551716
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-04 07:50:09 +00:00
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
Miikka Heikkinen
3fd293a567 QmlDesigner: Release MouseArea3D grab when hover leaves the parent view
Now we clear hovered state for MouseArea3D and remove it as a global
grabber instance when it gets HoverLeave event.

Fixes: QDS-13178
Change-Id: I8b69c39f54165fe1cb6f3dbaa75b19330446de77
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-07-04 06:53:12 +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
Marco Bubke
90b4c043a2 QmlDesigner: Fix nullptr access for m_qmlBackEnd
Change-Id: I23b45cd64f0af1b04b0e46ecafbf5af8995066fe
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-07-03 14:38:51 +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
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
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
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
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