mirror-chatterino2/src/common/NetworkManager.cpp

23 lines
466 B
C++
Raw Normal View History

2018-06-26 15:33:51 +02:00
#include "common/NetworkManager.hpp"
#include <QNetworkAccessManager>
namespace chatterino {
QThread NetworkManager::workerThread;
QNetworkAccessManager NetworkManager::NaM;
void NetworkManager::init()
{
NetworkManager::NaM.moveToThread(&NetworkManager::workerThread);
NetworkManager::workerThread.start();
}
void NetworkManager::deinit()
{
NetworkManager::workerThread.quit();
NetworkManager::workerThread.wait();
}
} // namespace chatterino