umbrello/umldoc.h
- Add ENC_WINDOWS for use by encoding(QIODevice&) umbrello/umldoc.cpp - short UMLDoc::encoding(QIODevice & file) : - Introduce variable 'enc' with initial value ENC_UNKNOWN - In loop advancing over comments and processing instructions, if node.isProcessingInstruction() then analyze the node.toProcessingInstruction().data(); if attribute "encoding" is found then extract its value. Assign ENC_UNICODE to enc if value is "UTF-8"; assign ENC_WINDOWS to enc if value is "windows-1252"; else assign ENC_OLD_ENC to enc (indicating a not yet implemented encoding.) - Change uWarning() messages added in commit 732b50aa to uDebug() - For premature returns, return variable 'enc' instead of ENC_UNKNOWN. Reason: Returning ENC_UNKNOWN here is overly strict, it precludes any further attempts at loading foreign XMI files. Rather, use the encoding attribute from the processing instruction if found. - bool UMLDoc::loadFromXMI(QIODevice & file, short encode) : Extend check which makes sure it is an XMI file to permit "xmi:XMI" as root.tagName() CCBUG:56184
parent
c65ae98e
Please register or sign in to comment