mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-16 00:44:17 -05:00
Avoid copying QSharedPointers when not needed
This commit is contained in:
parent
6df9c6f9b2
commit
39b96c13e8
18 changed files with 31 additions and 29 deletions
|
|
@ -74,7 +74,7 @@ int Create::execute(const QStringList& arguments)
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
QString databaseFilename = args.at(0);
|
||||
const QString& databaseFilename = args.at(0);
|
||||
if (QFileInfo::exists(databaseFilename)) {
|
||||
err << QObject::tr("File %1 already exists.").arg(databaseFilename) << endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -150,7 +150,7 @@ QSharedPointer<PasswordKey> Create::getPasswordFromStdin()
|
|||
* @param fileKey Resulting fileKey
|
||||
* @return true if the key file was loaded succesfully
|
||||
*/
|
||||
bool Create::loadFileKey(QString path, QSharedPointer<FileKey>& fileKey)
|
||||
bool Create::loadFileKey(const QString& path, QSharedPointer<FileKey>& fileKey)
|
||||
{
|
||||
QTextStream err(Utils::STDERR, QIODevice::WriteOnly);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue