Partial revert of 7f904c: empty data is not an error

Authored by thomasfischer on Apr 27 2020, 7:37 PM.

Description

Partial revert of 7f904c: empty data is not an error

Commit 7f904c2ca9ef56 added code to various FileImporter* classes to
check if the given QIODevice for load() operations was readable,
open, but empty or at its end. In such a case, (File*)nullptr got
returned to signal that a (severe) error occurred while loading data.

However, empty data is actually not an error condition and can be
gracefully represented by an empty File object, i.e. one which does
not contain any Elements.
Thus, if an valid (readable) but empty QIODevice is given, return a
valid but empty File object as the result of the load operation.

Details

Committed
thomasfischerMay 23 2020, 9:12 PM
Parents
R462:522e9eb843f1: Fixing spelling in comment
Branches
Unknown
Tags
Unknown