mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-08 03:15:51 +00:00
one more iteration to try to fix tests on travis
This commit is contained in:
@ -83,6 +83,18 @@ ExtScript *ExtScript::copy(const QString _fileName, const int _number)
|
||||
}
|
||||
|
||||
|
||||
QString ExtScript::jsonFiltersFile() const
|
||||
{
|
||||
QString fileName = QStandardPaths::locate(
|
||||
QStandardPaths::GenericDataLocation,
|
||||
QString(
|
||||
"awesomewidgets/scripts/awesomewidgets-extscripts-filters.json"));
|
||||
qCInfo(LOG_LIB) << "Filters file" << fileName;
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
|
||||
QString ExtScript::executable() const
|
||||
{
|
||||
return m_executable;
|
||||
@ -240,11 +252,7 @@ void ExtScript::readConfiguration()
|
||||
|
||||
void ExtScript::readJsonFilters()
|
||||
{
|
||||
QString fileName = QStandardPaths::locate(
|
||||
QStandardPaths::GenericDataLocation,
|
||||
QString(
|
||||
"awesomewidgets/scripts/awesomewidgets-extscripts-filters.json"));
|
||||
qCInfo(LOG_LIB) << "Filters file" << fileName;
|
||||
QString fileName = jsonFiltersFile();
|
||||
QFile jsonFile(fileName);
|
||||
if (!jsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
qCWarning(LOG_LIB) << "Could not open" << fileName;
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
explicit ExtScript(QWidget *parent, const QString filePath = QString());
|
||||
virtual ~ExtScript();
|
||||
ExtScript *copy(const QString _fileName, const int _number);
|
||||
QString jsonFiltersFile() const;
|
||||
// get methods
|
||||
QString executable() const;
|
||||
QStringList filters() const;
|
||||
|
@ -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;
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
explicit ExtWeather(QWidget *parent, const QString filePath = QString());
|
||||
virtual ~ExtWeather();
|
||||
ExtWeather *copy(const QString _fileName, const int _number);
|
||||
QString jsonMapFile() const;
|
||||
QString weatherFromInt(const int _id) const;
|
||||
// get methods
|
||||
QString city() const;
|
||||
|
Reference in New Issue
Block a user