openweather autodetect when empty string works
This commit is contained in:
parent
8a8df6337a
commit
fa9313f6f8
@ -138,7 +138,7 @@ void OpenWeatherMap::processSearchLocationResponse(QByteArray data)
|
||||
cityList.append(city);
|
||||
|
||||
m_cityId = elemant.value("id").toString();
|
||||
updateWeatherData();
|
||||
search(m_cityName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -258,6 +258,11 @@ void OpenWeatherMap::update()
|
||||
updateLocationData();
|
||||
}
|
||||
|
||||
void OpenWeatherMap::searchAutodetect()
|
||||
{
|
||||
updateLocationData();
|
||||
}
|
||||
|
||||
void OpenWeatherMap::search(const QString &searchString)
|
||||
{
|
||||
QString urlString = "http://api.openweathermap.org/data/2.5/find?q=" + searchString + "&type=like&units=metric&mode=json";
|
||||
|
||||
@ -72,6 +72,7 @@ signals:
|
||||
|
||||
public slots:
|
||||
void update();
|
||||
void searchAutodetect();
|
||||
void search(const QString &searchString);
|
||||
|
||||
private slots:
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
if [ -z $2 ]; then
|
||||
echo "usage $0 host deviceclassid [paramname paramvalue]"
|
||||
elif [ -z $3 ]; then
|
||||
(echo '{"id":1, "method":"Devices.GetDiscoveredDevices", "params":{"deviceClassId":"'$2'"}}'; sleep 6) | nc $1 1234
|
||||
(echo '{"id":1, "method":"Devices.GetDiscoveredDevices", "params":{"deviceClassId":"'$2'", "discoveryParams": {"location":""}}}'; sleep 6) | nc $1 1234
|
||||
elif [ -z $4 ]; then
|
||||
echo "usage $0 host deviceclassid [paramname paramvalue]"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user