Commit Graph

7165 Commits

Author SHA1 Message Date
Adriaan de Groot
bf7eed9342 [partition] Tidy debug output when creating table 2021-06-18 15:50:13 +02:00
Adriaan de Groot
fb7e6101ff [partition] Hook erase-fs-type changes to the config-object 2021-06-18 13:53:47 +02:00
Adriaan de Groot
7ce2a87644 [partition] Fix build
- fsName was a QString (a copy) so it could be modified;
- the modification isn't really necessary.
- While here, pick up new PointerSetter convenience class.
2021-06-18 13:49:39 +02:00
Adriaan de Groot
ef436ac4d7 [libcalamares] add a convenience optional-setter for use with pointers 2021-06-18 13:49:08 +02:00
Adriaan de Groot
2a0d4e5a23 [partition] Initialize pointers in declaration 2021-06-18 12:35:15 +02:00
Adriaan de Groot
26cabbb3e4 [partition] refactor config-reading from availableFileSystemTypes 2021-06-18 12:18:04 +02:00
Adriaan de Groot
cd804470b5 [partition] Canonicalize the FS choice for erase 2021-06-18 11:51:33 +02:00
Adriaan de Groot
d8a862ec82 [partition] Use Q_EMIT 2021-06-18 11:31:53 +02:00
Adriaan de Groot
4fa61249a8 [partition] Make the fs type used for erase, a config property 2021-06-18 11:29:36 +02:00
Adriaan de Groot
9fa5ab04e5 [partition] Apply coding style to core/ 2021-06-18 11:23:27 +02:00
Adriaan de Groot
f9659989b1 [partition] rename findFS
Rename findFS -> canonicalFilesystemName because that's what it actually
does. While here, apply coding style to the files that are affected.
2021-06-18 11:09:11 +02:00
Adriaan de Groot
546253d750 [partition] Apply coding style 2021-06-18 11:00:15 +02:00
Adriaan de Groot
cc0e39db56 [calamares] Inject a pre-script when testing Python modules
Co-opt the subprocess module and replace call and check_call
functions with something that logs the call and does nothing.
2021-06-15 23:56:58 +02:00
Adriaan de Groot
629fc83f21 [libcalamares] Add a pre-script for PythonJobs
This allows injecting arbitrary Python code before
the script of a module is even run. For testing
purposes, that gives us a chance to modify existing
(internal) modules before the script (e.g. to test
subprocess calls).
2021-06-15 21:50:59 +02:00
Adriaan de Groot
69cad09a00 [calamares] Tighten debug-output from module-loader test executable 2021-06-15 21:23:57 +02:00
Adriaan de Groot
7b297a0e16 [mount] Rename test file, re-jig tests for mount 2021-06-15 21:11:07 +02:00
Adriaan de Groot
846936357b [mount] If no btrfs layout at all, use something reasonable
This is related to https://invent.kde.org/neon/neon/calamares-settings/-/merge_requests/1
which adds .. the default things from the example configuration to the
configuration file KDE neon ships. The default layout doesn't add
any subvolumes at all, which seems to be non-functional.

If nothing is configured, complain and use /@ as the lone subvolume.
2021-06-15 20:43:44 +02:00
Adriaan de Groot
9ef22f4168 Merge branch 'calamares' of https://github.com/LordTermor/calamares into pr-1667 2021-06-15 11:48:33 +02:00
Adriaan de Groot
6ee0da41c8 [libcalamares] Avoid deprecation warning in network attributes 2021-06-15 11:45:29 +02:00
Adriaan de Groot
f0a25bd397 [libcalamares] Avoid warnings from deprecated country codes.
The Qt documentation does not mention @since for these values,
so we're going to let CI catch them.
2021-06-15 11:41:17 +02:00
Adriaan de Groot
dba346be7a [partition] Fix build in non-debug settings 2021-06-08 19:51:25 +02:00
Adriaan de Groot
4f70568c65 [partition] Remove unneeded includes 2021-06-08 15:05:44 +02:00
Adriaan de Groot
63c6a8bac8 [partition] Remove unneeded includes 2021-06-08 14:18:28 +02:00
Adriaan de Groot
f67c7f900c [partition] Make the expanded (pop-up) icon sizes for devices a bit smaller 2021-06-08 14:14:11 +02:00
Adriaan de Groot
df634573bf [partition] Resize combo box to show whole pop-up
The (collapsed) combo box should be wide enough to show the
entire pop-up (expanded) box data.

FIXES #1700
2021-06-08 14:09:31 +02:00
Adriaan de Groot
eb627bc055 [partition] Avoid crash when PARTITION_UNSAFE is on
PARTITION_UNSAFE is a debug mode. It is not used in
production, because it allows you to pick an install
device that would be dangerous (e.g. the current / device).

Existing code kept two copies of a list of pointers,
and deleted pointers from one of the lists and returned
the other -- which now contains dangling pointers.

Refactor by applying suitable lambdas to a single
copy of the list; this avoids copying the list so
there is no danger of dangling pointers.
2021-06-08 13:22:56 +02:00
Adriaan de Groot
a57a1fdbd8 [partition] Improve logging while collecting devices 2021-06-04 13:32:22 +02:00
Adriaan de Groot
cf341c53fa Merge branch 'calamares' into improve-partition 2021-05-25 17:37:15 +02:00
Adriaan de Groot
78af510535
Merge pull request #1708 from demmm/calamares
[localeq], working Offline.qml
2021-05-31 11:48:10 +02:00
Adriaan de Groot
b68e535131 [libcalamares] Log to file and stdout consistently
- The log **file** got every QDebug object, while stdout only
  got the ones of sufficient logging level. A CDebug object checks the
  logging level before writing anything -- so those already were
  consistent, but any qDebug() in the program (not cDebug()!) would
  reach the writing-function anyway, and so log to the file.
  Fix this weird inconsistency by checking log-level just once,
  for both writes.
2021-05-31 11:39:13 +02:00
Adriaan de Groot
716328cafb [libcalamares] Un-clog Logging
- Map QtMsgType -- used by qDebug() and qWarning() -- to levels used
  by Calamares in a consistent fashion.
- Drop unused log levels (INFO, EXTRA unused in any Calamares code).
2021-05-31 11:26:49 +02:00
Adriaan de Groot
a72d59d23b [partition] Don't mention IRC support for weird configs 2021-05-31 10:38:37 +02:00
Adriaan de Groot
2d8cf6aabf [partition] Fix build against KPMCore3 2021-05-26 16:36:28 +02:00
demmm
72f97ac163 [localeq] Offline.qml visual improvements 2021-05-26 12:38:08 +02:00
Philip Müller
2c99a8c6f8
[displaymanager] add cutefish
- more info at https://cutefishos.com/
2021-05-26 09:36:02 +02:00
demmm
ffe3209121 [localeq], working Offline.qml 2021-05-25 22:52:10 +02:00
Adriaan de Groot
01911beccc [partition] Expand debugging output
The partition path isn't set yet, so is probably 'empty'. Try logging the device, too.
2021-05-25 14:16:28 +02:00
Adriaan de Groot
252a88cb7f [partition] Check for suitable bios_grub partition. 2021-05-25 14:07:58 +02:00
Adriaan de Groot
43c172f54d [partition] Tighten up types
Don't return the generic Abstract model for bootloader, but
the subclass pointer, so that consumers can use the convenience
API on the subclass.
2021-05-25 13:23:28 +02:00
Adriaan de Groot
d0276fd25f [partition] Look up bootloader by name, method
The bootloader model knows about both rows and
devices, so we can look up both at once. The
existing implementation as a non-member was rather
sketchy and wasn't used except as support for
restoreSelectedBootLoader().
2021-05-25 13:05:45 +02:00
Adriaan de Groot
dabd895755 [partition] Use type alias consistently 2021-05-25 12:33:12 +02:00
Adriaan de Groot
d630c2aadf [partition] Introduce a check if the GPT-on-BIOS popup should be shown
The check is bogus right now, and it still always warns; but if
the `shouldWarnForGPTOnBIOS()` function is implemented, this will
fix issue 1701.
2021-05-25 12:00:35 +02:00
Adriaan de Groot
aa4569b55b [packages] Convert command-failures into readable error messages
If the pakcage manager fails in some way, convert to a readable
error message instead of leaking the exception to the caller
(which produces a traceback, which is harder to read and less
informative)
2021-05-24 23:07:11 +02:00
Adriaan de Groot
bb1df38caa [bootloader] Convert command-failures into readable error messages
Avoid leaking errors to the caller, because that gets us a
traceback and generic Python Error message, which is less-than-helpful.
2021-05-24 23:05:46 +02:00
Adriaan de Groot
e186e54434 [fstab] Don't fail with a KeyError in misconfigured installations
Use get() instead of [] to avoid KeyError when the host system
confuguration is entirely missing a setting for *mountOptions*.

FIXES #1702
2021-05-24 22:16:54 +02:00
Adriaan de Groot
d731e12456 [libcalamares] Add an extra job-failure enum value 2021-05-15 07:46:03 +02:00
Adriaan de Groot
ce5b5c6734
Merge pull request #1692 from edupals/copy_link_resolvconf
[networkcfg] copy resolvconf as link
2021-05-17 12:14:24 +02:00
Raul Rodrigo Segura
a888156deb copy resolvconf as link 2021-05-12 16:20:13 +02:00
Adriaan de Groot
27f965deb6 [summary] Name widgets for styling 2021-05-10 21:55:52 +02:00
Adriaan de Groot
5d577371e7 [welcome] Name widgets for styling
Widgets are easier to style if they have a name, and easier to spot
in the widget tree as well. Give the requirements-checker
parts meaningful names.

SEE #1685
2021-05-10 21:55:52 +02:00
Philip Müller
4543feccca
[displaymanager] add ukui 2021-05-07 15:44:25 +02:00
Adriaan de Groot
e6568667c4 [packagechooser] Sanitize includes
- build was broken due to AppStream moving around
- unnecessary includes
- change name HAVE_XML -> HAVE_APPDATA for meaning
2021-04-24 17:41:51 +02:00
Adriaan de Groot
eee536046b [packagechooser] Sanitize includes
- build was broken due to AppStream moving around
- unnecessary includes
- change name HAVE_XML -> HAVE_APPDATA for meaning
2021-04-24 17:40:37 +02:00
Adriaan de Groot
df20aa9ddb Merge branch 'calamares' into improve-partition 2021-04-23 23:33:49 +02:00
Adriaan de Groot
cd7d109114 [packages] Fix trivial indent problem 2021-04-23 23:04:51 +02:00
Adriaan de Groot
a3b84fa674
Merge pull request #1680 from jcfrosty/patch-1
[packages] Add Luet PackageManager support
2021-04-23 23:02:21 +02:00
Adriaan de Groot
f024cb7370 [packages] Document and add new key to schema
FIXES #1676
2021-04-23 23:01:28 +02:00
Adriaan de Groot
bac1108781 Merge branch 'issue-1550' into calamares
FIXES #1550
2021-04-23 22:37:12 +02:00
Adriaan de Groot
f4fe0881b9 [packagechooser] Be more clear on the resulting GS keys
- in legacy mode, *id* can have an effect and leads to
  "packagechooser_<id>"; if unset, uses the the module
  instance id instead, still as "packagechooser_<instanceid>".
- in packages mode, *id* is not used and only the whole
  module Id (generally, "packagechooser@<instanceid>")
  is used, but in packages mode there's no need for other
  packages to mess with GS settings for this packagechooser.
2021-04-23 22:36:25 +02:00
Adriaan de Groot
aa3633e43a [packagechooser] Delay initialization of default Id
When the module is loaded and the viewstep created, it doesn't have a
module Id **yet**. That is set after reading more of the configuration
file. It **is** set by the time setConfigurationMap() is called,
so pass it on to the Config object then. This means that packagechooser
modules can skip the *id* config key and use the module Id.
2021-04-23 22:04:15 +02:00
Adriaan de Groot
6ce1a49f1c [packagechooser] Store *method* configuration in Config object 2021-04-23 21:46:46 +02:00
Adriaan de Groot
7521be3c5f [libcalamares] Add find() to namedenumtable that takes a default value 2021-04-23 18:03:24 +02:00
Adriaan de Groot
64eafe35d4
Merge pull request #1666 from deprov447/Limit_log_upload_size
[logUpload] Limit upload size
2021-04-23 17:33:40 +02:00
Adriaan de Groot
108ba28c43 Merge branch 'extend-packages-service' into calamares 2021-04-23 12:48:45 +02:00
Adriaan de Groot
192d307d39 [netinstall] Warnings-- for unused variable 2021-04-23 12:48:25 +02:00
Adriaan de Groot
61557cf805 [packagechooser] Connect UI to model
The model needs to be attached to the widget; because of changes
in the order that widget() and setConfigurationMap() are called,
the model is created earlier, but needs to be connected later.
2021-04-23 12:41:50 +02:00
Adriaan de Groot
049b9f9c74 [libcalamares] Test the packages service API
- check that the variant and the string-list version of
  the API do the same thing, check independence of
  settings for different instance keys.
2021-04-23 11:49:06 +02:00
Adriaan de Groot
e400f79673 [libcalamares] Extend packages service API
- convenience method to install a (string) list of packages
  (doesn't do the installation, but adds to GS the list, so
  that the packages module can handle it).
2021-04-23 10:25:29 +02:00
Jerrod Frost
4299ea1d4f
Add Luet PackageManager support
Sabayon is being rebuilt into MocaccinoOS with a new packagemanager.
2021-04-22 11:18:41 -05:00
Adriaan de Groot
231fa815c1 [partition] Forgotten ) 2021-04-19 16:10:29 +02:00
Adriaan de Groot
117418fe60 [partition] Fix partitioning summary
- the %4 is left-over from the feature-summary string,
- replace it with ""; don't change the source string
  because that will break translations right now.
2021-04-19 15:47:55 +02:00
Adriaan de Groot
788c84dc41 [netinstall] SPDX-tag the syntax-error file 2021-04-18 13:37:58 +02:00
Adriaan de Groot
1af8796b2b [libcalamares] Refactor translations-for-a-test CMake code
- turn the translations-QRC phase into a function, just in
  case other tests need translations as well.
- This CMake code might work as the base of translation-wrangling for
  plugins (externally).
2021-04-18 13:35:18 +02:00
Adriaan de Groot
cfbe722350 [libcalamares] Test the translated string with real translations
- introduce a bogus translation context, load translations,
  and check that the context-enabled translator does its job.
2021-04-18 13:19:55 +02:00
Adriaan de Groot
0143aa5515 [libcalamares] Make the branding-loading messages follow same format as the others 2021-04-17 22:13:16 +02:00
Adriaan de Groot
d72e42f7ba [libcalamares] Extend (configuration) translated string with context
Make it possible to pass in a context for strings not-from-config
maps, to allow programmatically set, but translatable, strings.
2021-04-17 14:41:08 +02:00
Adriaan de Groot
65e78e5915 [packagechooser] Use packages list instead of ids
- don't pass the item IDs to packages module, use the
  packages lists for each item
- document the item list in more detail (including the packages member
  and new install-method item)
2021-04-17 14:39:24 +02:00
Adriaan de Groot
91a29c5885 [packagechooser] Add getters for the *packages* members to the model 2021-04-17 14:36:33 +02:00
Adriaan de Groot
5e77d65424 [packagechooser] Add install-method to pick *packages* module 2021-04-16 14:53:13 +02:00
Adriaan de Groot
ed14c49a03 [libcalamares] Extend (configuration) translated string with context
Make it possible to pass in a context for strings not-from-config
maps, to allow programmatically set, but translatable, strings.
2021-04-16 14:38:39 +02:00
Adriaan de Groot
35f4a81768 [libcalamares] Extend packages service API
- convenience method to install a (string) list of packages
  (doesn't do the installation, but adds to GS the list, so
  that the packages module can handle it).
2021-04-16 14:29:39 +02:00
Adriaan de Groot
a7f983db5f [packagechooser] Add *packageNames* to package items
This is prep-work for connecting to the *packages* module by
simply installing packages straight from packagechooser, rather
than using a workaround.
2021-04-16 13:46:19 +02:00
Adriaan de Groot
dd52e10839 [packagechooser] Introduce a Config object
Rip out most of the ViewStep that deals with configuration,
move it to a Config object (not one that supports QML yet,
though), and massage the model a little.
2021-04-16 13:24:51 +02:00
Adriaan de Groot
59ea88f1ad [packagechoose] Remove the *package* member
The single-values *package* member in a PackageItem was not used,
so remove it -- to show that it really isn't used. This is prep-
work for putting the package name *back*, as multi-valued,
and using the *packages* module.
2021-04-16 13:24:51 +02:00
Adriaan de Groot
2a9205ebd9 Merge branch 'issue-1673' into calamares
FIXES #1673
2021-04-16 11:55:57 +02:00
Adriaan de Groot
165e559866 [netinstall] Extend tests with mixed fallbacks
- insert bad or empty URLs in between successful loads,
  check tail end of loading process.
2021-04-16 11:54:18 +02:00
Adriaan de Groot
21d24eeb8d [netinstall] Add tests for fallback loading
- first success that has data is kept
2021-04-16 11:47:37 +02:00
Adriaan de Groot
4dd6ecd54e [netinstall] Edge cases of zero, or unset, groups urls
- consumers may wait for loadingDone(), so always emit that
  even if no URL list is set.
2021-04-16 11:41:04 +02:00
Adriaan de Groot
9569105575 [netinstall] Extend tests with YAML syntax error and no-files-at-all 2021-04-16 11:35:10 +02:00
Adriaan de Groot
850825f70f [netinstall] Leave the last status on the queue
- Reaching the end means there's no data, but leave the last load result
  (presumably bad-something) around rather than overwriting.
2021-04-16 11:32:04 +02:00
Adriaan de Groot
bd2fb552b5 [netinstall] let queue finish properly
- if the queue is emptied, there was no usable data; set
  failure to NoData rather than BadData.
- FetchNextUnless::done() is done only if the parameter is true (that
  is, it's done!); otherwise should continue.
2021-04-16 11:20:04 +02:00
Adriaan de Groot
3e26ae5ad6 Merge branch 'release-3.2.39.x' into calamares 2021-04-16 10:25:38 +02:00
Adriaan de Groot
cf0119ed4a [initcpiocfg][plymouthcfg] Consistent find-plymouth code
- drop the debugging line because that has already been
  logged by the call to `runCommand()` that backs
  `target_env_call()`.
- use the same (top-level) function rather than having a
  function and elsewhere a very-similar method.
2021-04-16 10:23:29 +02:00
Adriaan de Groot
af12583122
Merge branch 'calamares' into calamares 2021-04-14 13:17:34 +02:00
Adriaan de Groot
67effe4214 [netinstall] check in test that loading did not time out 2021-04-14 13:05:11 +02:00
Adriaan de Groot
bd118bb457 [netinstall] Massage test data
- hidden groups aren't counted at all
- count() at top-level of the model counts groups
2021-04-14 13:05:11 +02:00
Adriaan de Groot
dfedc0fb21 [netinstall] Extend tests
- add an "empty" groups file
- run an event loop to give the loader the opportunity to load
2021-04-14 13:05:11 +02:00
Adriaan de Groot
a21665011f [netinstall] The status is ready (done) when the queue is done
- Don't signal ready every time data is sent to the model, since
  if the model ends up empty, loading will continue with the next
  fallback entry.
2021-04-14 13:05:11 +02:00
Adriaan de Groot
294d07db7b [netinstall] When starting to load YAML data, set appropriate status
- if a list is required, then we don't have data yet and should complain;
  otherwise we're OK even if no data is ever added.
2021-04-14 13:05:11 +02:00
Adriaan de Groot
5af37b0be3 [netinstall] Stub of tests for fallback-loading 2021-04-14 13:05:11 +02:00
Adriaan de Groot
3c398bd15e [netinstall] Only wrap-up if the packages list is OK
Avoid situation where the YAML is ok but doesn't contain
a list of netinstall packages, so the packages list (the model)
is still empty.

FIXES #1673
2021-04-14 13:05:11 +02:00
Erik Dubois
9651cc0cd7
Update main.py 2021-04-13 17:47:02 +02:00
Johannes Kamprad
44ec9d14a6
Update main.py
adding sway to desktop_environments
2021-04-13 17:27:23 +02:00
Adriaan de Groot
3f1d12ccd8 [users] One more capitalization fix for autologin
FIXES #1672
2021-04-13 16:12:22 +02:00
Adriaan de Groot
2b8309eb04 [users] Add tests for autologin settings
- four possibilities for old and new keys
- 6e is the check for not-actually-set, to track defaults
2021-04-13 16:11:57 +02:00
Adriaan de Groot
adb9f37cca [locale] Set *locale* GS key when needed
The code path for setting the locale / language automatically
emits currentLanguageStatusChanged(), but the code that updates
GS connects to currentLanguageCodeChaged(). This was altered in
the 3.2.28 release cycle. Since then, automcatic locale selection
wasn't setting *locale* in GS, so that a click-through kind of
locale selection would not set it; then the packages module
has no *locale* setting for localization packages.

The combination of status and code signals (machine- and human-
readable) is ok. Introduce a setter to the language that does
the necessary signalling, so that setting the language automatically
also DTRT.

FIXES #1671
2021-04-13 14:03:31 +02:00
Adriaan de Groot
ea61ac4386 [locale] Set *locale* GS key when needed
The code path for setting the locale / language automatically
emits currentLanguageStatusChanged(), but the code that updates
GS connects to currentLanguageCodeChaged(). This was altered in
the 3.2.28 release cycle. Since then, automcatic locale selection
wasn't setting *locale* in GS, so that a click-through kind of
locale selection would not set it; then the packages module
has no *locale* setting for localization packages.

The combination of status and code signals (machine- and human-
readable) is ok. Introduce a setter to the language that does
the necessary signalling, so that setting the language automatically
also DTRT.

FIXES #1671
2021-04-12 17:21:33 +02:00
Adriaan de Groot
4912de5893 [partition] reduce warnings with unsafe-option
- Move variables closer to where they are needed
- Do the winnowing / selection always, but in unsafe mode return
  the un-winnowed list of devices
- Massage build documentation a little
2021-04-09 13:32:48 +02:00
Anubhav Choudhary
5691f95833 [logUpload] Added one more test 2021-04-02 23:50:41 -06:00
Adriaan de Groot
db51e813fb Merge branch 'release-3.2.39.2' into calamares 2021-04-02 16:25:31 +02:00
Adriaan de Groot
8a413866a1 [calamares] Make --version print extended versioning information 2021-04-02 16:05:26 +02:00
Adriaan de Groot
21f52f9dc1 [calamares] Remove overly-spaced debug (SubEntry does the right thing) 2021-04-02 15:56:42 +02:00
Adriaan de Groot
18b805d43f [keyboard] Set initial values for model, layout, variant
When loading the lists, no initial string-value was being
set for the model, layout and variant; the configuration
could pass right through and pick up empty strings instead.
If the user does not change the model, the UI would show
"pc105" but the internal setting would still be empty.

FIXES #1668
2021-04-02 15:51:24 +02:00
Anubhav Choudhary
b897619558 [logUpload] Added some basic tests 2021-04-02 07:40:03 -06:00
Adriaan de Groot
b191f39bdf [keyboard] Simplify config-loading
The machinery in `setConfigurationMap()` was just duplicating
checks already in place in the `getString()` and `getBool()`
methods, and there's no special need for efficiency here,
so prefer the more readable and short code.

("efficiency" here means "we're saving one method call in
case the configuration is not set")
2021-04-02 15:38:41 +02:00
Adriaan de Groot
8949b079e1 [users] Fix autologin-setting from config file
SEE #1668
2021-04-02 13:11:16 +02:00
Anubhav Choudhary
c73e9ec89f [logUpload] Ran styleScript 2021-04-01 01:05:55 -06:00
Anubhav Choudhary
c1aa0b581e [logUpload] suggestionsAndFixes-part3
- Resolved the problem of incomplete log upload
- sizeLimit = 0 fixed (turns off paste functionality)
- Documentation update
- sizeLimit < 0 now needs no hardcoded upper limit
- Calamares::Branding::uploadServerFromMap() serves sizeLimit in bytes
2021-04-01 00:25:37 -06:00
Artem Grinev
9302ad1468 [partition] Erase disk FS choice 2021-03-31 20:15:02 +04:00
Anubhav Choudhary
b42f86f20f [logUpload] suggestionsAndFixes-part2 2021-03-30 08:28:30 -06:00
Anubhav Choudhary
d109fc5856 [logUpload] suggestionsAndFixes 2021-03-30 08:13:29 -06:00
Adriaan de Groot
9d4c2bf1c7 [displaymanager] Fix mismatch in spelling of "autologinUser"
In 4ffa79d4cf, the spelling
was changed to consistently be "autoLoginUser" in the *users*
module, but that changed the Global Storage key as well,
and the *displaymanager* module wasn't changed to follow.
2021-03-30 11:27:51 +02:00
Erik Dubois
d19c3b5458 Update main.py
Typo
2021-03-30 11:27:51 +02:00
Erik Dubois
f8494f27d5 displaymanager from arcolinux 2021-03-30 11:27:51 +02:00
Anubhav Choudhary
6a6557e320 [logUpload] fixes 2021-03-29 13:22:56 -06:00
Anubhav Choudhary
6726a926a4 [logUpload] Configurable upload size limit
A key 'sizeLimit' added to uploadServer field in branding.desc to limit the size of logFile to upload.
2021-03-29 12:44:34 -06:00
Adriaan de Groot
7a26143fbc [partition] All action-changes should update next 2021-03-29 15:52:55 +02:00
Adriaan de Groot
bf7b41f548 [libcalamares] Document the Once class for logging 2021-03-29 15:31:41 +02:00
Adriaan de Groot
1fe337d6ed [partition] Improve logging of device-checking
- Avoid lots of function headers between the checks applied to
  each individual device.
2021-03-29 15:25:57 +02:00
Adriaan de Groot
d4f28e863f [libcalamares] Allow rvalue Once to be used in logging 2021-03-29 15:23:55 +02:00
Adriaan de Groot
785042ccf3 [partition] Improve formatting of logging while loading configuration 2021-03-29 14:41:56 +02:00
Adriaan de Groot
0446f03613 [partition] Remove overly-chatty debugging from fs-name-lookup 2021-03-29 14:38:39 +02:00
Adriaan de Groot
7b09344a8b [partition] Update next-button
You'll need a VM with 2 disks to demonstrate:

- Configure Calamares to pick "none" as initial action on
  the partition page (this is a safe choice),
- Enter partition page,
- No action is selected, and the next> button is greyed out.
- Click erase; notice next> is now available.
- Change devices, notice no action is selected, but next>
  is still available. Clicking on it, though, does nothing.

When changing to "no action", update the next-button's
availability.
2021-03-29 14:24:56 +02:00
Adriaan de Groot
70bf033dc0 [partition] Improve logging readability
- The entire queue is one long output, so print them with SubEntry
2021-03-29 14:17:40 +02:00
Adriaan de Groot
1155b6fc3d [partition] Improve debug-output a little 2021-03-29 14:14:05 +02:00
Adriaan de Groot
0ec77f5d85 [partition] Warnings-- (uninitialized value) 2021-03-29 11:06:16 +02:00
Adriaan de Groot
df1d7dea61 [partition] Warnings--
Avoid the extra indirection through the otherwise-unused
prettyGptType(const QString&), construct table of names
only on first call to avoid static-initialization order
(though that's not important here).
2021-03-29 11:03:37 +02:00
Adriaan de Groot
0ccd55e33f [libcalamares] Warn (python only) about unknown GS keys
This makes it easier to spot problems where key-names are mis-spelled
in Python (or other modules change a name and it's not applied
to consumers)
2021-03-29 10:50:32 +02:00
Adriaan de Groot
b04d59ba2e [libcalamares] More variant->python translations
- There's still 49 enumeration values not handled, leading to
  an annoying Clang warning, but there's just no **point**
  in listing them all: that's what 'default' is for.
2021-03-29 10:46:28 +02:00
Adriaan de Groot
42d00ffe38 [displaymanager] Fix mismatch in spelling of "autologinUser"
In 4ffa79d4cf, the spelling
was changed to consistently be "autoLoginUser" in the *users*
module, but that changed the Global Storage key as well,
and the *displaymanager* module wasn't changed to follow.
2021-03-29 10:30:56 +02:00
Adriaan de Groot
94bd17ecf5
Merge pull request #1664 from erikdubois/patch-1
[displaymanager] Update main.py
2021-03-28 21:30:58 +02:00
Adriaan de Groot
b95b3dbc78 Merge branch 'ff-fslabel' into calamares
Fix build with newer KPMCore (still builds on Netrunner 19).
2021-03-28 18:28:28 +02:00
Adriaan de Groot
22dbe60bb9 [partition] Use operations-API (available in all supported KPMCore versions) 2021-03-28 18:07:32 +02:00
Adriaan de Groot
47c167c043 [partition] KPMCore removed some headers 2021-03-28 17:56:54 +02:00
Adriaan de Groot
e2113eda38 [partition] trust in AutoMoc 2021-03-28 17:52:44 +02:00
Erik Dubois
51d414d6ef
Update main.py
Typo
2021-03-28 17:07:09 +02:00
Adriaan de Groot
fac0c90de1 Merge branch 'ff-fslabel' into calamares
This was a PR from Lisa Vitolo a long time ago, to expose
FS labels in the UI, and it got lost in transition.
Five-years-too late thanks.
2021-03-27 15:44:56 +01:00
Adriaan de Groot
3c7d97403e [plasmalnf] Apply coding style 2021-03-27 15:44:26 +01:00
Adriaan de Groot
1eba562d07 [partition] Apply coding style 2021-03-27 15:43:32 +01:00
Adriaan de Groot
9c2a26bed5 [libcalamares] Apply coding style 2021-03-27 15:41:58 +01:00
shainer
1007680931 Fix error handling in ChangeFilesystemLabelJob 2021-03-27 15:40:07 +01:00
shainer
c035029f38 Make sure we always set the filesystem label.
In particular, we need a separate Job class to set the label; this
is invoked after we formatted a partition, and when no other changes
to the partition have been requested in the Edit dialog.
2021-03-27 15:38:46 +01:00
Adriaan de Groot
3d49379bec [partition] Chase API change in createNewPartition()
The partition- and filesystem-label setting code was already there,
but not in the call to createNewPartition(); now we set the
FS label twice (once in the call, once afterwards)
2021-03-27 14:45:34 +01:00
shainer
b602d423c7 Allow users to set/edit filesystem labels.
When creating or editing a new formatted partition, allow
to set a filesystem label (16 chars maximum). Modify
the KPMHelpers to accept it as a new parameter. Partitions
created by default may get a meaningful label too.
2021-03-27 14:31:06 +01:00
Adriaan de Groot
ac8f99a206 [libcalamares] Don't double-include FileSystem
The partitioning header 'FileSystem.h' is for KPMCore support;
it is already included by Global.h and guarded by ifdefs for
KPMCore. Do not unconditionally include it from the implementation.
2021-03-27 02:38:45 +01:00
shainer
1cfdc8044c Display current filesystem label as a column in the main partition view. 2021-03-23 16:30:31 +01:00
Adriaan de Groot
559b79f920 [partition] Use (better documented) filesystem-use API 2021-03-23 12:09:06 +01:00
Adriaan de Groot
10bec1d970 [libcalamares] Expand API to allow clearing out the filesystem use 2021-03-23 12:09:01 +01:00
Adriaan de Groot
9665af0e5a [libcalamares] Make keys case-insensitive (as documented) 2021-03-23 12:09:01 +01:00
Adriaan de Groot
48541629f9 [libcalamares] Extend tests to handle case-insensitive 2021-03-23 12:09:01 +01:00
Adriaan de Groot
f3681a533e [libcalamares] Rearrange filesystem-use API
- make the functies that take a GS* first-class
- use the convenience functions from JobQueue for the others
- inline so only the explicit-GS* functions are in the library
2021-03-23 12:09:01 +01:00
Adriaan de Groot
488631824d [libcalamares] Make the KPMCore global storage filesystem handlers inline 2021-03-23 12:09:01 +01:00
Adriaan de Groot
75eb2c3cd4 [libcalamares] Add tests for filesystem_use service 2021-03-23 12:08:52 +01:00
Adriaan de Groot
afdf431b77 [libcalamares] Add partition service for managing global storage
- the global storage key filesystem_use has a structured meaning,
  so give it a (trivial-ish) API for reading and writing.
2021-03-23 12:08:52 +01:00
Adriaan de Groot
1e1b7b7ece [libcalamares] Introduce a convenience getter for GlobalStorage 2021-03-23 12:07:11 +01:00
Adriaan de Groot
cc6a598c61
Merge pull request #1658 from erikdubois/calamares
displaymanager from arcolinux
2021-03-23 12:04:06 +01:00
Adriaan de Groot
88aa1755ce CMake: split out skip-module-checking to its own cmake module
The skip-checking is now in the functions for adding plugins and
subdirectories, so that third-party building should get it
as well, for free. Since AddModuleSubdirectory and AddPlugin
use the newly split-out module, handling SKIP_MODULES and USE_*
consistently across module repositories is now easier.

While here, make accumulating-the-skipped-modules explicit.
2021-03-23 01:47:10 +01:00
Adriaan de Groot
dc0164d508 [libcalamares] Also install the version header 2021-03-22 13:36:52 +01:00
Adriaan de Groot
779e5ecf8f [libcalamaresui] Factor out the pastebin UI
- offer a convenience method for showing a popup and
  URL information and copying the URL to the clipboard
- use that from ViewManager (on failure) and DebugWindow (on demand)
2021-03-19 14:17:34 +01:00
Adriaan de Groot
981e96ea7f [calamares] Redo debug window tools
- make the tools tab buttons along the bottom row
- show the global storage tab by default

This costs little screen real-estate, makes the tools much more
visible and useful.
2021-03-19 13:51:30 +01:00
Adriaan de Groot
c54e417ff3 [calamares] Add a 'send log' button to the debug window
FIXES #1660
2021-03-19 13:38:06 +01:00
Adriaan de Groot
668921543a [libcalamaresui] Convenience method to check if paste would do anything 2021-03-19 13:36:40 +01:00
Adriaan de Groot
5ed1dff655 Merge branch 'issue-1579' into calamares
FIXES #1579
2021-03-19 13:13:27 +01:00
Adriaan de Groot
3588f06767 [netinstall] Document groupsUrl with multiple entries 2021-03-19 12:49:37 +01:00
Adriaan de Groot
fdfe52efe2 [netinstall] Improve loader queue API a bit
- use load() to start loading
- the FetchNextUnless class is useful in more spots in
  the loading process
- set status explicitly on success (otherwise, a failure in a
  previous URL would leave a failure message lying around even
  when the module shows something useful)
2021-03-19 12:30:09 +01:00
Adriaan de Groot
03d086a233 [netinstall] Missing initialisations, split out slot
- m_queue was not initialized to nullptr, crashes
- split queue-is-done to a separate slot rather than a lambda
- prefer queueing calls to fetchNext(), for responsiveness
2021-03-19 11:46:46 +01:00
Erik Dubois
0379fa9b7d displaymanager from arcolinux 2021-03-17 14:58:50 +01:00
Adriaan de Groot
404a9ef98a [netinstall] Split off requesting netinstall data into a queue-manager
This is the actual "meat" of the branch, which makes the
netinstall module request one URL at a time until one succeeds.
2021-03-17 00:09:15 +01:00
Adriaan de Groot
186d32ebee [partition] More missing ; 2021-03-16 16:11:02 +01:00
Adriaan de Groot
2b4bc7adf4 [partition] Apply newer formatting tool 2021-03-16 16:08:13 +01:00
Adriaan de Groot
bb426ebac4 [partition] Add missing ; (and apply coding style) 2021-03-16 16:01:25 +01:00
Adriaan de Groot
9341a84820 [libcalamares] Make the RETRANSLATE macros more statement-line
Require a ; after RETRANSLATE macros. They are statement-like;
this makes it easier for some of them to be recognized by
clang-format and resolves some existing weird formatting.
2021-03-16 14:55:26 +01:00
Adriaan de Groot
603a7106b3 [netinstall] Move package-listing wrangling to the Config object
Now all the business logic is in Config, the door is open to
building a QML-ified netinstall module. I'm not sure that
would be worth it: packagechooser offers more space for a
nice UI and should be QML'ed first.
2021-03-16 14:51:01 +01:00
Adriaan de Groot
9acd2fe458 [netinstall] Use the packages service 2021-03-16 14:38:52 +01:00
Adriaan de Groot
f1446736f8 [libcalamares] Expand tests a little
- do some additions and check they work
- drop the ";add" annotation on the source, this is not
  needed in the current situation with only adds available.
2021-03-16 14:37:13 +01:00
Adriaan de Groot
5b609565e2 [libcalamares] Make Packages API more flexible
- pass in the GS object; this makes mostly **testing** much easier
2021-03-16 14:14:02 +01:00
Adriaan de Groot
b868894371 [libcalamares] Start a packages service for netinstall and others 2021-03-16 13:50:15 +01:00
Adriaan de Groot
6662cb5f2d [netinstall] Swap parameters to makeSourceItem and document it 2021-03-16 13:17:33 +01:00
Adriaan de Groot
79b4f918fc [netinstall] Apply coding style 2021-03-16 13:10:35 +01:00
Adriaan de Groot
8e8525a941 [netinstall] Simplify slots in the UI page 2021-03-16 13:10:09 +01:00
Adriaan de Groot
a90f510b85 [libcalamares] Convenience for logging subentries
For methods that log a bunch of things, and which want to
consistently use SubEntry, but don't know when the **first**
log entry is within the method, Logger::Once can be used
to log one regular message (with function info) and the
rest are subentries.
2021-03-15 22:45:29 +01:00
Adriaan de Groot
72f67286a4 [libcalamares] Preserve type CDebug() if possible. 2021-03-15 21:41:27 +01:00
Adriaan de Groot
8fe2e1f68a [finished] Make the debug-log less cryptic 2021-03-15 21:22:20 +01:00
Adriaan de Groot
a3a1350dc7 [libcalamares] Don't complain if there isn't a preset
- If the module knows about a preset, then it should be registered
  even if there is not a value set for it specifically; this avoids
  complaints from isEditable() for fields that are known, but
  do not have a preset. (Reported by Anke)
2021-03-15 21:18:10 +01:00
Adriaan de Groot
a4c1f07521 [libcalamares] Reduce indentation-depth in apply() through early-return 2021-03-15 21:11:01 +01:00
Adriaan de Groot
33fec86ef6 [welcome] Improve logging of requirements-checking
- less chatty when 0-results come in
- compress the welcome debug to one output chunk
2021-03-15 20:53:59 +01:00
Adriaan de Groot
f8afb15c4c [libcalamaresui] Improve logging for QML modules
- mention which instance produces warnings
- tag additional debugging from the same method with Logger::SubEntry
2021-03-15 20:47:27 +01:00
Adriaan de Groot
6556f96442 Merge branch 'calamares' into issue-1579
Bring the branch up-to-date with the past few releases,
so it can be merged more easily once complete.
2021-03-15 13:10:21 +01:00
Adriaan de Groot
416c2c9689 [usersq] Reflect editable in the QML
- if presets prevent a field from being editable, don't allow
  the user to edit the field
- while here, mention the changes in usersq
2021-03-15 12:51:42 +01:00
Adriaan de Groot
44ac33845d Merge branch 'fix-usersq' into calamares 2021-03-15 12:41:01 +01:00
Adriaan de Groot
46f7e6c131 Merge branch 'hotfix-38' into calamares 2021-03-15 12:39:41 +01:00
Adriaan de Groot
8348bd2bb7 [usersq] Call setters for checkboxes 2021-03-15 12:36:54 +01:00
Adriaan de Groot
d2c0c8d638 [users] Grab hostname from config on creation 2021-03-15 11:53:14 +01:00
Adriaan de Groot
b17e01edff [usersq] Call setters to move values back from QML to the C++ side 2021-03-15 11:45:57 +01:00
Adriaan de Groot
b96ad4b166 [usersq] Hook up QML fields and the Config object
For properties, we can bind directly to the Config properties
for loginName, fullName, and also to checkbox-style (bool)
properties and passwords.
2021-03-15 00:24:10 +01:00
Adriaan de Groot
e60f8bcd06 [usersq] Tidy job creation and unnecessary code 2021-03-15 00:24:10 +01:00
Adriaan de Groot
4ffa79d4cf [users] In code, consistently [aA]utoLogin as name
There was a mix of autologin and autoLogin, leading to confusion
in the code. QML is sensitive to this, so go to one consistent name.
(Although the names of the settings in the `.conf` file are
different again)
2021-03-15 00:24:10 +01:00
Adriaan de Groot
287047fe1a [users] Tidy up job creation -- leave it to Config 2021-03-14 23:52:12 +01:00
Adriaan de Groot
98d42719e1
Merge pull request #1622 from Chrysostomus/btrfs-subvol
[fstab][mount] Create and mount btrfs subvolumes in generalized manner
2021-03-14 23:38:30 +01:00
Adriaan de Groot
1998405dbb [libcalamaresui] Fix up test for logfile
- this test would fail if the logfile already exists for
  any reason (including "I just ran the test")
- remove the file before expecting an empty logfile
- improve messages; a missing logfile is not a "things cannot
  work" situation, it's a warning
2021-03-14 21:37:31 +01:00
Adriaan de Groot
cdbc5a7b4b
Merge pull request #1652 from Conan-Kudo/rm-urpmi
[packages] Drop urpmi support
2021-03-14 17:41:10 +01:00
Adriaan de Groot
cc310a04b8 [users] Fix schema to match actual field names 2021-03-14 16:32:02 +01:00
Calamares CI
3fafeaf09a i18n: [dummypythonqt] Automatic merge of Transifex translations 2021-03-14 16:17:09 +01:00
Adriaan de Groot
8c7e214376 [users] Make the example config usable
Although the example configurations shouldn't really be used
as a sample of how to configure **your** Calamares for your
distro, many distro's do just copy the examples. So leave
traces of the OEM-configuration settings in the example,
and give the standard configuration a 'nothing changed'
set of presets.
2021-03-14 16:07:04 +01:00
Adriaan de Groot
caf18321df [users] Adjust UI to is-field-editable based on presets 2021-03-14 14:20:10 +01:00
Adriaan de Groot
7bae625f46 [users] Pick up UI changes based on the values from Config 2021-03-14 14:14:29 +01:00
Adriaan de Groot
b4a21d7aca [libcalamares] Add macro CONFIG_PREVENT_EDITING to handle uneditable fields
Boilerplate code for avoiding accidental setting of an internal
field when the UI is editable and the underlying data isn't.
2021-03-14 13:30:26 +01:00
Adriaan de Groot
3ea796d009 [users] 'undo' changes to values if the UI is wonky
- you can still call set*(), eg. from the UI, when the field is
  not editable. Although the code previously ignored the change,
  this would lead to a mismatch between what the UI is showing
  (the changed value) and what the Config has (old value).
  Emit a changed-signal (notify) with the old value so that the
  UI is changed *back* as soon as possible.
2021-03-14 12:27:59 +01:00
Adriaan de Groot
9fcf9b5fa8 [users] Pick up values from Config object on startup
- Previously, we 'knew' that the values in Config were empty,
  so didn't have to set them from the Config when building
  the (widget) page
2021-03-14 12:14:33 +01:00
Adriaan de Groot
941cc9c48b [users] Match presets to the actual name of fields 2021-03-14 12:14:33 +01:00
Adriaan de Groot
2e90a8d829 [libcalamares] Report preset mis-configurations
- warn about fields applied twice (program error)
- warn about fields not used (configuration error)
- add operator<< for "clean" looking preset application
2021-03-14 12:14:33 +01:00
Adriaan de Groot
d8dff3dc65 [libcalamares] Replace loadPresets() with an applicative style
Build up the list of known presets by what the Config-object
expects, not by what the Config file provides. This allows
early detection of mis-matched configurations.

Presets can only apply to Q_PROPERTY properties, and the
preset must match the property name.
2021-03-14 12:14:33 +01:00
Adriaan de Groot
8b10a9cfc2 [libcalamares] Add isEditable() check
This adds support for checking whether a field is editable;
Config objects should reject changes if the field is not
editable. There is an "unlock" setting to override the
check, although this is currently always locked.
2021-03-14 12:14:33 +01:00
Adriaan de Groot
448e478b6d [users] Use base Config and its Preset-handling 2021-03-12 13:54:06 +01:00
Adriaan de Groot
0be5e04c2e [libcalamares] Add a base class for Config-objects
This is an optional (until 3.3) base class, which can handle
Presets consistently for configurations.
2021-03-12 13:49:37 +01:00
Adriaan de Groot
381a4f9b53 [users] Add preset to users module Config 2021-03-12 13:25:16 +01:00
Adriaan de Groot
d9f2f5e988 [libcalamares] Start a 'presets' configuration datastructure 2021-03-12 13:16:36 +01:00
Neal Gompa
d39f2b8c3e [packages] Drop urpmi support
This code is essentially untested and unused, as OpenMandriva has been
using DNF for three years now.

Reference: https://www.openmandriva.org/en/news/article/switching-to-rpmv4
2021-03-11 06:32:49 -05:00
Adriaan de Groot
cb67c79203
Merge pull request #1651 from demmm/calamares
[finishedq] add license for svg file
2021-03-09 20:35:22 +01:00
demmm
a7b46a02eb [finishedq] add license for svg file 2021-03-09 19:45:32 +01:00
Adriaan de Groot
98524708cc [partition] Chase namespace change for Units 2021-03-09 19:45:12 +01:00
Adriaan de Groot
9f17d3fd12 [libcalamaresui] Paste the last 16KiB of the log file
- If Calamares is run more than once, reading the log file
  can get you older / not relevant log messages. Get the tail
  end instead.
2021-03-09 18:25:10 +01:00
Adriaan de Groot
980e5e13f8 Merge branch 'fixup-log-upload' into calamares 2021-03-09 18:22:51 +01:00
Adriaan de Groot
ea63f48c31 [libcalamares] Put the units in a nested namespace
- this makes it much easier to use the literal suffixes
  by using the namespace rather than individual operators.
2021-03-09 18:21:58 +01:00
Adriaan de Groot
a1ed303820 [libcalamaresui] Add test for Paste
This tests only the termbin ("fiche") paste by sending it
a derpy fixed string. Prints the resulting URL, doesn't
verify in particular.

It'd be rude to run this test too often.
2021-03-09 17:55:10 +01:00
Adriaan de Groot
44ec8a7c0b [libcalamaresui] Improve testability
- mark functions with STATICTEST so they can be compiled into a test
- move logfile-reading so we can call the pastebin-upload functions
  with an arbitrary payload.
2021-03-09 17:22:48 +01:00
Adriaan de Groot
846d6abaa8 [libcalamaresui] Move message- and clipboard handling
- The Paste API promises just a (string) URL back, not
  a whole message, so return just the URL from the
  abstract API and the concrete (fiche) implementation.
- Set clipboard contents from the UI
- Build (translated) message in the UI code
2021-03-09 15:51:24 +01:00
Adriaan de Groot
81badc36f4 [libcalamaresui] Implement abstract doLogUpload() API
This is a "do the right thing" function, which then calls
the implementation-specific code for each type.
2021-03-09 15:42:21 +01:00
Adriaan de Groot
1ff854f05d [libcalamaresui] Push upload to a more abstract API
- have a namespace Paste with just one entry point, which will handle
  untangling type &c.

This doesn't compile, but indicates the direction to take the API
2021-03-09 15:32:46 +01:00
Adriaan de Groot
efec12d001 [libcalamares] Read structured upload-server info
- Use just type and url, since port can be specified in
  a URL. Note that we only use host and port, not the
  scheme (or the path, for that matter).
- Factor out understanding the *uploadServer* key to a function.
2021-03-09 15:24:02 +01:00
Adriaan de Groot
bce6f3f1b7 [libcalamaresui] Adjust paste code to desired API
Still doesn't compile because consumers are not ready.
2021-03-09 14:56:37 +01:00
Adriaan de Groot
3c6683bd98 [libcalamaresui] Rip out untyped data about upload server
This doesn't compile, but indicates the **type** information
desired about the (a) upload server.
2021-03-09 14:51:59 +01:00
Adriaan de Groot
f72436aa0a [libcalamaresui] Drop RE-wrangling, compare hosts instead to detect valid paste URL 2021-03-09 14:41:58 +01:00
Adriaan de Groot
8af5fb5da5 [libcalamaresui] Simplify getting URL response
- get a QByteArray rather than going through a char[] buffer
- bytes-read is not important since the RE can only match if
  there **are** that many characters.
2021-03-09 14:38:43 +01:00
Adriaan de Groot
1bf95eacb0 [libcalamaresui] Tidy the logging some more 2021-03-09 14:33:47 +01:00
Adriaan de Groot
260862fabc [libcalamaresui] Move the format-string closer to where it is used 2021-03-09 14:31:46 +01:00
Adriaan de Groot
844831751d [libcalamaresui] Factor out the reading of the log file
- this will be needed for other pastebins, too
2021-03-09 14:30:20 +01:00
Adriaan de Groot
92e36558fa [libcalamaresui] Remove unnecessary shadowing in lambda 2021-03-09 14:25:40 +01:00
Adriaan de Groot
bc2435eb7d [libcalamaresui] Apply coding style 2021-03-09 14:23:52 +01:00
Adriaan de Groot
fc8830ae4a [libcalamaresui] Tidy logging 2021-03-09 14:23:27 +01:00
Adriaan de Groot
1ebb807624 [calamares] Drop #warning about KDSAG
- it might not be very current, and it's *probably* better to
  use dbus-activation / kf5dbus, but let's not call it
  deprecated until very sure that the dbus version does the
  right thing.
2021-03-09 13:57:21 +01:00
Adriaan de Groot
430b3b0722 REUSE: tag the schema file (badly, missing an email address) 2021-03-09 13:55:20 +01:00
Adriaan de Groot
0b8ef49e7e [calamares] Make debug-window available to QML
- Add a toggle() to the debug-window manager, for convenience
- Make the manager available to QML
- Use the debug-window manager (code imported from KaOS)
2021-03-06 23:11:41 +01:00
Adriaan de Groot
c00a382aea [calamares] Refactor debug-window handling
Move the management of the (a?) DebugWindow to a separate
class, and hang on to that manager in CalamaresWindow.
This is prep-work towards making it available from QML as well.
2021-03-06 22:55:48 +01:00
Adriaan de Groot
992c673951 [calamares] Document how to hide the Quit button
The Quit button can have its own logic at a QML level for
show/hide. It **ought** to follow the *quitVisible* property,
but can do additional work. Here, document how a distro might
choose to hide the Quit button on the last page (generally,
that's the "finished" page).
2021-03-06 22:08:35 +01:00
Adriaan de Groot
44602d0237 [finishedq] CMake: missing keyword 2021-03-06 15:33:15 +01:00
Adriaan de Groot
83e6476be8 [finishedq] Tighten up requirements 2021-03-06 15:23:23 +01:00
Adriaan de Groot
e9384deb5d [finishedq] Document the meaningful settings of the config file 2021-03-06 15:20:24 +01:00
Adriaan de Groot
bd775a16e2 [finished] Add a restart-anyway API to Config
It's possible to ignore the "user setting" for restart-now
and call doRestart(true) directly. This is intended for
use with specific UIs that make that choice clear for the user.

Hook up both [finished] and [finishedq] to the "traditional"
restart-if-the-box-is-ticked logic although the example
QML doesn't expose that box.
2021-03-06 13:51:45 +01:00
Adriaan de Groot
aa004503c5 [finished] Expand Config object's repertoire of notification-API 2021-03-06 13:38:02 +01:00
Adriaan de Groot
f8258f671b [calamares] Navigation getting the wrong side 2021-03-06 13:14:40 +01:00
Adriaan de Groot
6f15b69917 Merge branch 'qml-resizing' into calamares
Make panel sizes consistent, so the QML-navigation can be used better.
2021-03-05 23:20:47 +01:00
Adriaan de Groot
19874ebc3a [finished] Document doRestart() better
- move all the 'really want restart' logic to restartNowWanted()
2021-03-05 23:19:56 +01:00
Adriaan de Groot
f94853eb28 [finishedq] Always restart if possible 2021-03-05 23:17:57 +01:00
Adriaan de Groot
075a28a06d [finished] Log the doRestart() attempt 2021-03-05 22:59:53 +01:00
Adriaan de Groot
0d7c1ec130 [finishedq] Port QML back to using Config object 2021-03-05 22:59:04 +01:00
Adriaan de Groot
5b376b41bf [finishedq] Chase business logic in Config object 2021-03-05 22:40:38 +01:00
Adriaan de Groot
3ad3a9adfc [finished] Move the business logic to the Configt object 2021-03-05 22:27:24 +01:00
Adriaan de Groot
04145f49f8 [calamares] Factor out size-setting for QML panels
- Either orientation needs to have the same generic size-setting
  code, for both navigation and progress panels.
2021-03-05 16:59:54 +01:00
Adriaan de Groot
82223431fa [calamares] Pass orientation into panel-creation
- Add function for mapping panel sides to an orientation (H/V)
- Pass that into the creation functions

This is prep-work for handling vertical navigation and horizontal
progress reporting cleanly.
2021-03-05 14:21:19 +01:00
Adriaan de Groot
0f50085bb9 [calamares] Refactor sidebar creation
- None of these need to be methods of the main window,
  and it can all be put tidy away as static free functions.
2021-03-05 14:01:28 +01:00
Adriaan de Groot
a8463a8763 [calamares] Prefer to expand main panel
- Don't let the navigation items grow if they are QML
  (the Widget ones don't either) so the main panel takes
  most of the space.
2021-03-05 13:35:00 +01:00
Adriaan de Groot
ab7f6abf02 [calamares] Decouple debug-window button
- Provide slots and signals for managing the debug-window,
  so it can be used from QML as well.
2021-03-05 13:20:47 +01:00
Adriaan de Groot
1739d8f15f
Merge pull request #1647 from demmm/calamares
[finishedq] adding QML finished module
2021-03-05 12:24:16 +01:00
Adriaan de Groot
6a1e46d7f6 [libcalamaresui] Add properties to ViewManager to expose Settings 2021-03-03 16:06:53 +01:00
Adriaan de Groot
849da3f322 [libcalamaresui] The ViewManager is a UI component for QML, not core 2021-03-03 15:54:11 +01:00
Adriaan de Groot
c3860849c1 [libcalamaresui] Notify step number when modules are all loaded
- using the QML sidebar would not highlight the first step on startup,
  only after next / prev would the highlight show up. Now, notify
  when all the modules are loaded (and number 0 is active).
2021-03-03 15:43:11 +01:00
demmm
7acc8bcec3 [finishedq] adding QML finished module
module builds & runs, config connections are not registering
no errors
finishedq.qml is offering a different option though, running commands directly in qml
plasma-framework executer is used for that
2021-02-27 22:04:30 +01:00
Adriaan de Groot
cc3017be53
Merge pull request #1619 from deprov447/Upload_Install_Log
[libcalamaresui] Implementing LogUpload functionality from branding
2021-02-26 13:13:16 +01:00
Adriaan de Groot
24e129a413 Merge branch 'issue-1634' into calamares
FIXES #1634
2021-02-23 16:17:57 +01:00
Adriaan de Groot
d3acc39d2d Merge branch 'qml-finished' into calamares 2021-02-23 16:17:14 +01:00
Adriaan de Groot
a4682db987 [finished] Tidy up notification-at-end (and allow failed notifications) 2021-02-23 16:05:48 +01:00
Adriaan de Groot
5af614daf7 [finished] Allow positive and negative notifications at end. 2021-02-23 15:59:40 +01:00
Adriaan de Groot
ec4b6752d6 [finished] Move notification to Config 2021-02-23 15:54:19 +01:00
Adriaan de Groot
76a2791b12 [finished] Clean up includes 2021-02-23 15:42:14 +01:00
Adriaan de Groot
7d024cf72b [finished] Move restart handling to Config 2021-02-23 15:36:44 +01:00
Adriaan de Groot
9d6d8ecaea [finished] Heavy refactor
- move most of the business logic to Config
- make retranslate of the page more robust (e.g. changing language
  after failure would restore the un-failed message)

There's still some bits left.
2021-02-23 15:03:16 +01:00
Adriaan de Groot
288fe5b274 [finished] Rename and document following coding style 2021-02-23 12:50:52 +01:00
Adriaan de Groot
40961f21a7
Merge pull request #1624 from benne-dee/schema-netinstall
[netinstall] Schema for groups in netinstall.schema.yaml
2021-02-23 12:31:47 +01:00
benne-dee
f0aa515c8b
[netinstall] Schema validates also groups file 2021-02-22 22:17:06 +05:30
Adriaan de Groot
9c8194402b [keyboard] Add ASCII mapping for Greek
FIXES #1642
2021-02-19 14:33:38 +01:00
Adriaan de Groot
cdbf45b5d3 [libcalamaresui] Remove unused include 2021-02-19 14:29:46 +01:00
Adriaan de Groot
3a4dcb6913 [libcalamaresui] Give slideshow (ExecutionViewStep) widgets names 2021-02-17 14:34:33 +01:00
Adriaan de Groot
7e6c3a2309 [libcalamaresui] Give the slideshow-widgets a name
- this is the *working* part of the slideshow, not its background
2021-02-17 14:25:06 +01:00
Adriaan de Groot
49f4e7b8e1 [calamares] Make the widget-tree more informative, mention class name 2021-02-17 14:19:45 +01:00
Adriaan de Groot
6bf82e9c65 [welcome] Update .conf documentation
- fix typo
- don't suggest google as internetCheckUrl
- mark TODOs for #1384
2021-02-16 16:32:34 +01:00
Anubhav Choudhary
9738851261 YAML list for uploadServer key 2021-02-15 20:51:41 +05:30
Anubhav Choudhary
7057081bdf QUrl for serverURL + renames 2021-02-10 14:38:26 +05:30
Adriaan de Groot
e49f0cf3ba [libcalamares] Document NamedEnum in much more detail 2021-02-09 17:03:19 +01:00
Adriaan de Groot
04f4441182 [netinstall] Build up a list of urls, rather than just one
- the list is unused, and doesn't drive the loading of groups either;
  the existing one-string entry is used.
2021-02-09 15:06:53 +01:00
Adriaan de Groot
ca1ae6fd1d [netinstall] Support retranslation in the Config object 2021-02-09 11:06:59 +01:00
Adriaan de Groot
335ccbc149 [netinstall] Move other translation parts to Config 2021-02-09 10:58:11 +01:00
Adriaan de Groot
cf7391696e [netinstall] Continue moving settings to the Config object 2021-02-08 22:57:38 +01:00
Adriaan de Groot
f045e4f00e [libcalamares] Switch default language in Belarus
*If* the distro has GeoIP enabled and auto-selects the language for
Calamares, then Belarus now selects Russian, rather the Belarusian.
This is based on some personal input, mostly, and Wikipedia census data.

FIXES #1634
2021-02-07 22:35:32 +01:00
Chrysostomus
16eff98a06 Don't use f-strings yet. 2021-02-07 15:39:38 +02:00
Chrysostomus
0c92a36a53 Remove unnecessary comment 2021-02-07 15:29:30 +02:00
Chrysostomus
6d55005da0 Mount subvolumes to correct mountpoints 2021-02-07 00:16:26 +02:00
Chrysostomus
b16bd6bb23 Fix name error 2021-02-06 20:03:30 +02:00
Chrysostomus
67aedd5582 Move comments closer to where they are used 2021-02-06 19:54:29 +02:00
Chrysostomus
16bf7925a2 Adjust comments 2021-02-06 19:48:09 +02:00
Chrysostomus
1896a38ccc Fix a typo 2021-02-06 01:38:03 +02:00
Chrysostomus
1e0295dc65 Fix name error 2021-02-03 22:55:11 +02:00
Adriaan de Groot
84240683f5 [finished] Apply coding style 2021-02-03 17:16:22 +01:00
Adriaan de Groot
cb4248e56d [finished] Move config from viewstep to config object
- the configuration is still duplicated in the widget, and
  functionality still needs to move to the Config object
- the ViewStep is cut down to almost nothing
2021-02-03 17:14:49 +01:00
Adriaan de Groot
c82b802f4e [libcalamares] Typo in documentation 2021-02-03 17:12:33 +01:00
Adriaan de Groot
4ae3a7af61 [finished] Start Config-ification
- Introduce a Config class with suitable properties for use in QML,
  read configuration; this is unused right now.
2021-02-03 16:54:18 +01:00
Adriaan de Groot
b8a9c4c3b7 [users] Be more forgiving in tests
- the host system's /etc/group is being read, and that varies between
  host OS versions; since I was doing today's release on KaOS, the
  test was failing because of arbitrary differences between the
  default groups on each Linux flavor.
2021-02-03 13:48:01 +01:00
Adriaan de Groot
144b51f00e [partition] Use automount control
FIXES #1604

(Admittedly, this fixes the problem only when there's Plasma Solid automount
present, and not any of the other kinds; but none of those have been reported
yet, and adding them into AutoMount.cpp is opaque to the rest of the
system)
2021-02-03 01:31:37 +01:00
Adriaan de Groot
17f73b1294 [partition] Test automount job in a queue 2021-02-03 01:26:49 +01:00
Adriaan de Groot
38fa1d9567 [libcalamares] Distinguish logging raw, shared and unique pointers
- It shouldn't be necessary to explicitly .get() pointers for
  logging, and it's convenient to know when a pointer is smart.
  * no annotation means raw (e.g. @0x0)
  * S means shared
  * U means unique
2021-02-03 01:06:25 +01:00
Adriaan de Groot
c43a6ab866 [partition] Improve logging in automount test
- switch logging in job to VERBOSE because we don't want to be printing
  pointers to the regular session log
- switch logging in test to VERBOSE to actually see the messages from the Job
- hook the test into the build
2021-02-03 00:46:34 +01:00
Adriaan de Groot
c98a330bf9 [libcalamares] Store DBus reply value, drop debug-logging 2021-02-03 00:46:00 +01:00
Adriaan de Groot
aae815cf3b [partition] Add trivial test for automount management job 2021-02-02 23:01:59 +01:00
Chrysostomus
fcf6e2fb25 fix typos 2021-02-02 23:07:35 +02:00
Adriaan de Groot
1704ad5977 [partition] Add a job to handle automount behavior
- while here, nudge CalamaresUtils automount API a little,
  since it doesn't really need an rvalue-ref.
2021-02-02 19:18:19 +01:00
Adriaan de Groot
f3752e200a [libcalamaresui] Display first 6, last 2 lines of long error messages, preserve newlines 2021-02-02 16:40:01 +01:00
Adriaan de Groot
b9210721e6 Merge branch 'issue-1613' into calamares
The popup now cuts down messages to a manageable length.
Hopefully the part that is preserved, will still show
something meaningful for the user (8 lines of text should
be sufficient for the kind of things we do).

FIXES #1613
2021-02-02 16:35:10 +01:00
Adriaan de Groot
eafb8149b3 [libcalamares] Test some degenerate truncation cases 2021-02-02 15:35:53 +01:00
Adriaan de Groot
a383aa974a [users] Need <memory> for unique_ptr
- Although unique_ptr is only used when ICU is enabled, include it
  always because it is likely that we'll use more unique_ptr
  in the implementation at some point.
2021-02-02 13:38:52 +01:00
Adriaan de Groot
caff0176b1 [libcalamares] Need <memory> for unique_ptr
FIXES #1631
2021-01-31 21:40:41 +01:00
Neal Gompa
e56bdd019f modules/bootloader: Use the correct names for the shim binaries
Ever since signed shim binaries for multiple architectures became
available, the shim binaries installed in Linux distributions have
been renamed to include the EFI architecture in the binary names.

This started in Fedora, but is now used in openSUSE and Ubuntu too.

Reference for shim binary names comes from shim spec in Fedora:

d8c3c8e392/f/shim.spec (_23-32)
2021-01-30 05:37:41 -05:00
Adriaan de Groot
7ab9c63903 [libcalamares] Extend test with some degenerate cases 2021-01-29 11:53:36 +01:00
Adriaan de Groot
5c402ffd66 [libcalamares] Truncate to a character count as well 2021-01-28 22:13:44 +01:00
Adriaan de Groot
1542bad224 [libcalamares] Truncate strings without trailing newline properly 2021-01-28 15:30:00 +01:00
Adriaan de Groot
8e3ed3c933 [libcalamares] Remove redundant variable, use NEWLINE instead of character-literal 2021-01-28 15:24:05 +01:00
Adriaan de Groot
3623e9aefc [libcalamares] Extend tests of string-truncation 2021-01-28 14:47:03 +01:00
Adriaan de Groot
b85e5b52c2 [libcalamaresui] Apply coding style
- Some minor bits snuck in with the string-truncation code
- While here, make UPDATE_BUTTON_PROPERTY more statement-like
  so it doesn't confuse code-formatters.
2021-01-28 13:52:48 +01:00
Adriaan de Groot
db5f3bc309 Merge branch 'issue-1613' into calamares 2021-01-28 01:07:03 +01:00
Adriaan de Groot
319a720d1b [libcalamares Expand tests 2021-01-28 01:06:09 +01:00
Adriaan de Groot
b144d81979 [libcalamares] Fix up smart-string-truncation
- off-by-one when source ends with a newline
- lastNewLine was being calculated as a left-index into the string,
  then used as a count-from-right
2021-01-28 01:02:46 +01:00
Adriaan de Groot
3be360e433 [libcalamares] Add tests to string truncation
- check that basic manipulations succeed
- trailing-lines selection fails, though
2021-01-28 00:23:13 +01:00
Adriaan de Groot
8cc114bf2c [libcalamares] Move smart-string-truncation to library
Expand the API a little to support first-lines, last-lines,
and something of both. Use strong types to make the names
clear for each.
2021-01-27 23:51:03 +01:00
benne-dee
f8385d2cb8
Fix https in URL 2021-01-27 23:12:29 +05:30
benne-dee
13181a52ee
Define schema for groups in netinstall.schema.yaml 2021-01-27 22:38:40 +05:30
Chrysostomus
8c0c84f162 Create all fstab entries one way instead of having special handling 2021-01-27 15:41:01 +02:00
benne-dee
938edf5bd6
Create shellprocess.schema.yaml 2021-01-27 11:41:53 +05:30
Chrysostomus
14fbbd92dc Get configured subvolumes from the global storage 2021-01-26 22:56:31 +02:00
Chrysostomus
092374d08c Add modified list to global storage 2021-01-26 22:48:02 +02:00
Chrysostomus
f53f43ad03 Remove some unnecessary bits 2021-01-26 22:42:35 +02:00
Chrysostomus
4b6718b354 Further generalize subvolume handling 2021-01-26 22:35:42 +02:00
Chrysostomus
942221c764 Generalize subvolume handling 2021-01-26 22:24:50 +02:00
Chrysostomus
945effb048 Amend subvolumes to include path 2021-01-26 22:13:29 +02:00
Chrysostomus
b5cfa5109e Add schema definition 2021-01-26 21:34:11 +02:00
Chrysostomus
4ab30569c2 Add default configuration 2021-01-26 21:31:33 +02:00
Adriaan de Groot
4f78afe67e [libcalamaresui] Display a reduced amount of details
Cut the error message from down to a maximum of 8 lines
so that the messagebox does not hopelessly overflow.
2021-01-26 00:37:08 +01:00
Adriaan de Groot
f0fd47eeb3 [libcalamares] Simplify logging-manipulators
Writing `Logger::NoQuote{}`` has annoyed me for a while, so
switch it to a constant, like SubEntry, so it looks more
like a regular manipulator object.
2021-01-26 00:13:10 +01:00
Adriaan de Groot
c1064c5e08
Merge pull request #1597 from Chrysostomus/btrfs-swap
[fstab][mount] Btrfs swapfile handling
2021-01-25 15:19:45 +01:00
Anubhav Choudhary
b4078f3634 Changed branding keynames + minor fixes 2021-01-25 01:09:20 +05:30
Anubhav Choudhary
186c065b4c PasteURL sent to clipboard 2021-01-23 22:49:23 +05:30
Anubhav Choudhary
a2c930a714 Code-formatted and Copyright-text added 2021-01-23 21:16:32 +05:30
Anubhav Choudhary
ff66e4b3d5 Redirecting logUpload vars to pasteUtility 2021-01-23 20:47:33 +05:30
Anubhav Choudhary
f6cb879929 branding.desc updated 2021-01-23 20:43:55 +05:30
Adriaan de Groot
9a4c599e22 [libcalamares] Tidy logging a little for Python errors 2021-01-22 14:49:20 +01:00
Adriaan de Groot
6978ce3cb4 [partition] Collect more kpmcore 4.2 code 2021-01-20 14:56:34 +01:00
Adriaan de Groot
520f08bbba [partition] Fix build with legacy kpmcore 2021-01-20 14:54:12 +01:00
Adriaan de Groot
31bf38977e [partition] Refactor partition-labeling 2021-01-20 14:48:44 +01:00
Adriaan de Groot
3ade1fd84a Merge branch 'add-automount-control' into calamares 2021-01-18 16:28:12 +01:00
Adriaan de Groot
b709ba7a5b
Merge pull request #1590 from deprov447/Back/Next_buttons_at_installation
Navigation buttons hideability during installation
2021-01-18 16:24:10 +01:00
Adriaan de Groot
9482935034
Merge pull request #1572 from gportay/partition-output-more-things-in-overiew
[partition] output more things in overiew
2021-01-18 15:08:19 +01:00
Adriaan de Groot
478af25cec
Merge pull request #1571 from gportay/unpackfs-skip-overlay-extended-attributes
[unpackfs] Skip overlay extended attributes
2021-01-18 15:00:12 +01:00
Anubhav Choudhary
0ff32784d1 hooked backAndNextVisible signal to nonQML navigation 2021-01-13 22:41:25 +05:30
Anubhav Choudhary
a9539018e9 [fixed] backAndNextVisbility logic 2021-01-13 22:15:22 +05:30
Gaël PORTAY
af5c57a713 [partition] Output filesystem features in overview 2021-01-08 08:57:03 -05:00
Gaël PORTAY
c045af1975 [partition] Output GPT entries in overview 2021-01-08 08:57:03 -05:00
Gaël PORTAY
bf9c9a64f1 [libcalamares] Introduce new function getPartitionTable 2021-01-08 08:54:02 -05:00
Adriaan de Groot
132ff59d9c [libcalamares] Make running commands less chatty
If there's no output, don't mention it; don't mention failure modes
if the command was successful.
2021-01-06 00:07:35 +01:00
Adriaan de Groot
a3eae323f1 [libcalamares] Rename test-executable: avoid clashes with 'cala<tab>' 2020-12-22 22:08:23 +01:00
Adriaan de Groot
d74bdbcfd0 [libcalamares] coding-style, logging in calautomount 2020-12-22 22:07:17 +01:00
Adriaan de Groot
3150785ff1 [libcalamares] Use shared_ptr instead of unique_ptr
The value inside a unique_ptr can't be opaque, it needs to be known
at any site where the pointer may be deleted. shared_ptr does not
have that (deletion is part of the shared_ptr object, which is larger
than the unique_ptr) and so can be used for opaque deletions.
2020-12-22 21:29:49 +01:00
Adriaan de Groot
1c4bf58fb4 [libcalamares] automount-manipulation test-program 2020-12-22 21:25:00 +01:00
Adriaan de Groot
f0a33a235c [libcalamares] Make automountDisable() more flexible 2020-12-22 21:24:30 +01:00
Adriaan de Groot
9e6bddf31a [partition] Add new AutoMount-manipulating helpers 2020-12-22 16:05:20 +01:00
Adriaan de Groot
1c285f011b [libcalamares] Export partition-syncer symbols 2020-12-22 16:03:51 +01:00
Adriaan de Groot
c963d8905f [netinstall] Merge the two descriptions of *immutable* 2020-12-21 17:24:06 +01:00
Chrysostomus
271122865f define global storage 2020-12-20 01:27:45 +02:00
Adriaan de Groot
2ccd5a2043 Docs: explain about loadmodule
The Python-specific `testmodule.py` was replaced by the more
general `loadmodule`.

FIXES #1596
2020-12-14 16:18:50 +01:00
Anubhav Choudhary
e3a41571f0 Spacing added 2020-12-08 18:19:14 +05:30
Chrysostomus
727f7859b7 Mount @swap to /swap when needed 2020-12-07 22:59:29 +02:00
Chrysostomus
b180cbd47d Generate a subvolume for swap if swapfile is used 2020-12-07 22:52:39 +02:00
Chrysostomus
97eb32bf5c Correct the path of swapfile on btrfs 2020-12-07 22:47:32 +02:00
Chrysostomus
80a538665e Generate entry for subvolume @swap 2020-12-07 22:39:21 +02:00
Chrysostomus
3f0612b4ad Use different location for swapfile on btrfs root 2020-12-07 22:31:20 +02:00
Anubhav Choudhary
0f2320bd47 Initializing bools in settings.h 2020-12-07 21:40:59 +05:30
Anubhav Choudhary
03d1fe434c Navigation button hideability added 2020-12-06 04:32:18 +05:30
Chrysostomus
59cfdcccdf Use variable instead of a function 2020-12-05 22:57:51 +02:00
Chrysostomus
0ed0d37693 Don't use plymouth-encrypt if there is keyfile in use, because it is buggy and asks for password even when it is not needed 2020-12-05 22:55:35 +02:00
Adriaan de Groot
06c6ea04c0 [users] Make status message consistent (no .) 2020-12-04 22:26:27 +01:00
Calamares CI
3c14d7092a i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-12-04 22:11:59 +01:00
Adriaan de Groot
a93e96da7c [branding] Restore dropped https 2020-12-04 20:56:46 +01:00
Anubhav Choudhary
e8238ca713 Name added in copyright section 2020-12-04 23:01:06 +05:30
Anubhav Choudhary
a4c759355b [Fix] WelcomePage links
"Generic support" and "Known Issues" links fixed
2020-12-04 10:39:07 +05:30
Adriaan de Groot
f4133a97db [libcalamares] Make test a bit more verbose (before failing) 2020-11-30 15:38:17 +01:00
Adriaan de Groot
fa7d2bda16 [libcalamares] Misplaced space in a test-filename 2020-11-30 15:28:08 +01:00
Adriaan de Groot
1f21b9ad73 [dracutlukscfg] Const data
The QLatin1String() might be replaced by char[], that trades one
initialization for two but with a simpler data section; this
probably is not worth profiling.
2020-11-30 14:41:02 +01:00
Adriaan de Groot
1f0aec5f87 [dracutlukscfg] Job-internal constant data doesn't need to be a member 2020-11-30 14:35:21 +01:00
Adriaan de Groot
d2c7c42aec [dracutlukscfg] More static methods -> free functions 2020-11-30 14:32:36 +01:00
Adriaan de Groot
6d02bab098 [dracutlukscfg] static methods -> free functions
These methods don't touch anything in the class, and are more safely
tucked away as static (TU-local) free functions.
2020-11-30 14:23:06 +01:00
Adriaan de Groot
6df3c023c8 [luksbootkeyfile] Free functions that really are static (TU-local) 2020-11-30 14:16:35 +01:00
Adriaan de Groot
b82da569d5 [plasmalnf] Remove unused (widget) files 2020-11-30 14:16:35 +01:00
Adriaan de Groot
06e2db946f [plasmalnf] Older Qt doesn't have -> for iterator
With Qt 5.15.2 (and clang), `k->first` works, but this breaks
with Qt 5.11 (and gcc), this is not available and the dereference
  must be written differently, `(*k).first`.
2020-11-30 13:12:42 +01:00
Adriaan de Groot
ff66eacd0d Merge branch 'issue-1573' into calamares 2020-11-30 12:31:26 +01:00
Adriaan de Groot
fb9fa347a0 [plasmalnf] Fix iteration
`for k : images` iterates over the values in the map, while we need
both the key (the theme-id) and the value (the image to hand to
that theme).
2020-11-30 12:30:01 +01:00
Adriaan de Groot
bcff0454a3 [plasmalnf] Give the themes a selected-state
- This kind of runs around the selection model on the view,
  but we're drawing radio buttons ourselves **anyway**
  and the list of themes knows which is selected / current
  independent of the view.
2020-11-30 12:11:11 +01:00
Adriaan de Groot
da4f8fffcf [plasmalnf] Give the theme list plenty of space 2020-11-30 11:31:44 +01:00
Adriaan de Groot
cf538fb837 [plasmalnf] Implement a delegate for drawing the list of themes 2020-11-30 11:19:00 +01:00
Adriaan de Groot
cc6611bac4 [plasmalnf] Make 'the size of screenshots' available outside ThemeInfo 2020-11-30 10:46:46 +01:00
Adriaan de Groot
dac590a094 [plasmalnf] Rip out the intermediate model again, in prep for a delegate 2020-11-28 16:53:35 +01:00
Adriaan de Groot
61a2335909 [users] Stray space in message (reported by Transifex user Moo) 2020-11-24 23:47:13 +01:00
Adriaan de Groot
ccfbd6b972
Merge pull request #1566 from Chrysostomus/calamares
Don't use a keyfile for encrypted partitions if /boot in unecrypted
2020-11-24 16:13:32 +01:00
Adriaan de Groot
2a30ae1e25 [unpackfs] Log failure during unpackfs more clearly 2020-11-22 23:14:02 +01:00
Adriaan de Groot
66da5f2fa4 [netinstall] Removing the last package should clear it out.
FIXES #1577
2020-11-18 17:27:50 +01:00
Adriaan de Groot
06cbabd189 [plasmalnf] Simplify (warnings--, debug--) 2020-11-17 14:40:21 +01:00
Adriaan de Groot
faa1cb6b65 [plasmalnf] Demand-load image for a theme 2020-11-17 14:32:50 +01:00
Adriaan de Groot
58ea40c14d [plasmalnf] Add a description
- add a role for description
- change view to a table view
2020-11-17 12:41:50 +01:00
Adriaan de Groot
258a14bea2 [plasmalnf] Expose only the themes model
- make ThemeInfo and ThemeInfoList internal, expose only
  ThemesModel to the rest of the PlasmaLnF module
- don't build the widget anymore (needs to be replaced by
  a delegate)
2020-11-17 11:56:09 +01:00
Adriaan de Groot
04a6fbc4c4 [plasmalnf] Fix debug-logging
- ProcessResult isn't loggable, so operator bool() is called, so
  it logged 'false' on failure which isn't helpful.
2020-11-17 11:42:27 +01:00
Adriaan de Groot
0a88273e0d [plasmalnf] Replace combobox with a view 2020-11-17 11:38:33 +01:00
Adriaan de Groot
3909459563 [plasmalnf] Signal more changes to the model
- also individual changes need to be signalled
- use QSignalBlocker to avoid spamming changes when calling
  aggregate change methods
- refactor findById() so that also a row number can be
  obtained, which is needed for the change signals.
2020-11-17 11:17:47 +01:00
Adriaan de Groot
f93cec031b [plasmalnf] Introduce an index-lookup function
- for signalling model changes, also need to know indexes / row
2020-11-17 00:25:48 +01:00
Adriaan de Groot
f9e99da468 [plasmalnf] Improve lnf model
- remove useless widget pointer from themeinfo
- notify when data changes in the model
2020-11-17 00:12:47 +01:00
Adriaan de Groot
1f57a0ddda [plasmalnf] Very basic combo-box based UI 2020-11-17 00:02:59 +01:00
Adriaan de Groot
aaa56b6903 [plasmalnf] Rip out most of the widget
- put a filter model in place, so only the themes with "show" set
  are displayed
- rip out the messing about with widgets, soon to introduce a model-
  based UI
2020-11-16 23:36:32 +01:00
Adriaan de Groot
d4887426e2 [plasmalnf] Set screenshots on themes, filtering
- while here reorder the config so the effect of *showAll* is clearer
2020-11-16 21:57:06 +01:00
Adriaan de Groot
254933a488 [plasmalnf] Prep-work for loading the themes into the model 2020-11-16 21:28:37 +01:00
Adriaan de Groot
57907ca992 [plasmalnf] Move model to ThemeInfo files 2020-11-16 18:14:23 +01:00
Calamares CI
9bf0a3414f i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-11-16 12:15:52 +01:00
Chrysostomus
ff9f47ec83 Fix syntax errors 2020-11-15 01:42:16 +02:00
Chrysostomus
567b01eab0 call function at different scope to avoid name collision 2020-11-13 23:39:25 +02:00
Chrysostomus
09798a2a12 Use free functions (I wish I had known I can do this) 2020-11-13 00:02:12 +02:00
Chrysostomus
8676ce9a20 Simplify the generators 2020-11-12 23:57:02 +02:00
Gaël PORTAY
feab8bebba [partition] Remove unused attribute m_defaultFsType
This attribute is used since the commit fcd0e8d36 [partition] Apply
partition layout when replacing free space
2020-11-12 15:15:51 -05:00
Adriaan de Groot
dda2e1f29f Merge commit 'a8359696caf07b81b85db8acad2d3f44720d07fa' into calamares
This is the bugfix part (rather than the "clean up this widgets mess")
of issue-1573, ensuring that the LookAndFeelPackage setting is
saved to the target system config file.
2020-11-12 15:59:56 +01:00
Adriaan de Groot
27f1e82a8f [plasmalnf] Remove unused path-setting from the widget
- Only Config needs to know the path, since it is responsible for
  doing the actual lnf changes.
2020-11-12 15:59:03 +01:00
Adriaan de Groot
a19109ed0b [plasmalnf] Prepare a new model
- start a model for available themes, to replace the list held
  by the widget which just duplicates information.
- move preselected theme to Config.
2020-11-12 15:36:29 +01:00
Adriaan de Groot
03e09cb7e6 [keyboard] When changing layouts, reset variant
- Need to update the variant that is in use, **and**
  explicitly update it in the widget, in order to re-load
  the keyboard image for the newly-selected layout+variant.
2020-11-12 15:29:15 +01:00
Adriaan de Groot
fdfe3937e9 [keyboard] Tell the keyboard preview to update on config changes
These calls to setLayout() and setVariant() got lost in
the transition to Config object, in 5afe5413.

Reported by Harald Sitter.
2020-11-12 14:50:21 +01:00
Gaël PORTAY
2e6d632c7c [partition] Fix typo 2020-11-11 12:49:44 -05:00
Adriaan de Groot
cba2733471 [plasmalnf] Move job creation to config 2020-11-11 14:45:31 +01:00
Adriaan de Groot
0af12546ef [plasmalnf] Migrate more settings to Config 2020-11-11 14:41:45 +01:00
Adriaan de Groot
b4aca7e188 [libcalamares] Tidy up documentation for System::runCommand
- Make explicit which one runs in the host, which one is selectable.
- Document *location* parameter in the selectable version.
- Tidy up alignment of apidox.
2020-11-11 14:03:23 +01:00