X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=blobdiff_plain;f=src%2Fharbour-pedalo.cpp;h=6c0094d36c6264e2f33f52bc5733d0b4653aa114;hp=a4218cd2e1e68d08a340c11e4c836360e6ee4218;hb=5fc520bad80dccf9bf2e0f16552c9f2605417067;hpb=e5b6de629d0585d29f0591deec4afec33f44f20c diff --git a/src/harbour-pedalo.cpp b/src/harbour-pedalo.cpp index a4218cd..6c0094d 100644 --- a/src/harbour-pedalo.cpp +++ b/src/harbour-pedalo.cpp @@ -9,6 +9,7 @@ #include "journeymodel.h" #include "status.h" #include "settings.h" +#include "imageprovider.h" #include "harbour-pedalo.h" @@ -35,7 +36,7 @@ int main(int argc, char *argv[]) qmlRegisterSingletonType("harbour.pedalo.settings", 1, 0, "Settings", Settings::provider); JourneyModel journeys; - Status currentStatus; + Status currentStatus(journeys); Settings::getInstance().setMainStatus(currentStatus); Settings::getInstance().loadSettings(); @@ -44,6 +45,7 @@ int main(int argc, char *argv[]) journeys.importFromFile(file); QScopedPointer view(SailfishApp::createView()); + view->engine()->addImageProvider(QLatin1String("pedalo"), new ImageProvider(Settings::getInstance())); view->setSource(SailfishApp::pathTo("qml/harbour-pedalo.qml")); QQmlContext *ctxt = view->rootContext();