X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=f7edcbc88295718a9d794c0e3ad168f46162410a;hp=cbae7e68c47f8e78ecc8e91ea91fe0643c6c217e;hb=1a45f16a9734820fba42fe1db3f38dd1eee49df6;hpb=670e7d401aae1196c0a24c59f96d267a8eb9d1bb diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index cbae7e68..f7edcbc8 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -222,7 +222,7 @@ void UiStyle::updateSystemTimestampFormat() // Helpful interactive website for debugging and explaining: https://regex101.com/ const QRegExp regExpMatchAMPM(".*(\\b|_)(A|AP)(\\b|_).*", Qt::CaseInsensitive); - if (regExpMatchAMPM.exactMatch(QLocale::system().timeFormat(QLocale::ShortFormat))) { + if (regExpMatchAMPM.exactMatch(QLocale().timeFormat(QLocale::ShortFormat))) { // AM/PM style used _systemTimestampFormatString = " h:mm:ss ap"; } else { @@ -1150,25 +1150,18 @@ quint8 UiStyle::StyledMessage::senderHash() const /***********************************************************************************/ -#if QT_VERSION < 0x050000 -uint qHash(UiStyle::ItemFormatType key) -{ - return qHash(static_cast(key)); -} - -#else - uint qHash(UiStyle::ItemFormatType key, uint seed) { return qHash(static_cast(key), seed); } -#endif + UiStyle::FormatType operator|(UiStyle::FormatType lhs, UiStyle::FormatType rhs) { return static_cast(static_cast(lhs) | static_cast(rhs)); } + UiStyle::FormatType& operator|=(UiStyle::FormatType& lhs, UiStyle::FormatType rhs) { lhs = static_cast(static_cast(lhs) | static_cast(rhs));