on xenial help sign in
Fix header include, add missing setModel
246c47bMichael Terry
plugins/Wizard/timezonemodel.cpp+12
@@ -83,6 +83,18 @@ QHash<int, QByteArray> TimeZoneLocationModel::roleNames() const
83 return m_roleNames;
83 return m_roleNames;
84}
84}
85
85
86+void TimeZoneLocationModel::setModel(QList<GeonamesCity *> locations)
87+{
88+ beginResetModel();
89+
90+ Q_FOREACH(GeonamesCity *city, m_locations) {
91+ geonames_city_free(city);
92+ }
93+
94+ m_locations = locations;
95+ endResetModel();
96+}
97+
86void TimeZoneLocationModel::filterFinished(GObject *source_object,
98void TimeZoneLocationModel::filterFinished(GObject *source_object,
87 GAsyncResult *res,
99 GAsyncResult *res,
88 gpointer user_data)
100 gpointer user_data)
plugins/Wizard/timezonemodel.h+3
@@ -17,7 +17,10 @@
17#ifndef TIMEZONEMODEL_H
17#ifndef TIMEZONEMODEL_H
18#define TIMEZONEMODEL_H
18#define TIMEZONEMODEL_H
19
19
20+extern "C" {
20#include <geonames.h>
21#include <geonames.h>
22+}
23+
21#include <glib.h>
24#include <glib.h>
22#include <QAbstractListModel>
25#include <QAbstractListModel>
23
26