MCPcopy Create free account
hub / github.com/KDE/kdiff3 / parseOptions

Method parseOptions

src/Options.cpp:117–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117const 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
144QString Options::calcOptionHelp()
145{

Callers 2

KDiff3AppMethod · 0.80
optiondialog.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected