qmlscene prevents using default command line arguments after the .qml filename

Bug #1231558 reported by Anthony Granger
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Calendar App
Triaged
Low
Unassigned
Ubuntu Clock App
Triaged
Low
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

When using defaultArgument to get one or many default arguments passed by the command line using QmlScene, it seems that it not take the arguments passed after the .qml file, but before.

Currently pass a default argument you have to do :
qmlscene argument file.qml

It would be better to do :
qmlscene file.qml argument
But it don't work with qmlscene.

Since a lot of linux commands work as the following : "command arg1 arg2", it would be great to make ubuntu qml apps work according to the same pattern.

(You can see an example in the ubuntu-docviewer-app.desktop file of docviewer core app)

Changed in ubuntu-ui-toolkit:
status: New → Confirmed
summary: - Illogical use of defaultArgument
+ qmlscene prevents using default command line arguments after the .qml
+ filename
Changed in ubuntu-ui-toolkit:
importance: Undecided → Medium
Changed in ubuntu-clock-app:
status: New → Confirmed
Changed in ubuntu-calendar-app:
status: New → Confirmed
tags: added: qmlscene
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :

I found that if I ran a command like this:

liuxg@liuxg:~/Qt/Examples/Qt-5.4/quick/customitems/painteditem$ qmlscene textballoon.qml

The qmlscene does not take the QML file name, instead it prompts me to select a file from a FileDialog to choose a file to run. It is a little bit confusing.

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

Thanks Anthony.

Current approach is to avoid use qmlscene by user, and to use predefined bash script instead.
It is already done for Calculator app:
http://bazaar.launchpad.net/~ubuntu-calculator-dev/ubuntu-calculator-app/trunk/view/head:/app/ubuntu-calculator-app.in

You could just run calculator with command:

 $ ubuntu-calculator-app

or with additional parameters
 $ ubuntu-calculator-app -qt5

So it is bug in clock and calendar application itself, and not in ubuntu-ui-toolkit (Ubuntu).

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → Invalid
Changed in ubuntu-calendar-app:
status: Confirmed → Triaged
Changed in ubuntu-clock-app:
status: Confirmed → Triaged
Changed in ubuntu-calendar-app:
importance: Undecided → Low
Changed in ubuntu-clock-app:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.