novomesk / qt-jpegxl-image-plugin

Qt plug-in to allow Qt and KDE based applications to read/write JXL images.
GNU General Public License v3.0
91 stars 8 forks source link

Add Qt6 support to CMake #16

Closed dbermond closed 3 years ago

dbermond commented 3 years ago

The CMake option -DQT_MAJOR='<number>' specifies the major Qt version that will be used to build.

For example, -DQT_MAJOR='6' will use Qt6.

The current minimum required value is 5, due to the minimum Qt version requirement (5.14.0).

novomesk commented 3 years ago

I appreciate the fact that you tried how the plug-in works with the Qt6. However, I hesitate to accept the changes because:

dbermond commented 3 years ago

Thank you for the reply. I understand, no problem.

Regarding jxl.desktop, it was just renamed. Users will have 2 files only if they chose to co-install both Qt5 and Qt6 packages. The rename is to remove the file conflict on such co-install. Maybe the rename could be done only if Qt6 is chosen.

Regarding Qt5 and Qt6 plugins location, each one would go to the distro defined location. For example, on Arch Linux the Qt5 location is /usr/lib/qt/plugins, while the Qt6 one is at /usr/lib/qt6/plugins. So they can be co-installed without conflict, serving to both Qt5 and Qt6 programs at the same time.

Regarding the CMake script, I see nothing that prevents it from also accepting Qt6. It works fine for me. It would open the door for more people that are already developing for Qt6 (like me).

Regarding your obstacle, I see. On Arch Linux we already have both Qt5 and Qt6, and they can be co-installed. This way, the Qt5 to Qt6 transition can happen more smoothly, since probably the Qt apps will not be all ported at the same time.

I have prepared Arch Linux packages for Qt5 and Qt6: qt5-jpegxl-image-plugin and qt6-jpegxl-image-plugin. They are currently at the Arch User Repository (AUR), but if they become used by more people (or voted) I can consider to move them to the official repositories. The inconvenience is to carry the patches on the packages, as this is something that we usually does not do in Arch, unless necessary like in this case. I hope that you can add official support for Qt6 sometime in the future ;)

I thank you very much for doing this software :)