Page 1 of 1
Qt signals and slots type safety
Posted: Mon Apr 21, 2025 1:09 pm
by jurrie
Hi,
I read in
https://doc.qt.io/qt-6/signalsandslots. ... -arguments that when using the the SIGNAL() and SLOT() macros the signal and slot arguments are not checked by the compiler. When using the variant without the SIGNAL() and SLOT() macros they _are_ checked by the compiler. Seems to me that one would like type checking at compile time. But I'm no C++ or Qt expert. So I wonder, why the choice for the type unsafe variant?
And could the code be rewritten to use the type safe variant? Would such a PR be accepted?
With kind regards,
Jurrie
Re: Qt signals and slots type safety
Posted: Mon Apr 21, 2025 9:02 pm
by janosvitok
The new syntax is available since QT5. If QLC+ is still required to be compilable using Qt4, then the new syntax can't be used.
If QT4 is not needed any more, then rewrite would be useful, along with e.g. removing QT4 support from CMakeLists.txt.
I'm not in charge of QLC+ so I can't tell if QT4 support is still needed.
Jano
Re: Qt signals and slots type safety
Posted: Tue Apr 22, 2025 5:35 am
by jurrie
I hear you.
Been digging in the release notes of older QLC+ versions; QLC+ 4.12.0 (
https://www.qlcplus.org/forum/viewtopic.php?t=12759) has this in the release notes:
Linux users: with this version I am starting to abandon Qt4, for a simple reason: the world moves on and Qt5 is now reasonably present on any modern distro.
Therefore, the official Debian package now requires Qt5. If you really need a Qt4 package, check the OBS repository. I cannot guarantee though for how long QLC+ will be able to build on Qt4.
Since that was released on 10 november 2018, I think it is safe to assume Qt 5 now is the minimum

Re: Qt signals and slots type safety
Posted: Tue Apr 22, 2025 8:35 am
by edogawa
I'm volunteering in packaging in Open Build service, and for these packages I can assure that Qt4 packages have been dropped some years ago. None of the supported Linux distros there ship Qt4 anymore afaik, the build system in QLC source tree meanwhile has been extended to support Cmake and Qt6 while Qmake is being phased out I believe.
We also automatically build Appimages, Windows .exe and MacOS .dmg installers via Github actions for every commit and there's no Qt4 involved there, anywhere, anymore.
But I'd say: lets wait for Massimo as lead developer to comment on this.