diff --git a/pimsettingexporter/core/blogilo/exportblogilojob.cpp b/pimsettingexporter/core/blogilo/exportblogilojob.cpp index cc0815928c..9d61e23632 100644 --- a/pimsettingexporter/core/blogilo/exportblogilojob.cpp +++ b/pimsettingexporter/core/blogilo/exportblogilojob.cpp @@ -1,78 +1,79 @@ /* Copyright (c) 2013-2015 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "exportblogilojob.h" #include #include #include #include #include ExportBlogiloJob::ExportBlogiloJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep) : AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep) { } ExportBlogiloJob::~ExportBlogiloJob() { } void ExportBlogiloJob::start() { Q_EMIT title(i18n("Start export Blogilo settings...")); createProgressDialog(i18n("Export Blogilo settings")); if (mTypeSelected & Utils::Config) { QTimer::singleShot(0, this, SLOT(slotCheckBackupConfig())); } else if (mTypeSelected & Utils::Data) { QTimer::singleShot(0, this, SLOT(slotCheckBackupData())); } else { Q_EMIT jobFinished(); } } void ExportBlogiloJob::slotCheckBackupConfig() { setProgressDialogLabel(i18n("Backing up config...")); increaseProgressDialog(); backupConfigFile(QStringLiteral("blogilorc")); + backupUiRcFile(QStringLiteral("blogiloui.rc"), QStringLiteral("blogilo")); Q_EMIT info(i18n("Config backup done.")); QTimer::singleShot(0, this, SLOT(slotCheckBackupData())); } void ExportBlogiloJob::slotCheckBackupData() { if (mTypeSelected & Utils::Data) { setProgressDialogLabel(i18n("Backing up data...")); increaseProgressDialog(); const QString dbfileStr = QStringLiteral("blogilo.db"); const QString dbfile = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/blogilo/") + dbfileStr; backupFile(dbfile, Utils::dataPath() + QLatin1String("/blogilo/"), dbfileStr); Q_EMIT info(i18n("Data backup done.")); } Q_EMIT jobFinished(); } diff --git a/pimsettingexporter/core/blogilo/importblogilojob.cpp b/pimsettingexporter/core/blogilo/importblogilojob.cpp index d5098f44cf..9ea560cb33 100644 --- a/pimsettingexporter/core/blogilo/importblogilojob.cpp +++ b/pimsettingexporter/core/blogilo/importblogilojob.cpp @@ -1,89 +1,90 @@ /* Copyright (c) 2013-2015 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "importblogilojob.h" #include "archivestorage.h" #include "PimCommon/CreateResource" #include #include #include #include #include ImportBlogiloJob::ImportBlogiloJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep) : AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep) { initializeImportJob(); } ImportBlogiloJob::~ImportBlogiloJob() { } void ImportBlogiloJob::start() { Q_EMIT title(i18n("Start import Blogilo settings...")); createProgressDialog(i18n("Import Blogilo settings")); mArchiveDirectory = archive()->directory(); initializeListStep(); QTimer::singleShot(0, this, &ImportBlogiloJob::slotNextStep); } void ImportBlogiloJob::slotNextStep() { ++mIndex; if (mIndex < mListStep.count()) { const Utils::StoredType type = mListStep.at(mIndex); if (type == Utils::Config) { restoreConfig(); } else if (type == Utils::Data) { restoreData(); } else { qCDebug(PIMSETTINGEXPORTERCORE_LOG) << Q_FUNC_INFO << " not supported type "<< type; slotNextStep(); } } else { Q_EMIT jobFinished(); } } void ImportBlogiloJob::restoreConfig() { increaseProgressDialog(); setProgressDialogLabel(i18n("Restore configs...")); const QString blogiloStr(QStringLiteral("blogilorc")); restoreConfigFile(blogiloStr); + restoreUiRcFile(QStringLiteral("blogiloui.rc"), QStringLiteral("blogilo")); Q_EMIT info(i18n("Config restored.")); QTimer::singleShot(0, this, &ImportBlogiloJob::slotNextStep); } void ImportBlogiloJob::restoreData() { increaseProgressDialog(); setProgressDialogLabel(i18n("Restore data...")); const KArchiveEntry *blogiloEntry = mArchiveDirectory->entry(Utils::dataPath() + QLatin1String("blogilo/")); if (blogiloEntry && blogiloEntry->isDirectory()) { const QString blogiloPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + QLatin1String("blogilo/"); overwriteDirectory(blogiloPath, blogiloEntry); } Q_EMIT info(i18n("Data restored.")); QTimer::singleShot(0, this, &ImportBlogiloJob::slotNextStep); } diff --git a/pimsettingexporter/gui/backup-structure.txt b/pimsettingexporter/gui/backup-structure.txt index f5ef35fc91..b1d3ec659e 100644 --- a/pimsettingexporter/gui/backup-structure.txt +++ b/pimsettingexporter/gui/backup-structure.txt @@ -1,96 +1,97 @@ 2015-11-02: ----------- 2015-1-29: New VERSION for archive => VERSION_2 => knote-akonadi Zip structure is : Root |-----information | |---------VERSION_ | |-----transports | |---------mailtransports | |-----identities | |---------emailidentities | |---------uoid-identity | |--------- vcard file | |-----resources | |--------- | |-----mails | |--------- | |--------- | |--------- | |--------- |-----calendar | |--------- | |--------- | |--------- | |--------- |------addressbook | |--------- | |--------- | |--------- | |--------- | |------alarm | |--------- | |--------- | |--------- | |--------- | |------jot | |--------- | |--------- | |--------- | |--------- | |-----configs | |---------filters | |---------kmail2rc | |---------sievetemplaterc | |---------customtemplatesrc | |---------akonadi_archivemail_agentrc | |---------kabldaprc | |---------templatesconfigurationrc | |---------kalarmrc | |---------korganizerrc | |---------calendar_printing.rc | |---------korgacrc | |---------kaddressbookrc | |---------akonadi_mailfilter_agent.notifyrc | |---------akonadi_sendlater_agent.notifyrc | |---------akonadi_archivemail_agent.notifyrc | |---------kmail2.notifyrc | |---------akonadi_maildispatcher_agent.notifyrc | |---------akonadi_newmailnotifier_agent.notifyrc | |---------akonadi_followupreminder_agent.notifyrc | |---------messagevieweradblockrc | |---------knotesrc | |---------akregatorrc | |---------blogilorc | |---------messageviewer.notifyrc | |---------kontactrc | |---------kontact_summaryrc | |---------globalnotesettings | |---------akonadi_mailfilter_agent.notifyrc | |---------storageservicerc | |---------kpimbalooblacklist | |---------kleopatrarc | |---------sieveeditorrc | |---------kaddressbookui.rc +| |---------blogiloui.rc | |-----akonadi | |--------- | |-----data | |---------autocorrect/ | |---------korganizer/freebusyurls | |---------korganizer/templates/* | |---------messageviewer/themes/* | |---------kmail2/adblockrules_local | |---------knotes/print/* | |---------akregator/* | |---------blogilo/blogilo.db