KXMLGuiClient doesn't except empty strings as xml files anymore

Andreas Pakulat apaku at gmx.de
Sat Sep 20 01:38:40 BST 2008


On 20.09.08 00:10:47, David Faure wrote:
> On Saturday 13 September 2008, Andreas Pakulat wrote:
> > Hi,
> > 
> > I'm pretty sure this worked at some point, but unfortunately doesn't work
> > anymore now. When calling KXMLGuiClient::setXMLFile with QString() I get a
> > QASSERT from setDOMDocument because the QDomDocument is empty. When trying to
> > change that by reverting r858664 I trigger the kfatal in setXML.
> > 
> > The problem I have with this is that I've got a unit-test which basically
> > doesn't need any GUI, but unfortunately the framework forces me to have one.
> > Thus a mainwindow is created and setXMLFile is called.
> > 
> > Looking through the svn logs I'm seeing this comment from Rafael:
> > Let apps that are not providing their own rc file use the ui_standards.rc and do not assert
> > here. It should be fine. This makes the xmlgui first tutorial to don't crash, what also is
> > fine.
> > 
> > Which leads me to assume that it should actually be possible to call setXMLFile
> > without proper file, or is that meant to handle the case when setXMLFile is not
> > called at all?
> 
> This is fixed now, isn't it?

Yes, sorry for not replying that it was. Rafael removed the assertion.
OTOH I adjusted the actual code that tried to set an empty document,
which now doesn't call setXMLFile if the string its given is empty. Of
course that doesn't help when the file cannot be found, but that should
be covered now as well.

Andreas

-- 
Executive ability is prominent in your make-up.




More information about the kde-core-devel mailing list