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

fix(profile): Don't require .ini to load profile

Fixes an issue where qtox refused to load profiles while using
the -p switch on the command line. This happened in cases where
there was no .ini file for the specified profile present.
This commit is contained in:
Impyy 2016-04-21 16:48:17 +02:00
parent edc35ba9df
commit 56a36e2e0a

View File

@ -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