Commit 53c696cc authored by Nicolas Fella's avatar Nicolas Fella Committed by Han Young
Browse files

Remove unneeded QML type registration and constructor

parent 7d87b82c
......@@ -74,7 +74,6 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
engine.rootContext()->setContextProperty("locationQueryModel", locationQueryModel);
// register QML types
qmlRegisterType<WeatherLocation>("kweather", 1, 0, "WeatherLocation");
qmlRegisterType<WeatherHour>("kweather", 1, 0, "WeatherHour");
qmlRegisterType<WeatherHourListModel>("kweather", 1, 0, "WeatherHourListModel");
......
......@@ -17,7 +17,7 @@ Kirigami.ScrollablePage {
id: page
property bool inView: false
property WeatherLocation weatherLocation
property var weatherLocation
property var currentDay: dailyListView.currentItem.weather
property int maximumContentWidth: Kirigami.Units.gridUnit * 35
......
......@@ -18,7 +18,7 @@ Kirigami.ScrollablePage {
background: null // transparent, since there is a page behind
property WeatherLocation weatherLocation
property var weatherLocation
property var currentDay: dailyListView.currentItem.weather
property bool inView: false
......
......@@ -22,15 +22,6 @@
#include <QValueAxis>
#include <utility>
WeatherLocation::WeatherLocation()
{
m_weatherHourListModel = new WeatherHourListModel(this);
m_lastUpdated = QDateTime::currentDateTime();
this->m_timer = new QTimer(this);
connect(m_timer, &QTimer::timeout, this, &WeatherLocation::updateCurrentDateTime);
this->m_timer->start(60 - QDateTime::currentDateTime().currentMSecsSinceEpoch() % 60);
}
WeatherLocation::WeatherLocation(QString locationId,
QString locationName,
QString timeZone,
......
......@@ -48,7 +48,6 @@ class WeatherLocation : public QObject
Q_PROPERTY(double minTempLimit READ minTempLimit NOTIFY currentForecastChange)
public:
WeatherLocation();
explicit WeatherLocation(QString locationId,
QString locationName,
QString timeZone,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment