From 8203bdcbdbc8c121831db0d197a89842b7178f59 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 28 Aug 2016 07:28:15 +0200 Subject: Added copyToClipboard where applicable --- torrentwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'torrentwidget.cpp') diff --git a/torrentwidget.cpp b/torrentwidget.cpp index 656870e..a6cb2f4 100644 --- a/torrentwidget.cpp +++ b/torrentwidget.cpp @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include @@ -229,6 +231,12 @@ void TorrentWidget::selectDir(){ gatherData(); } +void TorrentWidget::copyToClipboard(){ + QModelIndex cur = mFileView->selectionModel()->currentIndex(); + QClipboard *clip = QApplication::clipboard(); + clip->setText(cur.data().toString()); +} + void TorrentWidget::fileSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected){ Q_UNUSED(selected); Q_UNUSED(deselected); -- cgit v1.2.3-70-g09d2