X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;fp=src%2Fuisupport%2Fuistyle.cpp;h=d839aef5884a4bf83e28e1704defe089c8a813bd;hp=714fe91fa0935d30f10498301b9241e9c617d338;hb=ed7467b75e19dce6228f1cfb53d989a989e92203;hpb=e6f810169117c836c22ae1146e469e61dec95f6f diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 714fe91f..d839aef5 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -72,13 +72,12 @@ UiStyle::UiStyle(QObject *parent) _opIconLimit(UserCategoryItem::categoryFromModes("o")), _voiceIconLimit(UserCategoryItem::categoryFromModes("v")) { - // register FormatList if that hasn't happened yet - // FIXME I don't think this actually avoids double registration... then again... does it hurt? - if (QVariant::nameToType("UiStyle::FormatList") == QVariant::Invalid) { - qRegisterMetaType("UiStyle::FormatList"); - qRegisterMetaTypeStreamOperators("UiStyle::FormatList"); - Q_ASSERT(QVariant::nameToType("UiStyle::FormatList") != QVariant::Invalid); - } + static bool registered = []() { + qRegisterMetaType(); + qRegisterMetaTypeStreamOperators(); + return true; + }(); + Q_UNUSED(registered) _uiStylePalette = QVector(static_cast(ColorRole::NumRoles), QBrush());