From 0475ea0b6f46d0e83138bfbaf4ee688f088b4cc2 Mon Sep 17 00:00:00 2001 From: fourtf Date: Wed, 23 May 2018 13:54:42 +0200 Subject: [PATCH] fixed text copying in the emote popup --- src/widgets/emotepopup.cpp | 1 + src/widgets/helper/channelview.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widgets/emotepopup.cpp b/src/widgets/emotepopup.cpp index 1bcd7503f..004cadce2 100644 --- a/src/widgets/emotepopup.cpp +++ b/src/widgets/emotepopup.cpp @@ -7,6 +7,7 @@ #include "widgets/notebook.hpp" #include +#include #include using namespace chatterino::providers::twitch; diff --git a/src/widgets/helper/channelview.cpp b/src/widgets/helper/channelview.cpp index 07e7044f2..b693d9681 100644 --- a/src/widgets/helper/channelview.cpp +++ b/src/widgets/helper/channelview.cpp @@ -126,7 +126,11 @@ ChannelView::ChannelView(BaseWidget *parent) this->scrollBar.setGeometry(this->width() - this->scrollBar.width(), 0, this->scrollBar.width(), this->height()); }); -} // namespace widgets + + QShortcut *shortcut = new QShortcut(QKeySequence("Ctrl+C"), this); + QObject::connect(shortcut, &QShortcut::activated, + [this] { QGuiApplication::clipboard()->setText(this->getSelectedText()); }); +} ChannelView::~ChannelView() {