add remove_definitions(-DQT_NO_FOREACH) for be sure that it will compile with next kf5
-
Better would be to stop using KDEFrameworksCompilerSettings in non-KF-repos ;) See also https://marc.info/?l=kde-devel&m=161107189918853&w=2
-
Just, KDEFrameworksCompilerSettings is KDEFrameworksCompilerSettings, not KDEStricterCompilerSettings. It should be able to become stricter anytime, without having to care about backward-compatibility with released software (like things in release service or on own release schedule).
Be aware that next to QT_NO_FOREACH possibly also QT_NO_KEYWORDS soon might be set by default, cmp. frameworks/extra-cmake-modules!89 (merged).
For having levels of more strictness, we need to have a dedicated solution that also includes backward-compatibility. But KDEFrameworksCompilerSettings is not designed as that solution, see reasoning in the email.
-
The problem is, even if we had a KDEStrictCompilerSettings, we would still have the issue of how to make it more strict without breaking released code. One solution that comes to mind is the same one that you suggested in the clang-format stuff: enabling the new stricter flags only when the requested version is the new version, which means opt-in.
Which makes me think of two solutions: maintaining both KDEFrameworksCompilerSettings and KDEStrictCompilerSettings, or simply using this version check in KDEFrameworksCompilerSettings.
Given how many kdepim libraries end up becoming frameworks in the long run, it kind of makes sense that they adopt the same settings upfront, to avoid the need for migrations to the KF way later on...
-
... and now I see this is exactly what you did in frameworks/extra-cmake-modules!89 (merged)
So this commit wasn't strictly necessary, right? (just trying to understand)