Commit Graph

4911 Commits

Author SHA1 Message Date
Adriaan de Groot
f6d8ed85e4 [netinstall] Allow a title above the netinstall tree
- Supports translation via the config file. This is useful
  (like label:sidebar) when displaying more than one netinstall page.
2020-02-19 09:29:23 +01:00
Adriaan de Groot
5b67ca315a [netinstall] It should be easier to get the number 2 2020-02-19 01:24:24 +01:00
Adriaan de Groot
497ecda14d [netinstall] Move translation of widget headers
Editorial: I really don't like plain CALAMARES_RETRANSLATE() thrown
into the middle of code.
2020-02-18 23:17:18 +01:00
Adriaan de Groot
45c15de623 [netinstall] Configurable name in the sidebar 2020-02-18 17:59:34 +01:00
Adriaan de Groot
be567dc508 [netinstall] Remove unused m_prettyStatus 2020-02-18 17:50:39 +01:00
Adriaan de Groot
4ae484dbca [netinstall] Initial work for configurable sidebar label
- Now that multiple netinstall pages may be supported, it's annoying
  that they all have the same name. Copy the approach from other
  modules (e.g. notesQML) of having the sidebar and other labels
  configured in the config file.
2020-02-18 17:46:56 +01:00
Adriaan de Groot
0877a994f1 [netinstall] Update copyright 2020-02-18 17:40:15 +01:00
Adriaan de Groot
d909b8119e [netinstall] Code-style 2020-02-18 17:37:58 +01:00
Adriaan de Groot
bc5aa1f837 [netinstall] Pretend to clean up resources 2020-02-18 17:37:16 +01:00
Adriaan de Groot
5f1bd4396e [netinstall] Avoid duplicate operations
- Since operations are added each time you leave this page,
   the existing operations (from a previous visit) need to be
   cleaned up. With the old setup of only **one** possible
   set of operations, this wasn't a problem. Now, merging
   in operations is necessary. Implement that by looking for
   the *source* property in an operation.

FIXES #1303
2020-02-18 14:46:00 +01:00
Adriaan de Groot
74169c166a [netinstall] Mark operations with source-module
- This will allow us to find the operations later, by looking for
  the same source-module.
- While here, tidy up types
2020-02-18 14:19:48 +01:00
Adriaan de Groot
7cadfb8ddd [packages] Log unfamiliar package operations
- unknown operations get a warning
 - "source" will be added from netinstall shortly
2020-02-18 12:02:16 +01:00
Adriaan de Groot
056b0d7548 [netinstall] Refactor variant-from-ItemData 2020-02-18 11:40:43 +01:00
Adriaan de Groot
d5675508fa [netinstall] More coding-style
The tools don't always pick up all the style changes in one go
(I think astyle has trouble parsing some Calamares code)
2020-02-18 11:39:54 +01:00
Adriaan de Groot
8286bff95f [netinstall] Shuffle code around a bit
- introduce char const for key name (consistency, it's used lots)
 - polish debugging a bit
 - add some inline code-docs
2020-02-18 11:28:42 +01:00
Adriaan de Groot
17eb3f5e33 [netinstall] Apply coding style 2020-02-18 11:02:53 +01:00
Adriaan de Groot
7c2a196568 [users] Document new knobs
- while here, update copyright notice

FIXES #1140
2020-02-18 10:38:31 +01:00
Adriaan de Groot
f7e8488edf [users] Correct DBus return from hostnamed calls 2020-02-18 10:35:47 +01:00
Adriaan de Groot
094c213baa [users] Also test hostname-setting via hostnamed
SEE #1140
2020-02-18 10:16:19 +01:00
Adriaan de Groot
f1435452ea [users] Polish up tests
- Don't remove test artifacts on failure
 - Coding style
2020-02-17 18:21:44 +01:00
Adriaan de Groot
c5b45c37fc [users] Add tests of the file-writing components 2020-02-17 18:10:46 +01:00
Adriaan de Groot
371fe267b1 Merge branch 'better-hostname' 2020-02-17 17:10:21 +01:00
Adriaan de Groot
94f5b13db0 [libcalamaresui] Restore previous DLLEXPORT names
- Different libraries should have different EXPORTs, so that
   you can IMPORT one while building the other. Reported (and
   kindly explained) by Kevin Kofler.
 - Stick to one header file, though.

While here, update copyright on file.
2020-02-17 16:55:17 +01:00
Adriaan de Groot
49eb8212e3 [users] Imporove enum-naming 2020-02-17 16:46:06 +01:00
Adriaan de Groot
e74831fcb4 [users] Add .conf entries for hostname settings
- Set hostname not-at-all, or via one of two mechanisms
 - Write /etc/hosts or not
2020-02-17 16:40:09 +01:00
Adriaan de Groot
61d096c9ec [users] Prep-work for configurable actions
- tidy include style
 - add setting to UsersViewStep for hostname action
2020-02-17 16:27:53 +01:00
Adriaan de Groot
33b3321698 [users] Simplify reading configuration 2020-02-17 16:05:55 +01:00
Adriaan de Groot
dbba0c9b03 [users] Move Job creation from the widget to the ViewStep
- Having the widget do creation ties the step heavily to that UI;
   start moving towards a state where we have a Config object (not
   here yet; it still queries the UI part) that moves data around
   between UI and ViewStep.
2020-02-17 15:56:41 +01:00
Adriaan de Groot
2471e74aab [users] Provide some accessors to the UI-page data 2020-02-17 15:50:22 +01:00
Adriaan de Groot
ef4bb5e13b [users] Make SetHostName job actions configurable 2020-02-17 15:24:44 +01:00
Adriaan de Groot
6719a41aef [libcalamares] Switch tests to calamares_add_test() 2020-02-17 15:05:00 +01:00
Adriaan de Groot
51e135cfbd CMake: chase introduction of IMPORTED yamlcpp 2020-02-17 15:01:05 +01:00
Adriaan de Groot
6f996d8eed CMake: give yamlcpp a proper imported target
- This makes linking easier,
 - Adds the right includes (needed on FreeBSD),
 - Lets us drop silly GUI setting for non-GUI tests (I think this was
   a side-effect of compiling on FreeBSD, where UI would pull in
   /usr/local/include).
2020-02-17 14:55:12 +01:00
Adriaan de Groot
4495a4c739 CMake: Allow extra libraries in calamares_add_test
- Extra libraries specified via LIBRARIES part of CMake function
 - Convert all the other module tests
2020-02-17 14:36:52 +01:00
Adriaan de Groot
637a57d534 [machineid] Change to calamares_add_test
- The test-macro handles cases without ECM or testing transparently.
 - Adds compile defines for STATICTEST.
2020-02-17 12:04:18 +01:00
Adriaan de Groot
6bdc4a55de CMake: new convenience module CalamaresAddTest 2020-02-17 12:02:53 +01:00
Adriaan de Groot
b42520b0ef [machineid] Apply new STATICTEST specifier, hide implementation details 2020-02-17 11:51:56 +01:00
Adriaan de Groot
92260e7d0b [libcalamares] Document DllMacro.h and add STATICTEST
- document the export macros
 - introduce a "static" that is switched off when re-building code
   for tests.
2020-02-17 11:43:20 +01:00
Adriaan de Groot
b044549013 [libcalamares] Merge PluginDllMacro.h into DllMacro.h
- Let's just have one header definining export- and visibility-
   macros for Calamares. They are still selected based on the
   export flags (*_PRO), just defined in one header instead of two.
2020-02-17 11:37:35 +01:00
Adriaan de Groot
aaa6f6bd55 [libcalamaresui] Drop UiDllMacro.h
- The scattering of DLL export macro's is kind of useless;
   there are several headers, and then the export macro isn't
   even applied consistently. Just drop the one for UI exports,
   which was only used in libcalamaresui.
2020-02-17 11:32:28 +01:00
Adriaan de Groot
44bf0a5d6d [users] Add method for using hostnamed
SEE #1140
2020-02-17 10:57:41 +01:00
Adriaan de Groot
9a7465bfd5 [users] Refactor writing-hostname and writing-hosts
- Move to separate functions, as prep-work for making the actions
   configurable (and optional).
2020-02-17 10:42:54 +01:00
Adriaan de Groot
214f9a308e Merge branch 'improve-tests' 2020-02-16 20:29:24 +01:00
Adriaan de Groot
d5f3e2e7d4
Merge pull request #1318 from yurchor/patch-2
[partition] Fix typo: partitons -> partitions
2020-02-16 20:26:43 +01:00
Yuri Chornoivan
ea82a26dae
Fix typo:; partitons -> partitions
Many thanks in advance for reviewing.
2020-02-16 14:12:48 +02:00
Yuri Chornoivan
b582c27bf4
Fix minor typo
Many thanks in advance for reviewing.
2020-02-16 14:09:30 +02:00
Adriaan de Groot
90f79b0692 [users] Restore error-checking to set-hostname code
- Use the new CreationResult code for compact results
2020-02-14 13:27:49 +01:00
Adriaan de Groot
781322ab41 [libcalamares] Use more descriptive variable name
- If the test failed, you'd get a cryptic message like
	FAIL!  : NetworkTests::testPing() 'r' returned FALSE. ()
   So rename the variable so the failure mode is more obvious.
   (Could have used QVERIFY2() instead, this is simpler)
2020-02-14 13:23:19 +01:00
Adriaan de Groot
f6526f7d9f [libcalamares] Add some tests for CreationResult
- More important is the compiler warning that will show up
   if we add more failure states.
2020-02-14 13:21:16 +01:00
Adriaan de Groot
274115c727 [libcalamares] Update tests to reflect changed API 2020-02-14 13:07:29 +01:00