Commit graph

14 commits

Author SHA1 Message Date
Tom Dewey
df33637d32 qt6: Replace qAsConst() usage 2024-09-11 17:12:48 +01:00
Alistair Buxton
7725ce7a40 Linux/OSX: Fix reversed fsync check
This if() condition checks the result of seek, write, flush
and fsync. The first three are methods on QFile, so return
a truthy value on success. write() returns number of bytes
written while seek() and flush() return bool true on success.
Therefore they have to be inverted to detect errors. However,
fsync() is a posix system call, so it returns zero (false) on
success. Therefore it should not be inverted.

Note that currently this entire code block can never run.
knownsize is always zero because QFile.size() currently
cannot determine the size of a block device. However, when I
asked to confirm this behavior, a Qt maintainer decided to
implement it, so there is now a PR. If that is released then
this code block will become live and the reversed fsync check
will cause a problem.

PR: https://codereview.qt-project.org/c/qt/qtbase/+/581443
2024-08-07 11:45:20 +01:00
Floris Bos
b918a7ea6f Retry on HTTP/2 frame errors as long as it do is making progress
Ref #767
2023-12-26 16:09:21 +01:00
Robin Geuze
12e024ad7f Also customize image if only a cloudinit payload exists 2023-11-03 10:07:22 +00:00
Floris Bos
2853fd2b87 Windows: improve error reporting if Conditional File Access is active 2023-09-23 19:46:13 +02:00
Floris Bos
e490ec1c4d Windows: fix depreceation warnings
- winsock2.h should be included before windows.h
- QProcess::execute('name') -> QProcess::execute('name', args);
2023-05-22 10:46:07 +02:00
Floris Bos
83e2d22a9a Linux: only eject through udisks2 when we have DBus 2023-03-24 15:41:15 +01:00
Floris Bos
dc6ef75333 udisks2: add support for 'safely removing storage'
mountutils lacks implemention of ejecting storage on Linux.
Add that to our own code (not to mountutils as it is hard to
do DBus calls from there).
2023-03-24 15:33:54 +01:00
Floris Bos
2694f3976a Remove excess new line from "Header:" download debug output 2022-11-20 17:47:54 +01:00
Floris Bos
5fa3fbe8dc Switch to using FAT classes for advanced settings
- No longer relies on operating system for mounting FAT partition
  when applying 'advanced settings'
- change '__attribute__ ((packed))' to '#pragma pack()' as the
  mingw version we are using for Windows has a bug with the former
2022-11-15 01:15:08 +01:00
Floris Bos
30225187bd OSX: fix unmounting drives that have APFS volumes
- If a drive is formatted APFS it will have a seperate disk
devices for physical drive (e.g. /dev/disk2) and volumes
(e.g. /dev/disk3).
Need to unmount all, or opening the device for
writing will subsequently fail.
(User will see an "Error running authopen" error in Imager
in that case).

- Also do not show APFS volumes seperately in the disk
selection dialog. List mount points under physical drive
instead.

Closes #501
2022-11-07 03:36:32 +01:00
Floris Bos
152831e72f Fix clazy-range-loop-detachs and other clazy complaints 2022-07-26 23:20:14 +02:00
Marcel Petrick
829c200fd1 code-quality: fixed all range-loop warnings which were reported from clazy.
See: `rpi-imager/src/downloadthread.cpp:1015:14: warning: Missing reference in range-for with non trivial type (QByteArray) [clazy-range-loop]`
2022-06-08 17:54:06 +02:00
Floris Bos
033ff07abf Move source files to /src 2022-02-14 10:07:15 +01:00
Renamed from downloadthread.cpp (Browse further)