MCPcopy Create free account
hub / github.com/KDE/kdevelop / readLines

Method readLines

kdevplatform/util/tests/test_kdevformatsource.cpp:352–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352bool TestKdevFormatSource::readLines(const QString& path, QStringList& lines) const
353{
354 QFile inFile(path);
355 if (!inFile.open(QIODevice::ReadOnly)) {
356 qDebug() << "unable to open file" << path << "for reading";
357 return false;
358 }
359
360 lines.clear();
361
362 QTextStream inStream(&inFile);
363 while (!inStream.atEnd()) {
364 lines += inStream.readLine();
365 }
366 inFile.close();
367
368 return true;
369}
370
371#include "moc_test_kdevformatsource.cpp"

Callers

nothing calls this directly

Calls 5

atEndMethod · 0.80
readLineMethod · 0.80
openMethod · 0.45
clearMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected