diff --git a/src/main.cpp b/src/main.cpp index 6cc733f..aa4462d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -24,18 +24,18 @@ QString papocchioDir(); int main(int argc, char *argv[]) { - QGuiApplication *app = SailfishApp::application(argc, argv); + QScopedPointer app(SailfishApp::application(argc, argv)); + QScopedPointer view(SailfishApp::createView()); // Otherwise the Canvas is cleaned when the application is not // marked as active. See for more: // https://lists.sailfishos.org/pipermail/devel/2014-October/005065.html - QQuickView *view = SailfishApp::createView(); - view->setSource(SailfishApp::pathTo("qml/Papocchio.qml")); view->setPersistentOpenGLContext(true); view->setPersistentSceneGraph(true); view->rootContext()->setContextProperty("papocchioDir", papocchioDir()); + view->setSource(SailfishApp::pathTo("qml/Papocchio.qml")); view->show(); return app->exec(); @@ -48,11 +48,12 @@ int main(int argc, char *argv[]) */ QString papocchioDir() { - QDir papocchioDir(QDir::homePath() + "/Pictures/Papocchio"); + const QDir papocchioDir(QStandardPaths::writableLocation(QStandardPaths::PicturesLocation) + + QDir::separator() + "Papocchio"); if (!papocchioDir.exists()) { papocchioDir.mkpath(papocchioDir.absolutePath()); } - return QString(papocchioDir.absolutePath() + "/"); + return QString(papocchioDir.absolutePath() + QDir::separator()); } diff --git a/translations/harbour-papocchio.ts b/translations/harbour-papocchio.ts index 83252a6..268f2c0 100644 --- a/translations/harbour-papocchio.ts +++ b/translations/harbour-papocchio.ts @@ -1,6 +1,6 @@ - + CoverPage