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>
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>
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>
The storage is now only set, never read -> thus remove it.
Amends 3cd0dad3d4
Change-Id: Icf95c03b923b07ed1a734fe522567d1851231960
Reviewed-by: hjk <hjk@qt.io>
Also de-Q_OBJECT-ify and drop two unnecessary casts.
Change-Id: I8113fc52e96226c3bdd72b36a904775c2fa5f1e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
Silences a warning regarding ISO C++20 considering the
overloaded operators as ambiguous.
Change-Id: Ie27a8567899a91ab064a58694105af260addb74b
Reviewed-by: hjk <hjk@qt.io>
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>