PDA

View Full Version : Comments in ui files



robertf
8th July 2008, 18:22
I would like to keep a change history in my .ui file. I started doing it by using the <comment> element but it seems to be limited to a total length of about 256 characters, and apparently only one <comment> is allowed. If I exceed these limits then I get the message "File ... is not valid" from UIC and "The file ... is not a valid Designer ui file" from Designer. If I use an XML comment (<!-- ... -->) then the file is read OK but if I modify it in Designer then the XML comment is lost upon saving.

Is there a mechanism for including long comments in ui files? Is there some other mechanism for maintaining a change history (apart from CVS, separate log file, etc.)?

- Robert

wysota
8th July 2008, 18:53
The comment is for something completely different :) It's part of the internationalisation mechanism. For change tracking I would advise to use something standard instead of modifying ui files...

robertf
8th July 2008, 19:06
OK, thanks. I hadn't seen any description of what <comment> was for.
Do I understand correctly from your reply that there is no built-in mechanism for recording a history in a ui file? How would you do it? CVS seems like overkill for a one-person project. Normally I just add comments to my source files (fortran, c, cpp, html, css ...).

- Robert

wysota
8th July 2008, 19:32
There is no support for tracking changes in ui files. CVS (or SVN) is certainly not an overkill for any project. You can also store diff files in an archive if you don't want to use a revision control system.

robertf
8th July 2008, 19:52
It's not only the changes themselves that I want to keep, but my comments to myself about when and why I (or somebody else) made the changes. What I've done for now is to create a companion .ui_hx file to keep my history in. For the ui file itself I keep old numbered versions a la emacs.

Thanks very much for your helpful replies.

wysota
8th July 2008, 20:08
What you say makes the use of a rcs system even more justified.