MCPcopy Create free account
hub / github.com/QNapi/qnapi / foreach

Function foreach

libqnapi/src/subtitlepostprocessor.cpp:139–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 QList<QByteArray> out;
138
139 foreach (QByteArray line, lines) {
140 int i;
141 while ((i = line.indexOf('\r')) >= 0) line.remove(i, 1);
142
143 QTextStream ts(line);
144 ts.setCodec(qPrintable(fromCodec));
145 QString encLine = ts.readAll();
146
147 if (encLine.isEmpty()) {
148 out << line;
149 continue;
150 }
151
152 bool found = false;
153 foreach (QString word, wordList) {
154 if (encLine.contains(word, Qt::CaseInsensitive)) {
155 found = true;
156 break;
157 }
158 }
159 if (found) continue;
160
161 out << line;
162 }
163
164 f.close();
165

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected