Skip to content

Commit

Permalink
[buteo-sync-plugins-social] Fix google calendar plugin adaptation to …
Browse files Browse the repository at this point in the history
…api changes. Contributes to JB#53994

Commit 1d80cc4 had quite a bunch of code churn and looks like this
change was missing.
  • Loading branch information
pvuorela committed Apr 21, 2021
1 parent 3c32e3d commit c28cd6a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/google/google-calendars/googlecalendarsplugin.cpp
Expand Up @@ -22,8 +22,6 @@
#include "googlecalendarsyncadaptor.h"
#include "socialnetworksyncadaptor.h"



GoogleCalendarsPlugin::GoogleCalendarsPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
Expand All @@ -41,3 +39,13 @@ SocialNetworkSyncAdaptor *GoogleCalendarsPlugin::createSocialNetworkSyncAdaptor(
{
return new GoogleCalendarSyncAdaptor(this);
}


Buteo::ClientPlugin* GoogleCalendarPluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new GoogleCalendarsPlugin(pluginName, profile, cbInterface);
}

12 changes: 12 additions & 0 deletions src/google/google-calendars/googlecalendarsplugin.h
Expand Up @@ -22,6 +22,7 @@
#define GOOGLECALENDARSPLUGIN_H

#include "socialdbuteoplugin.h"
#include <buteosyncfw5/SyncPluginLoader.h>

class Q_DECL_EXPORT GoogleCalendarsPlugin : public SocialdButeoPlugin
{
Expand All @@ -37,6 +38,17 @@ class Q_DECL_EXPORT GoogleCalendarsPlugin : public SocialdButeoPlugin
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};

class GoogleCalendarPluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.GoogleCalendarPluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)

public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};


#endif // GOOGLECALENDARSPLUGIN_H

0 comments on commit c28cd6a

Please sign in to comment.