Browse Source

Autosave on exit

pull/1793/head
tux3 10 years ago
parent
commit
05a49e8072
  1. 6
      src/nexus.cpp
  2. 1
      src/profile.cpp

6
src/nexus.cpp

@ -25,7 +25,8 @@ Nexus::Nexus(QObject *parent) : @@ -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() @@ -36,6 +37,9 @@ Nexus::~Nexus()
#else
delete widget;
#endif
delete loginScreen;
delete profile;
Settings::getInstance().save();
}
void Nexus::start()

1
src/profile.cpp

@ -195,6 +195,7 @@ void Profile::saveToxSave(QByteArray data) @@ -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…
Cancel
Save