diff options
| author | Tannin <devnull@localhost> | 2015-03-09 12:22:13 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-03-09 12:22:13 +0100 |
| commit | db2954e8eb41da715b9e7d79a72e225797401413 (patch) | |
| tree | a4e5da9be636d0962cadd999d1d2900f1d72509e /src/pluginlist.cpp | |
| parent | 8c0756bd9d87e8394d49e7611532002eecbc220a (diff) | |
minor cleanup
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index f8a27ef4..cccb7d12 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -935,6 +935,7 @@ Qt::ItemFlags PluginList::flags(const QModelIndex &modelIndex) const if (modelIndex.column() == COL_PRIORITY) {
result |= Qt::ItemIsEditable;
}
+ result &= ~Qt::ItemIsDropEnabled;
} else {
result |= Qt::ItemIsDropEnabled;
}
@@ -1082,7 +1083,7 @@ bool PluginList::eventFilter(QObject *obj, QEvent *event) QAbstractItemView *itemView = qobject_cast<QAbstractItemView*>(obj);
if (itemView == nullptr) {
- return QObject::eventFilter(obj, event);
+ return QAbstractItemModel::eventFilter(obj, event);
}
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
@@ -1110,7 +1111,7 @@ bool PluginList::eventFilter(QObject *obj, QEvent *event) rows.swap(i, rows.size() - i - 1);
}
}
- foreach (QModelIndex idx, rows) {
+ for (QModelIndex idx : rows) {
idx = proxyModel->mapToSource(idx);
int newPriority = m_ESPs[idx.row()].m_Priority + diff;
if ((newPriority >= 0) && (newPriority < rowCount())) {
@@ -1143,7 +1144,7 @@ bool PluginList::eventFilter(QObject *obj, QEvent *event) return true;
}
}
- return QObject::eventFilter(obj, event);
+ return QAbstractItemModel::eventFilter(obj, event);
}
|
