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:
parent
abf65a5060
commit
05a49e8072
|
@ -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()
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user