1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
dubslow 2014-10-09 04:26:32 -05:00
parent 983879e799
commit a99e7d2b94
2 changed files with 3 additions and 1 deletions

View File

@ -121,8 +121,9 @@ void IdentityForm::onRenameClicked()
{
name = Core::sanitize(name);
QDir dir(Settings::getSettingsDirPath());
QFile::copy(dir.filePath(cur+Core::TOX_EXT), dir.filePath(name+Core::TOX_EXT));
QFile::rename(dir.filePath(cur+Core::TOX_EXT), dir.filePath(name+Core::TOX_EXT));
bodyUI->profiles->setItemText(bodyUI->profiles->currentIndex(), name);
Settings::getInstance().setCurrentProfile(name);
}
}

View File

@ -223,6 +223,7 @@ QString Widget::detectProfile()
QFile file(path);
if (profile == "" || !file.exists())
{
Settings::getInstance().setCurrentProfile("");
#if 1 // deprecation attempt
// if the last profile doesn't exist, fall back to old "data"
path = dir.filePath(Core::CONFIG_FILE_NAME);