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

1
src/profile.cpp

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

Loading…
Cancel
Save