On Thursday, 9 June 2022 12:36:25 PDT Alexander Akulich wrote: > On Thu, Jun 9, 2022 at 10:14 PM Thiago Macieira > > <[email protected]> wrote: > > Doesn't work for libraries. > > Can you explain please?
Libraries don't call QCoreApplication's constructor. The application may have been recompiled and thus will inform QCoreApplication it was compiled against 6.4, but the library in question (a KF6 one) may have still been compiled against 6.3. > I see this correspond to 5.0.0 until > QCoreApplication constructor called but I thought it would be 'better > than a leak'. > QCoreApplicationPrivate::app_compile_version is a part of QtCore, so > even if it won't work *across* the libraries, it is still available > for QStringConverter because it is a part of the same library. Wrong tool for the job, as explained above. Removing in: https://codereview.qt-project.org/c/qt/qtbase/+/415327 In any case, I'll not make a runtime decision based on version. It's much easier to make a static decision based on which function you called. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
