Commit a6d76353 authored by Laurent Montel's avatar Laurent Montel 😁

Minor

parent 97b233c0
......@@ -97,8 +97,7 @@ static bool checkAkonadiServerStatus()
static bool checkSearchSupportStatus()
{
QStringList searchMethods;
searchMethods << QStringLiteral("Remote Search");
QStringList searchMethods {QStringLiteral("Remote Search")};
const QString pluginOverride = QString::fromLatin1(qgetenv("AKONADI_OVERRIDE_SEARCHPLUGIN"));
if (!pluginOverride.isEmpty()) {
......
......@@ -250,7 +250,7 @@ Qt::DropActions CollectionModel::supportedDropActions() const
QStringList CollectionModel::mimeTypes() const
{
return QStringList() << QStringLiteral("text/uri-list");
return {QStringLiteral("text/uri-list")};
}
QMimeData *CollectionModel::mimeData(const QModelIndexList &indexes) const
......
......@@ -467,7 +467,7 @@ Qt::DropActions EntityTreeModel::supportedDropActions() const
QStringList EntityTreeModel::mimeTypes() const
{
// TODO: Should this return the mimetypes that the items provide? Allow dragging a contact from here for example.
return QStringList() << QStringLiteral("text/uri-list");
return {QStringLiteral("text/uri-list")};
}
bool EntityTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
......
......@@ -418,7 +418,7 @@ Qt::ItemFlags ItemModel::flags(const QModelIndex &index) const
QStringList ItemModel::mimeTypes() const
{
return QStringList() << QStringLiteral("text/uri-list");
return {QStringLiteral("text/uri-list")};
}
Session *ItemModel::session() const
......
......@@ -63,9 +63,7 @@ void CollectionTest::testBuildCollection()
mDocument.setContent(collection1, true, nullptr);
Collection::List colist = XmlReader::readCollections(mDocument.documentElement());
QStringList mimeType;
mimeType << QStringLiteral("inode/directory") << QStringLiteral("message/rfc822");
const QStringList mimeType {QStringLiteral("inode/directory"),QStringLiteral("message/rfc822")};
QCOMPARE(colist.size(), 1);
verifyCollection(colist, 0, QStringLiteral("c11"), QStringLiteral("Inbox"), mimeType);
......
......@@ -44,7 +44,7 @@ int main(int argc, char **argv)
aboutData.processCommandLine(&parser);
CollectionDialog dlg;
dlg.setMimeTypeFilter(QStringList() << QStringLiteral("text/directory"));
dlg.setMimeTypeFilter( {QStringLiteral("text/directory")} );
dlg.setAccessRightsFilter(Collection::CanCreateItem);
dlg.setDescription(i18n("Select an address book for saving:"));
dlg.setSelectionMode(QAbstractItemView::ExtendedSelection);
......
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