MCPcopy Create free account
hub / github.com/YACReader/yacreader / parseCommand

Function parseCommand

YACReaderLibrary/library_comic_opener.cpp:49–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49QStringList parseCommand(const QString &input)
50{
51 QRegularExpression regex(R"((?:\"([^\"]*)\")|(\S+))");
52 QStringList result;
53 auto it = regex.globalMatch(input);
54 while (it.hasNext()) {
55 QRegularExpressionMatch match = it.next();
56 if (match.hasMatch()) {
57 result << (match.captured(1).isEmpty() ? match.captured(2) : match.captured(1));
58 }
59 }
60 return result;
61}
62
63bool YACReader::openComicInThirdPartyApp(const QString &command, const QString &path)
64{

Callers 1

Calls 2

isEmptyMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected