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

refactor(settings): declare createPersonal const

This commit is contained in:
jenli669 2019-06-26 16:35:20 +02:00
parent d65aeffe07
commit 1da963eced
No known key found for this signature in database
GPG Key ID: 8267F9F7C2BF7E5E
4 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@
QStringList Profile::profiles; QStringList Profile::profiles;
void Profile::initCore(const QByteArray& toxsave, ICoreSettings& s, bool isNewProfile) void Profile::initCore(const QByteArray& toxsave, const ICoreSettings& s, bool isNewProfile)
{ {
if (toxsave.isEmpty() && !isNewProfile) { if (toxsave.isEmpty() && !isNewProfile) {
qCritical() << "Existing toxsave is empty"; qCritical() << "Existing toxsave is empty";

View File

@ -103,7 +103,7 @@ private:
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);
bool saveToxSave(QByteArray data); bool saveToxSave(QByteArray data);
void initCore(const QByteArray& toxsave, ICoreSettings& s, bool isNewProfile); void initCore(const QByteArray& toxsave, const ICoreSettings& s, bool isNewProfile);
private: private:
std::unique_ptr<Core> core = nullptr; std::unique_ptr<Core> core = nullptr;

View File

@ -2368,7 +2368,7 @@ bool Settings::getEnableGroupChatsColor() const
* *
* @note If basename is "profile", settings will be saved in profile.ini * @note If basename is "profile", settings will be saved in profile.ini
*/ */
void Settings::createPersonal(QString basename) void Settings::createPersonal(const QString& basename) const
{ {
QMutexLocker locker{&bigLock}; QMutexLocker locker{&bigLock};

View File

@ -149,7 +149,7 @@ public:
QString getAppCacheDirPath() const; QString getAppCacheDirPath() const;
void createSettingsDir(); void createSettingsDir();
void createPersonal(QString basename); void createPersonal(const QString& basename) const;
void savePersonal(); void savePersonal();