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

Fix two minor bugs

This commit is contained in:
Dubslow 2015-01-23 08:31:13 -06:00
parent 7552fc0ceb
commit f6ff421aff
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA
2 changed files with 2 additions and 1 deletions

View File

@ -155,6 +155,7 @@ void IdentityForm::onRenameClicked()
tr("A profile named \"%1\" already exists. Do you want to erase it?", "rename confirm text").arg(cur))) tr("A profile named \"%1\" already exists. Do you want to erase it?", "rename confirm text").arg(cur)))
{ {
QFile::rename(dir.filePath(cur+Core::TOX_EXT), file); QFile::rename(dir.filePath(cur+Core::TOX_EXT), file);
QFile::rename(dir.filePath(cur+".ini"), dir.filePath(name+".ini"));
bodyUI->profiles->setItemText(bodyUI->profiles->currentIndex(), name); bodyUI->profiles->setItemText(bodyUI->profiles->currentIndex(), name);
HistoryKeeper::renameHistory(cur, name); HistoryKeeper::renameHistory(cur, name);
Settings::getInstance().setCurrentProfile(name); Settings::getInstance().setCurrentProfile(name);

View File

@ -403,7 +403,7 @@ QString Widget::detectProfile()
return ""; return "";
else else
{ {
Settings::getInstance().setCurrentProfile(profile); Settings::getInstance().switchProfile(profile);
return dir.filePath(profile + Core::TOX_EXT); return dir.filePath(profile + Core::TOX_EXT);
} }
} }