[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [pim-data-exporter] /: Blogilo is unmaintained now
From: Laurent Montel <null () kde ! org>
Date: 2018-06-01 6:18:34
Message-ID: E1fOdOU-0000q6-HJ () code ! kde ! org
[Download RAW message or body]
Git commit 2916db3b4b99de5ef3847a436f89a7510c9d41da by Laurent Montel.
Committed on 01/06/2018 at 06:18.
Pushed by mlaurent into branch 'master'.
Blogilo is unmaintained now
M +0 -5 core/CMakeLists.txt
D +0 -79 core/blogilo/exportblogilojob.cpp
D +0 -41 core/blogilo/exportblogilojob.h
D +0 -91 core/blogilo/importblogilojob.cpp
D +0 -44 core/blogilo/importblogilojob.h
M +0 -14 core/pimsettingsbackuprestore.cpp
M +0 -2 core/utils.cpp
M +1 -2 core/utils.h
M +0 -7 core/xml/templateselection.cpp
M +0 -3 gui/backup-structure.txt
M +0 -18 gui/widgets/selectiontypetreewidget.cpp
M +0 -1 gui/widgets/selectiontypetreewidget.h
https://commits.kde.org/pim-data-exporter/2916db3b4b99de5ef3847a436f89a7510c9d41da
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 71f7130..69de966 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -37,10 +37,6 @@ set(pimsettingexporter_akregator_SRCS
akregator/importakregatorjob.cpp
)
-set(pimsettingexporter_blogilo_SRCS
- blogilo/exportblogilojob.cpp
- blogilo/importblogilojob.cpp
- )
set(pimsettingexporter_LIB_SRCS
${pimsettingexporter_xml_SRCS}
@@ -51,7 +47,6 @@ set(pimsettingexporter_LIB_SRCS
${pimsettingexporter_addressbook_SRCS}
${pimsettingexporter_jot_SRCS}
${pimsettingexporter_akregator_SRCS}
- ${pimsettingexporter_blogilo_SRCS}
pimsettingexportcore_debug.cpp
abstractimportexportjob.cpp
pimsettingexporterkernel.cpp
diff --git a/core/blogilo/exportblogilojob.cpp b/core/blogilo/exportblogilojob.cpp
deleted file mode 100644
index 1bc083d..0000000
--- a/core/blogilo/exportblogilojob.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- Copyright (C) 2013-2018 Montel Laurent <montel@kde.org>
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- 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; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "exportblogilojob.h"
-
-#include <AkonadiCore/AgentManager>
-
-#include <KLocalizedString>
-
-#include <QStandardPaths>
-#include <QTimer>
-#include <QFileInfo>
-
-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, &ExportBlogiloJob::slotCheckBackupConfig);
- } else if (mTypeSelected & Utils::Data) {
- QTimer::singleShot(0, this, &ExportBlogiloJob::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, &ExportBlogiloJob::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;
- if (QFileInfo::exists(dbfile)) {
- backupFile(dbfile, Utils::dataPath() + QLatin1String("blogilo/"), \
dbfileStr);
- }
-
- Q_EMIT info(i18n("Data backup done."));
- }
- Q_EMIT jobFinished();
-}
diff --git a/core/blogilo/exportblogilojob.h b/core/blogilo/exportblogilojob.h
deleted file mode 100644
index 59a92dc..0000000
--- a/core/blogilo/exportblogilojob.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Copyright (C) 2013-2018 Montel Laurent <montel@kde.org>
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- 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; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef EXPORTBLOGILOJOB_H
-#define EXPORTBLOGILOJOB_H
-
-#include "abstractimportexportjob.h"
-
-class ArchiveStorage;
-
-class ExportBlogiloJob : public AbstractImportExportJob
-{
- Q_OBJECT
-public:
- explicit ExportBlogiloJob(QObject *parent, Utils::StoredTypes typeSelected, \
ArchiveStorage *archiveStorage, int numberOfStep);
- ~ExportBlogiloJob() override;
-
- void start() override;
-
-private:
- void slotCheckBackupConfig();
- void slotCheckBackupData();
-};
-
-#endif // EXPORTBLOGILOJOB_H
diff --git a/core/blogilo/importblogilojob.cpp b/core/blogilo/importblogilojob.cpp
deleted file mode 100644
index 245b051..0000000
--- a/core/blogilo/importblogilojob.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- Copyright (C) 2013-2018 Montel Laurent <montel@kde.org>
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- 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; see the file COPYING. 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 <PimCommonAkonadi/CreateResource>
-
-#include <KArchive>
-#include <KLocalizedString>
-
-#include <KZip>
-#include <QStandardPaths>
-#include <QTimer>
-
-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("Starting to 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/core/blogilo/importblogilojob.h b/core/blogilo/importblogilojob.h
deleted file mode 100644
index e51993b..0000000
--- a/core/blogilo/importblogilojob.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- Copyright (C) 2013-2018 Montel Laurent <montel@kde.org>
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- 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; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef IMPORTBLOGILOJOB_H
-#define IMPORTBLOGILOJOB_H
-
-#include "abstractimportexportjob.h"
-
-class ArchiveStorage;
-
-class ImportBlogiloJob : public AbstractImportExportJob
-{
- Q_OBJECT
-public:
- explicit ImportBlogiloJob(QObject *parent, Utils::StoredTypes typeSelected, \
ArchiveStorage *archiveStorage, int numberOfStep);
- ~ImportBlogiloJob() override;
-
- void start() override;
-
-private:
- void slotNextStep() override;
-
-private:
- void restoreConfig();
- void restoreData();
-};
-
-#endif // IMPORTBLOGILOJOB_H
diff --git a/core/pimsettingsbackuprestore.cpp b/core/pimsettingsbackuprestore.cpp
index 7a6adf0..98a7f75 100644
--- a/core/pimsettingsbackuprestore.cpp
+++ b/core/pimsettingsbackuprestore.cpp
@@ -39,8 +39,6 @@
#include "akregator/exportakregatorjob.h"
#include "akregator/importakregatorjob.h"
-#include "blogilo/exportblogilojob.h"
-#include "blogilo/importblogilojob.h"
#include <KLocalizedString>
#include <KMessageBox>
@@ -172,12 +170,6 @@ void PimSettingsBackupRestore::backupNextStep()
executeJob();
}
break;
- case Utils::Blogilo:
- if (mStoreIterator.value().numberSteps != 0) {
- mImportExportData = new ExportBlogiloJob(this, \
mStoreIterator.value().types, mArchiveStorage, \
mStoreIterator.value().numberSteps);
- executeJob();
- }
- break;
case Utils::Unknown:
break;
}
@@ -249,12 +241,6 @@ void PimSettingsBackupRestore::restoreNextStep()
executeJob();
}
break;
- case Utils::Blogilo:
- if (mStoreIterator.value().numberSteps != 0) {
- mImportExportData = new ImportBlogiloJob(this, \
mStoreIterator.value().types, mArchiveStorage, \
mStoreIterator.value().numberSteps);
- executeJob();
- }
- break;
case Utils::Unknown:
break;
}
diff --git a/core/utils.cpp b/core/utils.cpp
index ae86d41..bd54828 100644
--- a/core/utils.cpp
+++ b/core/utils.cpp
@@ -345,8 +345,6 @@ QString Utils::appTypeToI18n(AppsType type)
return i18n("KNotes");
case Akregator:
return i18n("Akregator");
- case Blogilo:
- return i18n("Blogilo");
case Unknown:
break;
}
diff --git a/core/utils.h b/core/utils.h
index 0cbff4c..5262397 100644
--- a/core/utils.h
+++ b/core/utils.h
@@ -59,8 +59,7 @@ enum AppsType {
KAlarm,
KOrganizer,
KNotes,
- Akregator,
- Blogilo
+ Akregator
};
struct importExportParameters {
diff --git a/core/xml/templateselection.cpp b/core/xml/templateselection.cpp
index e7b049f..23f2695 100644
--- a/core/xml/templateselection.cpp
+++ b/core/xml/templateselection.cpp
@@ -90,8 +90,6 @@ QHash<Utils::AppsType, Utils::importExportParameters> \
TemplateSelection::loadTem type = Utils::KNotes;
} else if (mStreamReader->name() == QLatin1String("akregator")) {
type = Utils::Akregator;
- } else if (mStreamReader->name() == QLatin1String("blogilo")) {
- type = Utils::Blogilo;
}
if (type != Utils::Unknown) {
int numberOfSteps = 0;
@@ -185,11 +183,6 @@ void TemplateSelection::createTemplate(const \
QHash<Utils::AppsType, Utils::impor saveParameters(i.value().types);
mStreamWriter->writeEndElement();
break;
- case Utils::Blogilo:
- mStreamWriter->writeStartElement(QStringLiteral("blogilo"));
- saveParameters(i.value().types);
- mStreamWriter->writeEndElement();
- break;
case Utils::Unknown:
qCCritical(PIMSETTINGEXPORTERCORE_LOG) << "Code must not use this enum \
here"; break;
diff --git a/gui/backup-structure.txt b/gui/backup-structure.txt
index f9613c1..cc82a8f 100644
--- a/gui/backup-structure.txt
+++ b/gui/backup-structure.txt
@@ -72,7 +72,6 @@ Root
| |---------messagevieweradblockrc
| |---------knotesrc
| |---------akregatorrc
-| |---------blogilorc
| |---------messageviewer.notifyrc
| |---------kontactrc
| |---------kontact_summaryrc
@@ -83,7 +82,6 @@ Root
| |---------kleopatrarc
| |---------sieveeditorrc
| |---------kaddressbookui.rc
-| |---------blogiloui.rc
| |---------pageviewer.rc
| |---------akregator_part.rc
| |---------articleviewer.rc
@@ -125,7 +123,6 @@ Root
| |---------kmail2/adblockrules_local
| |---------knotes/print/*
| |---------akregator/*
-| |---------blogilo/blogilo.db
| |---------kaddressbook/viewertemplates/
| |---------kaddressbook/csv-templates/
| |---------kaddressbook/printing/
diff --git a/gui/widgets/selectiontypetreewidget.cpp \
b/gui/widgets/selectiontypetreewidget.cpp index 58e13e0..3d6278d 100644
--- a/gui/widgets/selectiontypetreewidget.cpp
+++ b/gui/widgets/selectiontypetreewidget.cpp
@@ -86,12 +86,6 @@ void SelectionTypeTreeWidget::initialize()
createSubItem(mAkregatorItem, Utils::Config);
createSubItem(mAkregatorItem, Utils::Data);
- mBlogiloItem = new QTreeWidgetItem(this);
- mBlogiloItem->setText(0, Utils::appTypeToI18n(Utils::Blogilo));
- mBlogiloItem->setCheckState(0, Qt::Checked);
- createSubItem(mBlogiloItem, Utils::Config);
- createSubItem(mBlogiloItem, Utils::Data);
-
connect(this, &SelectionTypeTreeWidget::itemChanged, this, \
&SelectionTypeTreeWidget::slotItemChanged); }
@@ -121,10 +115,6 @@ void SelectionTypeTreeWidget::removeNotSelectedItems()
delete mAkregatorItem;
mAkregatorItem = nullptr;
}
- if (!removeNotSelectedItem(mBlogiloItem)) {
- delete mBlogiloItem;
- mBlogiloItem = nullptr;
- }
}
bool SelectionTypeTreeWidget::removeNotSelectedItem(QTreeWidgetItem *parent)
@@ -169,10 +159,6 @@ QHash<Utils::AppsType, Utils::importExportParameters> \
SelectionTypeTreeWidget::s if (!var.isEmpty()) {
stored.insert(Utils::Akregator, var);
}
- var = typeChecked(mBlogiloItem);
- if (!var.isEmpty()) {
- stored.insert(Utils::Blogilo, var);
- }
return stored;
}
@@ -269,7 +255,6 @@ void SelectionTypeTreeWidget::setSelectItems(bool b)
changeState(mKorganizerItem, b);
changeState(mKNotesItem, b);
changeState(mAkregatorItem, b);
- changeState(mBlogiloItem, b);
}
void SelectionTypeTreeWidget::changeState(QTreeWidgetItem *item, bool b)
@@ -411,9 +396,6 @@ void SelectionTypeTreeWidget::setParameters(const \
QHash<Utils::AppsType, Utils:: case Utils::Akregator:
initializeSubItem(mAkregatorItem, i.value().types);
break;
- case Utils::Blogilo:
- initializeSubItem(mBlogiloItem, i.value().types);
- break;
case Utils::Unknown:
break;
}
diff --git a/gui/widgets/selectiontypetreewidget.h \
b/gui/widgets/selectiontypetreewidget.h index c3be78f..855c864 100644
--- a/gui/widgets/selectiontypetreewidget.h
+++ b/gui/widgets/selectiontypetreewidget.h
@@ -72,7 +72,6 @@ private:
QTreeWidgetItem *mKorganizerItem = nullptr;
QTreeWidgetItem *mKNotesItem = nullptr;
QTreeWidgetItem *mAkregatorItem = nullptr;
- QTreeWidgetItem *mBlogiloItem = nullptr;
};
#endif // SELECTIONTYPETREEWIDGET_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic