MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / saveTo

Method saveTo

src/core/track.cpp:142–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142bool 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
160bool Track::saveGpxTo(QIODevice& device) const

Callers 2

gpxTestMethod · 0.45
saveTemplateFileMethod · 0.45

Calls 4

mediaScannerScanFileFunction · 0.85
openMethod · 0.80
commitMethod · 0.80
QFileInfoClass · 0.50

Tested by

no test coverage detected