Commit Graph

6160 Commits

Author SHA1 Message Date
Adriaan de Groot
ce6f6592d4 [libcalamares] Drop parts of InstanceKey API
- Drop the 1-argument QString constructor, it is suprising
 - Drop the conversion to QString
 - Add a toString() instead
 - Drop tests for the removed API
 - While here, apply code formatting to the tests

This is done to force consumers to update to strongly-typed
InstanceKeys.
2019-09-15 20:38:16 +02:00
Adriaan de Groot
7dcc6e8e07 [libcalamares] Fix bug in InstanceKey::QString 2019-09-15 20:38:16 +02:00
Adriaan de Groot
57e4b66af2 [libcalamares] Test QString() operator
- An invalid InstanceKey should give an empty string
 - Test remaining QString() cases
 - Edge cases for 2-string constructor
2019-09-15 20:38:16 +02:00
Adriaan de Groot
ba7e96c5e1 [libcalamares] Add test for InstanceKey
- cover all the constructors
 - Start with some tests that fail, showing bugs in the implementation
 - Fix bug that "derp@derp" was creating a valid instance-key with
   a bad module and id (need to use ::fromString() to get that
   functionality).
 - Extend tests with more bad cases.
 - Refactor tests to simplify "this is bad" assertions.
2019-09-15 20:38:16 +02:00
Adriaan de Groot
2f99004041 [libcalamares] Move the module instance-key
- Split out of the UI library and into (header-only) libcalamares.
2019-09-15 20:38:16 +02:00
Adriaan de Groot
666462651b [libcalamares] Namespace consistently
- Things in libcalamares/ subdirectories are namespaced
   according to that subdirectory (sometimes in namespace
   Calamares, sometimes CalamaresUtils). Do that in modulesystem/ too.
2019-09-15 20:38:16 +02:00
Adriaan de Groot
78de6776af [libcalamaresui] Swap out use of QString for ModuleInstanceKey
- The strings `module@id` are used internally, make that type explicit.
2019-09-15 20:38:19 +02:00
Adriaan de Groot
b8dd6e9ae7 [libcalamaresui] Introduce a module-instance-key class
- This replaces rather ad-hoc use of a QString as key.
2019-09-15 20:38:16 +02:00
Adriaan de Groot
e1aced56fd Changes: fix typo's 2019-09-14 08:01:44 -04:00
Adriaan de Groot
0c14bbc50b Merge branch 'locale-polish' 2019-09-14 07:56:52 -04:00
Adriaan de Groot
57a942d155 [libcalamares] Make a NAM per thread
- To avoid warnings about creating requests and replies, parented
   by the NAM but from another thread, make a NAM per thread.
2019-09-14 07:21:24 -04:00
Adriaan de Groot
ca351ff7b6 [libcalamares] Apply (some) options to request earlier 2019-09-10 14:26:46 +02:00
Adriaan de Groot
11d3f10e26 [locale] Dispose of waiting widget
- Do the async GeoIP checking in the async requirements-checking phase
 - Do not return any requirements results -- we just need the async bit
 - Drop the waiting widget, since it's not needed (done by the
   requirements phase)
2019-09-10 14:18:47 +02:00
Adriaan de Groot
41ece863de [locale] Create widgets when needed instead of at startup
- this blocks forever, since now the GeoIP lookup isn't done at all.
2019-09-10 06:19:20 -04:00
Adriaan de Groot
0a1dc77f9b [locale] Hang on to GeoIP::Handler just once
- replace configuration settings by putting them in an object
 - use unique_ptr to allow us to create one optionally.
2019-09-10 11:26:47 +02:00
Adriaan de Groot
d70d418d92 [locale] Refactor setting of LC entries 2019-09-07 17:02:59 +02:00
Adriaan de Groot
5cac3ac6ad [locale] Apply coding style 2019-09-07 16:58:37 +02:00
Adriaan de Groot
0ee8427d5a [locale] Remove old-style GeoIP configuration 2019-09-07 16:05:09 +02:00
Adriaan de Groot
5a24e45e3b [locale] Factor out a simple lambda
- If this was handed to an algorithm it would make more sense
   as a lambda
2019-09-07 15:58:56 +02:00
Adriaan de Groot
3093f635e2 [locale] Apply coding style 2019-09-07 15:48:22 +02:00
Adriaan de Groot
21dde80a65 [locale] Refactor button handling to plain methods 2019-09-07 15:47:12 +02:00
Adriaan de Groot
91f0509272 [locale] Refactor lambdas to plain methods
- Lengthy lambda's doing UI stuff -- that doesn't change --
   are easier to read as plain methods.
2019-09-07 15:18:58 +02:00
Adriaan de Groot
782b469974 [locale] Move all the translation work to a single slot 2019-09-07 12:38:49 +02:00
Adriaan de Groot
a57a030ee2 [packagechooser] Massage the list view to be narrower 2019-09-05 06:41:06 -04:00
Adriaan de Groot
4259bc9d5d [packagechooser] Also use screenshot from no-package-selected 2019-09-05 03:23:50 -04:00
Adriaan de Groot
52e72f4fb1 [welcome] Apply coding style 2019-09-05 03:23:28 -04:00
Adriaan de Groot
88fc6685ba [libcalamares] Apply coding style to geoip/ 2019-09-05 03:23:28 -04:00
Adriaan de Groot
01c4383178 [packagechooser] Simplify parameters
- Just pass the no-package-selected item around.
2019-09-04 19:40:35 +02:00
Adriaan de Groot
996714dd06 [packagechooser] Use all translations for no-package-selected
- If there is an item with id "" (empty), it is used as the
   "no-package-selected" placeholder text.
 - Existing code iterated over the abstract model and used the
   name and description at the time the model was set -- but
   by getting the name and description from the model, only
   a single string was obtained instead of the full range
   of translations.
 - Therefore, when arriving on the page, the "no-package-selected"
   information was displayed from the translation that was active
   when the model was set.

Instead, extend the non-abstract model so we can find the no-package-
selected item and pass that explicitly to the page.

FIXES #1241
2019-09-04 19:33:24 +02:00
Adriaan de Groot
c2f1070f2a Merge branch 'translate-packagechooser'
FIXES #1228

The label on the left can now be specified (and translated)
in the config file. The strings corresponding to "nothing
selected" from PackageChooserPage.cpp L33-34 can already
be specified in the *items* section.
2019-09-02 15:30:41 +02:00
Adriaan de Groot
019d1c36c6 [packagechooser] Load translated strings from config
- Apply the *labels* from the configuration file to the
   visible strings (only the ViewStep name).
2019-09-02 15:29:00 +02:00
Adriaan de Groot
0eae72e10f [packagechooser] Introduce translatable labels
- Since the package chooser might be used more than once, or for
   more specific items than "Packages", introduce a way to provide
   specific strings for display.
 - The only string needed is the ViewStep name, since the item with
   id "" can be used for the no-selection item.
2019-09-02 15:28:15 +02:00
Adriaan de Groot
65d23cd94c Merge branch 'more-networking' 2019-09-02 14:11:53 +02:00
Adriaan de Groot
9850e4b35b [netinstall] Use the network-manager
- use asynchronousGet and keep the reply
 - drop unused includes
 - apply current coding style
2019-09-02 14:10:36 +02:00
Adriaan de Groot
badbdf59ee [libcalamares] Build synchronous get w/ async-get 2019-09-02 13:43:10 +02:00
Adriaan de Groot
f8356a6dcc [libcalamares] Add an async get method
- Mostly a "cheap" wrapper for a half-dozen boilerplate lines
   of Qt NAM code.
2019-09-02 12:21:33 +02:00
Adriaan de Groot
543e2d34fc [libcalamares] [locale] Remove unused includes 2019-09-02 12:02:43 +02:00
Calamares CI
3eb5c00e13 i18n: [python] Automatic merge of Transifex translations 2019-09-02 10:52:45 +02:00
Calamares CI
617a62c18a i18n: [calamares] Automatic merge of Transifex translations 2019-09-02 10:52:44 +02:00
Adriaan de Groot
c7cbba3951 [welcome] Fix typo in tooltip 2019-08-30 22:54:28 +02:00
bill-auger
1513934a57
add checkbox to disable password validations 2019-08-30 08:13:33 -04:00
Adriaan de Groot
c9ab0524e2 Changes: post-release housekeeping 2019-08-30 13:38:00 +02:00
Calamares CI
36d64b0944 i18n: [python] Automatic merge of Transifex translations 2019-08-30 13:17:14 +02:00
Calamares CI
64a5a30199 i18n: [calamares] Automatic merge of Transifex translations 2019-08-30 13:17:14 +02:00
Adriaan de Groot
f156a683a8 Changes: pre-release housekeeping 2019-08-30 06:41:48 -04:00
Adriaan de Groot
66ee6ac673 [libcalamares] Fix tests for umask != 022
- My usual test environment has umask set to 022, but on one dev
   box it is 002, leading to test failures (which show the test
   was bad, not that the umask-setting code is bad)
2019-08-30 06:35:53 -04:00
Adriaan de Groot
9053b9cecf [libcalamares] Fix Qt 5.9 compatibility
- not really sure why I went for the Qt 5.10 STL-style iterators

FIXES #1236
2019-08-30 06:20:45 -04:00
Adriaan de Groot
61482b38cc Changes: give credit for this cycle 2019-08-29 16:28:00 +02:00
Adriaan de Groot
b685583060
Merge pull request #1226 from a-wai/fix-unpackfs-for-rootfs
[unpackfs] Enable to use "/" as a source
2019-08-29 10:25:32 -04:00
Adriaan de Groot
1d9177c5a3
Merge pull request #1230 from bill-auger/patch-1
add esperanto branding translations, fix mis-configured ones
2019-08-29 09:06:05 -04:00