X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;fp=src%2Fqtui%2Fchatitem.cpp;h=79ee339b9da85a4b3f730b05f607209861d7bee1;hp=bbd49bfc6c52483de95e8857bab6e9ca1b8d54b0;hb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;hpb=d4b81a6d777de45611034b26bd89973d19e60c96 diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index bbd49bfc..79ee339b 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -49,7 +49,7 @@ ChatItem::ChatItem(const QRectF &boundingRect, ChatLine *parent) _boundingRect(boundingRect), _selectionMode(NoSelection), _selectionStart(-1), - _cachedLayout(0) + _cachedLayout(nullptr) { } @@ -141,7 +141,7 @@ QTextLayout *ChatItem::layout() const void ChatItem::clearCache() { delete _cachedLayout; - _cachedLayout = 0; + _cachedLayout = nullptr; } @@ -630,7 +630,7 @@ ContentsChatItem::ActionProxy ContentsChatItem::_actionProxy; ContentsChatItem::ContentsChatItem(const QPointF &pos, const qreal &width, ChatLine *parent) : ChatItem(QRectF(pos, QSizeF(width, 0)), parent), - _data(0) + _data(nullptr) { setPos(pos); setGeometryByWidth(width); @@ -652,7 +652,7 @@ ContentsChatItem::~ContentsChatItem() void ContentsChatItem::clearCache() { delete _data; - _data = 0; + _data = nullptr; ChatItem::clearCache(); } @@ -679,7 +679,7 @@ qreal ContentsChatItem::setGeometryByWidth(qreal w) qreal spacing = qMax(fontMetrics()->lineSpacing(), fontMetrics()->height()); // cope with negative leading() qreal h = lines * spacing; delete _data; - _data = 0; + _data = nullptr; if (w != width() || h != height()) setGeometry(w, h);