mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Revert "Delete CoreAV from the Core thread"
This reverts commit 1f758efc2f19fd4e9a9847c517e57ad021364c0f.
This commit is contained in:
parent
ae243b2089
commit
8d2ae07c9f
@ -77,12 +77,6 @@ Core::Core(QThread *CoreThread, Profile& profile) :
|
||||
|
||||
void Core::deadifyTox()
|
||||
{
|
||||
if (QThread::currentThread() != coreThread)
|
||||
{
|
||||
QMetaObject::invokeMethod(this, "deadifyTox", Qt::BlockingQueuedConnection);
|
||||
return;
|
||||
}
|
||||
|
||||
if (av)
|
||||
{
|
||||
delete av;
|
||||
@ -105,9 +99,6 @@ Core::~Core()
|
||||
QMetaObject::invokeMethod(this, "killTimers", Qt::BlockingQueuedConnection,
|
||||
Q_ARG(bool, false));
|
||||
}
|
||||
|
||||
deadifyTox();
|
||||
|
||||
coreThread->exit(0);
|
||||
while (coreThread->isRunning())
|
||||
{
|
||||
@ -115,6 +106,8 @@ Core::~Core()
|
||||
coreThread->wait(500);
|
||||
}
|
||||
|
||||
deadifyTox();
|
||||
|
||||
Audio& audio = Audio::getInstance();
|
||||
audio.closeInput();
|
||||
audio.closeOutput();
|
||||
|
@ -223,9 +223,10 @@ private:
|
||||
|
||||
void checkLastOnline(uint32_t friendId);
|
||||
|
||||
void deadifyTox();
|
||||
|
||||
private slots:
|
||||
void killTimers(bool onlyStop); ///< Must only be called from the Core thread
|
||||
void deadifyTox(); ///< Will call itself blocking queued on the Core thread
|
||||
|
||||
private:
|
||||
Tox* tox;
|
||||
|
Loading…
x
Reference in New Issue
Block a user