Bug 423316 - Implement a check to look for QT_VERSION_CHECK calls below a certain version
Summary: Implement a check to look for QT_VERSION_CHECK calls below a certain version
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-21 10:40 UTC by martonmiklos
Modified: 2025-09-05 05:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martonmiklos 2020-06-21 10:40:07 UTC
This is not a bug report rather than something like thinking out loud:

Many Qt based projects specify a minimum Qt version requirement. As the time moves on this requirement will likely be changed for newer releases. These minimum requirement rise actions makes many Qt version dependent hacks obsolete. Usually these places marked with a QT_VERSION_CHECK macros. It would be useful to have an utility which would list the calls of the QT_VERSION_CHECK macro where called with version number below a certain one. 

What do you think would it be useful to add such a feature to the clazy itself?
Comment 1 Sergio Martins 2020-06-21 14:25:18 UTC
Sounds overkill in clazy, I would just grep for QT_VERSION_CHECK after bumping the required Qt version
Comment 2 martonmiklos 2020-06-21 19:45:30 UTC
(In reply to Sergio Martins from comment #1)
> Sounds overkill in clazy, I would just grep for QT_VERSION_CHECK after
> bumping the required Qt version

Well my goal was adding this check to my CI processes. Handling version numbers properly with grep might be a bit tricky.
Comment 3 Alexander Lohnau 2025-09-05 05:37:46 UTC
I think this is also something that should not be limited to just Qt versions, like KDE frameworks versions too or versions of other libraries.

But for the check to work properly, we need configuration of the macros and required versions of the dependencies. From the compile flags, we can not tell this. I'd say this is a bit out of scope for now, but if you are willing to work on it :D