clang-tidy: use braced init list (#7998)

This commit is contained in:
Rosen Penev
2023-01-29 07:05:44 -08:00
committed by GitHub
parent 0f7ef275ab
commit 318157d242
34 changed files with 87 additions and 87 deletions

View File

@@ -93,7 +93,7 @@ QSharedPointer<PasswordGenerator> Generate::createGenerator(QSharedPointer<QComm
passwordGenerator->setLength(PasswordGenerator::DefaultLength);
} else if (passwordLength.toInt() <= 0) {
err << QObject::tr("Invalid password length %1").arg(passwordLength) << endl;
return QSharedPointer<PasswordGenerator>(nullptr);
return {};
} else {
passwordGenerator->setLength(passwordLength.toInt());
}
@@ -139,7 +139,7 @@ QSharedPointer<PasswordGenerator> Generate::createGenerator(QSharedPointer<QComm
if (!passwordGenerator->isValid()) {
err << QObject::tr("Invalid password generator after applying all options") << endl;
return QSharedPointer<PasswordGenerator>(nullptr);
return {};
}
return passwordGenerator;

View File

@@ -384,7 +384,7 @@ namespace Utils
if (fieldName == TagsFieldName) {
return entry->tags();
}
return QString("");
return "";
}
QStringList findAttributes(const EntryAttributes& attributes, const QString& name)