qtquick: Fix parentChanged() passing the wrong argument

QQuickItem::parentChanged(QQuickItem *parent) passes the *new*
parent, not *this*

Fixes #243 which is actually invalid, but uncovered this bug.
For #243 you can just use sender(), or connect to a lambda that
captures the dock widget.
This commit is contained in:
Sergio Martins
2021-10-12 11:46:16 +01:00
parent a8bd6ba840
commit 0e866079da
2 changed files with 2 additions and 2 deletions

View File

@@ -732,10 +732,9 @@ void DockWidgetBase::Private::show()
void DockWidgetBase::onParentChanged()
{
#ifdef KDDOCKWIDGETS_QTWIDGETS
// TODO: In v1.4, remove this part and use the signal emitting the arg
Q_EMIT parentChanged();
#else
Q_EMIT parentChanged(this);
Q_EMIT QQuickItem::parentChanged(parentItem());
#endif
d->updateToggleAction();
d->updateFloatAction();