- From an exec section, next() is called automatically when
all the jobs in that section are done.
- If there **is** no next section (e.g. there's no finished
page to show after the exec), then m_steps.at() would assert
on an out-of-range index.
- Introdcuce a helper predicate isAtVeryEnd() which handles both
out-of-range and normal at-the-end scenarios.
- If there's no page following the exec section, stay with the
slideshow but update buttons to match the normal last-page
behavior, and don't ask about cancel (since we're done).
- This avoids processes that wait on stdin, and e.g. improves
reaction to having just "cat" (no file) in a command, or
a package manager that asks for input.
- JobQueue is only needed to get global settings, which are needed
when running in the target; for host commands, allow running
without a queue.
- Settings is needed for the value of debugsettings; assume if
there's no settings object, that we're in a test and should
print debugging information.
- This is the same as EFAIL: a block is indented as if it's a multi-
line else block. This isn't Python though, and the return always
applies.
- Add the necessary braces.
- Apparently noone uses this code path (until ProcessJob was re-
factored to do so).
- Use the system runCommand() instead of a 90% copy of it.
This **does** change the overall command to `env /bin/sh -c`
rather than running only `/bin/sh -c`, though.
- Replace magic numbers like -3 with named enum values
(NoWorkingDirectory, for -3).
- Downside is big-ugly static_casts, but that's what you get
for having an int as return value for processes.
- This solves a crash where the thread is destroyed while still
running (e.g. cancelling during install).
- The thread might not cooperate in being terminated, but then we
have a bigger problem anyway (and Calamares will still crash on
exit).
FIXES#1164
- The static destructor issues a warning on exit:
QBasicTimer::start: QBasicTimer can only be used with threads
started with QThread
so instead, heap-allocate the model. This leaks memory, but
it's a singleton *and* we're exiting anyway.
- after model resets, restore what was previously selected.
- This avoids having an **empty** combobox, SEE #1141 but does
not actually set it back to the value the user had previously
picked (e.g. changing swap settings **still** breaks the
selection).
- d78bc0c5 added an early `return false` when cancel is disabled,
before checking if we were at the last step; so last-step
didn't get any special handling.
- refactor so that last-step now gets special handling first,
**then** disable-cancel handling, and then the usual case.
- Avoid races which might double-delete the timer, or enter
the if twice (which would lead to duplicate emissions of
requirementsComplete and the associated UI glitches).
If the requirements checking is **really fast**, e.g. you don't
have a check for internet connectivity, then the checks
might be done as fast as the 0-timeout single-shot timer,
which means that finished() is called once by the QFutureWatcher,
and then after that by the QTimer .. leading to two messages
"All requirements have been checked", but also twice
requirementsComplete being emitted, so you end up with two
results lists being added by the CheckerContainer.
Stop that by using the results-progress timer as an additional
flag: the first time everything is complete, delete that timer
and set the pointer back to nullptr.
- In debug mode, hitting assert(false) is meaningless,
- In release mode, the assert is optimized out.
- So assert the condition we're actually testing, for better messages.
- It's ok to use path / filenames in images, but you can also
use icon names according to the FDO icon spec. This makes
sense for at least *productLogo*, possibly *productIcon*, but
not really for *productWelcome*.
- Using next and back buttons calls onActivate() on the view step
that you end up on.
- The first view step to be shown, though, doesn't get an onActivate()
(unless you go, say, next and then back).
- Explicitly call onActivate() on the first view step once they're
all loaded.
FIXES#1156
- Branding images might want to use os-release data as well.
- Refactor a little to keep the number of #ifdefs the same;
an intermediate expand() lambda handles expansion (or not,
if it's not enabled).
FIXES#1153