Skip to content
Permalink
Browse files

Fixed Remote Calendar authorization

We need to save the calendar type for older CalDAV code to work,
additionally Google calendar needs the calendar ID (tipically the same
as the email address), used the optional Key setting field for this.
  • Loading branch information...
amtriathlon committed Jul 4, 2019
1 parent a6b7993 commit 236f782e66a8a47cb9fc8231ba14fc6ec7d097a0
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/Cloud/CalDAVCloud.cpp
@@ -55,6 +55,7 @@ CalDAVCloud::CalDAVCloud(Context *context, CalDAV::type variant) : CloudService(

// config
if (variant == CalDAV::Google) {
settings.insert(Key, GC_DVGOOGLE_CALID);
settings.insert(OAuthToken, GC_GOOGLE_CALENDAR_REFRESH_TOKEN);
} else if (variant == CalDAV::Webcal) {
settings.insert(URL, GC_WEBCAL_URL);
@@ -65,7 +66,13 @@ CalDAVCloud::CalDAVCloud(Context *context, CalDAV::type variant) : CloudService(
}
}

CalDAVCloud::~CalDAVCloud() {}
CalDAVCloud::~CalDAVCloud() {
// We need to save the variant for compatibility with older code
// until CalDAV code is fully integrated in the Cloud Services framework
settings.insert(Local1, GC_DVCALDAVTYPE);
setSetting(GC_DVCALDAVTYPE, variant);
CloudServiceFactory::instance().saveSettings(this, context);
}

QImage CalDAVCloud::logo() const
{

0 comments on commit 236f782

Please sign in to comment.
You can’t perform that action at this time.