Fix frameworks detection
As of KDE Gear 24.05 kolourpaint is now Qt6-only. While investigating why it was requiring me to use -DBUILD_WITH_QT6=ON
to build it I noticed that this variable was incorrect. Fixing it fixes the build without the explicit -DBUILD_WITH_QT6=ON
argument.
Please backport to the 24.05 branch.