If the hostname changes while the field has focus, that means
that the user is typing in the field, and we shouldn't mess
with the cursor position.
FIXES#1884
- use clang-format12 or 13 or unversioned executable, only
- check it's actually 12 or 13
- set language standard explicitly to C++17, "Cpp11" is now
an alias for "latest" which is weird
This change does lead to some thrashing when applying styles,
so I'm not going to do that across the board right now. Changes include:
- extra spaces in lambda-captures
- nicer alignment of lambda-bodies
- if nothing is selected (index -1, which now shows the placeholder), the text is empty
- if something has been entered, return it (e.g. if the user is typing)
- if something is selected, the text gets set to that anyway
The warning about the mount point -- that it was in-use or
invalid -- had been separated from the drop-down by the
FSLabel field. Move it back, rename the variable for
clarity while we're at it.
- make the boxes expand, rather than stick to a minimum
size that doesn't align with other boxes in the dialog,
and which may be too small to contain the text they display.
Avoid logs like
23:29:57 [2]: void Config::setConfigurationMap(const QVariantMap&)
WARNING: Configuration for *initialSwapChoice* is not one of the *userSwapChoices*
WARNING: .. Choice "small" added.
where the label is duplicated.
There is a mismatch between how the configuration interprets
*initialSwapChoice* when it is not a valid choice, and how
the UI interprets it. If you e.g. do not have a *userSwapChoices*
setting at all, whatever *initialSwapChoice* is set is interpreted
by the UI as "suspend".
Avoid that by putting the choice in the configuration and
warning the user (which ought to be a warning to the distro).
FIXES#1881
- mark some TODO
- tighten up the YAML schema a little bit
- when unset, use 'quiet' rather than empty, to preserve compatibility
with existing configuration files.
SEE #1882
This is the infrastructure bit; if someone can come up with a way
of **meaningfully** detecting support, the detection function can
be given a better implementation.
FIXES#1725