| 62 | } |
| 63 | |
| 64 | QString JsFileIo::readLine(const QString &path, const int lineNumber) |
| 65 | { |
| 66 | QFile file(path); |
| 67 | int i = 0; |
| 68 | QString data; |
| 69 | |
| 70 | if(file.open(QIODevice::ReadOnly)) { |
| 71 | QTextStream stream(&file); |
| 72 | while(i <= lineNumber) { |
| 73 | data = stream.readLine(); |
| 74 | if(stream.atEnd()) |
| 75 | break; |
| 76 | i++; |
| 77 | } |
| 78 | } |
| 79 | return data; |
| 80 | } |
| 81 | |
| 82 | QString JsFileIo::getTempPath() { return QDir::tempPath(); } |
| 83 |
no test coverage detected