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

Method detect

libqnapi/src/subconvert/formats/tmplayer.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include "tmplayer.h"
16
17bool TMPlayerSubtitleFormat::detect(const QStringList &lines) const {
18 foreach (QString line, lines) {
19 if (!line.trimmed().isEmpty()) {
20 QRegExp r("^(0\\d|\\d\\d):(0\\d|\\d\\d):(0\\d|\\d\\d):(.*)");
21 r.setPatternSyntax(QRegExp::RegExp2);
22 return r.exactMatch(line);
23 }
24 }
25
26 return false;
27}
28
29SubFile TMPlayerSubtitleFormat::decode(const QStringList &lines) const {
30 SubFile sf;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected