QNapi: add Object::getFilteredStringKeys()
On a HarmonyOS device napi_get_property_names() returns every own key
of an object, including non-enumerable and symbol keys, although
Node-API and the HarmonyOS SDK documentation define its result as the
enumerable string keys, inherited ones included.
napi_get_all_property_names() selects the keys correctly there.
node-addon-api offers no way around this: both
Napi::Object::GetPropertyNames() and iteration over a Napi::Object use
napi_get_property_names(), and there is no wrapper for
napi_get_all_property_names().
Add Object::getFilteredStringKeys(), which returns the string keys that
napi_get_all_property_names() selects for a key mode and filter, so
that code outside QNapi need not call that function directly.
Task-number: QTBUG-151396
Pick-to: 6.12
Change-Id: I7b2ccce9c950d435b905f7722b8fd3eb6c1fe2f6
Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Adam Krzykala <adam.krzykala@qt.io>