Register Settings Type with QML
authorLuciano Montanaro <mikelima@cirulla.net>
Fri, 22 Jul 2011 11:51:13 +0000 (13:51 +0200)
committerLuciano Montanaro <mikelima@cirulla.net>
Tue, 27 Dec 2011 22:16:46 +0000 (23:16 +0100)
application/view.cpp

index ace9d43..e3959af 100644 (file)
@@ -20,14 +20,14 @@ Boston, MA 02110-1301, USA.
 */
 
 #include "view.h"
+#include "settings.h"
 #include "stationlistmodel.h"
 #include "stationlistproxymodel.h"
 
-#include <QDeclarativeContext>
-#include <QDeclarativeView>
 #include <QDebug>
 #include <QDir>
 #include <QFile>
+#include <QtDeclarative>
 
 // search Paths seem to be broken in Harmattan?
 
@@ -63,6 +63,8 @@ View::View(QWidget *parent) :
     stationListProxyModel->setSourceModel(stationListModel);
     stationListProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
 
+    qmlRegisterType<Settings>("net.cirulla.quandoparte", 1, 0, "Settings");
+
     QDeclarativeContext *context = this->rootContext();
     context->setContextProperty("stationListProxyModel", stationListProxyModel);