本文整理汇总了C++中qfileinfolist::iterator::canonicalFilePath方法的典型用法代码示例。如果您正苦于以下问题:C++ iterator::canonicalFilePath方法的具体用法?C++ iterator::canonicalFilePath怎么用?C++ iterator::canonicalFilePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qfileinfolist::iterator
的用法示例。
在下文中一共展示了iterator::canonicalFilePath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: start
//.........这里部分代码省略.........
qWarning("lupdate warning: For some reason, I cannot save '%s'\n",
qPrintable(arg) );
}
} else {
qWarning("lupdate error: File '%s' lacks .ts or .xlf extension\n",
qPrintable(arg) );
}
} else if (arg.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)) {
proFiles << arg;
} else {
QFileInfo fi(arg);
if (fi.isDir()) {
if ( verbose )
Console::out(tr("Scanning directory '%1'...\n").arg(arg));
QDir dir = QDir(fi.filePath());
if (extensionsNameFilters.isEmpty()) {
extensions = extensions.trimmed();
// Remove the potential dot in front of each extension
if (extensions.startsWith(QLatin1Char('.')))
extensions.remove(0,1);
extensions.replace(QLatin1String(",."), QLatin1String(","));
extensions.insert(0, QLatin1String("*."));
extensions.replace(QLatin1Char(','), QLatin1String(",*."));
extensionsNameFilters = extensions.split(QLatin1Char(','));
}
QDir::Filters filters = QDir::Files | QDir::NoSymLinks;
QFileInfoList fileinfolist;
recursiveFileInfoList(dir, extensionsNameFilters, filters, true, &fileinfolist);
QFileInfoList::iterator ii;
QString fn;
for (ii = fileinfolist.begin(); ii != fileinfolist.end(); ++ii) {
// Make sure the path separator is stored with '/' in the ts file
fn = ii->canonicalFilePath().replace(QLatin1Char('\\'),QLatin1Char('/'));
#ifdef LINGUIST_DEBUG
qDebug() << fn;
#endif
sourceFiles << fn;
}
}else{
sourceFiles << fi.canonicalFilePath().replace(QLatin1Char('\\'),QLatin1Char('/'));
}
}
} //for
if ( proFiles.count() > 0 ) {
proFiles = getListOfProfiles(proFiles, verbose);
}
bool firstPass = true;
for (int pi = 0; firstPass || pi < proFiles.count(); ++pi) {
QStringList tsFiles = tsFileNames;
if (proFiles.count() > 0) {
QString pf = proFiles.at(pi);
QMap<QByteArray, QStringList> variables;
if(!evaluateProFile(pf, verbose, &variables))
return 2;
sourceFiles = variables.value("SOURCES");
QStringList tmp = variables.value("CODECFORTR");
if (!tmp.isEmpty()) {
codecForTr = tmp.first().toAscii();
fetchedTor.setCodecForTr(codecForTr.constData());
}