Fix crash when hosting QQuickWidget

There's no need to check if invisible widgets are candidates
for docking. There's usually no downside either, except that
QQuickWidget is very sensitive with when its platform window
is created, so don't force the creation.

Will cherry-pick to 1.2 if no regression is found

Fixes #150
This commit is contained in:
Sergio Martins
2021-01-31 12:59:02 +00:00
parent 02cf9d1cd2
commit a6b9a82e9c
2 changed files with 5 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
- Fixed drag offset when dragging too fast with mouse
- Fixed bug where last tab index position wouldn't be remembered in case user
had manually reordered tabs (#154)
- Fixed crash when hosting a QQuickWidget (#150)
* v1.2.1 (unreleased)
- Support for resizing dock widgets when they are in overlay/popup mode (autohide/sidebar feature)

View File

@@ -648,6 +648,10 @@ static QWidgetOrQuick *qtTopLevelForHWND(HWND hwnd)
{
const QList<QWindow*> windows = qApp->topLevelWindows();
for (QWindow *window : windows) {
if (!window->isVisible()) {
continue;
}
if (hwnd == (HWND)window->winId()) {
return DockRegistry::self()->topLevelForHandle(window);
}