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

Autosave on exit

This commit is contained in:
tux3 2015-06-04 11:42:49 +02:00
parent abf65a5060
commit 05a49e8072
2 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,8 @@ Nexus::Nexus(QObject *parent) :
QObject(parent),
profile{nullptr},
widget{nullptr},
androidgui{nullptr}
androidgui{nullptr},
loginScreen{nullptr}
{
}
@ -36,6 +37,9 @@ Nexus::~Nexus()
#else
delete widget;
#endif
delete loginScreen;
delete profile;
Settings::getInstance().save();
}
void Nexus::start()

View File

@ -195,6 +195,7 @@ void Profile::saveToxSave(QByteArray data)
assert(ProfileLocker::getCurLockName() == name);
QString path = Settings::getSettingsDirPath() + QDir::separator() + name + ".tox";
qDebug() << "Saving tox save to "<<path;
QSaveFile saveFile(path);
if (!saveFile.open(QIODevice::WriteOnly))
{