7944 Commits (fd384f334d8ed6725ff818956959b61674b3c327)
 

Author SHA1 Message Date
Adriaan de Groot 04e53be934 [locale] Repair test: don't re-init te occupied-pixels set each loop
- while here, merge Tests.h to the cpp file
- Fix build when debugging timezones (missed during earlier refactor)
5 years ago
Adriaan de Groot 21f97db8fd [libcalamares] Offer translation lookup of regions 5 years ago
Adriaan de Groot ad3c0de936 [libcalamares] Reduce logging in POD manipulation 5 years ago
Adriaan de Groot 296337d45d [libcalamares] Implement nearest-TZ lookup
- This version, based on lat+lon lookup, handles wrap-around the
  globe at -180 W (which is very close to +180 E)
- Test wrap-around-the-globe lookups
5 years ago
Adriaan de Groot 9e274aac07 [libcalamares] Make ZonesModel more QML-friendly
- expose TZ lookup (as a QObject*, which QML needs)
- C++ code should use find(), which is safer
5 years ago
Adriaan de Groot ab69e7c83a [libcalamares] Add API for geographical lookup
- find a zone given lat, lon -- with a failing test and a bogus
  implementation.
5 years ago
Adriaan de Groot 626dd038da [locale] Re-do locale module with new TZ data
- The Config object now uses the re-done models and timezone data
- most of the properties of the locale Config are unchanged
- much less complication in extracting data from the zones model
5 years ago
Adriaan de Groot d814a3dba8 [libcalamares] Sort the models before use
- zones and regions alphabetically by key
5 years ago
Adriaan de Groot 37c211fd14 [libcalamares] Add an iterator for the full zones model 5 years ago
Adriaan de Groot 7ea2ad7dc6 [libcalamares] Add accessors for TZ data and region in the model
It's convenient when e.g. QComboBox::currentData() gets the key
"automatically", and the default role for that method is UserRole,
so let the value of KeyRole overlap.
5 years ago
Adriaan de Groot 245d4a8ef7 [libcalamares] Add a find() to ZonesModel
- Look up TZ data by region and zone name.
5 years ago
Adriaan de Groot 478a275764 [libcalamares] Make TimeZoneData public
- Also make it a QObject so we can add properties and make it useful
  for QML consumption.
5 years ago
Adriaan de Groot 10fb5b95c7 [libcalamares] Split out CStringPair into TranslatableString
The (renamed) class TranslatableString keeps a key value
(e.g. New_York) and a human-readable version around; the
human-readable one is passed through QObject::tr() for translation
on-the-fly.
5 years ago
Adriaan de Groot 3e32335511 [libcalamares] Introduce a filtering model per-region 5 years ago
Adriaan de Groot 1afdcc9c82 [libcalamares] Give zones data, too
- while here, fix bug in TimeZoneData that didn't munge names
  (so it reported "New_York")
5 years ago
Adriaan de Groot 33e39b92fb [libcalamares] Satisfy test, return region names 5 years ago
Adriaan de Groot 609ea8350c [libcalamares] Failing test: there is data in the regions model 5 years ago
Adriaan de Groot 82cc652f55 [libcalamares] Re-done zones loading
- just make one big list of zones, one short list of regions
- the models are non-functional right now
5 years ago
Adriaan de Groot ca40d2e2d9 [libcalamares] Introduce a failing test for the number of regions 5 years ago
Adriaan de Groot fce05acf1e [libcalamares] Rip out all the TZ models
- The models are overly complicated: **overall** there is just one
  list of timezones, and we need various views on that list.

Start over with an empty model of regions.
5 years ago
Adriaan de Groot 5066624a8e Merge branch 'issue-1471' into calamares
FIXES #1471
5 years ago
Adriaan de Groot 082770032f [hostinfo] Massage test to handle ARM
- there **is** another source of information about the CPU,
  so in the test use that to cross-check what hostCPU() says.

NB: it's probably a good idea to fall back on the same file
    in hostCPU() for better accuracy.
5 years ago
Adriaan de Groot 272cf099be [hostinfo] Try to recognize ARM as well
- /proc/cpuinfo is a terrible information source; it contains very
  different information on x86 from arm (testen on rpi4 and rock64).
5 years ago
Calamares CI b8530c2c08 i18n: [python] Automatic merge of Transifex translations 5 years ago
Calamares CI ee3f308686 i18n: [calamares] Automatic merge of Transifex translations 5 years ago
Adriaan de Groot b49b9a66e6 [users] Drop data-access from the Page
- get username, password etc. from the config object, not the page
- jobs now depend entirely on config
- handle logic of "what's the root password" in Config
5 years ago
Adriaan de Groot eb72d662d1 [users] Add password fields to Config
- no checking is done for validity, and there is no password-status
5 years ago
Adriaan de Groot b2b9ae7799 [users] Add tests for moved password-check configuration
- link the PW checks to the test, and libpwquality if needed
- test only does very basic config-mungeing
5 years ago
Adriaan de Groot 900deb5dc8 [users] Move the configuration of password checks to Config
- the Widget (Page) does not need to know the password checks,
  that's business logic that belongs to Config.
5 years ago
Adriaan de Groot 7b87242107 [users] PW checking does not need widgets 5 years ago
Adriaan de Groot 0ecf1e1cc1 [users] Drop default parameter for badness 5 years ago
Adriaan de Groot fcafe5db8f [users] Test the moved setHostname Config
- document that the default for writeHostsFile is *true*
5 years ago
Adriaan de Groot 2efce1ac7a [users] Move the hostname-setting config
- The configuration for writing the hostname (to /etc/hostname,
  to /etc/hosts and possibly to systemd-hostname) is read-only,
  because it comes from the config file and won't change after.
5 years ago
Adriaan de Groot 32e3933355 CMake: stop clobbering config files
When CMake runs, configure_file() will clobber the config files in
the build/ directory, which is annoying during testing: you need
to keep making the same edits, or edit the source.

- Introduce new behavior: the config file is **not** overwritten unless
  the source file is newer. This means that edits to config files
  in the build directory are preserved.
- If INSTALL_CONFIG is **on** then the files are clobbered anyway (the
  source is considered new regardless).
5 years ago
Adriaan de Groot f7102527a8 CMake: stop clobbering config files
When CMake runs, configure_file() will clobber the config files in
the build/ directory, which is annoying during testing: you need
to keep making the same edits, or edit the source.

- Introduce new behavior: the config file is **not** overwritten unless
  the source file is newer. This means that edits to config files
  in the build directory are preserved.
- If INSTALL_CONFIG is **on** then the files are clobbered anyway (the
  source is considered new regardless).
5 years ago
Adriaan de Groot a8c4f5b758 CMake: fix up warnings from the LibPWQuality module
- don't include other find modules
- pkgconfig isn't totally necessary, it might work without
5 years ago
Adriaan de Groot 35dff4d12c [users] Migrate reuse-password and password-strength to Config
- add the "reuse user password for root" setting to Config,
  make the UI page follow that setting.
- add the require-strong-password default and toggle settings to
  Config; this is not well-checked yet.

On the widget / UI side, connect checkboxes only if they are
visible; refactor reuse-user-password-for-root settings.
5 years ago
Adriaan de Groot 44bc61d4be [users] set up Config object before widget 5 years ago
Adriaan de Groot 05f3fbea05 [locale] Apply SPDX headers 5 years ago
Adriaan de Groot 3f1b31e352 [libcalamares] Explicit tests for Interlingue
- The language code "ie" is not recognized,
- "ia" is, and it seems to be the post-war variant of
  Interlingue, so we may want to rename / relabel.

The testEsperanto test -- now split into scripts and
esperanto -- would have picked "ie" out of the list
because it does map to C locale.
5 years ago
Adriaan de Groot b27bc11975 [libcalamares] Merge locale tests files
- No need for a separate .h in most test cases
5 years ago
Adriaan de Groot 29cfcb01da i18n: suppress Interlingue
- like Esperanto before Qt 5.12, Interlingue does not
  seem to be supported by QLocale, so it gets turned into
  "C" locale, which then messes up the default language
  selection in the welcome page.

Move it to _incomplete until QLocale does support it.

FIXES #1475
5 years ago
Adriaan de Groot 320779ccbe [libcalamares] Document Job::prettyDescription
The TODO said it was unused: it **is** used, but only in
a very limited scope. Drop it from jobs where it wasn't
useful (e.g. those that just return prettyName(), outside
of the partition module).
5 years ago
Adriaan de Groot 88e5e98d29 [libcalamares] Use consistent type alias (Descriptor) 5 years ago
Adriaan de Groot ea709aab59 [libcalamaresui] Swap out unstructured string for structured data 5 years ago
Adriaan de Groot b5c0158ec2 [libcalamares] Some if-method-exists trickery
This builds some machinery so that we can create
a detector for member-functions (methods) named <whatever>.
Use the macro to build the machinery:

DECLARE_HAS_METHOD(myFunction)

then after that,

has_myFunction<T>

is either std::true_type or std::false_type
depending on whether T has a method myFunction.
5 years ago
Adriaan de Groot 7b6ff8dd37 [libcalamares] Minor tests for parts of RAII 5 years ago
Adriaan de Groot 0902c74809 [hostinfo] Editorialize on the tests
- the implementation understands Intel and AMD, but the test
  was written for my desktop machine (which fails elsewhere).

SEE #1471
5 years ago
Adriaan de Groot b1b81f27cc Merge branch 'issue-1297' into calamares
This does **not** result issue-1297, but brings in some
prep-work and pleasant clean-ups.
5 years ago
Adriaan de Groot 41ce42cd4b [partition] Drop InstallChoice enum from Page
- The enum for install choice was copied into PartitionActions and
  used in the Config object; its definition does not belong in the UI.
- Chase the renamings required.
5 years ago