summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/offscreen
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-09-05 16:51:15 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-09-06 13:24:01 +0200
commita6266810ae5b285d9ff3fce856e543c7075816e7 (patch)
treee97236ae82d1fda932877c3b0dae921b9a6ab7fb /src/plugins/platforms/offscreen
parentda84941375d8301d9f22df1fa3753571de005c64 (diff)
Fix compilation with clang
Amends 711105058afe68407a0ed613335a83b6181112ed and fixes the following errors: .../qeglfsx11integration.cpp:28:36: note: non-constexpr constructor 'QBasicAtomicInteger' cannot be used in a constant expression Q_CONSTINIT static QBasicAtomicInt running; ^ .../qbasicatomic.h:171:5: note: declared here QBasicAtomicInteger() = default; And: .../qoffscreenwindow.cpp:171:50: error: 'constinit' specifier missing on initializing declaration of 'm_windowForWinIdHash' [-Werror,-Wmissing-constinit] QHash<WId, QOffscreenWindow *> QOffscreenWindow::m_windowForWinIdHash; ^ Q_CONSTINIT .../qoffscreenwindow.h:44:5: note: variable declared constinit here Q_CONSTINIT static QHash<WId, QOffscreenWindow *> m_windowForWinIdHash; Change-Id: I991674826737db897e087e9e06b56b338ca61a4f Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'src/plugins/platforms/offscreen')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
index b009722e56..6f61d72ed3 100644
--- a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
@@ -168,6 +168,6 @@ QOffscreenWindow *QOffscreenWindow::windowForWinId(WId id)
return m_windowForWinIdHash.value(id, 0);
}
-QHash<WId, QOffscreenWindow *> QOffscreenWindow::m_windowForWinIdHash;
+Q_CONSTINIT QHash<WId, QOffscreenWindow *> QOffscreenWindow::m_windowForWinIdHash;
QT_END_NAMESPACE