X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=bbd49bfc6c52483de95e8857bab6e9ca1b8d54b0;hb=92fc8c5b119111a35ab8423c3cbde5b2a022badf;hp=10b7d78068dba35629e1cca8ad97b9e18a0ca268;hpb=77f32bd74c6140060007ace39f70f2bbd8aeebe9;p=quassel.git diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index 10b7d780..bbd49bfc 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) { @@ -759,7 +759,7 @@ Clickable ContentsChatItem::clickableAt(const QPointF &pos) const UiStyle::FormatList ContentsChatItem::formatList() const { UiStyle::FormatList fmtList = ChatItem::formatList(); - for (int i = 0; i < privateData()->clickables.count(); i++) { + for (size_t i = 0; i < privateData()->clickables.size(); i++) { Clickable click = privateData()->clickables.at(i); if (click.type() == Clickable::Url) { overlayFormat(fmtList, click.start(), click.start() + click.length(), UiStyle::FormatType::Url);