| 140 | } |
| 141 | |
| 142 | bool Track::saveTo(const QString& path) const |
| 143 | { |
| 144 | QSaveFile file(path); |
| 145 | if (file.open(QIODevice::WriteOnly | QIODevice::Text) |
| 146 | && saveGpxTo(file) |
| 147 | && file.commit()) |
| 148 | { |
| 149 | #ifdef Q_OS_ANDROID |
| 150 | // Make the MediaScanner aware of the *updated* file. |
| 151 | Android::mediaScannerScanFile(QFileInfo(path).absolutePath()); |
| 152 | #endif |
| 153 | return true; // NOLINT : redundant boolean literal in conditional return statement |
| 154 | } |
| 155 | |
| 156 | return false; |
| 157 | } |
| 158 | |
| 159 | |
| 160 | bool Track::saveGpxTo(QIODevice& device) const |
no test coverage detected