KXMLGuiClient doesn't except empty strings as xml files anymore

Olivier Goffart ogoffart at kde.org
Tue Sep 16 11:47:52 BST 2008

Le samedi 13 septembre 2008, Andreas Pakulat a écrit :
> 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?
> Andreas

Note that this ASSERT has let me found a bug in Kopete where an ui.rc file was 
not loaded correctly (because the componentData was not set correctly)

But yes, i think that it should not assert.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080916/62baa082/attachment.sig>

More information about the kde-core-devel mailing list