mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-25 15:55:38 -04: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
|
@ -23,7 +23,7 @@
|
|||
#include "core/Database.h"
|
||||
#include "core/Group.h"
|
||||
|
||||
bool CsvExporter::exportDatabase(const QString& filename, QSharedPointer<const Database> db)
|
||||
bool CsvExporter::exportDatabase(const QString& filename, const QSharedPointer<const Database>& db)
|
||||
{
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
|
||||
|
@ -33,7 +33,7 @@ bool CsvExporter::exportDatabase(const QString& filename, QSharedPointer<const D
|
|||
return exportDatabase(&file, db);
|
||||
}
|
||||
|
||||
bool CsvExporter::exportDatabase(QIODevice* device, QSharedPointer<const Database> db)
|
||||
bool CsvExporter::exportDatabase(QIODevice* device, const QSharedPointer<const Database>& db)
|
||||
{
|
||||
QString header;
|
||||
addColumn(header, "Group");
|
||||
|
|
|
@ -29,8 +29,8 @@ class QIODevice;
|
|||
class CsvExporter
|
||||
{
|
||||
public:
|
||||
bool exportDatabase(const QString& filename, QSharedPointer<const Database> db);
|
||||
bool exportDatabase(QIODevice* device, QSharedPointer<const Database> db);
|
||||
bool exportDatabase(const QString& filename, const QSharedPointer<const Database>& db);
|
||||
bool exportDatabase(QIODevice* device, const QSharedPointer<const Database>& db);
|
||||
QString errorString() const;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue