Hi, I have an app where I draw pictures with Canvas. I want to share the picture via e-mail. I manage to code the whole operation with a hard coded path. It is OK for OpenRepos but is rejected by a validation for Jolla Harbour. When substituting /home/nemo/
with $HOME/
the app won’t work any more. The code follows. If you want to look all the spaghetti, please try https://github.com/Rikujolla/harbour-math-teacher/blob/master/qml/pages/FunPage.qml
MenuItem {
text:qsTr("Share my horse")
onClicked:{
saddle.save("/home/nemo/horse.png")
//saddle.save("$HOME/horse.png")
pageStack.push("Sailfish.TransferEngine.SharePage",
{
"source": "/home/nemo/horse.png",
//"source": "$HOME/horse.png",
"mimeType": "image/png",
"content": { "type": "text/x-uri", "status": "Sent from SailfishOS app Math teacher" },
"serviceFilter": ["sharing", "e-mail"]
}
)
}
}
}