Commit 7bf0b2e5 authored by Laurent Montel's avatar Laurent Montel 😁

Use QLatin1Char

parent 4efe5fba
......@@ -128,7 +128,7 @@ static bool checkAvailableAgentTypes()
QDir dir(pluginDir);
const QStringList plugins = dir.entryList(QStringList() << QStringLiteral("*.desktop"), QDir::Files);
for (const QString &plugin : plugins) {
QSettings pluginInfo(pluginDir + QLatin1String("/") + plugin, QSettings::IniFormat);
QSettings pluginInfo(pluginDir + QLatin1Char('/') + plugin, QSettings::IniFormat);
pluginInfo.beginGroup(QStringLiteral("Desktop Entry"));
types << pluginInfo.value(QStringLiteral("X-Akonadi-Identifier")).toString();
}
......
......@@ -298,11 +298,11 @@ QString EntityOrderProxyModel::configString(const QModelIndex &index) const
{
Item::Id iId = index.data(EntityTreeModel::ItemIdRole).toLongLong();
if (iId != -1) {
return QLatin1String("i") + QString::number(iId);
return QLatin1Char('i') + QString::number(iId);
}
Collection::Id cId = index.data(EntityTreeModel::CollectionIdRole).toLongLong();
if (cId != -1) {
return QLatin1String("c") + QString::number(cId);
return QLatin1Char('c') + QString::number(cId);
}
Q_ASSERT(!"Invalid entity");
return QString();
......
......@@ -329,7 +329,7 @@ void CppGenerator::writeHeaderClass(ClassNode const *node)
} else if (!prop->dependencies().isEmpty()) {
QString varType;
if (TypeHelper::isNumericType(prop->type()) || TypeHelper::isBoolType(prop->type())) {
varType = QLatin1String("(") + prop->type() + QLatin1String(" ");
varType = QLatin1Char('(') + prop->type() + QLatin1Char(' ');
} else {
varType = QLatin1String("(const ") + prop->type() + QLatin1String(" &");
}
......@@ -337,7 +337,7 @@ void CppGenerator::writeHeaderClass(ClassNode const *node)
} else {
QString varType;
if (TypeHelper::isNumericType(prop->type()) || TypeHelper::isBoolType(prop->type())) {
varType = QLatin1String("(") + prop->type() + QLatin1String(" ");
varType = QLatin1Char('(') + prop->type() + QLatin1Char(' ');
} else {
varType = QLatin1String("(const ") + prop->type() + QLatin1String(" &");
}
......
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