X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=blobdiff_plain;f=src%2Fharbour-pedalo.cpp;h=216240d2444888f86c7faac66cda1e39162f637c;hp=d7da21f1404ebc3ac3822d73d535b640b60dbd64;hb=7d6ca1150d70c17469e48d71920dfe6083e1a719;hpb=b22fdac4f96ee5858c4672f1743fd58ad8f6d6f4 diff --git a/src/harbour-pedalo.cpp b/src/harbour-pedalo.cpp index d7da21f..216240d 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" @@ -44,9 +45,15 @@ 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(); + ctxt->setContextProperty("version", VERSION); + qDebug() << "harbour-pedalo VERSION string: " << VERSION; + qDebug() << "VERSION_MAJOR: " << VERSION_MAJOR; + qDebug() << "VERSION_MINOR: " << VERSION_MINOR; + qDebug() << "VERSION_BUILD: " << VERSION_BUILD; ctxt->setContextProperty("journeymodel", &journeys); ctxt->setContextProperty("currentStatus", ¤tStatus);