// 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 {
// Merge all formats except mIRC and extended colors
mergeFormat(charFormat, format, label & 0xffff0000); // keep nickhash in label
- for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Selected); mask <<= 1) {
+ for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Last); mask <<= 1) {
if (static_cast<quint32>(label) & mask) {
mergeFormat(charFormat, format, label & (mask | 0xffff0000));
}
// unless the AllowForegroundOverride or AllowBackgroundOverride properties are set (via stylesheet).
if (_allowMircColors) {
mergeColors(charFormat, format, MessageLabel::None);
- for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Selected); mask <<= 1) {
+ for (quint32 mask = 0x00000001; mask <= static_cast<quint32>(MessageLabel::Last); mask <<= 1) {
if (static_cast<quint32>(label) & mask) {
mergeColors(charFormat, format, label & mask);
}