summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-04-12 15:48:50 +0200
committerTannin <devnull@localhost>2015-04-12 15:48:50 +0200
commit942bd04e5e3053b4ee3d7d94d51ce8cfa34cb9b9 (patch)
treed2c917bb58c6b9db8e3356fe0689256204308438 /src
parent4b6e8ac51b9b903fc55e87fb3db0aff9b2fa03d0 (diff)
bugfix: batch-activation/deactivation used non-persistent indices which seems to
be a problem nowadays (probably related to Qt5?)
Diffstat (limited to 'src')
-rw-r--r--src/pluginlist.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index f1a58cfb..002c7721 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -1159,9 +1159,13 @@ bool PluginList::eventFilter(QObject *obj, QEvent *event)
} else if (keyEvent->key() == Qt::Key_Space) {
QItemSelectionModel *selectionModel = itemView->selectionModel();
const QSortFilterProxyModel *proxyModel = qobject_cast<const QSortFilterProxyModel*>(selectionModel->model());
+ QList<QPersistentModelIndex> indices;
+ for (QModelIndex idx : selectionModel->selectedRows()) {
+ indices.append(idx);
+ }
QModelIndex minRow, maxRow;
- foreach (QModelIndex idx, selectionModel->selectedRows()) {
+ for (QModelIndex idx : indices) {
if (proxyModel != nullptr) {
idx = proxyModel->mapToSource(idx);
}