| 262 | } // namespace |
| 263 | |
| 264 | std::tuple<QDateTime, QString, QString, QString, QString> read_lock_File(const QString& path) |
| 265 | { |
| 266 | auto contents = QString(FS::read(path)); |
| 267 | auto lines = contents.split('\n'); |
| 268 | |
| 269 | QDateTime timestamp; |
| 270 | QString from, to, target, data_path; |
| 271 | for (auto line : lines) { |
| 272 | auto index = line.indexOf("="); |
| 273 | if (index < 0) |
| 274 | continue; |
| 275 | auto left = line.left(index); |
| 276 | auto right = line.mid(index + 1); |
| 277 | if (left.toLower() == "timestamp") { |
| 278 | timestamp = QDateTime::fromString(right, Qt::ISODate); |
| 279 | } else if (left.toLower() == "from") { |
| 280 | from = right; |
| 281 | } else if (left.toLower() == "to") { |
| 282 | to = right; |
| 283 | } else if (left.toLower() == "target") { |
| 284 | target = right; |
| 285 | } else if (left.toLower() == "data_path") { |
| 286 | data_path = right; |
| 287 | } |
| 288 | } |
| 289 | return std::make_tuple(timestamp, from, to, target, data_path); |
| 290 | } |
| 291 | |
| 292 | Application::Application(int& argc, char** argv) : QApplication(argc, argv) |
| 293 | { |
no test coverage detected