Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] support for passing arguments to applications in sailfish-qml #16

Closed
M4rtinK opened this issue Oct 13, 2014 · 4 comments
Closed

Comments

@M4rtinK
Copy link

M4rtinK commented Oct 13, 2014

sailfish-qml currently only accepts one possitional argument, which is the application name. Appending any additional arguments results in an error. This prevents application that are being launched by sailfish-qml from receiving custom CLI argument and options.

Suggestion:

  • arguments passed after the application name should be added to argv, example:
    sailfish.qml harbour-foo --bar baz
    should result in Qt.application.arguments being equal to:
    sailfish-qml,harbour-modrana,-bar,baz
  • if [bug] --help and --version options are interpretted as input #14 is fixed, my suggestion is to only handle --help and --version if no application name is provided, if application name is provided --help and --version should be added to agv and not handled so that the application can handle it itself
  • if [RFE] add support for appending to QML import path to sailfish-qml #15 is fixed, the import path option flag & path should be handled & appened to argv, which is what qmlscene does & the flag should be something that does not collide with often used flag names, for example -I as with qmlscene or --qml_import_path_append

Usecase:
The modRana navigation system has various command line options and if sailfish-qml adds support for option passing, it will be possible for users and
other applications to make use of them. For example:

sailfish-qml harbour-modrana --local-search "pizza"

or

sailfish-qml harbour-modrana --focus-on-coordinates geo:50.083333,14.416667
@M4rtinK
Copy link
Author

M4rtinK commented Mar 19, 2018

Any takers/progress on this ? I'm afraid I've not progressed much in my C++ knowledge since I have filled this issue 4 years ago. :)

In other news, yet another case where lack of argument passing is a problem for Sailfish OS applications:
http://talk.maemo.org/showthread.php?t=100253&page=2

In short:

  • a developer (Taixzo) would like to tell a Sailfish OS QML mapping application (WhoMaps) application to launch and zoom on a point
  • this is not possible as sailfish-qml can't pass command line arguments to the application

@martyone
Copy link
Member

@M4rtinK are you sure this issue really (still) exists? I just briefly checked the code and it seems like doing exactly what you suggested.

@otsaloma
Copy link

Just tried it, Qt.application.arguments does work indeed. Maybe it was this commit: 4b1ab9b? Would have been nice to close this issue though.

@martyone
Copy link
Member

@otsaloma thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants