| 350 | } |
| 351 | |
| 352 | bool 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" |