mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #720, renaming in writer
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6f61d323c2
commit
c5dc61d64f
@@ -65,7 +65,7 @@ namespace BlackCore
|
||||
multiPart->append(CNetworkUtils::getMultipartWithDebugFlag());
|
||||
}
|
||||
|
||||
m_pendingReply = sApp->postToNetwork(request, multiPart, { this, &CDatabaseWriter::ps_postResponse});
|
||||
m_pendingReply = sApp->postToNetwork(request, multiPart, { this, &CDatabaseWriter::ps_postModelsResponse});
|
||||
return msgs;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CDatabaseWriter::ps_postResponse(QNetworkReply *nwReplyPtr)
|
||||
void CDatabaseWriter::ps_postModelsResponse(QNetworkReply *nwReplyPtr)
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::swiftDbWebservice()}));
|
||||
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> nwReply(nwReplyPtr);
|
||||
@@ -100,7 +100,7 @@ namespace BlackCore
|
||||
if (dataFileData.isEmpty())
|
||||
{
|
||||
const CStatusMessageList msgs({CStatusMessage(cats, CStatusMessage::SeverityError, "No response data from " + urlString)});
|
||||
emit published(CAircraftModelList(), CAircraftModelList(), msgs);
|
||||
emit publishedModels(CAircraftModelList(), CAircraftModelList(), msgs);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace BlackCore
|
||||
CAircraftModelList modelsSkipped;
|
||||
CStatusMessageList msgs;
|
||||
bool success = CDatastoreUtility::parseSwiftPublishResponse(dataFileData, modelsPublished, modelsSkipped, msgs);
|
||||
emit published(modelsPublished, modelsSkipped, msgs);
|
||||
emit publishedModels(modelsPublished, modelsSkipped, msgs);
|
||||
Q_UNUSED(success);
|
||||
}
|
||||
else
|
||||
@@ -116,7 +116,7 @@ namespace BlackCore
|
||||
QString error = nwReply->errorString();
|
||||
nwReply->close(); // close asap
|
||||
const CStatusMessageList msgs( {CStatusMessage(cats, CStatusMessage::SeverityError, "HTTP error: " + error)});
|
||||
emit published(CAircraftModelList(), CAircraftModelList(), msgs);
|
||||
emit publishedModels(CAircraftModelList(), CAircraftModelList(), msgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,11 +44,11 @@ namespace BlackCore
|
||||
|
||||
signals:
|
||||
//! Published models, the response to \sa asyncPublishModels
|
||||
void published(const BlackMisc::Simulation::CAircraftModelList &modelsPublished, const BlackMisc::Simulation::CAircraftModelList &modelsSkipped, const BlackMisc::CStatusMessageList &messages);
|
||||
void publishedModels(const BlackMisc::Simulation::CAircraftModelList &modelsPublished, const BlackMisc::Simulation::CAircraftModelList &modelsSkipped, const BlackMisc::CStatusMessageList &messages);
|
||||
|
||||
private slots:
|
||||
//! Post response
|
||||
void ps_postResponse(QNetworkReply *nwReplyPtr);
|
||||
void ps_postModelsResponse(QNetworkReply *nwReplyPtr);
|
||||
|
||||
private:
|
||||
BlackMisc::Network::CUrl m_modelPublishUrl;
|
||||
|
||||
Reference in New Issue
Block a user