From 980c0b2a93f0a6c1682823a9dfb464e39a1beec5 Mon Sep 17 00:00:00 2001 From: fourtf Date: Thu, 20 Apr 2017 21:34:51 +0200 Subject: [PATCH] improved chatwidgetview syntax --- widgets/chatwidgetview.cpp | 2 +- widgets/chatwidgetview.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/widgets/chatwidgetview.cpp b/widgets/chatwidgetview.cpp index f74b781e6..db2f7811a 100644 --- a/widgets/chatwidgetview.cpp +++ b/widgets/chatwidgetview.cpp @@ -219,7 +219,7 @@ void ChatWidgetView::paintEvent(QPaintEvent *event) const QPixmap *image = lli.getPixmap(); - if (image != NULL) { + if (image != nullptr) { painter.drawPixmap(QRect(wordPart.getX(), wordPart.getY(), wordPart.getWidth(), wordPart.getHeight()), *image); diff --git a/widgets/chatwidgetview.h b/widgets/chatwidgetview.h index 423e50671..4de6f1430 100644 --- a/widgets/chatwidgetview.h +++ b/widgets/chatwidgetview.h @@ -29,14 +29,14 @@ public: ScrollBar *getScrollbar(); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(QResizeEvent *) override; - void paintEvent(QPaintEvent *); - void wheelEvent(QWheelEvent *event); + void paintEvent(QPaintEvent *) override; + void wheelEvent(QWheelEvent *event) override; - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; bool tryGetMessageAt(QPoint p, std::shared_ptr &message, QPoint &relativePos);