I have ported an application we use at work to show UBL/PePPoL documents. These are XML-based documents (mostly containing an embedded PDF). The application is developed in Lazarus.
It works fine when you open a document from the application itself, and when run from terminal when given the document as parameter, it works fine too.
However if I use ‘Open with’ popup menu, it opens the application, but without opening the document.
I’ve made a test app to see what parameters are passed on to the application, but as it seems, no parameter is added, so you have no clue what file was used with ‘Open with’.
How does the ‘Open with’-function work and how does it pass the needed data to the application?
If it is a Qt5 app the best way would be if the application would be patched to support the FileOpen event, because that’s what RefsReceived is triggering.
The alternative is to set the QT:QPA_FLAGS attribute for the application to Q_REF_TO_ARGV, the Qt will attempt to convert the initial RefsReceived message into command line arguments.