From 2270f22feb0ba5821ddc0f5dfa7982984d7c13fc Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Fri, 27 Dec 2013 15:27:59 +0100 Subject: [PATCH] Add missing metatypes to view.cpp --- application/view.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/view.cpp b/application/view.cpp index 03ef9f0..ea49a56 100644 --- a/application/view.cpp +++ b/application/view.cpp @@ -1,6 +1,6 @@ /* -Copyright (C) 2011 Luciano Montanaro +Copyright (C) 2011, 2013 Luciano Montanaro This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,8 @@ Boston, MA 02110-1301, USA. #include "view.h" #include "settings.h" #include "dataprovider.h" +#include "stationitem.h" +#include "stationscheduleitem.h" #include "stationschedulemodel.h" #include "stationlistproxymodel.h" #include "stationlistmodel.h" @@ -88,10 +90,14 @@ View::View(QWidget *parent) : /* Types to be made accessible to QML */ #if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)) - qRegisterMetaType< QModelIndex >(); + qRegisterMetaType("QGeoCoordinate"); + qRegisterMetaType("QGeoPositionInfo"); + qRegisterMetaType< QModelIndex >("QModelIndex"); qRegisterMetaType< QList< QPersistentModelIndex > >(); qRegisterMetaType< QAbstractItemModel::LayoutChangeHint>(); #endif + qmlRegisterType< StationListModel >( + "net.cirulla.quandoparte", 1, 0, "StationListModel"); qmlRegisterType< StationListProxyModel >( "net.cirulla.quandoparte", 1, 0, "StationListProxyModel"); qmlRegisterType< StationScheduleModel >( -- 1.7.9.5