本文整理汇总了C++中QCStringList::contains方法的典型用法代码示例。如果您正苦于以下问题:C++ QCStringList::contains方法的具体用法?C++ QCStringList::contains怎么用?C++ QCStringList::contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCStringList
的用法示例。
在下文中一共展示了QCStringList::contains方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
void Qhp::initialize()
{
/*
<QtHelpProject version="1.0">
<namespace>mycompany.com.myapplication.1_0</namespace>
<virtualFolder>doc</virtualFolder>
<customFilter name="My Application 1.0">
<filterAttribute>myapp</filterAttribute>
<filterAttribute>1.0</filterAttribute>
</customFilter>
<filterSection>
<filterAttribute>myapp</filterAttribute>
<filterAttribute>1.0</filterAttribute>
..
*/
QCString nameSpace = Config_getString(QHP_NAMESPACE);
QCString virtualFolder = Config_getString(QHP_VIRTUAL_FOLDER);
m_doc.declaration("1.0", "UTF-8");
const char * rootAttributes[] =
{ "version", "1.0", 0 };
m_doc.open("QtHelpProject", rootAttributes);
m_doc.openCloseContent("namespace", nameSpace);
m_doc.openCloseContent("virtualFolder", virtualFolder);
// Add custom filter
QCString filterName = Config_getString(QHP_CUST_FILTER_NAME);
if (!filterName.isEmpty())
{
const char * tagAttributes[] =
{ "name", filterName, 0 };
m_doc.open("customFilter", tagAttributes);
QCStringList customFilterAttributes = QCStringList::split(' ', Config_getString(QHP_CUST_FILTER_ATTRS));
for (int i = 0; i < (int)customFilterAttributes.count(); i++)
{
m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]);
}
m_doc.close("customFilter");
}
m_doc.open("filterSection");
// Add section attributes
QCStringList sectionFilterAttributes = QCStringList::split(' ',
Config_getString(QHP_SECT_FILTER_ATTRS));
if (!sectionFilterAttributes.contains("doxygen"))
{
sectionFilterAttributes << "doxygen";
}
for (int i = 0; i < (int)sectionFilterAttributes.count(); i++)
{
m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i]);
}
m_toc.open("toc");
// Add extra root node
QCString fullProjectname = getFullProjectName();
QCString indexFile = "index"+Doxygen::htmlFileExtension;
const char * const attributes[] =
{ "title", fullProjectname,
"ref", indexFile,
NULL
};
m_toc.open("section", attributes);
m_prevSectionTitle = getFullProjectName();
m_prevSectionLevel = 1;
m_sectionLevel = 1;
m_index.open("keywords");
m_files.open("files");
}