OSDN Git Service

drop support for storing types that are not QString-convertable via QSettings
authorIvailo Monev <xakepa10@gmail.com>
Sun, 13 Nov 2022 17:27:13 +0000 (19:27 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 13 Nov 2022 17:29:01 +0000 (19:29 +0200)
commitbc0040b9700dd1eddcd4e2b7ca1479bce2abdd78
tree9f230066ec05a648fe2ebe4ae518155fe8a2b02e
parent2ae0376a535bd630fdb6a43f9b796ad44efaca3e
drop support for storing types that are not QString-convertable via QSettings

I am not interested in custom types feature at all - QMainWindow for
example saves its state via QDataStream. ofcourse it involves conversion
but that is the case with QVariant aswell. there is also the qreal type
thing - it may be float, it may double. streaming QRectF has to be done
in such a way to account for both cases but here is the catch - if
conversion fails there has to be fallback which QSettings::value() kinda
covers for types that are not composed of several more types.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/io/qsettings.cpp
src/core/io/qsettings_p.h
tests/auto/qsettings/tst_qsettings.cpp