mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
parent
d07bef21a3
commit
38c68658e0
|
@ -275,7 +275,7 @@ void Nexus::setProfile(Profile* profile)
|
|||
{
|
||||
getInstance().profile = profile;
|
||||
if (profile)
|
||||
Settings::getInstance().loadPersonnal(profile);
|
||||
Settings::getInstance().loadpersonal(profile);
|
||||
}
|
||||
|
||||
AndroidGUI* Nexus::getAndroidGUI()
|
||||
|
|
|
@ -48,7 +48,7 @@ Profile::Profile(QString name, QString password, bool isNewProfile)
|
|||
s.setCurrentProfile(name);
|
||||
s.saveGlobal();
|
||||
|
||||
// At this point it's too early to load the personnal settings (Nexus will do it), so we always load
|
||||
// At this point it's too early to load the personal settings (Nexus will do it), so we always load
|
||||
// the history, and if it fails we can't change the setting now, but we keep a nullptr
|
||||
history.reset(new History{name, password});
|
||||
if (!history->isValid())
|
||||
|
|
|
@ -265,18 +265,18 @@ void Settings::loadGlobal()
|
|||
loaded = true;
|
||||
}
|
||||
|
||||
void Settings::loadPersonnal()
|
||||
void Settings::loadpersonal()
|
||||
{
|
||||
Profile* profile = Nexus::getProfile();
|
||||
if (!profile)
|
||||
{
|
||||
qCritical() << "No active profile, couldn't load personnal settings";
|
||||
qCritical() << "No active profile, couldn't load personal settings";
|
||||
return;
|
||||
}
|
||||
loadPersonnal(profile);
|
||||
loadpersonal(profile);
|
||||
}
|
||||
|
||||
void Settings::loadPersonnal(Profile* profile)
|
||||
void Settings::loadpersonal(Profile* profile)
|
||||
{
|
||||
QMutexLocker locker{&bigLock};
|
||||
|
||||
|
@ -288,7 +288,7 @@ void Settings::loadPersonnal(Profile* profile)
|
|||
if (QFile(tmp).exists()) // otherwise, filePath remains the global file
|
||||
filePath = tmp;
|
||||
|
||||
qDebug()<<"Loading personnal settings from"<<filePath;
|
||||
qDebug()<<"Loading personal settings from"<<filePath;
|
||||
|
||||
SettingsSerializer ps(filePath, profile->getPassword());
|
||||
ps.load();
|
||||
|
|
|
@ -43,14 +43,14 @@ public:
|
|||
QString getSettingsDirPath(); ///< The returned path ends with a directory separator
|
||||
|
||||
void createSettingsDir(); ///< Creates a path to the settings dir, if it doesn't already exist
|
||||
void createPersonal(QString basename); ///< Write a default personnal .ini settings file for a profile
|
||||
void createPersonal(QString basename); ///< Write a default personal .ini settings file for a profile
|
||||
|
||||
void savePersonal(); ///< Asynchronous, saves the current profile
|
||||
void savePersonal(Profile *profile); ///< Asynchronous
|
||||
|
||||
void loadGlobal();
|
||||
void loadPersonnal();
|
||||
void loadPersonnal(Profile *profile);
|
||||
void loadpersonal();
|
||||
void loadpersonal(Profile *profile);
|
||||
|
||||
public slots:
|
||||
void saveGlobal(); ///< Asynchronous
|
||||
|
|
|
@ -373,7 +373,7 @@ void SettingsSerializer::readSerialized()
|
|||
stream >> sizeData;
|
||||
if (sizeData.isEmpty())
|
||||
{
|
||||
qWarning("The personnal save file is corrupted!");
|
||||
qWarning("The personal save file is corrupted!");
|
||||
return;
|
||||
}
|
||||
quint64 size = dataToVUint(sizeData);
|
||||
|
@ -386,7 +386,7 @@ void SettingsSerializer::readSerialized()
|
|||
stream >> indexData;
|
||||
if (indexData.isEmpty())
|
||||
{
|
||||
qWarning("The personnal save file is corrupted!");
|
||||
qWarning("The personal save file is corrupted!");
|
||||
return;
|
||||
}
|
||||
quint64 index = dataToVUint(indexData);
|
||||
|
|
Loading…
Reference in New Issue
Block a user