本文整理汇总了C++中QStringList::endsWith方法的典型用法代码示例。如果您正苦于以下问题:C++ QStringList::endsWith方法的具体用法?C++ QStringList::endsWith怎么用?C++ QStringList::endsWith使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QStringList
的用法示例。
在下文中一共展示了QStringList::endsWith方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runSimple
int ConflateCmd::runSimple(QStringList args)
{
Timer totalTime;
Timer t;
QList<SingleStat> stats;
bool displayStats = false;
//force stats to always be the last optional param so it can be followed by an optional
//output file
QString outputStatsFile;
if (args.contains("--stats"))
{
if (args.endsWith("--stats"))
{
displayStats = true;
//remove "--stats" from args list
args.pop_back();
}
else if (args[args.size() - 1] == "--stats")
{
displayStats = true;
outputStatsFile = args[args.size() - 1];
//remove "--stats" and stats output file name from args list
args.pop_back();
args.pop_back();
}
}
LOG_VARD(displayStats);
LOG_VARD(outputStatsFile);
DiffConflator diffConflator;
bool isDiffConflate = false;
if (args.contains("--differential"))
{
isDiffConflate = true;
args.removeAt(args.indexOf("--differential"));
// Check for tags argument "--Include-Tags"
if (args.contains("--include-tags"))
{
diffConflator.enableTags();
args.removeAt(args.indexOf("--include-tags"));
}
}
LOG_VARD(isDiffConflate);
// Check for separate output files (for geometry & tags)
bool separateOutput = false;
if (args.contains("--separate-output"))
{
separateOutput = true;
args.removeAt(args.indexOf("--separate-output"));
}
if (args.size() < 2 || args.size() > 3)
{
cout << getHelp() << endl << endl;
throw HootException(QString("%1 takes two or three parameters.").arg(getName()));
}
QString input1 = args[0];
QString input2, output;
if (args.size() == 3)
{
input2 = args[1];
output = args[2];
}
else
{
output = args[1];
}
QString msg =
"Conflating " + input1.right(50) + " with " + input2.right(50) + " and writing the output to " +
output.right(50);
if (isDiffConflate)
{
msg = msg.prepend("Differentially ");
}
LOG_INFO(msg);
double bytesRead = IoSingleStat(IoSingleStat::RChar).value;
LOG_VART(bytesRead);
QList<QList<SingleStat>> allStats;
// read input 1
OsmMapPtr map(new OsmMap());
IoUtils::loadMap(map, input1,
ConfigOptions().getReaderConflateUseDataSourceIds1(),
Status::Unknown1);
ChangesetProviderPtr pTagChanges;
if (isDiffConflate)
{
// Store original IDs for tag diff
diffConflator.storeOriginalMap(map);
//.........这里部分代码省略.........