MCPcopy Create free account
hub / github.com/blizzard4591/openMittsu / parseLineImpl

Method parseLineImpl

src/widgets/player/QPlaylistFileParser.cpp:212–227  ·  view source on GitHub ↗

* The format is essentially that of an INI file structured as follows: Header * [playlist] : This tag indicates that it is a Playlist File Track Entry Assuming track entry #X * FileX : Variable defining location of stream. * TitleX : Defines track title. * LengthX : Length in seconds of track. Value of -1 indicates indefinite. Footer

Source from the content-addressed store, hash-verified

210 Version=2
211 */
212 bool parseLineImpl(int, const QString &line, const QUrl &root) override
213 {
214 // We ignore everything but 'File' entries, since that's the only thing we care about.
215 if (!line.startsWith(QLatin1String("File")))
216 return true;
217
218 QString value = getValue(line);
219 if (value.isEmpty())
220 return true;
221
222 QUrl path = expandToFullPath(root, value);
223 m_parent->playlist.append(path);
224 newItemFound(path);
225
226 return true;
227 }
228
229 QString getValue(QStringView line)
230 {

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected