| 10 | using namespace QtCSV; |
| 11 | |
| 12 | bool openFile(const QString& filePath, QFile& file) { |
| 13 | if (!CheckFile(filePath, true)) { |
| 14 | qDebug() << __FUNCTION__ << "Error - wrong file path:" << filePath; |
| 15 | return false; |
| 16 | } |
| 17 | |
| 18 | file.setFileName(filePath); |
| 19 | const auto result = file.open(QIODevice::ReadOnly); |
| 20 | if (!result) { |
| 21 | qDebug() << __FUNCTION__ << "Error - can't open file:" << filePath; |
| 22 | } |
| 23 | |
| 24 | return result; |
| 25 | } |
| 26 | |
| 27 | // ElementInfo is a helper struct that is used as indicator of row end |
| 28 | struct ElementInfo { |
no test coverage detected