wasm: Fix checking window flags in QWasmWindow
Querying bit flags by direct comparison yields incorrect results. As an effect the minimum size for QWasmWindow is not always properly set. Use testFlags() function instead. Change-Id: Ie4cf528ed3c6f664abd17615a6898e8fc49d84b5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
8dfca2ee71
commit
cd28603360
@ -188,8 +188,8 @@ void QWasmWindow::initialize()
|
||||
QRect rect = windowGeometry();
|
||||
|
||||
constexpr int minSizeBoundForDialogsAndRegularWindows = 100;
|
||||
const int windowType = window()->flags() & Qt::WindowType_Mask;
|
||||
const int systemMinSizeLowerBound = windowType == Qt::Window || windowType == Qt::Dialog
|
||||
const auto windowFlags = window()->flags();
|
||||
const int systemMinSizeLowerBound = windowFlags.testAnyFlags(Qt::Window | Qt::Dialog)
|
||||
? minSizeBoundForDialogsAndRegularWindows
|
||||
: 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user