Hi,
https://codereview.qt-project.org/c/qt/qtbase/+/550842
has just been merged.TL;DR: this patch will make QFile::open [[nodiscard]] by default starting from Qt 6.10 (*).
While there's some time before that happens, it also means that as soon as the Qt version is bumped to 6.10 in dev, your code will raise warnings (or, under -Werror / developer builds, it will stop compiling) if you call QFile::open() and ignore the return value.
Please prepare your modules in advance: build Qt with `-DQT_USE_NODISCARD_FILE_OPEN` in CXXFLAGS (or use any equivalent way to add that define globally) and fix any raised warnings or errors.
I've already cleaned up qtdeclarative, its dependencies, and qttools.(*) However, we could also *not* wait for the automatic switch, and add this define to the defines always set when building Qt itself. I'm a bit torn on the timing here.
Thank you, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - Trusted Software Excellence
smime.p7s
Description: Firma crittografica S/MIME
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development