Results 1 to 6 of 6

Thread: Comments in ui files

  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Comments in ui files

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Comments in ui files

    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...

  3. #3
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Comments in ui files

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Comments in ui files

    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.

  5. #5
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Comments in ui files

    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.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Comments in ui files

    What you say makes the use of a rcs system even more justified.

Similar Threads

  1. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  2. problem with reading text files
    By Axsis in forum Newbie
    Replies: 1
    Last Post: 25th April 2008, 12:29
  3. compiling problem / Qt DLL files
    By ht1 in forum Newbie
    Replies: 1
    Last Post: 5th January 2008, 17:58
  4. Replies: 5
    Last Post: 22nd September 2006, 08:04
  5. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.