Currently, the `bytesToSectors()` function rounds a partition size to the
nearest MiB unit, which may lead to inconsistencies when a partition
is expected to only be a few KiB's.
This patch changes the behaviour of `bytesToSectors()` so that it aligns
on sector size, without rounding the partition size to a multiple of
1MiB.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Currently, all size units are expressed as KiB, MiB or GiB (resp. 2^10,
2^20 or 2^30).
In order to maximize compatibility and consistent results with other
partitioning tools, this commit adds support for sizes expressed as KB,
MB or GB (resp. 10^3, 10^6 or 10^9).
This change won't affect existing users, it simply adds a new option
that wasn't previously handled.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
- stop compiler warnings with some judicious casting;
that's what you get when a container indexed by int
stored those indexes as quintptr.
- apply coding style
- do static initialization more carefully
- float -> qreal (double) because that's what the Qt API expects,
to reduce type-conversion warnings
- apply current coding style
- calamares_automoc() sets AUTOMOC, but also adds some flags
to avoid compilation warnings from the generated MOC code.
- drop weird hard-coded include paths
- Although milliseconds::count() is long long, we pass it to
a Qt interface that only takes int; let's assume we have
only a 32-bit count, since a timeout of 4 billion milliseconds
is roughly 46 days, which we'll just call "no timeout".
- Drop the round-trip of forming a JSON document from a QVariant,
then parsing the document into JSON objects and building a
model out of that. View the Variant directly.
- This is a fairly specialized class, for use only in the
whole-application where it ties in with the module system.
Move it to the application directory and slim down the UI library.
- Include it from the new location.
- Add UIC to Calamares (the application) because there's now
a designer-based widget in it.