From c5dc61d64fb1196f0b7b637ee25e4ef9e672e7a1 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 9 Aug 2016 01:59:10 +0200 Subject: [PATCH] refs #720, renaming in writer --- src/blackcore/db/databasewriter.cpp | 10 +++++----- src/blackcore/db/databasewriter.h | 4 ++-- src/blackgui/components/dbmodelcomponent.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/blackcore/db/databasewriter.cpp b/src/blackcore/db/databasewriter.cpp index b497d034e..4d4a96501 100644 --- a/src/blackcore/db/databasewriter.cpp +++ b/src/blackcore/db/databasewriter.cpp @@ -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 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); } } diff --git a/src/blackcore/db/databasewriter.h b/src/blackcore/db/databasewriter.h index 523c73bb7..66577cb8e 100644 --- a/src/blackcore/db/databasewriter.h +++ b/src/blackcore/db/databasewriter.h @@ -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; diff --git a/src/blackgui/components/dbmodelcomponent.cpp b/src/blackgui/components/dbmodelcomponent.cpp index 40ad610de..2b51adaa5 100644 --- a/src/blackgui/components/dbmodelcomponent.cpp +++ b/src/blackgui/components/dbmodelcomponent.cpp @@ -73,7 +73,7 @@ namespace BlackGui CAircraftModel model(this->ui->tvp_AircraftModel->container().latestObject()); ts = model.getUtcTimestamp(); } - sGui->getWebDataServices()->triggerRead(CEntityFlags::ModelEntity, ts); + sGui->getWebDataServices()->triggerReloadFromDb(CEntityFlags::ModelEntity, ts); } void CDbModelComponent::ps_modelsRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count) @@ -91,7 +91,7 @@ namespace BlackGui void CDbModelComponent::ps_reload() { if (!sGui) { return; } - sGui->getWebDataServices()->triggerRead(CEntityFlags::ModelEntity); + sGui->getWebDataServices()->triggerReloadFromDb(CEntityFlags::ModelEntity); } void CDbModelComponent::ps_onStyleSheetChanged()