From a569985315dd5356aec82bc2c21c35f67c7ec9ac Mon Sep 17 00:00:00 2001 From: rexim Date: Wed, 22 May 2019 02:25:09 +0700 Subject: [PATCH] Remove dead code --- src/messages/layouts/MessageLayoutElement.cpp | 16 ---------------- src/messages/layouts/MessageLayoutElement.hpp | 4 ---- 2 files changed, 20 deletions(-) diff --git a/src/messages/layouts/MessageLayoutElement.cpp b/src/messages/layouts/MessageLayoutElement.cpp index 9f5db03d9..a8bcc30c9 100644 --- a/src/messages/layouts/MessageLayoutElement.cpp +++ b/src/messages/layouts/MessageLayoutElement.cpp @@ -168,11 +168,6 @@ int ImageLayoutElement::getXFromIndex(int index) } } -boost::optional ImageLayoutElement::imagePreview() const -{ - return this->image_->pixmap(); -} - // // TEXT // @@ -296,11 +291,6 @@ int TextLayoutElement::getXFromIndex(int index) } } -boost::optional TextLayoutElement::imagePreview() const -{ - return boost::none; -} - // TEXT ICON TextIconLayoutElement::TextIconLayoutElement(MessageElement &creator, const QString &_line1, @@ -378,10 +368,4 @@ int TextIconLayoutElement::getXFromIndex(int index) } } -boost::optional TextIconLayoutElement::imagePreview() const -{ - return boost::none; -} - - } // namespace chatterino diff --git a/src/messages/layouts/MessageLayoutElement.hpp b/src/messages/layouts/MessageLayoutElement.hpp index 9837146a6..a7214937a 100644 --- a/src/messages/layouts/MessageLayoutElement.hpp +++ b/src/messages/layouts/MessageLayoutElement.hpp @@ -41,7 +41,6 @@ public: virtual void paintAnimated(QPainter &painter, int yOffset) = 0; virtual int getMouseOverIndex(const QPoint &abs) const = 0; virtual int getXFromIndex(int index) = 0; - virtual boost::optional imagePreview() const = 0; const Link &getLink() const; const QString &getText() const; @@ -72,7 +71,6 @@ protected: void paintAnimated(QPainter &painter, int yOffset) override; int getMouseOverIndex(const QPoint &abs) const override; int getXFromIndex(int index) override; - boost::optional imagePreview() const override; private: ImagePtr image_; @@ -96,7 +94,6 @@ protected: void paintAnimated(QPainter &painter, int yOffset) override; int getMouseOverIndex(const QPoint &abs) const override; int getXFromIndex(int index) override; - boost::optional imagePreview() const override; private: QColor color_; @@ -122,7 +119,6 @@ protected: void paintAnimated(QPainter &painter, int yOffset) override; int getMouseOverIndex(const QPoint &abs) const override; int getXFromIndex(int index) override; - boost::optional imagePreview() const override; private: float scale;