Read csv-file and process it line-by-line @input: - filePath - string with absolute path to csv-file - processor - AbstractProcessor-based object that receives data from csv-file line-by-line - separator - string or character that separate elements in a row - textDelimiter - string or character that enclose each element in a row - codec - pointer to codec object that would be used for file reading
| 623 | // @output: |
| 624 | // - bool - True if file was successfully read, otherwise False |
| 625 | bool Reader::readToProcessor( |
| 626 | const QString& filePath, |
| 627 | Reader::AbstractProcessor& processor, |
| 628 | const QString& separator, |
| 629 | const QString& textDelimiter, |
| 630 | QTextCodec* codec) |
| 631 | { |
| 632 | QFile file; |
| 633 | if (false == openFile(filePath, file)) { return false; } |
| 634 | |
| 635 | return readToProcessor(file, processor, separator, textDelimiter, codec); |
| 636 | } |
| 637 | |
| 638 | // Read csv-formatted data from IO Device and process it line-by-line |
| 639 | bool Reader::readToProcessor(QIODevice& ioDevice, |
nothing calls this directly
no test coverage detected