mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
Improved Calendar Support
Fixes previous CalDAV support, as MobileMe based calendars now work ok. Additionally, a new 'id' field has been created to provide a persistent and immutable identifier for a ride file (regardless of changes to date/filename). The URL provided in the Calendar config pane can now include '@' symbols (they are translated to %40). The CalDAV URL should be provided for a calendar collection and not for a principal. Examples being (trailing slash is significant): Google : https://www.google.com/calendar/dav/xxxx@gmail.com/events/ MobileMe: https://cal.me.com:8443/calendars/users/x.xxxxxxxxxx/home/
This commit is contained in:
@@ -64,6 +64,9 @@ GcFileReader::openRideFile(QFile &file, QStringList &errors) const
|
||||
// now set in localtime
|
||||
rideFile->setStartTime(asUTC.toLocalTime());
|
||||
}
|
||||
if (key == "Identifier") {
|
||||
rideFile->setId(value);
|
||||
}
|
||||
}
|
||||
|
||||
// read in metric overrides:
|
||||
@@ -186,6 +189,10 @@ GcFileReader::writeRideFile(const RideFile *ride, QFile &file) const
|
||||
attributes.appendChild(attribute);
|
||||
attribute.setAttribute("key", "Device type");
|
||||
attribute.setAttribute("value", ride->deviceType());
|
||||
attribute = doc.createElement("attribute");
|
||||
attributes.appendChild(attribute);
|
||||
attribute.setAttribute("key", "Identifier");
|
||||
attribute.setAttribute("value", ride->id());
|
||||
|
||||
// write out in metric overrides:
|
||||
// <override>
|
||||
|
||||
Reference in New Issue
Block a user