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>
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>
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>
... to simplify the user code.
Some, but not all, potential beneficiaries are adapted.
Change-Id: Ia7d514a0114a4f99f8ee745523435f5b990bd095
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
This sets no context, i.e. effectively does not do anything.
Change-Id: I5f2e30f61fd5547f71cd69a43667c21ea4d06c77
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
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>
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>
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>
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>
The global variables got added twice for StringAspects.
Fixes: QTCREATORBUG-31183
Change-Id: I3feaf56cbc78bae0bb2da8f5ba5327a2ca038810
Reviewed-by: hjk <hjk@qt.io>
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>
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>
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>
Those are registered as mingw rather than clang.
Fixes: QTCREATORBUG-31156
Change-Id: If4e1d7ceecd9648f768680c92c4cde24c1255600
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>