diff options
author | Arno <arno@disconnect.de> | 2016-08-28 07:28:15 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2016-08-28 07:28:15 +0200 |
commit | 8203bdcbdbc8c121831db0d197a89842b7178f59 (patch) | |
tree | 8a693c8c11e3265e08ed6d74c35a76ee991f8e12 /torrentwidget.cpp | |
parent | 32afa2c28aabe862bfca44dba24083ffd7db6721 (diff) | |
download | ShemovCleaner-8203bdcbdbc8c121831db0d197a89842b7178f59.tar.gz ShemovCleaner-8203bdcbdbc8c121831db0d197a89842b7178f59.tar.bz2 ShemovCleaner-8203bdcbdbc8c121831db0d197a89842b7178f59.zip |
Added copyToClipboard where applicable
Diffstat (limited to 'torrentwidget.cpp')
-rw-r--r-- | torrentwidget.cpp | 8 |
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); |