1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(profile): use const name reference in Profile()

This commit is contained in:
jenli669 2019-06-26 15:49:52 +02:00
parent 2d1d5b2a3e
commit d65aeffe07
No known key found for this signature in database
GPG Key ID: 8267F9F7C2BF7E5E
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ void Profile::initCore(const QByteArray& toxsave, ICoreSettings& s, bool isNewPr
Qt::ConnectionType::QueuedConnection); Qt::ConnectionType::QueuedConnection);
} }
Profile::Profile(QString name, const QString& password, bool isNewProfile, Profile::Profile(const QString& name, const QString& password, bool isNewProfile,
const QByteArray& toxsave, std::unique_ptr<ToxEncrypt> passkey) const QByteArray& toxsave, std::unique_ptr<ToxEncrypt> passkey)
: name{name} : name{name}
, passkey{std::move(passkey)} , passkey{std::move(passkey)}

View File

@ -98,7 +98,7 @@ private slots:
void onAvatarOfferReceived(uint32_t friendId, uint32_t fileId, const QByteArray& avatarHash); void onAvatarOfferReceived(uint32_t friendId, uint32_t fileId, const QByteArray& avatarHash);
private: private:
Profile(QString name, const QString& password, bool newProfile, const QByteArray& toxsave, Profile(const QString& name, const QString& password, bool newProfile, const QByteArray& toxsave,
std::unique_ptr<ToxEncrypt> passKey); std::unique_ptr<ToxEncrypt> passKey);
static QStringList getFilesByExt(QString extension); static QStringList getFilesByExt(QString extension);
QString avatarPath(const ToxPk& owner, bool forceUnencrypted = false); QString avatarPath(const ToxPk& owner, bool forceUnencrypted = false);