Merge branch 'master' of github.com:HiveFive/Hive

pull/1/head
Michael Zanetti 2014-04-14 00:38:34 +02:00
commit 6c3596a3f4
3 changed files with 8 additions and 2 deletions

View File

@ -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";

View File

@ -72,6 +72,7 @@ signals:
public slots:
void update();
void searchAutodetect();
void search(const QString &searchString);
private slots:

View File

@ -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