| 191 | } |
| 192 | |
| 193 | void ResultsView::saveStatistics(const QString &filename) const |
| 194 | { |
| 195 | QFile f(filename); |
| 196 | if (!f.open(QIODevice::Text | QIODevice::Append)) |
| 197 | return; |
| 198 | QTextStream ts(&f); |
| 199 | ts << '[' << QDate::currentDate().toString("dd.MM.yyyy") << "]\n"; |
| 200 | ts << QDateTime::currentMSecsSinceEpoch() << '\n'; |
| 201 | for (const QString& tool : mStatistics->getTools()) { |
| 202 | ts << tool << "-error:" << mStatistics->getCount(tool, ShowTypes::ShowErrors) << '\n'; |
| 203 | ts << tool << "-warning:" << mStatistics->getCount(tool, ShowTypes::ShowWarnings) << '\n'; |
| 204 | ts << tool << "-style:" << mStatistics->getCount(tool, ShowTypes::ShowStyle) << '\n'; |
| 205 | ts << tool << "-performance:" << mStatistics->getCount(tool, ShowTypes::ShowPerformance) << '\n'; |
| 206 | ts << tool << "-portability:" << mStatistics->getCount(tool, ShowTypes::ShowPortability) << '\n'; |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | void ResultsView::updateFromOldReport(const QString &filename) const |
| 211 | { |
no test coverage detected