Before this patch, adding the torrent in
https://github.com/qbittorrent/qBittorrent/issues/11511 and the torrrent
state will stay in torrent_status::checking_resume_data forever.
This is not the correct state since the `torrent_status.errc` field is
non-zero and this commit fixes it.
The old code has a wrong comparison which compares speed limits
in different magnitude: bytes vs KiB. The comparison is removed.
Also the old code treats values that are smaller than 1024 as unlimited
speed which is clearly wrong.
This function will throw exceptions if the required parameters do not
exsit hence a stronger word is more appropriate here.
Also change the function parameter type to QVector. We don't need the
duplicate entries checking as currently we only use 3 fields at max and
can be easily checked by hand. So drop back to QVector which can be
constructed more efficiently.
This is to avoid Windows swapping out other application data from
OS cache and put in torrent data which hinders other program
responsiveness.
The default value "Below normal" is choosen because casual users have
other higher priority apps (such as browser) running and they don't
expect OS to swap out its data. Dedicated seeders most probably will not
have other app running on their system and would expect qbt has
priority over other background services.
The option only has effect on Windows >= 8.
For some users on Windows the physicalDotsPerInch() could return values
that are smaller than the normal 96 DPI which leads to big dialog sizes
taking the entire screen.
So we need to ensure it is at least 96 DPI.
Closes#11405, #11407.