diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-31 16:08:30 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-09-01 19:44:19 +0200 |
commit | 711105058afe68407a0ed613335a83b6181112ed (patch) | |
tree | 82f549dafc18558cf0801e67b1ebfd18c8d73f8d /src/gui/kernel | |
parent | 44a1782a9bb6b2db8847ab332682b3af386e67ae (diff) | |
download | qtbase-711105058afe68407a0ed613335a83b6181112ed.tar.gz |
Apply Q_CONSTINIT where beneficial
Applied Q_CONSTINIT to variables with static storage duration, but
skipped the POD types with core constant initializers.
Task-number: QTBUG-100486
Change-Id: Iaabf824e9cb0f29a405a149912200d4e4b3573c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 99c13257a3..49ba5eea16 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -42,7 +42,7 @@ static QOpenGLContext *global_share_context = nullptr; #ifndef QT_NO_DEBUG QHash<QOpenGLContext *, bool> QOpenGLContextPrivate::makeCurrentTracker; -QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex; +Q_CONSTINIT QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex; #endif /*! diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 07879b36bf..0177b105d6 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -26,12 +26,12 @@ using namespace Qt::StringLiterals; Q_LOGGING_CATEGORY(lcQpaInputDevices, "qt.qpa.input.devices") -QElapsedTimer QWindowSystemInterfacePrivate::eventTime; +Q_CONSTINIT QElapsedTimer QWindowSystemInterfacePrivate::eventTime; bool QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = false; bool QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse = true; QWaitCondition QWindowSystemInterfacePrivate::eventsFlushed; -QMutex QWindowSystemInterfacePrivate::flushEventMutex; -QAtomicInt QWindowSystemInterfacePrivate::eventAccepted; +Q_CONSTINIT QMutex QWindowSystemInterfacePrivate::flushEventMutex; +Q_CONSTINIT QAtomicInt QWindowSystemInterfacePrivate::eventAccepted; QWindowSystemEventHandler *QWindowSystemInterfacePrivate::eventHandler; QWindowSystemInterfacePrivate::WindowSystemEventList QWindowSystemInterfacePrivate::windowSystemEventQueue; |