Recommended way to detect setXMLFile-failure?

David Faure faure at kde.org
Thu Oct 13 17:24:22 CEST 2005


On Thursday 13 October 2005 17:21, Sascha Cunz wrote:
> Hi,
> Am Donnerstag 13 Oktober 2005 13:34 schrieb Thomas Friedrichsmeier:
> > Hi!
> >
> > Probably, anybody developing a KDE-application has had users asking, why
> > the menus and toolbars are missing, at some point or another. Most of the
> > time, this is due to users not having done a make install, or installed to
> > the wrong place (or of course, you have forgotten to include an .rc-file in
> > the release). What's worse than having to answer the same question time and
> > again, is that for every user asking for support, there are probably at
> > least five who you give up silently, and never try your application again.
> > So, it would seem reasonable to check for this sort of thing, and showing
> > the user a helpful message, if an .rc-file could not be found.
> > Unfortunately, KXMLGUIClient::setXMLFile () does not return any indication
> > on wether the file could be loaded (well, it prints a message to the
> > console, but who besides a developer is looking at console output?). So, is
> > there a recommended way of finding out, whether the file could be loaded?
> > Could a future version of setXMLFile () return an indication of
> > success/failure?
> 
> almost back 4 years in time, when i got involved into kde, the first thing i 
> did was to research, why some menu entries in KDevelop did not show up. After 
> digging around for quite a while, if found a XML file that did not validate.
> 
> At those days, i suggested, to validate the file during "make install". I 
> don't know if anybody did add that to the admin/-scripts since then.

Yes it has.

cd koffice/kword
make install
...
checking /mnt/devel/kde/src/koffice/kword/kword.rc
checking /mnt/devel/kde/src/koffice/kword/kword_readonly.rc

(with unsermake; which launches xmllint, see checkrcs.um)

-- 
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-buildsystem mailing list