diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2015-06-01 15:32:25 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2015-06-02 09:34:35 +0200 |
commit | 51fc672f59f390ce4ddf05448b63bdf11e80563b (patch) | |
tree | 3fda7483dbac74aa403a123e4f13124e7947048d /src/qt/guiutil.cpp | |
parent | f00b62391b9317bf4c83676520fede1fb4027c43 (diff) |
[Qt] disconnect peers from peers tab via context menu
- It is now allowed to disconnect peers from peers tab via
right-click context menu. Peers are not permanently banned!
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 4a1f728e18..581d2321bc 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -265,6 +265,19 @@ void copyEntryData(QAbstractItemView *view, int column, int role) } } +QString getEntryData(QAbstractItemView *view, int column, int role) +{ + if(!view || !view->selectionModel()) + return QString(); + QModelIndexList selection = view->selectionModel()->selectedRows(column); + + if(!selection.isEmpty()) { + // Return first item + return (selection.at(0).data(role).toString()); + } + return QString(); +} + QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut) |