Avoid creating subwindow on internal page widget

Authored by davidedmundson on Apr 14 2020, 4:48 PM.

Description

Avoid creating subwindow on internal page widget

Summary:
KWallet::openWallet takes a windowId as a parameter.

QWidget->winId() is a dangerous call, it will create an underlying
platform window when called. This happens even if we're not the toplevel
widget. On X11 this passed winId must have always been broken, but not
in a way that caused a problem.

This leaves QtWayland in a very confused state with the side effect that
all scrolling widgets become broken.

BUG: 418755
BUG: 420035

Test Plan:
Bisected drkonqi till we found the cause
Verified fix by running crashtest (with some mods so I could report a bug)
I can't confirm the winId is correct on X11, but the code looks safe

Reviewers: Plasma, sitter

Reviewed By: sitter

Subscribers: sitter, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D28832

Details