diff options
| author | Tannin <devnull@localhost> | 2015-04-12 15:48:50 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-04-12 15:48:50 +0200 |
| commit | 942bd04e5e3053b4ee3d7d94d51ce8cfa34cb9b9 (patch) | |
| tree | d2c917bb58c6b9db8e3356fe0689256204308438 /src/pluginlist.cpp | |
| parent | 4b6e8ac51b9b903fc55e87fb3db0aff9b2fa03d0 (diff) | |
bugfix: batch-activation/deactivation used non-persistent indices which seems to
be a problem nowadays (probably related to Qt5?)
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 6 |
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);
}
|
