Rename private slots to private functions

This commit is contained in:
Roland Winklmeier
2018-02-03 16:00:35 +01:00
committed by Klaus Basan
parent 266e8a768d
commit 1b5a0a7f4d
2 changed files with 10 additions and 14 deletions

View File

@@ -76,7 +76,7 @@ namespace BlackWxPlugin
const QUrl url = getDownloadUrl().toQUrl();
CLogMessage(this).debug() << "Started to download GFS data from" << url.toString();
QNetworkRequest request(url);
sApp->getFromNetwork(request, { this, &CWeatherDataGfs::ps_parseGfsFile });
sApp->getFromNetwork(request, { this, &CWeatherDataGfs::parseGfsFile });
}
else
{
@@ -86,7 +86,7 @@ namespace BlackWxPlugin
{
parseGfsFileImpl(m_gribData);
});
m_parseGribFileWorker->then(this, &CWeatherDataGfs::ps_fetchingWeatherDataFinished);
m_parseGribFileWorker->then(this, &CWeatherDataGfs::fetchingWeatherDataFinished);
}
}
@@ -96,12 +96,12 @@ namespace BlackWxPlugin
return m_weatherGrid;
}
void CWeatherDataGfs::ps_fetchingWeatherDataFinished()
void CWeatherDataGfs::fetchingWeatherDataFinished()
{
emit fetchingFinished();
}
void CWeatherDataGfs::ps_parseGfsFile(QNetworkReply *nwReplyPtr)
void CWeatherDataGfs::parseGfsFile(QNetworkReply *nwReplyPtr)
{
// wrap pointer, make sure any exit cleans up reply
// required to use delete later as object is created in a different thread
@@ -113,7 +113,7 @@ namespace BlackWxPlugin
{
parseGfsFileImpl(m_gribData);
});
m_parseGribFileWorker->then(this, &CWeatherDataGfs::ps_fetchingWeatherDataFinished);
m_parseGribFileWorker->then(this, &CWeatherDataGfs::fetchingWeatherDataFinished);
}
CUrl CWeatherDataGfs::getDownloadUrl() const

View File

@@ -53,14 +53,6 @@ namespace BlackWxPlugin
//! \copydoc BlackCore::IWeatherData::getWeatherData()
virtual BlackMisc::Weather::CWeatherGrid getWeatherData() const override;
private slots:
//! Asyncronous fetching finished
//! \threadsafe
void ps_fetchingWeatherDataFinished();
//! Parsing
void ps_parseGfsFile(QNetworkReply *nwReplyPtr);
private:
enum Grib2CloudLevel
{
@@ -137,8 +129,12 @@ namespace BlackWxPlugin
double surfaceTemperature = 0;
};
BlackMisc::Network::CUrl getDownloadUrl() const;
//! Asyncronous fetching finished
//! \threadsafe
void fetchingWeatherDataFinished();
void parseGfsFile(QNetworkReply *nwReplyPtr);
BlackMisc::Network::CUrl getDownloadUrl() const;
void parseGfsFileImpl(const QByteArray &gribData);
void findNextGribMessage(unsigned char *buffer, g2int size, g2int iseek, g2int *lskip, g2int *lgrib);
void createWeatherGrid(const gribfield *gfld);