macOS: Class initialize QCocoaWindow members

Pick-to: 6.5
Change-Id: I76e107b676ce27526094f851ec23bb544689e32f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Tor Arne Vestbø 2023-03-07 12:56:27 +01:00
parent f5afbd6d4b
commit 6806ed373c
2 changed files with 18 additions and 34 deletions

View File

@ -218,32 +218,33 @@ public: // for QNSView
static void setupPopupMonitor();
static void removePopupMonitor();
NSView *m_view;
QCocoaNSWindow *m_nsWindow;
NSView *m_view = nil;
QCocoaNSWindow *m_nsWindow = nil;
Qt::WindowStates m_lastReportedWindowState;
Qt::WindowModality m_windowModality;
Qt::WindowStates m_lastReportedWindowState = Qt::WindowNoState;
Qt::WindowModality m_windowModality = Qt::NonModal;
static QPointer<QCocoaWindow> s_windowUnderMouse;
bool m_initialized;
bool m_inSetVisible;
bool m_inSetGeometry;
bool m_inSetStyleMask;
QCocoaMenuBar *m_menubar;
bool m_initialized = false;
bool m_inSetVisible = false;
bool m_inSetGeometry = false;
bool m_inSetStyleMask = false;
bool m_frameStrutEventsEnabled;
QCocoaMenuBar *m_menubar = nullptr;
bool m_frameStrutEventsEnabled = false;
QRect m_exposedRect;
QRect m_normalGeometry;
int m_registerTouchCount;
bool m_resizableTransientParent;
int m_registerTouchCount = 0;
bool m_resizableTransientParent = false;
static const int NoAlertRequest;
NSInteger m_alertRequest;
NSInteger m_alertRequest = NoAlertRequest;
bool m_drawContentBorderGradient;
int m_topContentBorderThickness;
int m_bottomContentBorderThickness;
bool m_drawContentBorderGradient = false;
int m_topContentBorderThickness = 0;
int m_bottomContentBorderThickness = 0;
struct BorderRange {
BorderRange(quintptr i, int u, int l) : identifier(i), upper(u), lower(l) { }

View File

@ -98,24 +98,7 @@ Q_CONSTRUCTOR_FUNCTION(qRegisterNotificationCallbacks)
const int QCocoaWindow::NoAlertRequest = -1;
QPointer<QCocoaWindow> QCocoaWindow::s_windowUnderMouse;
QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
: QPlatformWindow(win)
, m_view(nil)
, m_nsWindow(nil)
, m_lastReportedWindowState(Qt::WindowNoState)
, m_windowModality(Qt::NonModal)
, m_initialized(false)
, m_inSetVisible(false)
, m_inSetGeometry(false)
, m_inSetStyleMask(false)
, m_menubar(nullptr)
, m_frameStrutEventsEnabled(false)
, m_registerTouchCount(0)
, m_resizableTransientParent(false)
, m_alertRequest(NoAlertRequest)
, m_drawContentBorderGradient(false)
, m_topContentBorderThickness(0)
, m_bottomContentBorderThickness(0)
QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle) : QPlatformWindow(win)
{
qCDebug(lcQpaWindow) << "QCocoaWindow::QCocoaWindow" << window();