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
Adriaan de Groot
1242f71b3b
Merge pull request #1317 from yurchor/patch-1
...
[luksbootkeyfile] Fix minor typo
2020-02-16 20:26:05 +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
Adriaan de Groot
2d7398161d
[libcalamares] More detail for createTargetFile()
...
- Return a result-object with statrus information and the path
which was previously used (empty for "failures").
2020-02-14 13:03:51 +01:00
Adriaan de Groot
695b88b8a7
[users] Tidy up hostname creation
...
- Use the createTargetFile() convenience functions to do the
actual work.
- This probably involves more copying around of buffers, since it's
creating one big QString and sending that off, rather than writing
little chunks to a file, but I feel this is worth the code simplification.
- Drops all the error checking for creation, though, because the API for
createTargetFile() lousy.
2020-02-14 12:31:53 +01:00
Adriaan de Groot
b337a6b3f5
[user] Apply coding style
2020-02-14 11:46:35 +01:00
Adriaan de Groot
2bb4dd8e22
[users] Refactor hostname-guessing
2020-02-14 11:45:45 +01:00
Gabriel Craciunescu
7c323bdcdc
[users] Try to guess suggested hostname from dmi
...
- nothing compicated for now, just try to get something
from /sys/devices/virtual/dmi/id/product_name and fallback
to -pc thingy if we can't
2020-02-14 11:36:53 +01:00
Adriaan de Groot
6d10c41aeb
Merge branch 'fs-translation'
...
Double-check the uses of filesystem names -- give only *untranslated*
names to system tools, and show *translated* ones.
2020-02-13 13:30:33 +01:00
Adriaan de Groot
5a50a3a40c
[partition] Consistent FS name usage
...
- explicit use of user-visible names in EditExistingPartitionDialog
- consistent conversion of config-values to FS names (user-visible).
The GS value comes from the ViewStep, and should always match
something -- it's already converted to the canonical un-translated
so the type should be good.
2020-02-13 13:24:53 +01:00
Adriaan de Groot
57b608083e
[partition] Fix build - missing )
2020-02-13 13:24:09 +01:00
Adriaan de Groot
ca67534cd2
[partition] Improve logging of bad configs
2020-02-13 13:15:06 +01:00
Adriaan de Groot
472ec32617
[partition] Be explicit about user-visible FS names, ReplaceWidget
2020-02-13 11:49:20 +01:00
Adriaan de Groot
05dfc24af6
[partition] Be explicit about user-visible FS names, CreatePartitionDialog
2020-02-13 11:45:04 +01:00
Adriaan de Groot
88cff387c3
[partition] Be explicit about user-visible FS names, FormatPartitionJob
2020-02-13 11:33:40 +01:00
Adriaan de Groot
bacca04695
[partition] Be explicit about what's user visible in SetPartitionFlagsJob
2020-02-13 11:29:45 +01:00
Adriaan de Groot
29894cec6a
[partition] Convenience userVisibleFS()
...
- Mark uses of filesystem-name where it's intentional that they
are user-visible, with a new convenience function.
2020-02-13 11:22:09 +01:00
Adriaan de Groot
dac5516b2c
[partition] Update copyright, coding style
2020-02-13 11:12:22 +01:00
Adriaan de Groot
a0449abab9
[partition] Do not translate filesystem names
...
- Move contents of FSName to KPMHelpers
- Use the new functions from FillGlobalStorage
Needs more use in the rest of the partition module.
2020-02-13 11:06:53 +01:00
Adriaan de Groot
f410a4bb68
[libcalamares] Convenience function for FS names
...
Because getting the untranslated name of a FileSystem is something
that needs doing consistently, add some functions for that;
it makes it easier to spot places where that isn't done.
Probably doesn't compile, and needs extra documentation.
2020-02-13 10:12:02 +01:00
Adriaan de Groot
c055e1da49
[partition] Use untranslated name of filesystem
...
- Patch from Gabriel Craciunescu
2020-02-13 09:32:06 +01:00
Adriaan de Groot
aa0a799492
[welcomeq] QML warnings--
...
The config bits are all constant, so avoid NOTIFY warnings.
2020-02-12 22:47:11 +01:00
Adriaan de Groot
f094cb543b
[libcalamaresui] Set config object earlier
...
- The config context object should be set earlier, otherwise
QML code will try binding to a non-existent config already
- Document that QMLViewStep::setConfigurationMap() parent implementation
should be called **last**, at the end of the subclass implementation.
2020-02-12 22:33:49 +01:00
Adriaan de Groot
7e0cc7af41
[welcomeq] Add configuration file
...
- copy the buttons-config part from welcome.conf
- create buttons in the QML part
2020-02-12 18:24:07 +01:00
Adriaan de Groot
85b873a1a2
[libcalamaresui] Log QML error message
...
- When loading fails, log a useful error message from the QML
engine (to help debug the QML)
2020-02-12 17:58:21 +01:00
Adriaan de Groot
49ed97cb77
[libcalamares] Allow QML ViewSteps to expose a config object
2020-02-12 17:51:10 +01:00
Adriaan de Groot
f0134aab71
[welcomeq] Add more fields to Config
...
- getters as slots, for later access from QML
2020-02-12 17:37:06 +01:00
Adriaan de Groot
86bf9287ab
[notesqml] Use Branding strings
2020-02-12 16:23:34 +01:00
Adriaan de Groot
ae35256177
[welcomeq] Add top-text
...
- Fix QML indentation to the canonical 4-spaces
- Add a header at the top of the page
- Force the image to load from the filesystem
2020-02-12 16:20:53 +01:00
Adriaan de Groot
18942f835f
[libcalamares] Remove confusing name-qualifiers
...
- Using Branding::ImageEntry, when ImageEntry is an enum class
defined *in* Branding, is superfluous, and it also confuses
moc; the enum type isn't recognized from QML.
2020-02-12 15:35:11 +01:00
Camilo Higuita
15d8503726
[libcalamaresui] Expose the branding strings & urls to qml
2020-02-12 15:18:24 +01:00
Adriaan de Groot
152c3352c2
[welcomeq] Compile the QML into the module
...
- Default implementation is in the QRC
- Register Branding for QML modules (just once)
2020-02-12 15:08:18 +01:00
Camilo Higuita
b5e17b7ea5
[welcomeq] Add full-featured QML for welcome page
...
This is a merge of several commits by Camilo.
2020-02-12 14:31:15 +01:00
Adriaan de Groot
7bf0fded1b
[welcomeq] Port to newer QmlViewStep
2020-02-12 14:25:30 +01:00