diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-10-31 14:08:57 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-10-31 17:59:44 +0100 |
commit | 0a53b7be5975b474a6fafd2c6dc8280431551d94 (patch) | |
tree | afa3aa5cc092979b23fe79d5c3ac261ecc528134 /vcl/qt5/QtFrame.cxx | |
parent | 2023a5291984438de52a95e5bc560a82d69eaca1 (diff) |
Qt de-obfuscate the aWinFlags assignment
The aWinFlags assignement is an obfuscated case statement, so this
explicitly defaults to Qt::Widget and drops the whole or'ing.
Change-Id: If6ac1817d1e600a174c1308a3bad0af5f3f9c30b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124524
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5/QtFrame.cxx')
-rw-r--r-- | vcl/qt5/QtFrame.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 2d4a068a34b1..1fc9930ae83f 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -137,32 +137,32 @@ QtFrame::QtFrame(QtFrame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) m_nStyle = nStyle; m_pParent = pParent; - Qt::WindowFlags aWinFlags; + Qt::WindowFlags aWinFlags(Qt::Widget); if (!(nStyle & SalFrameStyleFlags::SYSTEMCHILD)) { if (nStyle & SalFrameStyleFlags::INTRO) - aWinFlags |= Qt::SplashScreen; + aWinFlags = Qt::SplashScreen; // floating toolbars are frameless tool windows // + they must be able to receive keyboard focus else if ((nStyle & SalFrameStyleFlags::FLOAT) && (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)) - aWinFlags |= Qt::Tool | Qt::FramelessWindowHint; + aWinFlags = Qt::Tool | Qt::FramelessWindowHint; else if (nStyle & SalFrameStyleFlags::TOOLTIP) - aWinFlags |= Qt::ToolTip; + aWinFlags = Qt::ToolTip; // Can't use Qt::Popup, because it grabs the input focus and generates // a focus-out event, reaching the combo box. This used to map to // Qt::ToolTip, which doesn't feel that correct... else if (isPopup()) aWinFlags = Qt::Widget | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint; else if (nStyle & SalFrameStyleFlags::TOOLWINDOW) - aWinFlags |= Qt::Tool; + aWinFlags = Qt::Tool; // top level windows can't be transient in Qt, so make them dialogs, if they have a parent. At least // the plasma shell relies on this setting to skip dialogs in the window list. And Qt Xcb will just // set transient for the types Dialog, Sheet, Tool, SplashScreen, ToolTip, Drawer and Popup. else if (nStyle & SalFrameStyleFlags::DIALOG || m_pParent) - aWinFlags |= Qt::Dialog; + aWinFlags = Qt::Dialog; else - aWinFlags |= Qt::Window; + aWinFlags = Qt::Window; } if (aWinFlags == Qt::Window) |