Bug 436798

Summary: kaffeine-2.0.18 w/ KF5WindowSystem built without <=5.62 deprecated API: src/main.cpp:183:32: error: cannot convert ‘QPointer<MainWindow>’ to ‘QWindow*’
Product: [Applications] kaffeine Reporter: Andreas Sturmlechner <asturm>
Component: generalAssignee: Mauro Carvalho Chehab <mchehab>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: build.log

Description Andreas Sturmlechner 2021-05-08 21:14:09 UTC
Created attachment 138259 [details]
build.log

SUMMARY

kaffeine is using deprecated API that will be removed with KF6. It would be nice to already port away from it.

STEPS TO REPRODUCE
1. Build KF5WindowSystem with -DKWINDOWSYSTEM_NO_WIDGETS
2. This implies EXCLUDE_DEPRECATED_BEFORE_AND_AT "5.62.0"
3. Try to build kaffeine against that library

OBSERVED RESULT

> kaffeine-2.0.18/src/main.cpp:183:32: error: cannot convert ‘QPointer<MainWindow>’ to ‘QWindow*’
>   183 |  KStartupInfo::setNewStartupId(mainWindow, KStartupInfo::startupId());
>       |                                ^~~~~~~~~~
>       |                                |
>       |                                QPointer<MainWindow>
> In file included from /usr/include/KF5/KWindowSystem/KStartupInfo:1,
>                  from kaffeine-2.0.18/work/kaffeine-2.0.18/src/main.cpp:25:
> /usr/include/KF5/KWindowSystem/kstartupinfo.h:93:42: note:   initializing argument 1 of ‘static void KStartupInfo::setNewStartupId(QWindow*, const QByteArray&)’
>    93 |     static void setNewStartupId(QWindow *window, const QByteArray &startup_id);
>       |                                 ~~~~~~~~~^~~~~~

SOFTWARE/OS VERSIONS
Operating System: Gentoo
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Comment 1 Bug Janitor Service 2021-05-08 23:22:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/kaffeine/-/merge_requests/2
Comment 2 Andreas Sturmlechner 2021-05-09 08:09:17 UTC
Git commit 4280d21a96c4ffd162eca52815aa84ddb679f60b by Andreas Sturmlechner.
Committed on 08/05/2021 at 21:45.
Pushed by mauroc into branch 'master'.

Port away from API deprecated in >KF-5.62

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

M  +1    -1    src/main.cpp

https://invent.kde.org/multimedia/kaffeine/commit/4280d21a96c4ffd162eca52815aa84ddb679f60b