mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3172
Impyy (1): fix(profile): Don't require .ini to load profile
This commit is contained in:
commit
56e59d0fa3
|
@ -202,17 +202,11 @@ void Profile::scanProfiles()
|
|||
for (QString toxfile : toxfiles)
|
||||
{
|
||||
if (!inifiles.contains(toxfile))
|
||||
importProfile(toxfile);
|
||||
Settings::getInstance().createPersonal(toxfile);
|
||||
profiles.append(toxfile);
|
||||
}
|
||||
}
|
||||
|
||||
void Profile::importProfile(QString name)
|
||||
{
|
||||
assert(!exists(name));
|
||||
Settings::getInstance().createPersonal(name);
|
||||
}
|
||||
|
||||
QVector<QString> Profile::getProfiles()
|
||||
{
|
||||
return profiles;
|
||||
|
@ -464,7 +458,7 @@ void Profile::removeAvatar(const QString &ownerId)
|
|||
bool Profile::exists(QString name)
|
||||
{
|
||||
QString path = Settings::getInstance().getSettingsDirPath() + name;
|
||||
return QFile::exists(path+".tox") && QFile::exists(path+".ini");
|
||||
return QFile::exists(path+".tox");
|
||||
}
|
||||
|
||||
bool Profile::isEncrypted() const
|
||||
|
|
Loading…
Reference in New Issue
Block a user