Hi Petr,
and what about:
switch()
{
...
// no default: so that we get a compile time warning
}
Q_ASSERT (false && "Unhandled Event value"); // so that we get a meaningful assert warning during debugging
return "unknown"; // so that we still return something even in release builds
I think initializing these variables in the ctor would be more work then just declaring static variables. Maybe if we always use only static class members of the same class there will not be any problems - I’ll give that a try!
Regards,
Peter
