- inline UiStyle::SenderPrefixMode SenderPrefixDisplay() {
- return static_cast<UiStyle::SenderPrefixMode>(
- localValue("SenderPrefixMode",
- QVariant::fromValue<UiStyle::SenderPrefixMode>(
- UiStyle::SenderPrefixMode::HighestMode)).toInt());
- // Cast the QVariant to an integer, then cast that to the enum class.
- // .canConvert<UiStyle::SenderPrefixMode>() returned true, but
- // .value<UiStyle::SenderPrefixMode>(); always gave the default value 0.
- //
- // There's probably a cleaner way of doing this. I couldn't find it within 4 hours, so...
- }