mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-26 00:05:34 -04:00
Clean up code (#3431)
* Empty destructors are replaced with default destructors * A few loop variables made into const references to avoid copies * Add missing `override` spec for some `Command::execute` methods
This commit is contained in:
parent
7cbcea18e9
commit
b9e1088f74
27 changed files with 12 additions and 78 deletions
|
@ -80,14 +80,14 @@ QSharedPointer<QCommandLineParser> Command::getCommandLineParser(const QStringLi
|
|||
|
||||
QSharedPointer<QCommandLineParser> parser = QSharedPointer<QCommandLineParser>(new QCommandLineParser());
|
||||
parser->setApplicationDescription(description);
|
||||
for (CommandLineArgument positionalArgument : positionalArguments) {
|
||||
for (const CommandLineArgument& positionalArgument : positionalArguments) {
|
||||
parser->addPositionalArgument(
|
||||
positionalArgument.name, positionalArgument.description, positionalArgument.syntax);
|
||||
}
|
||||
for (CommandLineArgument optionalArgument : optionalArguments) {
|
||||
for (const CommandLineArgument& optionalArgument : optionalArguments) {
|
||||
parser->addPositionalArgument(optionalArgument.name, optionalArgument.description, optionalArgument.syntax);
|
||||
}
|
||||
for (QCommandLineOption option : options) {
|
||||
for (const QCommandLineOption& option : options) {
|
||||
parser->addOption(option);
|
||||
}
|
||||
parser->addHelpOption();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue