Skip to content
Commit a9d4efc3 authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment