summaryrefslogtreecommitdiffstats
path: root/torrentwidget.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2016-08-28 07:28:15 +0200
committerArno <arno@disconnect.de>2016-08-28 07:28:15 +0200
commit8203bdcbdbc8c121831db0d197a89842b7178f59 (patch)
tree8a693c8c11e3265e08ed6d74c35a76ee991f8e12 /torrentwidget.cpp
parent32afa2c28aabe862bfca44dba24083ffd7db6721 (diff)
downloadShemovCleaner-8203bdcbdbc8c121831db0d197a89842b7178f59.tar.gz
ShemovCleaner-8203bdcbdbc8c121831db0d197a89842b7178f59.tar.bz2
ShemovCleaner-8203bdcbdbc8c121831db0d197a89842b7178f59.zip
Added copyToClipboard where applicable
Diffstat (limited to 'torrentwidget.cpp')
-rw-r--r--torrentwidget.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/torrentwidget.cpp b/torrentwidget.cpp
index 656870e..a6cb2f4 100644
--- a/torrentwidget.cpp
+++ b/torrentwidget.cpp
@@ -19,6 +19,8 @@
#include <QRegularExpression>
#include <QToolBar>
#include <QMenuBar>
+#include <QClipboard>
+#include <QApplication>
#include <QDebug>
@@ -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);