MCPcopy Create free account
hub / github.com/carsonip/Penguin-Subtitle-Player / parseFile

Method parseFile

src/parser.cpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17std::vector<Engine::SubtitleItem> Parser::parseFile(QFile &f,
18 QString encoding) {
19 for (ParserInterface *p : Parser::parsers) {
20 bool ok = false;
21 for (QString ext : p->getExtensions()) {
22 ok = ok || f.fileName().endsWith(ext, Qt::CaseInsensitive);
23 }
24 if (ok)
25 return p->parseFile(f, encoding);
26 }
27 return std::vector<Engine::SubtitleItem>();
28}
29
30QStringList Parser::getExtensions() {
31 QStringList list;

Callers 1

EngineMethod · 0.45

Calls 1

getExtensionsMethod · 0.45

Tested by

no test coverage detected