aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101@gmail.com>2016-10-03 19:40:40 -0400
committerAndrew Chow <achow101@gmail.com>2016-11-08 08:50:04 -0500
commitaddfdebe1a2ec45f718638f39a9ae3afb531805f (patch)
tree1c8567526b0eac7767dd40f0c115c38bc1ebd995 /src/qt/guiutil.cpp
parent4e5782438c3d117be7e52ddd0d35ae0475a30759 (diff)
downloadbitcoin-addfdebe1a2ec45f718638f39a9ae3afb531805f.tar.xz
Multiple Selection for peer and ban tables
Allows multiple selection and action for the nodes in the peer and ban tables in the Debug Window.
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 42dafa1175..9dc75c2e1a 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -291,17 +291,11 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
}
}
-QVariant getEntryData(QAbstractItemView *view, int column, int role)
+QList<QModelIndex> getEntryData(QAbstractItemView *view, int column)
{
if(!view || !view->selectionModel())
- return QVariant();
- QModelIndexList selection = view->selectionModel()->selectedRows(column);
-
- if(!selection.isEmpty()) {
- // Return first item
- return (selection.at(0).data(role));
- }
- return QVariant();
+ return QList<QModelIndex>();
+ return view->selectionModel()->selectedRows(column);
}
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir,