[rkward-cvs] SF.net SVN: rkward:[4482] trunk/rkward/rkward/windows/rkhtmlwindow.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Dec 7 09:29:59 UTC 2012


Revision: 4482
          http://rkward.svn.sourceforge.net/rkward/?rev=4482&view=rev
Author:   tfry
Date:     2012-12-07 09:29:58 +0000 (Fri, 07 Dec 2012)
Log Message:
-----------
Generate warning, if UI element not found

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rkhtmlwindow.cpp

Modified: trunk/rkward/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2012-12-06 09:20:31 UTC (rev 4481)
+++ trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2012-12-07 09:29:58 UTC (rev 4482)
@@ -589,6 +589,7 @@
 						QString title = help_xml->getStringAttribute (*it, "title", QString (), DL_INFO);
 						if (title.isEmpty ()) {
 							QDomElement source_element = component_xml->findElementWithAttribute (component_doc_element, "id", id, true, DL_WARNING);
+							if (source_element.isNull ()) RK_DEBUG (PLUGIN, DL_ERROR, "No such UI element: %s", qPrintable (id));
 							title = component_xml->getStringAttribute (source_element, "label", i18n ("Unnamed GUI element"), DL_WARNING);
 						}
 						khtmlpart->write ("<h4>" + title + "</h4>");
@@ -597,6 +598,7 @@
 						QString id = help_xml->getStringAttribute (*it, "id", QString (), DL_WARNING);
 						QString title = help_xml->getStringAttribute (*it, "title", QString (), DL_INFO);
 						QDomElement source_element = component_xml->findElementWithAttribute (component_doc_element, "id", id, true, DL_WARNING);
+						if (source_element.isNull ()) RK_DEBUG (PLUGIN, DL_ERROR, "No such UI element: %s", qPrintable (id));
 						title = component_xml->getStringAttribute (source_element, "label", title, DL_WARNING);
 						khtmlpart->write ("<h3>" + title + "</h3>");
 					} else {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list