one more iteration to try to fix tests on travis

This commit is contained in:
2017-02-14 03:48:11 +03:00
parent ce09ab753b
commit 38c5589c10
11 changed files with 66 additions and 15 deletions

View File

@ -95,6 +95,17 @@ ExtWeather *ExtWeather::copy(const QString _fileName, const int _number)
}
QString ExtWeather::jsonMapFile() const
{
QString fileName = QStandardPaths::locate(
QStandardPaths::GenericDataLocation,
QString("awesomewidgets/weather/awesomewidgets-extweather-ids.json"))
qCInfo(LOG_LIB) << "Map file" << fileName;
return fileName
}
QString ExtWeather::weatherFromInt(const int _id) const
{
qCDebug(LOG_LIB) << "Weather ID" << _id;
@ -236,10 +247,7 @@ void ExtWeather::readConfiguration()
void ExtWeather::readJsonMap()
{
QString fileName = QStandardPaths::locate(
QStandardPaths::GenericDataLocation,
QString("awesomewidgets/weather/awesomewidgets-extweather-ids.json"));
qCInfo(LOG_LIB) << "Map file" << fileName;
QString fileName = jsonMapFile();
QFile jsonFile(fileName);
if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
qCWarning(LOG_LIB) << "Could not open" << fileName;