Bug 450702

Summary: QtQuickDialogWrapper::exec is an anti pattern that allows the user to break most apps that use it
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: Harald Sitter <sitter>
Component: generalAssignee: Dan Leinir Turthra Jensen <admin>
Severity: normal CC: alexander.lohnau, cezar.inglezis, kdelibs-bugs, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.94
Sentry Crash Report:

Description Harald Sitter 2022-02-22 13:01:43 UTC

1.  open parley
2.  click on >> get new collections <<
3.  close parley
4. observe the kns window still being open
5. close the kns window
6. crash

1. open systemsettings
2. open global theme kcm
3. click >> get new global themes <<
4. close systemsettings
5. observe ksn window closing
6. try to start systemsettings again - you can't it's still running without window 🤷‍♂️

masterino on linux

Nested eventloops are the devil. I would suggest to deprecate ::exec and drop it with kf6 entirely. Porting away from exec shouldn't be too much of a challenge, the few apps I've looked at mostly seem to reload their state when the dialog closes, that can easily be done in a lambda slot.
Comment 1 Alexander Lohnau 2022-04-26 03:56:42 UTC
Git commit 3dbdcc0385142dd5e117a99550e6504ecca8d8fd by Alexander Lohnau.
Committed on 26/04/2022 at 03:53.
Pushed by alex into branch 'master'.

Port away from using KNS3::QtQuickDialogWrapper::exec internally

M  +5    -0    src/qtquickdialogwrapper.cpp
M  +6    -0    src/qtquickdialogwrapper.h
M  +11   -8    src/widgets/action.cpp
M  +4    -1    src/widgets/button.cpp

Comment 2 Alexander Lohnau 2022-04-26 03:56:50 UTC
Git commit 836a7b80f3c850f953e1b7ed229a2c3401ef015e by Alexander Lohnau.
Committed on 26/04/2022 at 03:53.
Pushed by alex into branch 'master'.

Deprecate KNS3::QtQuickDialogWrapper::exec

M  +1    -1    src/CMakeLists.txt
M  +2    -0    src/qtquickdialogwrapper.cpp
M  +5    -0    src/qtquickdialogwrapper.h

Comment 3 Nate Graham 2022-05-05 22:06:06 UTC
*** Bug 453397 has been marked as a duplicate of this bug. ***