QmlDesigner: Add support for Key enums

Change-Id: I602c44283a4f8978d76117fd5b885ef34d377857
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Thomas Hartmann
2024-03-28 14:50:34 +01:00
parent 3494f37b18
commit 932bdb339b

View File

@@ -84,6 +84,9 @@ bool isGlobalQtEnums(QStringView value)
u"TopToBottom", u"UpArrowCursor", u"Vertical", u"WaitCursor",
u"WhatsThisCursor", u"WheelFocus"});
if (value.toString().startsWith("Key_"))
return true;
return std::binary_search(std::begin(list),
std::end(list),
QmlDesigner::ModelUtils::toStdStringView(value));