----------------------------------------------------------------------------
| 41 | |
| 42 | //---------------------------------------------------------------------------- |
| 43 | ctkCmdLineModuleDescription ctkCmdLineModuleReferencePrivate::description() const |
| 44 | { |
| 45 | // If we already got an XML exception just throw it immediately, since |
| 46 | // the XML description cannot change for this module reference. |
| 47 | if (XmlException) |
| 48 | { |
| 49 | throw *XmlException; |
| 50 | } |
| 51 | |
| 52 | // Lazy creation. The title is a required XML element. |
| 53 | if (Description.title().isNull()) |
| 54 | { |
| 55 | QByteArray xml(RawXmlDescription); |
| 56 | QBuffer xmlInput(&xml); |
| 57 | ctkCmdLineModuleXmlParser parser(&xmlInput, &Description); |
| 58 | try |
| 59 | { |
| 60 | parser.doParse(); |
| 61 | } |
| 62 | catch (const ctkCmdLineModuleXmlException& e) |
| 63 | { |
| 64 | XmlException = e.clone(); |
| 65 | } |
| 66 | } |
| 67 | return Description; |
| 68 | } |
| 69 | |
| 70 | //---------------------------------------------------------------------------- |
| 71 | ctkCmdLineModuleReference::ctkCmdLineModuleReference() |