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

revert: "refactor(core): Remove unused Core::reset method"

This reverts commit 4664c6249a.
This commit is contained in:
Diadlo 2017-06-29 15:17:42 +03:00
parent 90910cbfe1
commit 3c21af200c
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 16 additions and 0 deletions

View File

@ -1435,3 +1435,18 @@ void Core::killTimers(bool onlyStop)
toxTimer = nullptr;
}
}
/**
* @brief Reinitialized the core.
* @warning Must be called from the Core thread, with the GUI thread ready to process events.
*/
void Core::reset()
{
assert(QThread::currentThread() == coreThread);
QByteArray toxsave = getToxSaveData();
ready = false;
killTimers(true);
deadifyTox();
GUI::clearContacts();
start(toxsave);
}

View File

@ -78,6 +78,7 @@ public:
public slots:
void start(const QByteArray& savedata);
void reset();
void process();
void bootstrapDht();