mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
[AFV] First version of threaded CAfvClient
This commit is contained in:
committed by
Mat Sutcliffe
parent
d1006160f8
commit
d3a1eb1d60
@@ -63,7 +63,7 @@ namespace BlackCore
|
||||
|
||||
QNetworkRequest request(url);
|
||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||
QEventLoop loop(sApp);
|
||||
QEventLoop loop;
|
||||
|
||||
// posted in QAM thread, reply is nullptr if called from another thread
|
||||
QNetworkReply *reply = sApp->postToNetwork(request, CApplication::NoLogRequestId, QJsonDocument(obj).toJson(),
|
||||
@@ -160,7 +160,7 @@ namespace BlackCore
|
||||
{
|
||||
if (isShuttingDown()) { return {}; }
|
||||
|
||||
QEventLoop loop(sApp);
|
||||
QEventLoop loop;
|
||||
QByteArray receivedData;
|
||||
|
||||
// posted in QAM thread, reply is nullptr if called from another thread
|
||||
@@ -196,7 +196,7 @@ namespace BlackCore
|
||||
{
|
||||
if (isShuttingDown()) { return {}; }
|
||||
|
||||
QEventLoop loop(sApp);
|
||||
QEventLoop loop;
|
||||
QByteArray receivedData;
|
||||
|
||||
// posted in QAM thread, reply is nullptr if called from another thread
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
#include "blackcore/afv/dto.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QNetworkAccessManager>
|
||||
@@ -78,7 +79,7 @@ namespace BlackCore
|
||||
{
|
||||
if (!m_isAuthenticated)
|
||||
{
|
||||
CLogMessage(this).debug(u"AFV not authenticated");
|
||||
BlackMisc::CLogMessage(this).debug(u"AFV not authenticated");
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -101,7 +102,7 @@ namespace BlackCore
|
||||
{
|
||||
if (! m_isAuthenticated)
|
||||
{
|
||||
CLogMessage(this).debug(u"AFV not authenticated");
|
||||
BlackMisc::CLogMessage(this).debug(u"AFV not authenticated");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user