Process your .ui files before committing them: fixuifiles
faure at kde.org
Mon Jun 14 21:34:50 BST 2004
On Monday 14 June 2004 22:26, Dominique Devriese wrote:
> David Faure writes:
> > Qt Designer generates .ui files with a few problems:
> > * Too high "required Qt version number" when using a too recent Qt
> > Designer
> > * Hardcoded untranslatable Alt+Letter accels (auto-added by Qt
> > Designer)
> > * Captions that are equal to classname (auto-added by Qt Designer),
> > which bug translators.
> > All of this can now be automatically fixed: just run the script
> > fixuifiles (after installing it from kdesdk/scripts) every time you
> > are about to commit .ui files.
> I heard someone voice the idea to run this as a sort of commit hook.
> Any update on that ?
I'm not sure this would be a good idea - there's always the border case of
using a caption equal to the classname, but still correct (e.g. Settings).
The script knows a few words (like Settings), but when seeing a new word,
will remove it (although with a warning). This might require manual intervention
so it's not suited for automation.
What's more, I'm working on support for different per-module qt-version
requirement, which requires a checkout - can't be done at commit time.
> domi ( who's pretty sure he'll often forget running the script )
The script is easy to use recursively, so I suspect that Albert Astals Cid,
Stephan Binner and myself will run it now and then.
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel