You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3b1931e added operator< to MetaEnumVariable. However, contrary to the commit message, no call to QMetaType::registerComparators is made.
In Qt 6, this works because it uses introspection to determine if operator< is implemented in the class. However, in Qt 5 the call must be explicit.
Oddly, it seems to work on most platforms anyway, somehow… except 64-bit PowerPC. On this platform, using Qt 5.15 + KDE Patch Collection, and GCC 8.5.0, with -O2, or -O0 -fstack-protector -fschedule-insns -fmove-loop-invariants -finline-functions-called-once -fguess-branch-probability (minimum optimisation flags needed to trigger):
FAIL! : TestBuiltinSyntax::testEnums(gadget-enums-compare05) Compared values are not the same
Actual (result): "true"
Expected (output): "false"
Loc: [/usr/src/packages/user/grantlee/src/grantlee-5.3.1/templates/tests/testbuiltins.cpp(482)]
PASS : TestBuiltinSyntax::testEnums(gadget-enums-compare06)
FAIL! : TestBuiltinSyntax::testEnums(gadget-enums-compare07) Compared values are not the same
Actual (result): "false"
Expected (output): "true"
Loc: [/usr/src/packages/user/grantlee/src/grantlee-5.3.1/templates/tests/testbuiltins.cpp(482)]
Adding a call to registerComparators in testbuiltins makes it pass:
This is needed to ensure that MetaEnumVariable can be properly handled
for comparisons, e.g. as done via QVariant::compare().
Followup of commit 3b1931eFixessteveire#89
3b1931e added
operator<
toMetaEnumVariable
. However, contrary to the commit message, no call toQMetaType::registerComparators
is made.In Qt 6, this works because it uses introspection to determine if
operator<
is implemented in the class. However, in Qt 5 the call must be explicit.Oddly, it seems to work on most platforms anyway, somehow… except 64-bit PowerPC. On this platform, using Qt 5.15 + KDE Patch Collection, and GCC 8.5.0, with
-O2
, or-O0 -fstack-protector -fschedule-insns -fmove-loop-invariants -finline-functions-called-once -fguess-branch-probability
(minimum optimisation flags needed to trigger):Adding a call to
registerComparators
intestbuiltins
makes it pass:The text was updated successfully, but these errors were encountered: