1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-770 Updates version info code used in AUV settings export file.

This commit is contained in:
Fredrik Arvidsson 2013-05-27 20:42:56 +02:00
parent d9d2b7d167
commit 94d38a4b48

View File

@ -246,15 +246,10 @@ QString UAVSettingsImportExportFactory::createXMLDocument(const enum storedData
fw.setAttribute("tag", board.gitTag);
versionInfo.appendChild(fw);
QString gcsRevision = VersionInfo::revision();
QString gcsGitDate = gcsRevision.mid(gcsRevision.indexOf(" ") + 1, 14);
QString gcsGitHash = gcsRevision.mid(gcsRevision.indexOf(":") + 1, 8);
QString gcsGitTag = gcsRevision.left(gcsRevision.indexOf(":"));
QDomElement gcs = doc.createElement("gcs");
gcs.setAttribute("date", gcsGitDate);
gcs.setAttribute("hash", gcsGitHash);
gcs.setAttribute("tag", gcsGitTag);
QDomElement gcs = doc.createElement("gcs");
gcs.setAttribute("date", VersionInfo::dateTime());
gcs.setAttribute("hash", VersionInfo::hash());
gcs.setAttribute("tag", VersionInfo::tagOrBranch());
versionInfo.appendChild(gcs);
// create settings and/or data elements