|
|
|
@ -3,6 +3,7 @@
@@ -3,6 +3,7 @@
|
|
|
|
|
#include "src/misc/settings.h" |
|
|
|
|
#include "src/core/core.h" |
|
|
|
|
#include "src/historykeeper.h" |
|
|
|
|
#include "src/widget/gui.h" |
|
|
|
|
#include <cassert> |
|
|
|
|
#include <QDir> |
|
|
|
|
#include <QFileInfo> |
|
|
|
@ -17,6 +18,7 @@ Profile::Profile(QString name, QString password, bool isNewProfile)
@@ -17,6 +18,7 @@ Profile::Profile(QString name, QString password, bool isNewProfile)
|
|
|
|
|
newProfile{isNewProfile}, isRemoved{false} |
|
|
|
|
{ |
|
|
|
|
Settings::getInstance().setCurrentProfile(name); |
|
|
|
|
HistoryKeeper::resetInstance(); |
|
|
|
|
|
|
|
|
|
coreThread = new QThread(); |
|
|
|
|
coreThread->setObjectName("qTox Core"); |
|
|
|
@ -313,3 +315,11 @@ QString Profile::getPassword()
@@ -313,3 +315,11 @@ QString Profile::getPassword()
|
|
|
|
|
{ |
|
|
|
|
return password; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Profile::restartCore() |
|
|
|
|
{ |
|
|
|
|
GUI::setEnabled(false); // Core::reset re-enables it
|
|
|
|
|
if (!isRemoved && core->isReady()) |
|
|
|
|
saveToxSave(); |
|
|
|
|
QMetaObject::invokeMethod(core, "reset"); |
|
|
|
|
} |
|
|
|
|