Adriaan de Groot
d2c3f7a326
libcalamares: improve formatting of Qt error messages
...
These come through without function information, but we
can format them in one line by mis-using function info.
2023-11-07 00:53:10 +01:00
Adriaan de Groot
b57db97412
libcalamares: massage logging
...
Make the log-to-file always follow columns (with time
at the start of each line) so that stdout and the
log file look more alike.
2023-11-07 00:53:10 +01:00
Adriaan de Groot
63b0589382
CI: apply style tool across the entire codebase
2023-10-17 22:24:46 +02:00
Adriaan de Groot
1efb12e332
libcalamares: rename CalamaresUtilsSystem and Gui
2023-09-11 20:40:10 +02:00
Adriaan de Groot
eb840d4117
libcalamares: ditch namespace CalamaresUtils
...
- Most CalamaresUtils things go to Calamares
- YAML support to Calamares::YAML and then remove redundant "yaml"
from the function names.
2023-09-11 20:34:01 +02:00
Adriaan de Groot
8a8860e75c
Qt6: resolve TODOs against missing KF6
...
- On FreeBSD, no KF6 was available
- On KDE Neon Unstable, there are somewhat wonky KF6 packages available
- Adjust CMake to find the KDE Neon versions, then fix the C++ code
2023-09-04 21:51:03 +02:00
Adriaan de Groot
4b3278058b
libcalamares: repair test
...
The calamaresstyle tool reformatted a bunch of R-strings,
leading to test failures. Mark them with INDENT-OFF so
astyle doesn't break them again.
2023-09-03 23:16:54 +02:00
Adriaan de Groot
cdb2eb8b9a
libcalamares: deal with KF5 macro expansion
...
Since KF5 is not looked-for in the Qt6 build, mock up
a useless macro-expander in its place.
2023-09-03 23:00:13 +02:00
Adriaan de Groot
fe8939e745
libcalamares: deal with QRegExp
2023-09-03 22:58:49 +02:00
Adriaan de Groot
99d012c5ce
libcalamares: deal with QVariant
...
Compatibility header required, and logging was missing
a (transitively included in Qt5) include for QVariant.
2023-09-03 22:58:44 +02:00
Adriaan de Groot
27329a497a
libcalamares: deal with QMutexLocker
...
- Add a compat/ directory with support for Calamares-named
variations of Qt classes where there are relevant differences
between Qt5 and Qt6
2023-09-03 22:58:33 +02:00
Adriaan de Groot
50f2a6ad4a
libcalamares: deal with QPair
...
Use std::pair instead. Also applies to Qt5 build.
2023-09-03 22:53:43 +02:00
Adriaan de Groot
10da2c257d
Merge pull request #2009 from calamares/issue-1940
...
[libcalamares] Remove translation-languages define
2022-07-18 23:03:22 +02:00
Adriaan de Groot
18a3092aa1
[libcalamares] Use namespace Calamares
...
The distinction CalamaresUtils and Calamares is old-fashioned,
since we can use nested namespaces (and already do) for a lot
of things; make libcalamares/locale/ a bit more consistent
by using namespace Calamares::Locale for everything.
2022-07-02 23:19:44 +02:00
Adriaan de Groot
273941f451
[libcalamares] Add convenience for building macro-expanders
2022-07-02 15:56:21 +02:00
Adriaan de Groot
821a62ffbb
[libcalamares] Add missing <memory> for std::unique_ptr
...
SEE #1972
2022-06-02 14:38:44 +02:00
Adriaan de Groot
72240d0d59
Merge branch 'work-3.3' into calamares
2022-05-29 17:22:36 +02:00
Adriaan de Groot
3e72635204
[libcalamares] Fix path-search for loading branding-translation
...
- log which path is actually being used
- there are two overloads for QTranslator::load(); the intention
was to call `QTranslator::load(const QLocale&, ...)`, but the
types of the arguments were wrong, leading to the other
overload being called, and interpreting the locale-name
(e.g. "nl") as a full filename.
Improve logging, call the "other" overload with the right parameters
and drop the not-needed ones.
FIXES #1961
2022-05-29 00:55:35 +02:00
Adriaan de Groot
66682b3e84
Merge branch 'calamares' into work-3.3
2022-05-18 15:13:21 +02:00
Adriaan de Groot
874a0c1f38
CI: apply coding style globally again
2022-05-18 12:44:55 +02:00
Adriaan de Groot
4713f0be42
Merge branch 'calamares' into work-3.3
2022-05-04 11:59:46 +02:00
Adriaan de Groot
1f7b2a3d2d
[libcalamares] Remove CommandList destructor
...
The destructor was just the default one, but declaring it
blocks the default copy constructor.
2022-05-04 11:38:42 +02:00
Adriaan de Groot
5307976179
[libcalamares] Special-case startup for some languages
2022-05-04 10:10:35 +02:00
Adriaan de Groot
bbea67ecb4
[libcalamares] Add an expand() to command lines and lists
...
- While this is primarily convenient for testing (e.g. checking
that a command is expanded the way we expect), it simplifies
some of the code because it's now clear that run() uses an
expanded copy of the command-list to do the actual work.
2022-04-13 14:08:21 +02:00
Adriaan de Groot
d76dd2f8e0
[libcalamares] Use new expander in CommandList
...
- This switches @@ROOT@@ for ${ROOT} and uses standard macro-
expansion mechanisms for the commands; undefined variables
will be logged as well.
2022-04-12 16:06:42 +02:00
Adriaan de Groot
f923dedc3f
[libcalamares] Add a word-expander
...
This is a variant on KMacroExpander, which allows for
reporting of errors after expansion.
2022-04-12 15:28:07 +02:00
Adriaan de Groot
d03a8acc9d
[libcalamares] Create namespace Calamares::String
...
This is a step towards getting rid of CalamaresUtils and
using more structured namespaces overall, e.g. Calamares::String
for things related to string-handling.
2022-04-12 14:14:02 +02:00
Adriaan de Groot
82b5ca8bfc
Merge branch 'calamares' into work-3.3
2022-04-12 12:44:39 +02:00
vt
73462d9214
[libcalamares] Fix file-reading from target system
...
readTargetFile was not fully reading files because of an incorrect
EOF check. This could cause /etc/openswap.conf files to be
truncated and hibernation to fail on installed systems.
2022-04-10 19:36:38 -04:00
Adriaan de Groot
ec3282e15d
[libcalamares] Allow checking a Once object for repeat messages
2022-03-28 12:28:07 +02:00
Adriaan de Groot
f888cb87d1
[libcalamares] Start deprecating signed sizes
2022-03-22 15:23:24 +01:00
Adriaan de Groot
97031ea3e6
[libcalamares] The amount of memory in the system cannot be negative
2022-03-22 15:23:24 +01:00
Adriaan de Groot
99b19b9539
[libcalamares] Always log to file, sometimes to terminal
2022-03-22 12:54:54 +01:00
Adriaan de Groot
5160fdc26a
[libcalamares] Port away from KPluginFactory
2022-02-08 15:50:17 +01:00
Adriaan de Groot
660b198da0
[libcalamares] Avoid more moc warnings with recent Clang
2022-02-07 12:51:06 +01:00
Adriaan de Groot
3ea25a901e
[libcalamares] Avoid compiler warnings when stdin is defined to something else
2022-02-07 11:32:22 +01:00
Adriaan de Groot
d5c6a70442
[libcalamares] Use signed sizes
2022-02-07 11:22:13 +01:00
Adriaan de Groot
ffeab32403
[libcalamares] Apply coding style
2022-01-31 23:41:37 +01:00
Adriaan de Groot
80300e412c
[libcalamares] When logging extra lines to warning or error, suppress label
...
Avoid logs like
23:29:57 [2]: void Config::setConfigurationMap(const QVariantMap&)
WARNING: Configuration for *initialSwapChoice* is not one of the *userSwapChoices*
WARNING: .. Choice "small" added.
where the label is duplicated.
2022-01-31 23:27:35 +01:00
Adriaan de Groot
bc2713ccbb
[libcalamares] Add string functions for lstrip() and rstrip()-like
2021-12-08 14:08:37 +01:00
Adriaan de Groot
890c17cd71
[libcalamares] Expand error-logging when creating files
2021-12-06 14:46:26 +01:00
Adriaan de Groot
6ef7acc108
[libcalamares] Add minor tests for new readTargetFile
2021-12-06 14:46:26 +01:00
Adriaan de Groot
baf8297cc4
[libcalamares] Reading a file from target system
2021-12-06 14:46:26 +01:00
Adriaan de Groot
5a4e2b73ab
[libcalamares][partition] Give RedactedName a convert-to-QString
...
- use hex-trailer
- while here, convert DebugRow to use a copy rather than a reference,
to avoid dangling references when applied to temporaries
- convert *partition* module to use the RedactedNames
2021-11-16 15:22:04 +01:00
Adriaan de Groot
152b3c333b
[libcalamares] Introduce redaction-of-names class for logging
...
- redacted names are stable inside of one run of Calamares
- random, private displays of a given string for a context
SEE #1593
2021-11-16 14:47:13 +01:00
Adriaan de Groot
7b3c4db8f0
[libcalamares] Redacted -> RedactedCommand
...
- For logging (shell) commands where a password might become visible, use
RedactedCommand. Rename it to allow for other kinds of redaction, too.
2021-11-16 14:21:46 +01:00
Adriaan de Groot
5e6d292235
FIXUP
2021-11-05 16:31:47 +01:00
Adriaan de Groot
faf1d68d32
[libcalamares] Tidy up processing of process output
...
- force C locale on processes
- split trailing output if output per-line-processing is active
2021-11-05 16:26:45 +01:00
Adriaan de Groot
e5323ec487
[libcalamares] Expand Runner documentation
...
- document a bit more of the methods
- provide convenience method enableOutputProcessing() alongside
an explicit setter; adjust tests to the changed API.
- add an executable() information method.
2021-11-03 12:20:36 +01:00
Adriaan de Groot
2088502e57
[libcalamares] Don't use QProcess directly outside of Runner
2021-11-02 23:46:26 +01:00