Skip to content

gom: cursor: Fix check for enum and flag types

Evangelos Ribeiro Tzaras requested to merge devrtz/gom:derived-enum-types into master

Since G_VALUE_TYPE(value) would give us the exact GType it would fail not execute the code meant for G_TYPE_ENUM or G_TYPE_FLAGS. Instead we use the G_TYPE_IS_ENUM() and G_TYPE_IS_FLAGS() macros which take derived types into account.

Fixes #29

If desired I can also write a test case for this (probably would only get to that after the UI/feature freeze though).

Also note that this fixes only the fetching from the database, I'm not sure if something similar might be needed when saving to the database (but I'm bound to check this very soon).

Merge request reports