mirror-chatterino2/src/common/NetworkManager.cpp
2018-08-10 20:53:13 +02:00

23 lines
486 B
C++

#include "common/NetworkManager.hpp"
#include <QNetworkAccessManager>
namespace chatterino {
QThread NetworkManager::workerThread;
QNetworkAccessManager NetworkManager::accessManager;
void NetworkManager::init()
{
NetworkManager::accessManager.moveToThread(&NetworkManager::workerThread);
NetworkManager::workerThread.start();
}
void NetworkManager::deinit()
{
NetworkManager::workerThread.quit();
NetworkManager::workerThread.wait();
}
} // namespace chatterino