| 115 | } |
| 116 | |
| 117 | const QString Options::parseOptions(const QStringList& optionList) |
| 118 | { |
| 119 | QString result; |
| 120 | |
| 121 | for(const QString& optionString: optionList) |
| 122 | { |
| 123 | qsizetype pos = optionString.indexOf('='); |
| 124 | if(pos > 0) // seems not to have a tag |
| 125 | { |
| 126 | const QString key = optionString.left(pos); |
| 127 | const QString val = optionString.mid(pos + 1); |
| 128 | |
| 129 | bool bFound = accept(key, val); |
| 130 | |
| 131 | if(!bFound) |
| 132 | { |
| 133 | result += "No config item named \"" + key + "\"\n"; |
| 134 | } |
| 135 | } |
| 136 | else |
| 137 | { |
| 138 | result += "No '=' found in \"" + optionString + "\"\n"; |
| 139 | } |
| 140 | } |
| 141 | return result; |
| 142 | } |
| 143 | |
| 144 | QString Options::calcOptionHelp() |
| 145 | { |
no outgoing calls
no test coverage detected