mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
tweaks
This commit is contained in:
parent
983879e799
commit
a99e7d2b94
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user