Skip to content

Commit

Permalink
refresh wasn't reachable from ui
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlich committed Jul 28, 2023
1 parent fbb763d commit 37b9040
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Makefile
installroot/
RPMS/
debug*.list
CMakeLists.txt.user
CMakeLists.txt.user*
build/
2 changes: 1 addition & 1 deletion src/qml/pages/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Page {
id: bigForecastIconMouse;
anchors.fill: parent
onClicked: {
model.refreshWeather()
weatherModel.loadWeatherFromAPI()
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/weathermodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class WeatherModel : public QAbstractListModel {
Q_INVOKABLE QString niceTemperatureString(int temperatureUnits, double t);
Q_INVOKABLE double speedConvert(int units, double s);

Q_INVOKABLE void loadWeatherFromAPI();

signals:
void cityChanged();
void hasValidWeatherChanged();
Expand All @@ -41,7 +43,6 @@ class WeatherModel : public QAbstractListModel {
QSqlDatabase m_db;

void loadWeatherFromDB();
void loadWeatherFromAPI();
};

#endif // WEATHERMODEL_H

0 comments on commit 37b9040

Please sign in to comment.