- 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
- From the debug-window, clicking *reload stylesheet* does just
that, and applies the new stylesheet to the Calamares window.
- Remove stylesheet caching from the Branding class; we only
need the sheet once (on Calamares startup) or when updating
the stylesheet, which is seldom-enough that we don't need
to keep an extra copy around.
- To use, start Calamares, open the debug window, open stylesheet.qss
in an editor. Make changes, save, then click *reload stylesheet*.
SEE #1149
- Adds another tool to the debug window, which dumps (to the debug
log) a tree-like view of all the widgets in the application.
This can be used when writing stylesheets.
- allows you to use -- at runtime -- values from os-release in the
branding file.
- WIP because the only machine I have with sufficiently new KF5
is the FreeBSD box.
- Do the checking for IsMap inside loadStrings() and use
YAML::Exception to get to bail() (since we're already dealing
with exceptions here, no extra costs). This tidies up the code
somewhat.
- Don't need an extra indirection from WITH_KF5Crash to WITH_KCRASH,
just use the cmakedefine directly.
- Since the setting is only used in main.cpp, move the define
down there and remove cmakedefine entirely.