diff --git a/src/messages/layouts/MessageLayoutElement.cpp b/src/messages/layouts/MessageLayoutElement.cpp index 1b52201bb..9f5db03d9 100644 --- a/src/messages/layouts/MessageLayoutElement.cpp +++ b/src/messages/layouts/MessageLayoutElement.cpp @@ -168,7 +168,7 @@ int ImageLayoutElement::getXFromIndex(int index) } } -boost::optional ImageLayoutElement::pixmap() const +boost::optional ImageLayoutElement::imagePreview() const { return this->image_->pixmap(); } @@ -296,7 +296,7 @@ int TextLayoutElement::getXFromIndex(int index) } } -boost::optional TextLayoutElement::pixmap() const +boost::optional TextLayoutElement::imagePreview() const { return boost::none; } @@ -378,7 +378,7 @@ int TextIconLayoutElement::getXFromIndex(int index) } } -boost::optional TextIconLayoutElement::pixmap() const +boost::optional TextIconLayoutElement::imagePreview() const { return boost::none; } diff --git a/src/messages/layouts/MessageLayoutElement.hpp b/src/messages/layouts/MessageLayoutElement.hpp index 3c2c1b24c..9837146a6 100644 --- a/src/messages/layouts/MessageLayoutElement.hpp +++ b/src/messages/layouts/MessageLayoutElement.hpp @@ -41,7 +41,7 @@ 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 pixmap() const = 0; + virtual boost::optional imagePreview() const = 0; const Link &getLink() const; const QString &getText() const; @@ -72,7 +72,7 @@ protected: void paintAnimated(QPainter &painter, int yOffset) override; int getMouseOverIndex(const QPoint &abs) const override; int getXFromIndex(int index) override; - boost::optional pixmap() const override; + boost::optional imagePreview() const override; private: ImagePtr image_; @@ -96,7 +96,7 @@ protected: void paintAnimated(QPainter &painter, int yOffset) override; int getMouseOverIndex(const QPoint &abs) const override; int getXFromIndex(int index) override; - boost::optional pixmap() const override; + boost::optional imagePreview() const override; private: QColor color_; @@ -122,7 +122,7 @@ protected: void paintAnimated(QPainter &painter, int yOffset) override; int getMouseOverIndex(const QPoint &abs) const override; int getXFromIndex(int index) override; - boost::optional pixmap() const override; + boost::optional imagePreview() const override; private: float scale; diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index 8087d8b1a..0d53a9b7c 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -1217,7 +1217,7 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event) } else { - if (auto pixmap = hoverLayoutElement->pixmap()) { + if (auto pixmap = hoverLayoutElement->imagePreview()) { QBuffer buffer; pixmap->save(&buffer, "PNG");