vcl/qt5/QtFrame.cxx |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 0a53b7be5975b474a6fafd2c6dc8280431551d94
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Sun Oct 31 14:08:57 2021 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Sun Oct 31 17:59:44 2021 +0100

    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 <glo...@fbihome.de>

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)

Reply via email to