本文整理汇总了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();
}
示例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;
}