(#976) Make TooltipPreviewImage non-copyable

This commit is contained in:
rexim 2019-06-12 02:04:57 +07:00
parent 483e177a39
commit 244252f610
2 changed files with 3 additions and 1 deletions

View file

@ -8,6 +8,8 @@ namespace chatterino {
static TooltipPreviewImage &getInstance();
void setImage(ImagePtr image);
TooltipPreviewImage(const TooltipPreviewImage&) = delete;
private:
TooltipPreviewImage();

View file

@ -1219,7 +1219,7 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
}
else
{
auto tooltipPreviewImage = TooltipPreviewImage::getInstance();
auto &tooltipPreviewImage = TooltipPreviewImage::getInstance();
auto emoteElement = dynamic_cast<const EmoteElement*>(&hoverLayoutElement->getCreator());
if (emoteElement && getSettings()->emotesTooltipPreview.getValue()) {
tooltipPreviewImage.setImage(emoteElement->getEmote()->images.getImage(3.0));