From 35c39237136ab3ddc94d20d8280b7bf6680f07c2 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Wed, 5 Sep 2018 22:17:16 +0200 Subject: [PATCH] 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. --- src/qtui/chatitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.20.1