From 711105058afe68407a0ed613335a83b6181112ed Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 31 Aug 2022 16:08:30 +0200 Subject: Apply Q_CONSTINIT where beneficial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: MÃ¥rten Nordheim --- src/gui/platform/darwin/qapplekeymapper.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/platform') diff --git a/src/gui/platform/darwin/qapplekeymapper.mm b/src/gui/platform/darwin/qapplekeymapper.mm index 2b0335fef4..a0a2eb208d 100644 --- a/src/gui/platform/darwin/qapplekeymapper.mm +++ b/src/gui/platform/darwin/qapplekeymapper.mm @@ -364,7 +364,7 @@ QChar QAppleKeyMapper::toCocoaKey(Qt::Key key) if (key == Qt::Key_Backspace) return QChar(NSBackspaceCharacter); - static QHash reverseCocoaKeys; + Q_CONSTINIT static QHash reverseCocoaKeys; if (reverseCocoaKeys.isEmpty()) { reverseCocoaKeys.reserve(cocoaKeys.size()); for (auto it = cocoaKeys.begin(); it != cocoaKeys.end(); ++it) -- cgit v1.2.3