From b11821fd770dea496a6ac86151a6d505561a9896 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 23 Sep 2022 08:59:45 +0200 Subject: [PATCH] InputMethodQueryResult - use int as a key, not Qt::InputMethodQuery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In release mode different qHash overloads picked up for enumerators in 2 different translation units (and this can be even affected by the order of includes), thus resulting in one hash with which we insert a value, and a different hash, when we are trying to extract the value, which _is_ in QHash; getting us a default value (invalid QVariant in our case). Fixes: QTBUG-106219 Change-Id: I7cce35555d792f03e50639a8d3d25f6a74de05a6 Reviewed-by: Tor Arne Vestbø Reviewed-by: Mårten Nordheim (cherry picked from commit b22a726f25b47f2a800a16d35da6aee7f622bcd9) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/cocoa/qcocoahelpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h index 869b2459112..1964dcf59d8 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.h +++ b/src/plugins/platforms/cocoa/qcocoahelpers.h @@ -313,7 +313,7 @@ QSendSuperHelper qt_objcDynamicSuperHelper(id receiver, SEL selector, A // ------------------------------------------------------------------------- -struct InputMethodQueryResult : public QHash +struct InputMethodQueryResult : public QHash { operator bool() { return !isEmpty(); } };