Extract a sublist from the serialized arguments * indicated by a keyword starting with a colon indicator: * ":a,i1,i2,:b:i3,i4" with ":a" -> "i1,i2" */
| 520 | * ":a,i1,i2,:b:i3,i4" with ":a" -> "i1,i2" |
| 521 | */ |
| 522 | static QStringList subList(const QStringList &in, const QString &key) |
| 523 | { |
| 524 | QStringList rc; |
| 525 | // Find keyword and copy arguments until end or next keyword |
| 526 | const QStringList::const_iterator inEnd = in.constEnd(); |
| 527 | QStringList::const_iterator it = qFind(in.constBegin(), inEnd, key); |
| 528 | if (it != inEnd) { |
| 529 | const QChar nextIndicator = QLatin1Char(':'); |
| 530 | for (++it; it != inEnd && !it->startsWith(nextIndicator); ++it) |
| 531 | rc.append(*it); |
| 532 | } |
| 533 | return rc; |
| 534 | } |
| 535 | |
| 536 | /*! |
| 537 | Parses the options encoded by serializedArguments() const |
no outgoing calls
no test coverage detected