From: Manuel Nickschas Date: Wed, 5 Sep 2018 20:17:16 +0000 (+0200) Subject: qa: Avoid warning about missing field initializers X-Git-Tag: 0.13-rc2~34 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=35c39237136ab3ddc94d20d8280b7bf6680f07c2 qa: Avoid warning about missing field initializers Some compiler setups throw a warning when default-brace-initializing UiStyle::Format. Avoid this by explicitly constructing an instance. --- diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index 10b7d780..9fadc127 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -312,7 +312,7 @@ QVector ChatItem::additionalFormats() const return LabelFormat{f.first, f.second, itemLabel}; }); // Append dummy element to avoid special-casing handling the last real format - labelFmtList.push_back(LabelFormat{quint16(data(MessageModel::DisplayRole).toString().length()), {}, itemLabel}); + labelFmtList.push_back(LabelFormat{quint16(data(MessageModel::DisplayRole).toString().length()), Format(), itemLabel}); // Apply the given label to the given range in the format list, splitting formats as necessary auto applyLabel = [&labelFmtList](quint16 start, quint16 end, Label label) {