qa: Avoid warning about missing field initializers
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 5 Sep 2018 20:17:16 +0000 (22:17 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 6 Sep 2018 06:02:07 +0000 (08:02 +0200)
Some compiler setups throw a warning when default-brace-initializing
UiStyle::Format. Avoid this by explicitly constructing an instance.

src/qtui/chatitem.cpp

index 10b7d78..9fadc12 100644 (file)
@@ -312,7 +312,7 @@ QVector<QTextLayout::FormatRange> ChatItem::additionalFormats() const
         return LabelFormat{f.first, f.second, itemLabel};
     });
     // Append dummy element to avoid special-casing handling the last real format
         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) {
 
     // 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) {