uisupport: Let ClickableList inherit from std::vector instead of QList
[quassel.git] / src / qtui / chatitem.cpp
index 10b7d78..bbd49bf 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
-    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);