Changeset 769 for trunk/src/xmlpatterns


Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/xmlpatterns/api/qxmlresultitems.cpp

    r651 r769  
    7070  sequence and returns it, and current() always returns the QXmlItem
    7171  that next() returned the last time it was called.
     72
     73  \note When using the QXmlResultItems overload of QXmlQuery::evaluateTo()
     74  to execute a query, it is advisable to create a new instance of this
     75  class for each new set of results rather than reusing an old instance.
    7276
    7377  \sa QXmlItem::isNode(), QXmlItem::isAtomicValue(), QXmlNodeModelIndex
  • trunk/src/xmlpatterns/data/qatomicvalue.cpp

    r651 r769  
    227227        case QVariant::Time:
    228228            return BuiltinTypes::xsDateTime;
     229        case QMetaType::Float:
     230            return BuiltinTypes::xsFloat;
    229231        case QVariant::Double:
    230232            return BuiltinTypes::xsDouble;
  • trunk/src/xmlpatterns/data/qdecimal_p.h

    r651 r769  
    6262 * Defined in QtCore's qlocale.cpp.
    6363 */
    64 extern char *qdtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp);
     64Q_DECL_IMPORT extern char *qdtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp);
    6565
    6666namespace QPatternist
  • trunk/src/xmlpatterns/schema/qxsdschemaparser.cpp

    r651 r769  
    265265}
    266266
     267void XsdSchemaParser::addIncludedSchemas(const NamespaceSet &schemas)
     268{
     269    m_includedSchemas += schemas;
     270}
     271
    267272void XsdSchemaParser::setIncludedSchemas(const NamespaceSet &schemas)
    268273{
     
    270275}
    271276
     277void XsdSchemaParser::addImportedSchemas(const NamespaceSet &schemas)
     278{
     279    m_importedSchemas += schemas;
     280}
     281
    272282void XsdSchemaParser::setImportedSchemas(const NamespaceSet &schemas)
    273283{
    274284    m_importedSchemas = schemas;
     285}
     286
     287void XsdSchemaParser::addRedefinedSchemas(const NamespaceSet &schemas)
     288{
     289    m_redefinedSchemas += schemas;
    275290}
    276291
     
    298313    m_includedSchemas.insert(uri);
    299314    m_importedSchemas.insert(uri);
     315    m_redefinedSchemas.insert(uri);
    300316}
    301317
     
    595611            parser.setImportedSchemas(m_importedSchemas);
    596612            parser.setRedefinedSchemas(m_redefinedSchemas);
    597             if (!parser.parse(XsdSchemaParser::IncludeParser))
     613            if (!parser.parse(XsdSchemaParser::IncludeParser)) {
    598614                return;
     615            } else {
     616                // add indirectly loaded schemas to the list of already loaded ones
     617                addIncludedSchemas(parser.m_includedSchemas);
     618                addImportedSchemas(parser.m_importedSchemas);
     619                addRedefinedSchemas(parser.m_redefinedSchemas);
     620            }
    599621        }
    600622    }
     
    685707                parser.setImportedSchemas(m_importedSchemas);
    686708                parser.setRedefinedSchemas(m_redefinedSchemas);
    687                 if (!parser.parse(XsdSchemaParser::ImportParser))
     709                if (!parser.parse(XsdSchemaParser::ImportParser)) {
    688710                    return;
     711                } else {
     712                    // add indirectly loaded schemas to the list of already loaded ones
     713                    addIncludedSchemas(parser.m_includedSchemas);
     714                    addImportedSchemas(parser.m_importedSchemas);
     715                    addRedefinedSchemas(parser.m_redefinedSchemas);
     716                }
    689717            }
    690718        }
     
    703731                    parser.setImportedSchemas(m_importedSchemas);
    704732                    parser.setRedefinedSchemas(m_redefinedSchemas);
    705                     if (!parser.parse(XsdSchemaParser::ImportParser))
     733                    if (!parser.parse(XsdSchemaParser::ImportParser)) {
    706734                        return;
     735                    } else {
     736                        // add indirectly loaded schemas to the list of already loaded ones
     737                        addIncludedSchemas(parser.m_includedSchemas);
     738                        addImportedSchemas(parser.m_importedSchemas);
     739                        addRedefinedSchemas(parser.m_redefinedSchemas);
     740                    }
    707741                }
    708742            }
     
    840874            parser.setImportedSchemas(m_importedSchemas);
    841875            parser.setRedefinedSchemas(m_redefinedSchemas);
    842             if (!parser.parse(XsdSchemaParser::RedefineParser))
     876            if (!parser.parse(XsdSchemaParser::RedefineParser)) {
    843877                return;
     878            } else {
     879                // add indirectly loaded schemas to the list of already loaded ones
     880                addIncludedSchemas(parser.m_includedSchemas);
     881                addImportedSchemas(parser.m_importedSchemas);
     882                addRedefinedSchemas(parser.m_redefinedSchemas);
     883            }
    844884
    845885            delete reply;
     
    48334873            if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) {
    48344874                const XsdAnnotation::Ptr annotation = parseAnnotation();
    4835                 element->addAnnotation(annotation);
     4875                term->addAnnotation(annotation);
    48364876            } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) {
    48374877                if (hasRefAttribute) {
  • trunk/src/xmlpatterns/schema/qxsdschemaparser_p.h

    r561 r769  
    121121
    122122            /**
     123             * Adds @p schemas to the list of already included schemas, so the parser
     124             * can detect multiple includes of the same schema.
     125             */
     126            void addIncludedSchemas(const NamespaceSet &schemas);
     127
     128            /**
    123129             * Sets which @p schemas have been included already, so the parser
    124              * can detect circular includes.
     130             * can detect multiple includes of the same schema.
    125131             */
    126132            void setIncludedSchemas(const NamespaceSet &schemas);
     133
     134            /**
     135             * Adds @p schemas to the list of already imported schemas, so the parser
     136             * can detect multiple imports of the same schema.
     137             */
     138            void addImportedSchemas(const NamespaceSet &schemas);
    127139
    128140            /**
     
    133145
    134146            /**
     147             * Adds @p schemas to the list of already redefined schemas, so the parser
     148             * can detect multiple redefines of the same schema.
     149             */
     150            void addRedefinedSchemas(const NamespaceSet &schemas);
     151
     152            /**
    135153             * Sets which @p schemas have been redefined already, so the parser
    136              * can detect circular redefines.
     154             * can detect multiple redefines of the same schema.
    137155             */
    138156            void setRedefinedSchemas(const NamespaceSet &schemas);
  • trunk/src/xmlpatterns/schema/qxsdschemaresolver.cpp

    r561 r769  
    633633                    // 1.2
    634634                    const XsdSimpleType::Ptr anonType(new XsdSimpleType());
    635                     anonType->setCategory(complexBaseType->contentType()->simpleType()->category());
     635                    XsdSimpleType::TypeCategory baseCategory = complexBaseType->contentType()->simpleType()->category();
     636                    anonType->setCategory(baseCategory);
     637
     638                    if (baseCategory == XsdSimpleType::SimpleTypeList) {
     639                        const XsdSimpleType::Ptr baseSimpleType = complexBaseType->contentType()->simpleType();
     640                        anonType->setItemType(baseSimpleType->itemType());
     641                    }
     642
    636643                    anonType->setDerivationMethod(XsdSimpleType::DerivationRestriction);
    637644                    anonType->setWxsSuperType(complexBaseType->contentType()->simpleType());
  • trunk/src/xmlpatterns/xmlpatterns.pro

    r561 r769  
    2626include($$PWD/utils/utils.pri)
    2727include($$PWD/qobjectmodel/qobjectmodel.pri, "", true)
    28 wince*:# The Microsoft MIPS compiler crashes if /Og is specified
    29 :
    3028
    31 # -O2/1 expands to /Og plus additional arguments.
    32 contains(DEFINES, MIPS): {
    33     QMAKE_CXXFLAGS_RELEASE ~= s/-O2/-Oi -Ot -Oy -Ob2/
    34     QMAKE_CXXFLAGS_RELEASE ~= s/-O1/-Os -Oy -Ob2/
     29wince* {
     30    # The Microsoft MIPS compiler crashes if /Og is specified.
     31    # -O2/1 expands to /Og plus additional arguments.
     32    contains(DEFINES, MIPS) {
     33        QMAKE_CXXFLAGS_RELEASE ~= s/-O2/-Oi -Ot -Oy -Ob2/
     34        QMAKE_CXXFLAGS_RELEASE ~= s/-O1/-Os -Oy -Ob2/
     35    }
    3536}
     37
    3638symbian:TARGET.UID3 = 0x2001E62B
    37 HEADERS +=
Note: See TracChangeset for help on using the changeset viewer.