forked from qt-creator/qt-creator
QmlDesigner: Fix startup crash on linux
Task-number: QDS-9198
Change-Id: I1e0f87a941ccbd2131f0e86ae20f7a2d0c2d7856
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
(cherry picked from commit 519b9e3c52
)
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
45d9fec1fa
commit
0ca46916bf
@@ -105,11 +105,16 @@ namespace ADS
|
||||
q, &DockFocusController::onFocusedDockAreaViewToggled);
|
||||
}
|
||||
|
||||
auto newFloatingWidget = m_focusedDockWidget->dockContainer()->floatingWidget();
|
||||
auto dockContainer = m_focusedDockWidget->dockContainer();
|
||||
FloatingDockContainer *newFloatingWidget = nullptr;
|
||||
|
||||
if (dockContainer)
|
||||
newFloatingWidget = dockContainer->floatingWidget();
|
||||
|
||||
if (newFloatingWidget)
|
||||
newFloatingWidget->setProperty("FocusedDockWidget", QVariant::fromValue(dockWidget));
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#ifdef Q_OS_LINUX
|
||||
// This code is required for styling the floating widget titlebar for linux
|
||||
// depending on the current focus state
|
||||
if (m_floatingWidget == newFloatingWidget)
|
||||
@@ -122,7 +127,7 @@ namespace ADS
|
||||
|
||||
if (m_floatingWidget)
|
||||
updateFloatingWidgetFocusStyle(m_floatingWidget, true);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (old != dockWidget)
|
||||
emit m_dockManager->focusedDockWidgetChanged(old, dockWidget);
|
||||
|
Reference in New Issue
Block a user