Commit b87e5f4d authored by David Faure's avatar David Faure

Minor cleanups

parent a62c5862
......@@ -574,10 +574,10 @@ void EntityTreeModelTest::testItemRemoved()
FakeServerData *serverData = testDrivers.first;
Akonadi::EntityTreeModel *model = testDrivers.second;
QModelIndexList list = model->match(model->index(0, 0), Qt::DisplayRole, removedItem, 1, Qt::MatchRecursive);
const QModelIndexList list = model->match(model->index(0, 0), Qt::DisplayRole, removedItem, 1, Qt::MatchRecursive);
Q_ASSERT(!list.isEmpty());
QModelIndex removedIndex = list.first();
QString sourceCollection = removedIndex.parent().data().toString();
const QString sourceCollection = removedIndex.parent().data().toString();
int sourceRow = removedIndex.row();
FakeItemRemovedCommand *removeCommand = new FakeItemRemovedCommand(removedItem, sourceCollection, serverData);
......
......@@ -393,7 +393,7 @@ Qt::ItemFlags EntityTreeModel::flags(const QModelIndex &index) const
Q_D(const EntityTreeModel);
// Pass modeltest.
if (!index.isValid()) {
return nullptr;
return {};
}
Qt::ItemFlags flags = QAbstractItemModel::flags(index);
......@@ -453,7 +453,7 @@ Qt::ItemFlags EntityTreeModel::flags(const QModelIndex &index) const
// Can't drop onto items.
if (rights & Collection::CanChangeItem && index.column() == 0) {
flags = flags | Qt::ItemIsEditable;
flags |= Qt::ItemIsEditable;
}
// dragging is always possible, even for read-only objects, but they can only be copied, not moved.
flags |= Qt::ItemIsDragEnabled;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment