Remove qt5 support and fix kf6
This PR is arguable, and it's completely OK to banish it from existence if you don't feel it fits the project well
It does these things:
- remove qt5 vars/code, so that we support only compilation with qt6
- fixes the
KDE_SUPPORTfor Plasma 6 (which is dependent on qt6, so I don't see the point in supporting EOL qt5) - fixes some nasty gcc 14 warnings
-
Exiv2::enableBMFF(true);is deprecated and seems not needed anymore
gcc warnings stuff may be backported to a current version, that utilizes the qt5, but the kf6 fixes aren't, afaik
Also a note about mainwindow.cpp changes for kf6: the KWindowEffects::enableBlurBehind now takes QWindow instead of winId, and while the applyWindowedBackground was being called applyWindowedBackground with kf5 wasn't a bad thing, now it crashes, because the window not exists on a first call. That's why the check here is needed, though it's a bit nasty
FYI, with the move to Qt6, the qtraw plugin will stop working as it is seems abandoned by the author and needs to be fixed for Qt6.
Thanks for info. Does this actually fails for you to open raw files without it? I can open DNG just fine
Yeah. It's failing. But I'm on Windows, not sure about Linux.
I think that plugin builds with qt6, would be glad if someone could test it on windows. I only needed to change one line in main.cpp to build it on linux:
QImageIOPlugin::Capabilities
RawPlugin::capabilities(QIODevice *device, const QByteArray &format) const
{
if (keys().contains(format) ||
format == "tif" ||
format == "tiff")
return Capabilities(CanRead);
if (!format.isEmpty())
- return 0;
+ return {};
Capabilities cap;
if (device->isReadable() && RawIOHandler::canRead(device))
cap |= CanRead;
return cap;
}
It builds successfully on windows. But qimgv still won't display raw files with it.
Please note that in the meantime at least Gentoo and Ubuntu are running Qt5 removal trackers. So getting this done gets more important.
1
~无知的我~ @.***
------------------ 原始邮件 ------------------ 发件人: "Andreas @.>; 发送时间: 2025年4月26日(星期六) 晚上8:20 收件人: @.>; 抄送: @.***>; 主题: Re: [easymodo/qimgv] Remove qt5 support and fix kf6 (PR #556)
a17r留下评论(easymodo/qimgv#556)
请注意,目前至少 Gentoo 和 Ubuntu 正在运行 Qt5 移除追踪器。因此,完成这项工作变得更加重要。
— 直接回复此邮件、在 GitHub 上查看或取消订阅。 您收到此邮件是因为您订阅了此主题。消息ID:< @.*** >
@Gigas002 Hi. I've merged this but without Qt5 removal parts, gonna keep it until I'm sure qt6 build is not inferior in any way.
Also this breaks your aur package, please remove the patch and add USE_QT5=OFF into cmake build options instead.
Thank you! It'll make building the qt6 version much easier :)