当前位置: 首页>>代码示例>>C++>>正文


C++ QDomNode::prefix方法代码示例

本文整理汇总了C++中QDomNode::prefix方法的典型用法代码示例。如果您正苦于以下问题:C++ QDomNode::prefix方法的具体用法?C++ QDomNode::prefix怎么用?C++ QDomNode::prefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QDomNode的用法示例。


在下文中一共展示了QDomNode::prefix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QString

QString QDomNodeProto:: prefix() const
{
  QDomNode *item = qscriptvalue_cast<QDomNode*>(thisObject());
  if (item)
    return item->prefix();
  return QString();
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例2: isAttributesEqual

bool TestBaseLine::isAttributesEqual(const QDomNamedNodeMap &cl1, const QDomNamedNodeMap &cl2)
{
    const unsigned int len = cl1.length();
    pDebug() << "LEN:" << len;

    if(len == cl2.length())
    {
        for(unsigned int i1 = 0; i1 < len; ++i1)
        {
            const QDomNode attr1(cl1.item(i1));
            Q_ASSERT(!attr1.isNull());

            /* This is set if attr1 cannot be found at all in cl2. */
            bool earlyExit = false;

            for(unsigned int i2 = 0; i2 < len; ++i2)
            {
                const QDomNode attr2(cl2.item(i2));
                Q_ASSERT(!attr2.isNull());
                pDebug() << "ATTR1:" << attr1.localName() << attr1.namespaceURI() << attr1.prefix() << attr1.nodeName();
                pDebug() << "ATTR2:" << attr2.localName() << attr2.namespaceURI() << attr2.prefix() << attr2.nodeName();

                if(attr1.localName() == attr2.localName()       &&
                   attr1.namespaceURI() == attr2.namespaceURI() &&
                   attr1.prefix() == attr2.prefix()             &&
                   attr1.nodeName() == attr2.nodeName()         && /* Yes, needed in addition to all the other. */
                   attr1.nodeValue() == attr2.nodeValue())
                {
                    earlyExit = true;
                    break;
                }
            }

            if(!earlyExit)
            {
                /* An attribute was found that doesn't exist in the other list so exit. */
                return false;
            }
        }

        return true;
    }
    else
        return false;
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:45,代码来源:TestBaseLine.cpp


注:本文中的QDomNode::prefix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。