本文整理汇总了C++中ProStringList::at方法的典型用法代码示例。如果您正苦于以下问题:C++ ProStringList::at方法的具体用法?C++ ProStringList::at怎么用?C++ ProStringList::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProStringList
的用法示例。
在下文中一共展示了ProStringList::at方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProStringList_join
static QString ProStringList_join(const ProStringList &this_, const QChar *sep, const int sepSize)
{
int totalLength = 0;
const int sz = this_.size();
for (int i = 0; i < sz; ++i)
totalLength += this_.at(i).size();
if (sz)
totalLength += sepSize * (sz - 1);
QString res(totalLength, Qt::Uninitialized);
QChar *ptr = (QChar *)res.constData();
for (int i = 0; i < sz; ++i) {
if (i) {
memcpy(ptr, sep, sepSize * sizeof(QChar));
ptr += sepSize;
}
const ProString &str = this_.at(i);
memcpy(ptr, str.constData(), str.size() * sizeof(QChar));
ptr += str.size();
}
return res;
}
示例2: expand
ProString QMakeProject::expand(const QString &expr, const QString &where, int line)
{
ProString ret;
ProFile *pro = m_parser->parsedProBlock(expr, where, line, QMakeParser::ValueGrammar);
if (pro->isOk()) {
m_current.pro = pro;
m_current.line = 0;
const ushort *tokPtr = pro->tokPtr();
ProStringList result = expandVariableReferences(tokPtr, 1, true);
if (!result.isEmpty())
ret = result.at(0);
}
pro->deref();
return ret;
}
示例3: writeRcFilePart
void MingwMakefileGenerator::writeRcFilePart(QTextStream &t)
{
const QString rc_file = fileFixify(project->first("RC_FILE").toQString());
ProStringList rcIncPaths = project->values("RC_INCLUDEPATH");
rcIncPaths.prepend(fileInfo(rc_file).path());
QString incPathStr;
for (int i = 0; i < rcIncPaths.count(); ++i) {
const ProString &path = rcIncPaths.at(i);
if (path.isEmpty())
continue;
incPathStr += QStringLiteral(" --include-dir=");
if (path != "." && QDir::isRelativePath(path.toQString()))
incPathStr += "./";
incPathStr += escapeFilePath(path);
}
if (!rc_file.isEmpty()) {
t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t"
<< var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE")
<< incPathStr << " $(DEFINES)\n\n";
}
}
示例4: addSourceFiles
void QMakeSourceFileInfo::addSourceFiles(const ProStringList &l, uchar seek,
QMakeSourceFileInfo::SourceFileType type)
{
for(int i=0; i<l.size(); ++i)
addSourceFile(l.at(i).toQString(), seek, type);
}