Commit 81e8b2cc authored by David Faure's avatar David Faure

Merge branch 'Applications/17.08'

parents 432cace1 b87e5f4d
......@@ -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);
......
......@@ -33,9 +33,11 @@ void ShellScript::writeEnvironmentVariables()
foreach (const EnvVar &envvar, mEnvVars) {
mScript += QLatin1String("_old_") + QLatin1String(envvar.first) + QLatin1String("=") + QLatin1String(envvar.first) + QLatin1String("\n");
mScript.append(QLatin1String(envvar.first));
mScript.append(QLatin1Char('='));
mScript.append(QLatin1String(envvar.second));
mScript.append(QLatin1Char('\n'));
mScript.append(QLatin1String("=\""));
QString value = QString::fromLocal8Bit(envvar.second);
value = value.replace(QLatin1Char('"'), QLatin1String("\\\""));
mScript.append(value);
mScript.append(QLatin1String("\"\n"));
mScript.append(QLatin1String("export "));
mScript.append(QLatin1String(envvar.first));
......
......@@ -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