mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-18 11:08:05 -04:00
some cppcheck and clang-tidy fixies
This commit is contained in:
parent
ac7face247
commit
98badfb4a2
9 changed files with 16 additions and 14 deletions
|
@ -46,7 +46,7 @@ Clip::Clip()
|
|||
int Clip::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<QCommandLineParser> parser)
|
||||
{
|
||||
const QStringList args = parser->positionalArguments();
|
||||
QString entryPath = args.at(1);
|
||||
const QString& entryPath = args.at(1);
|
||||
QString timeout;
|
||||
if (args.size() == 3) {
|
||||
timeout = args.at(2);
|
||||
|
|
|
@ -60,8 +60,8 @@ int Import::execute(const QStringList& arguments)
|
|||
TextStream errorTextStream(Utils::STDERR, QIODevice::WriteOnly);
|
||||
|
||||
const QStringList args = parser->positionalArguments();
|
||||
const QString xmlExportPath = args.at(0);
|
||||
const QString dbPath = args.at(1);
|
||||
const QString& xmlExportPath = args.at(0);
|
||||
const QString& dbPath = args.at(1);
|
||||
|
||||
if (QFileInfo::exists(dbPath)) {
|
||||
errorTextStream << QObject::tr("File %1 already exists.").arg(dbPath) << endl;
|
||||
|
|
|
@ -60,7 +60,7 @@ int List::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
QString groupPath = args.at(1);
|
||||
const QString& groupPath = args.at(1);
|
||||
Group* group = database->rootGroup()->findGroupByPath(groupPath);
|
||||
if (!group) {
|
||||
errorTextStream << QObject::tr("Cannot find group %1.").arg(groupPath) << endl;
|
||||
|
|
|
@ -40,7 +40,7 @@ int Locate::executeWithDatabase(QSharedPointer<Database> database, QSharedPointe
|
|||
{
|
||||
|
||||
const QStringList args = parser->positionalArguments();
|
||||
QString searchTerm = args.at(1);
|
||||
const QString& searchTerm = args.at(1);
|
||||
TextStream outputTextStream(Utils::STDOUT, QIODevice::WriteOnly);
|
||||
TextStream errorTextStream(Utils::STDERR, QIODevice::WriteOnly);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue