← Back to team overview

quickly-talk team mailing list archive

Re: qtquick template and quickly license (Was: Please update me!)

 

Al 28/11/12 11:32, En/na Stuart Langridge ha escrit:
> Angelo Compagnucci wrote:
>> I really want to contribute more to my Qt templates, I think now with
> Digia
>> many changes will happen to benefit pyside and qt quick!
> 
> I've been playing with the qtquick template, and it seems pretty cool :-)
> 
> One thing: "quickly license" doesn't work. I think this is because it
> tries to edit the .ui files, and those .ui files don't contain the stuff
> it's expecting; I do not know whether this is because the
> ubuntu-application template (which is where the quickly license command
> lives) expects those files to be Glade files and they aren't, or whether
> the .ui files for the qtquick template should contain stuff about author
> and do not. So, there's a bug somewhere, and it's problematic: the
> quickly upgrade process runs quickly license, so one can't upgrade:
> 
> Note: This is the first time you have run Quickly since it has been
> updated.
> Quickly will now upgrade its files (bin/*, u1notes_lib/*, and setup.py).
> But first it will save your project.  View Quickly's changes by running:
> bzr diff
> Traceback (most recent call last):
>   File "/usr/share/quickly/templates/ubuntu-application/upgrade.py",
> line 226, in <module>
>     license.licensing()
>   File "/usr/share/quickly/templates/ubuntu-application/license.py",
> line 266, in licensing
>     {'translatable': 'yes'})
>   File
> "/usr/share/quickly/templates/ubuntu-application/internal/quicklyutils.py",
> line 166, in change_xml_elem
>     xml_tree.find(parent_node).insert(0, new_node)
> AttributeError: 'NoneType' object has no attribute 'insert'
> ERROR: upgrade command failed
> Aborting
> 
> Obviously something somewhere needs fixing: what I'm not sure about,
> though, is how I can work around this problem or monkeypatch it so that
> I can get stuff done. Help?
> 
> sil
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~quickly-talk
> Post to     : quickly-talk@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~quickly-talk
> More help   : https://help.launchpad.net/ListHelp

Hey Stuart,

After a quick chat with didrocks, it seems that a quick fix to your
problem would be to modify the qtquick template to:

a) Not to import the 'license' command from ubuntu-application [1]
b) Override ubuntu-application's 'license' command with your own. It
should live in the ubuntu-application-qtquick root and for starters you
could have it as an empty license.py file or you could probably copy the
contents of quickly's core 'license' command and fix the bit that reads
the .ui files (*)

Didier also tells me that a better fix is to have the license command
fixed in the ubuntu-application template, so that if there is no .ui
file (or a Gtk-based one), this code isn't triggered.

In any case, I think the override approach is valid. Even though you
might have to duplicate some code from the core license template,
overriding core is what templates were designed for.

Let us know how it works for you and feel free to send a merge proposal
if you can fix it!

Cheers,
David.

[1]
http://bazaar.launchpad.net/~quickly-templates-hackers/quickly-community-templates/trunk/view/head:/ubuntu-application-qtquick/commandsconfig

(*) I'm not familiar with the structure of Qt's .ui files, but I'm
guessing the license command is scanning for the GtkAboutDialog's
license property. So unless Qt has got any kind of licensing information
in .ui files, I guess they can be ignored by the license command in the
qtquick template.

Attachment: signature.asc
Description: OpenPGP digital signature


References