Open geustache opened 4 months ago
I don't know git very well yet, so I had to delete my previous pull request to put in a clean one. Sorry about that
Should we even bother with QT6 + Core5Compat -> Use QTextCodec
? I don't see a good reason to keep it.
Hello @cen1 I understand your comment but there's a good reason for it Qt6 with QTextCodec requires Core5Compat but allows you to manage more encodings.
QStringConverter only handles the following codecs (see Qt doc for more details):
QStringConverter::Utf8 QStringConverter::Utf16 QStringConverter::Utf16 QStringConverter::Utf16LE QStringConverter::Utf32 QStringConverter::Utf32BE QStringConverter::Utf32LE QStringConverter::Latin1
In practice, for new projects, I think Utf8 will be used
After a quick review:
We will also need to add Core5Compat into the CI matrix so we test both build scenarios for at least some tests but that's on me.
I commit fix about compilation issue ! As soon as I have a bit of time, I could look into refining the test scripts to take into account codecs that are not present with qt6 (without core5compat).
You should also use
target_compile_definitions(${QUAZIP_LIB_TARGET_NAME} PUBLIC QUAZIP_CAN_USE_QTEXTCODEC)
instead of
add_compile_definitions(QUAZIP_CAN_USE_QTEXTCODEC)
otherwise including quazip.h will not work as quazip_textcodec.h will still include
Remove dependency on QTextCodec for qt6 with QStringConvert 3 cases Qt5 -> Use QTextCodec QT6 + Core5Compat -> Use QTextCodec (more encoding available) QT6 without Core5Compat -> Use QStringConvert (less encoding available but probably enought for new projects)