qimgv icon indicating copy to clipboard operation
qimgv copied to clipboard

Remove qt5 support and fix kf6

Open Gigas002 opened this issue 1 year ago • 7 comments

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_SUPPORT for 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

Gigas002 avatar Jul 23 '24 02:07 Gigas002

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.

eddiezato avatar Aug 12 '24 07:08 eddiezato

Thanks for info. Does this actually fails for you to open raw files without it? I can open DNG just fine

Gigas002 avatar Aug 12 '24 11:08 Gigas002

Yeah. It's failing. But I'm on Windows, not sure about Linux.

eddiezato avatar Aug 12 '24 11:08 eddiezato

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;
}

Gigas002 avatar Aug 14 '24 12:08 Gigas002

It builds successfully on windows. But qimgv still won't display raw files with it.

eddiezato avatar Aug 14 '24 13:08 eddiezato

Please note that in the meantime at least Gentoo and Ubuntu are running Qt5 removal trackers. So getting this done gets more important.

a17r avatar Apr 26 '25 12:04 a17r

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:< @.*** >

chensiyuanlove avatar Apr 27 '25 03:04 chensiyuanlove

@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.

easymodo avatar Jul 21 '25 08:07 easymodo

Thank you! It'll make building the qt6 version much easier :)

Gigas002 avatar Jul 21 '25 11:07 Gigas002