Commit 62a9f6c8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add support for import/export google/openxchange

parent 618c083b
......@@ -64,6 +64,12 @@ void ExportCalendarJobInterface::slotWriteNextArchiveResource()
} else if (identifier.contains(QLatin1String("akonadi_davgroupware_resource_"))) {
backupCalendarResourceFile(identifier, Utils::calendarPath());
QTimer::singleShot(0, this, &ExportCalendarJobInterface::slotCalendarJobTerminated);
} else if (identifier.contains(QLatin1String("akonadi_openxchange_resource_"))) {
backupCalendarResourceFile(identifier, Utils::calendarPath());
QTimer::singleShot(0, this, &ExportCalendarJobInterface::slotCalendarJobTerminated);
} else if (identifier.contains(QLatin1String("akonadi_google_resource_"))) {
backupCalendarResourceFile(identifier, Utils::calendarPath());
QTimer::singleShot(0, this, &ExportCalendarJobInterface::slotCalendarJobTerminated);
} else {
QTimer::singleShot(0, this, &ExportCalendarJobInterface::slotCalendarJobTerminated);
}
......
......@@ -82,7 +82,9 @@ bool ImportCalendarJobInterface::isAConfigFile(const QString &name) const
{
return name.endsWith(QLatin1String("rc"))
&& (name.contains(QLatin1String("akonadi_ical_resource_")) || name.contains(QLatin1String("akonadi_davgroupware_resource_"))
|| name.contains(QLatin1String("akonadi_icaldir_resource_")));
|| name.contains(QLatin1String("akonadi_icaldir_resource_"))
|| name.contains(QLatin1String("akonadi_openxchange_resource_"))
|| name.contains(QLatin1String("akonadi_google_resource_")));
}
void ImportCalendarJobInterface::restoreConfig()
......@@ -246,6 +248,8 @@ void ImportCalendarJobInterface::restoreResources()
QStringList listResource;
listResource << restoreResourceFile(QStringLiteral("akonadi_ical_resource"), Utils::calendarPath(), Utils::storeCalendar());
listResource << restoreResourceFile(QStringLiteral("akonadi_davgroupware_resource"), Utils::calendarPath(), Utils::storeCalendar());
listResource << restoreResourceFile(QStringLiteral("akonadi_openxchange_resource"), Utils::calendarPath(), Utils::storeCalendar());
listResource << restoreResourceFile(QStringLiteral("akonadi_google_resource"), Utils::calendarPath(), Utils::storeCalendar());
if (!mListResourceFile.isEmpty()) {
QDir dir(mTempDirName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment