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

Merge remote-tracking branch 'PKEv/correct_remove_profile'

This commit is contained in:
agilob 2015-09-24 19:06:34 +01:00
commit dabb346c3a
No known key found for this signature in database
GPG Key ID: 296F0B764741106C

View File

@ -158,11 +158,14 @@ Profile::~Profile()
saveToxSave(); saveToxSave();
delete core; delete core;
delete coreThread; delete coreThread;
if (!isRemoved)
{
Settings::getInstance().savePersonal(this); Settings::getInstance().savePersonal(this);
Settings::getInstance().sync(); Settings::getInstance().sync();
ProfileLocker::assertLock(); ProfileLocker::assertLock();
assert(ProfileLocker::getCurLockName() == name); assert(ProfileLocker::getCurLockName() == name);
ProfileLocker::unlock(); ProfileLocker::unlock();
}
} }
QVector<QString> Profile::getFilesByExt(QString extension) QVector<QString> Profile::getFilesByExt(QString extension)
@ -368,6 +371,7 @@ void Profile::remove()
} }
} }
QString path = Settings::getInstance().getSettingsDirPath() + name; QString path = Settings::getInstance().getSettingsDirPath() + name;
ProfileLocker::unlock();
QFile::remove(path+".tox"); QFile::remove(path+".tox");
QFile::remove(path+".ini"); QFile::remove(path+".ini");