Git commit c96f79da39150d758437205ddb0dcf83b0c71f3a by Volker Krause.
Committed on 11/04/2017 at 17:23.
Pushed by vkrause into branch 'master'.

Remove the HTML export feature

As agreed during the PIM sprint in Toulouse last weekend. It generates
HTML3-style output, doesn't handle recurring events in different timezones
correctly and addresses a use-case that has been better solved by the
meanwhile invented groupware servers.

M  +5    -62   doc/index.docbook
M  +0    -4    src/CMakeLists.txt
M  +0    -126  src/actionmanager.cpp
M  +0    -23   src/actionmanager.h
M  +0    -15   src/calendarview.cpp
M  +0    -8    src/calendarview.h
M  +1    -2    src/data/korganizer_part.rc
M  +1    -2    src/data/korganizerui.rc
D  +0    -246  src/dialog/exportwebdialog.cpp
D  +0    -86   src/dialog/exportwebdialog.h
D  +0    -924  src/job/htmlexportjob.cpp
D  +0    -118  src/job/htmlexportjob.h
M  +1    -1    src/korgmigrateapplication.cpp
M  +0    -14   src/prefs/koprefs.cpp
M  +0    -5    src/prefs/koprefs.h
M  +0    -24   src/prefs/koprefsdialog.cpp
D  +0    -196  src/settings/htmlexportsettings.kcfg
D  +0    -15   src/settings/htmlexportsettings.kcfgc
M  +0    -16   src/settings/korganizer.kcfg

https://commits.kde.org/korganizer/c96f79da39150d758437205ddb0dcf83b0c71f3a

diff --git a/doc/index.docbook b/doc/index.docbook
index a4df1961..c8a98339 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -134,7 +134,7 @@ you keep your schedule.</para>
 
 <para>But &korganizer; is not only about your personal calendar, it can
 help you to interact with your colleagues and friends too. With &korganizer;,
-you can publish a calendar as a web page, invite anyone with an email address
+you can invite anyone with an email address
 to an event and process responses, share a calendar (using a groupware
 server or simply a file over the network), and share events (&eg;
 the schedule of a championship or a conference), using the get hot new stuff
@@ -361,10 +361,9 @@ import the data (merge) into an existing resource and open 
the file in a new
 window too. Importing files in the format used by the old
 <application>ical</application> application is also supported.</para>
 
-<para>You can export your data as a web page, as an iCalendar or
+<para>You can export your data as an iCalendar or
 vCalendar file. These files are supported by most scheduling applications.
-The web page can be used to publish your calendar and to-do list on the
-web or on the local network.</para>
+</para>
 
 <para>In this chapter, we will explain how to manage your calendar, using the
 resources, import and export actions and the get hot new stuff scheme.</para>
@@ -530,10 +529,9 @@ store.kde.org KOrganizer Calendars-->
 <sect2 id="managing-export">
 <title>Exporting Calendars</title>
 
-<para>You can export your data as a web page, or as an iCalendar or
+<para>You can export your data as an iCalendar or
 vCalendar file, which are supported by most scheduling applications.
-The web page can be used to publish your calendar and to-do list on the
-web or on the local network. Either way, &korganizer; will export all calendar
+Either way, &korganizer; will export all calendar
 items from the enabled (checked) resources which are
 <link linkend="filters-view">not filtered out</link> (let's call these items
 <quote>active</quote> items). In other words, if you cannot see a calendar
@@ -556,42 +554,6 @@ data as a new vCalendar file choose the 
<menuchoice><guimenu>File</guimenu>
 Enter the file name and location for the new file to complete the export
 action.</para>
 
-<para>You can export your calendar or a part of it as an &HTML;
-file, suitable for publishing on the web. Anyone with access to this file,
-using a web browser, will be able to view it. This is an easy way to share
-calendar information with your colleagues and friends.</para>
-
-<!--TODO: use case: export your friends birthdays?-->
-
-<procedure id="procedure-export-html">
-<step><para>Disable all the resources you do not want to export, and filter out
-the items you do not want to export.</para></step>
-<step><para>Choose the <menuchoice><guimenu>File</guimenu>
-<guisubmenu>Export</guisubmenu><guimenuitem>Export Web Page...</guimenuitem>
-</menuchoice> menu item. You will get a window with three tabs:
-<guilabel>General</guilabel>,  <guilabel>Events</guilabel>, and
-<guilabel>To-dos</guilabel>.</para></step>
-<step><para><guilabel>General</guilabel> tab:</para>
-<substeps>
-<step><para>Specify the date range that you want published. Enter dates
-manually or use the Calendar Widget.</para></step>
-<step><para>If you want to export to-dos, check the <guilabel>Export
-to-do list</guilabel> box.</para></step>
-<step><para>If you want to export the items displayed in the Month view, check 
the
-<guilabel>Export in month view</guilabel> box.</para></step>
-<step><para>If you want to export events formatted as a list of events, check 
the
-<guilabel>Export events as list</guilabel> box.</para></step>
-<step><para>Specify the web output file in the <guilabel>Output 
filename</guilabel>
-field. If you want to set another location, press the <inlinemediaobject>
-<imageobject><imagedata fileref="document-open.png" 
format="PNG"/></imageobject><!--wrong png-->
-</inlinemediaobject><guibutton>Open file dialog</guibutton> button to find 
it.</para></step>
-</substeps></step>
-<step><para><guilabel>Events</guilabel> tab: specify if you want to include
-categories and attendees in the exported web page.</para></step>
-<step><para><guilabel>To-dos</guilabel> tab: specify if you want to list Due
-Dates, Categories, and Attendees.</para></step>
-</procedure>
-
 </sect2>
 
 <sect2 id="managing-purge-archive">
@@ -2088,13 +2050,6 @@ the email excluding attachments or only a link to the 
email.</para>
 <variablelist>
 
 <varlistentry>
-<term><guilabel>Export to &HTML; periodically</guilabel></term>
-<listitem><para>By checking this option, you can order &korganizer; to export
-your calendar and to-do list to an &HTML; file in your home folder at an 
interval
-which defaults to 10 minutes.</para></listitem>
-</varlistentry>
-
-<varlistentry>
 <term><guilabel>Confirm deletes</guilabel></term>
 <listitem><para>When you check <guilabel>Confirm deletes</guilabel> box,
  &korganizer;
@@ -2928,18 +2883,6 @@ added to your calendar.</para>
 </listitem>
 </varlistentry>
 
-<varlistentry id="menu-file-export-as-web">
-<term><menuchoice>
-<guimenu>File</guimenu>
-<guisubmenu>Export</guisubmenu>
-<guimenuitem>Export Web Page...</guimenuitem>
-</menuchoice></term>
-<listitem><para><action>You can export your calendar or a part of it as a 
&HTML;
-file, suitable for publishing on the World Wide Web.</action></para>
-<para>For more information about this action, please refer to
-<xref linkend="managing-export" />.</para></listitem>
-</varlistentry>
-
 <varlistentry id="menu-file-export-icalendar">
 <term><menuchoice>
 <guimenu>File</guimenu>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5047d9c1..0ea32428 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -165,9 +165,7 @@ set(korganizerprivate_LIB_SRCS
     datechecker.cpp
     datenavigator.cpp
     datenavigatorcontainer.cpp
-    dialog/exportwebdialog.cpp
     dialog/filtereditdialog.cpp
-    job/htmlexportjob.cpp
     widgets/kdatenavigator.cpp
     kocheckableproxymodel.cpp
     kocorehelper.cpp
@@ -196,8 +194,6 @@ set(korganizerprivate_LIB_SRCS
     views/whatsnextview/kowhatsnextview.cpp
     )
 
-kconfig_add_kcfg_files(korganizerprivate_LIB_SRCS 
settings/htmlexportsettings.kcfgc)
-
 ki18n_wrap_ui(korganizerprivate_LIB_SRCS
     ui/filteredit_base.ui
     ui/kogroupwareprefspage.ui
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 9826b7a0..2db4d22a 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -32,8 +32,6 @@
 #include "akonadicollectionview.h"
 #include "calendaradaptor.h"
 #include "calendarview.h"
-#include "job/htmlexportjob.h"
-#include "htmlexportsettings.h"
 #include "kocore.h"
 #include "kodialogmanager.h"
 #include "korganizeradaptor.h"
@@ -113,7 +111,6 @@ ActionManager::ActionManager(KXMLGUIClient *client, 
CalendarView *widget,
     mCalendarView = widget;
     mIsPart = isPart;
     mTempFile = nullptr;
-    mHtmlExportSync = false;
     mMainWindow = mainWindow;
     mMenuBar = menuBar;
 }
@@ -168,14 +165,6 @@ void ActionManager::init()
     // initialize the QAction instances
     initActions();
 
-    // set up autoExporting stuff
-    mAutoExportTimer = new QTimer(this);
-    connect(mAutoExportTimer, &QTimer::timeout, this, 
&ActionManager::checkAutoExport);
-    if (KOPrefs::instance()->mAutoExport &&
-            KOPrefs::instance()->mAutoExportInterval > 0) {
-        mAutoExportTimer->start(1000 * 60 * 
KOPrefs::instance()->mAutoExportInterval);
-    }
-
     // set up autoSaving stuff
     mAutoArchiveTimer = new QTimer(this);
     mAutoArchiveTimer->setSingleShot(true);
@@ -193,8 +182,6 @@ void ActionManager::init()
 
     connect(mCalendarView, &CalendarView::incidenceSelected,
             this, &ActionManager::processIncidenceSelection);
-    connect(mCalendarView, SIGNAL(exportHTML(KOrg::HTMLExportSettings*)),
-            this, SLOT(exportHTML(KOrg::HTMLExportSettings*)));
 
     processIncidenceSelection(Akonadi::Item(), QDate());
 
@@ -293,10 +280,6 @@ void ActionManager::initActions()
     mACollection->addAction(QStringLiteral("downloadnewstuff"), action);
     connect(action, &QAction::triggered, this, 
&ActionManager::downloadNewStuff);
 
-    action = new QAction(i18n("Export &Web Page..."), this);
-    mACollection->addAction(QStringLiteral("export_web"), action);
-    connect(action, &QAction::triggered, mCalendarView, 
&CalendarView::exportWeb);
-
     action = new QAction(i18n("Export as &iCalendar..."), this);
     mACollection->addAction(QStringLiteral("export_icalendar"), action);
     connect(action, &QAction::triggered, mCalendarView, 
&CalendarView::exportICalendar);
@@ -993,91 +976,6 @@ bool ActionManager::saveURL()
     return true;
 }
 
-void ActionManager::exportHTML()
-{
-    HTMLExportSettings *settings = new 
HTMLExportSettings(QStringLiteral("KOrganizer"));
-    mSettingsToFree.insert(settings);
-    // Manually read in the config, because parametrized kconfigxt objects 
don't
-    // seem to load the config theirselves
-    settings->load();
-
-    const QDate qd1 = QDate::currentDate();
-    QDate qd2 = qd1;
-
-    if (settings->monthView()) {
-        qd2 = qd2.addMonths(1);
-    } else {
-        qd2 = qd2.addDays(7);
-    }
-    settings->setDateStart(QDateTime(qd1));
-    settings->setDateEnd(QDateTime(qd2));
-
-    exportHTML(settings, true/*autoMode*/);
-}
-
-void ActionManager::exportHTML(KOrg::HTMLExportSettings *settings, bool 
autoMode)
-{
-    if (!settings) {
-        qCWarning(KORGANIZER_LOG) << "Settings is null" << settings;
-        return;
-    }
-
-    if (settings->outputFile().isEmpty()) {
-        int result = KMessageBox::questionYesNo(
-                         dialogParent(),
-                         i18n("The HTML calendar export file has not been 
specified yet.\n"
-                              "Do you want to set it now?\n\n"
-                              "If you answer \"no\" then this export operation 
will be canceled"),
-                         QString());
-        if (result == KMessageBox::No) {
-            mMainWindow->showStatusMessage(
-                i18nc("@info:status",
-                      "Calendar HTML operation canceled due to unspecified 
output file name"));
-            return;
-        }
-
-        const QString fileName =
-            QFileDialog::getSaveFileName(dialogParent(), i18n("Select path for 
HTML calendar export"),
-                                         
QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation),
-                                         i18n("HTML Files (*.html)"));
-        settings->setOutputFile(fileName);
-        settings->save();
-    }
-
-    if (!autoMode && QFileInfo(settings->outputFile()).exists()) {
-        if (KMessageBox::warningContinueCancel(
-                    dialogParent(),
-                    i18n("Do you want to overwrite file \"%1\"?",
-                         settings->outputFile()),
-                    QString(),
-                    KStandardGuiItem::overwrite()) == KMessageBox::Cancel) {
-            mMainWindow->showStatusMessage(
-                i18nc("@info:status",
-                      "Calendar HTML operation canceled due to output file 
overwrite"));
-            return;
-        }
-    }
-
-    settings->setEMail(CalendarSupport::KCalPrefs::instance()->email());
-    settings->setName(CalendarSupport::KCalPrefs::instance()->fullName());
-
-    settings->setCreditName(QStringLiteral("KOrganizer"));
-    settings->setCreditURL(QStringLiteral("http://korganizer.kde.org";));
-
-    KOrg::HtmlExportJob *exportJob = new KOrg::HtmlExportJob(calendar(), 
settings, autoMode, mMainWindow, view());
-
-    if (KOGlobals::self()->holidays()) {
-        const KHolidays::Holiday::List holidays = 
KOGlobals::self()->holidays()->holidays(
-                                                settings->dateStart().date(), 
settings->dateEnd().date());
-        for (const KHolidays::Holiday &holiday : holidays) {
-            exportJob->addHoliday(holiday.observedStartDate(), holiday.name());
-        }
-    }
-
-    connect(exportJob, &KOrg::HtmlExportJob::result, this, 
&ActionManager::handleExportJobResult);
-    exportJob->start();
-}
-
 bool ActionManager::saveAsURL(const QUrl &url)
 {
     qCDebug(KORGANIZER_LOG) << url.toDisplayString();
@@ -1890,19 +1788,6 @@ QWidget *ActionManager::dialogParent()
     return mCalendarView->topLevelWidget();
 }
 
-void ActionManager::checkAutoExport()
-{
-    // Don't save if auto save interval is zero
-    if (KOPrefs::instance()->mAutoExportInterval == 0) {
-        return;
-    }
-
-    // has this calendar been saved before? If yes automatically save it.
-    if (KOPrefs::instance()->mAutoExport) {
-        exportHTML();
-    }
-}
-
 void ActionManager::openTodoEditor(const QString &summary,
                                    const QString &description,
                                    const QStringList &attachmentUris,
@@ -1935,17 +1820,6 @@ void ActionManager::openEventEditor(const QString 
&summary,
     qCWarning(KORGANIZER_LOG) << "Not implemented in korg-desktop";
 }
 
-void ActionManager::handleExportJobResult(KJob *job)
-{
-    HtmlExportJob *htmlExportJob = qobject_cast<HtmlExportJob *>(job);
-    Q_ASSERT(htmlExportJob);
-
-    if (mSettingsToFree.contains(htmlExportJob->settings())) {
-        mSettingsToFree.remove(htmlExportJob->settings());
-        delete htmlExportJob->settings();
-    }
-}
-
 void ActionManager::setHelpText(QAction *act, const QString &text)
 {
     act->setStatusTip(text);
diff --git a/src/actionmanager.h b/src/actionmanager.h
index 632effc8..8dd29d06 100644
--- a/src/actionmanager.h
+++ b/src/actionmanager.h
@@ -43,10 +43,6 @@
 class AkonadiCollectionView;
 class CalendarView;
 class KOWindowList;
-namespace KOrg
-{
-class HTMLExportSettings;
-}
 
 namespace Akonadi
 {
@@ -96,19 +92,6 @@ public Q_SLOTS:
     /** Save calendar file to URL */
     bool saveAsURL(const QUrl &QUrl);
 
-    /**
-      Export the calendar to an HTML file. Reads up the user settings as 
needed.
-      Intended to be used as part of the auto HTML export feature.
-    */
-    void exportHTML();
-
-    /**
-      Export the calendar to an HTML file, per the user settings.
-      @param settings is a pointer to an KOrg::HTMLExportSettings instance.
-      @param autoMode if true, indicates that this export is for an autosave;
-                      if false, then the export is explicitly user invoked.
-    */
-    void exportHTML(KOrg::HTMLExportSettings *settings, bool autoMode = false);
     void toggleMenubar(bool dontShowWarning = false);
 
 public:
@@ -270,9 +253,6 @@ public Q_SLOTS:
 protected Q_SLOTS:
     void setItems(const QStringList &, int);
 
-    /** called by the autoExportTimer to automatically export the calendar */
-    void checkAutoExport();
-
     /** open new window */
     //void file_new();
 
@@ -324,7 +304,6 @@ protected:
     QWidget *dialogParent();
 
 private Q_SLOTS:
-    void handleExportJobResult(KJob *);
     void dumpText(const QString &);    // only for debugging purposes
 
     void slotDefaultResourceChanged(const Akonadi::Collection &);
@@ -405,12 +384,10 @@ private:
     CalendarView *mCalendarView;
     KOrg::MainWindow *mMainWindow;
     bool mIsPart;
-    bool mHtmlExportSync;
 
     AkonadiCollectionView *mCollectionView;
     KViewStateMaintainer<Akonadi::ETMViewStateSaver> 
*mCollectionViewStateSaver;
     KViewStateMaintainer<Akonadi::ETMViewStateSaver> 
*mCollectionSelectionModelStateSaver;
-    QSet<KOrg::HTMLExportSettings *> mSettingsToFree;
 };
 
 #endif
diff --git a/src/calendarview.cpp b/src/calendarview.cpp
index 3beb21ff..92914b00 100644
--- a/src/calendarview.cpp
+++ b/src/calendarview.cpp
@@ -33,7 +33,6 @@
 #include "datechecker.h"
 #include "datenavigator.h"
 #include "datenavigatorcontainer.h"
-#include "dialog/exportwebdialog.h"
 #include "kocorehelper.h"
 #include "kodaymatrix.h"
 #include "kodialogmanager.h"
@@ -42,7 +41,6 @@
 #include "kohelper.h"
 #include "prefs/koprefs.h"
 #include "koviewmanager.h"
-#include "htmlexportsettings.h"
 #include "widgets/navigatorbar.h"
 #include "views/agendaview/koagendaview.h"
 #include "views/monthview/monthview.h"
@@ -1818,19 +1816,6 @@ void CalendarView::printPreview()
                        selectedIncidences, true);
 }
 
-void CalendarView::exportWeb()
-{
-    KOrg::HTMLExportSettings *settings = new 
KOrg::HTMLExportSettings(QStringLiteral("KOrganizer"));
-    Q_ASSERT(settings);
-    // Manually read in the config, because parameterized kconfigxt objects 
don't
-    // seem to load the config theirselves
-    settings->load();
-    ExportWebDialog *dlg = new ExportWebDialog(settings, this);
-    connect(dlg, &ExportWebDialog::exportHTML,
-            this, &CalendarView::exportHTML);
-    dlg->show();
-}
-
 void CalendarView::exportICalendar()
 {
     QString filename =
diff --git a/src/calendarview.h b/src/calendarview.h
index 36769dda..b8d203b6 100644
--- a/src/calendarview.h
+++ b/src/calendarview.h
@@ -49,10 +49,6 @@ class KOViewManager;
 class NavigatorBar;
 class KOCheckableProxyModel;
 class AkonadiCollectionView;
-namespace KOrg
-{
-class HTMLExportSettings;
-}
 
 namespace CalendarSupport
 {
@@ -263,7 +259,6 @@ Q_SIGNALS:
     void autoArchivingSettingsModified();
 
     void newIncidenceChanger(Akonadi::IncidenceChanger *) Q_DECL_OVERRIDE;
-    void exportHTML(KOrg::HTMLExportSettings *);
 
     void filtersUpdated(const QStringList &, int);
     void filterChanged();
@@ -490,9 +485,6 @@ public Q_SLOTS:
     void print();
     void printPreview();
 
-    /** Export as HTML file */
-    void exportWeb();
-
     /** Export as iCalendar file */
     void exportICalendar();
 
diff --git a/src/data/korganizer_part.rc b/src/data/korganizer_part.rc
index 1e85be7a..9059f2c3 100644
--- a/src/data/korganizer_part.rc
+++ b/src/data/korganizer_part.rc
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui>
-<kpartgui name="korganizer" version="427" translationDomain="korganizer">
+<kpartgui name="korganizer" version="428" translationDomain="korganizer">
   <MenuBar>
     <Menu name="file"><text>&amp;File</text>
       <Merge/>
@@ -16,7 +16,6 @@
         <Action name="downloadnewstuff"/>
       </Menu>
       <Menu name="export"><text>&amp;Export</text>
-        <Action name="export_web" />
         <Action name="export_icalendar"/>
         <Action name="export_vcalendar"/>
         <Merge/>
diff --git a/src/data/korganizerui.rc b/src/data/korganizerui.rc
index 7c89a9f7..c630b159 100644
--- a/src/data/korganizerui.rc
+++ b/src/data/korganizerui.rc
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui>
-<kpartgui name="korganizer" version="429"  translationDomain="korganizer">
+<kpartgui name="korganizer" version="430"  translationDomain="korganizer">
   <MenuBar>
     <Menu name="file"><text>&amp;File</text>
       <Menu name="import"><text>&amp;Import</text>
@@ -10,7 +10,6 @@
         <Action name="downloadnewstuff"/>
       </Menu>
       <Menu name="export"><text>&amp;Export</text>
-        <Action name="export_web" />
         <Action name="export_icalendar"/>
         <Action name="export_vcalendar"/>
         <Merge/>
diff --git a/src/dialog/exportwebdialog.cpp b/src/dialog/exportwebdialog.cpp
deleted file mode 100644
index 1b416426..00000000
--- a/src/dialog/exportwebdialog.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
-  This file is part of KOrganizer.
-
-  Copyright (c) 2001 Cornelius Schumacher <[email protected]>
-  Copyright (C) 2004 Reinhold Kainhofer <[email protected]>
-
-  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; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-  As a special exception, permission is given to link this program
-  with any edition of Qt, and distribute the resulting executable,
-  without including the source code for Qt in the source distribution.
-*/
-
-#include "exportwebdialog.h"
-#include "htmlexportsettings.h"
-
-#include <KDateComboBox>
-#include <QFileDialog>
-#include <QHBoxLayout>
-#include <KMessageBox>
-#include <KUrlRequester>
-#include <QVBoxLayout>
-#include <KLocalizedString>
-#include "korganizer_debug.h"
-
-#include <QBoxLayout>
-#include <QCheckBox>
-#include <QGroupBox>
-#include <QLabel>
-
-// FIXME: The basic structure of this dialog has been copied from KPrefsDialog,
-//        because we want custom buttons, a Tabbed dialog, and a different
-//        headline... Maybe we should try to achieve the same without code
-//        duplication.
-ExportWebDialog::ExportWebDialog(KOrg::HTMLExportSettings *settings, QWidget 
*parent)
-    : KPageDialog(parent), KPIM::KPrefsWidManager(settings), 
mSettings(settings)
-{
-    setAttribute(Qt::WA_DeleteOnClose);
-    setFaceType(Tabbed);
-    setWindowTitle(i18n("Export Calendar as Web Page"));
-    setStandardButtons(QDialogButtonBox::Cancel | 
QDialogButtonBox::RestoreDefaults);
-    setModal(false);
-    mExportButton = new QPushButton(i18n("Export"));
-    mExportButton->setDefault(true);
-    addActionButton(mExportButton);
-
-    setupGeneralPage();
-    setupEventPage();
-    setupTodoPage();
-
-    connect(mExportButton, &QPushButton::clicked, this, 
&ExportWebDialog::slotOk);
-    connect(button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, 
&ExportWebDialog::reject);
-    connect(button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, 
this, &ExportWebDialog::slotDefault);
-    readConfig();
-    updateState();
-}
-
-ExportWebDialog::~ExportWebDialog()
-{
-}
-
-void ExportWebDialog::setDefaults()
-{
-    setWidDefaults();
-}
-
-void ExportWebDialog::readConfig()
-{
-    readWidConfig();
-    usrReadConfig();
-}
-
-void ExportWebDialog::writeConfig()
-{
-    writeWidConfig();
-    usrWriteConfig();
-    readConfig();
-}
-
-void ExportWebDialog::slotApply()
-{
-    writeConfig();
-    Q_EMIT configChanged();
-}
-
-void ExportWebDialog::slotOk()
-{
-    slotApply();
-    Q_EMIT exportHTML(mSettings);
-    accept();
-}
-
-void ExportWebDialog::slotDefault()
-{
-    if (KMessageBox::warningContinueCancel(
-                this,
-                i18n("You are about to set all preferences to default values. "
-                     "All custom modifications will be lost."),
-                i18n("Setting Default Preferences"),
-                KGuiItem(i18n("Reset to Defaults"))) == KMessageBox::Continue) 
{
-        setDefaults();
-    }
-}
-
-void ExportWebDialog::setupGeneralPage()
-{
-    mGeneralPage = new QFrame(this);
-    addPage(mGeneralPage, i18nc("general settings for html export", 
"General"));
-    QVBoxLayout *topLayout = new QVBoxLayout(mGeneralPage);
-    topLayout->setSpacing(10);
-
-    mDateRangeGroup = new QGroupBox(i18n("Date Range"), mGeneralPage);
-    topLayout->addWidget(mDateRangeGroup);
-
-    QHBoxLayout *rangeLayout = new QHBoxLayout(mDateRangeGroup);
-
-    KPIM::KPrefsWidDate *dateStart = addWidDate(mSettings->dateStartItem());
-    rangeLayout->addWidget(dateStart->label());
-    rangeLayout->addWidget(dateStart->dateEdit());
-    KPIM::KPrefsWidDate *dateEnd = addWidDate(mSettings->dateEndItem());
-    rangeLayout->addWidget(dateEnd->label());
-    rangeLayout->addWidget(dateEnd->dateEdit());
-
-    QGroupBox *typeGroup = new QGroupBox(i18n("View Type"), mGeneralPage);
-    topLayout->addWidget(typeGroup);
-
-    QBoxLayout *typeLayout = new QVBoxLayout(typeGroup);
-
-    mMonthViewCheckBox = addWidBool(mSettings->monthViewItem())->checkBox();
-    connect(mMonthViewCheckBox, &QCheckBox::stateChanged, this, 
&ExportWebDialog::updateState);
-    typeLayout->addWidget(mMonthViewCheckBox);
-
-    mEventListCheckBox = addWidBool(mSettings->eventViewItem())->checkBox();
-    connect(mEventListCheckBox, &QCheckBox::stateChanged, this, 
&ExportWebDialog::updateState);
-    typeLayout->addWidget(mEventListCheckBox);
-
-    typeLayout->addWidget(addWidBool(mSettings->todoViewItem())->checkBox());
-    typeLayout->addWidget(
-        addWidBool(mSettings->excludePrivateItem())->checkBox());
-    typeLayout->addWidget(
-        addWidBool(mSettings->excludeConfidentialItem())->checkBox());
-
-    QGroupBox *destGroup = new QGroupBox(i18n("Destination"), mGeneralPage);
-    topLayout->addWidget(destGroup);
-
-    QBoxLayout *destLayout = new QHBoxLayout(destGroup);
-
-    KPIM::KPrefsWidPath *pathWid = addWidPath(mSettings->outputFileItem(),
-                                   destGroup, QStringLiteral("text/html"), 
KFile::File);
-    connect(pathWid->urlRequester(), &KUrlRequester::textChanged,
-            this, &ExportWebDialog::slotTextChanged);
-    destLayout->addWidget(pathWid->label());
-    destLayout->addWidget(pathWid->urlRequester());
-
-    topLayout->addStretch(1);
-}
-
-void ExportWebDialog::slotTextChanged(const QString &_text)
-{
-    mExportButton->setEnabled(!_text.trimmed().isEmpty());
-}
-
-void ExportWebDialog::setupTodoPage()
-{
-    mTodoPage = new QFrame(this);
-    addPage(mTodoPage, i18n("To-dos"));
-    QVBoxLayout *topLayout = new QVBoxLayout(mTodoPage);
-    topLayout->setSpacing(10);
-
-    QWidget *hbox = new QWidget(mTodoPage);
-    QHBoxLayout *hboxHBoxLayout = new QHBoxLayout(hbox);
-    hboxHBoxLayout->setMargin(0);
-    topLayout->addWidget(hbox);
-    KPIM::KPrefsWidString *s = addWidString(mSettings->todoListTitleItem(), 
hbox);
-    hboxHBoxLayout->addWidget(s->label());
-    hboxHBoxLayout->addWidget(s->lineEdit());
-
-    QWidget *vbox = new QWidget(mTodoPage);
-    QVBoxLayout *vboxVBoxLayout = new QVBoxLayout(vbox);
-    vboxVBoxLayout->setMargin(0);
-    topLayout->addWidget(vbox);
-    KPIM::KPrefsWidBool *boolWid = addWidBool(mSettings->taskDueDateItem(), 
vbox);
-    vboxVBoxLayout->addWidget(boolWid->checkBox());
-    boolWid = addWidBool(mSettings->taskLocationItem(), vbox);
-    vboxVBoxLayout->addWidget(boolWid->checkBox());
-    boolWid = addWidBool(mSettings->taskCategoriesItem(), vbox);
-    vboxVBoxLayout->addWidget(boolWid->checkBox());
-    boolWid = addWidBool(mSettings->taskAttendeesItem(), vbox);
-    vboxVBoxLayout->addWidget(boolWid->checkBox());
-//  addWidBool( mSettings->taskExcludePrivateItem(), vbox );
-//  addWidBool( mSettings->taskExcludeConfidentialItem(), vbox );
-
-    topLayout->addStretch(1);
-}
-
-void ExportWebDialog::setupEventPage()
-{
-    mEventPage = new QFrame(this);
-    addPage(mEventPage, i18n("Events"));
-    QVBoxLayout *topLayout = new QVBoxLayout(mEventPage);
-    topLayout->setSpacing(10);
-
-    QWidget *hbox = new QWidget(mEventPage);
-    QHBoxLayout *hboxHBoxLayout = new QHBoxLayout(hbox);
-    hboxHBoxLayout->setMargin(0);
-    topLayout->addWidget(hbox);
-    KPIM::KPrefsWidString *s = addWidString(mSettings->eventTitleItem(), hbox);
-    hboxHBoxLayout->addWidget(s->label());
-    hboxHBoxLayout->addWidget(s->lineEdit());
-
-    QWidget *vbox = new QWidget(mEventPage);
-    QVBoxLayout *vboxVBoxLayout = new QVBoxLayout(vbox);
-    vboxVBoxLayout->setMargin(0);
-    topLayout->addWidget(vbox);
-    KPIM::KPrefsWidBool *boolWid = addWidBool(mSettings->eventLocationItem(), 
vbox);
-    vboxVBoxLayout->addWidget(boolWid->checkBox());
-    boolWid = addWidBool(mSettings->eventCategoriesItem(), vbox);
-    vboxVBoxLayout->addWidget(boolWid->checkBox());
-    boolWid = addWidBool(mSettings->eventAttendeesItem(), vbox);
-    vboxVBoxLayout->addWidget(boolWid->checkBox());
-//  addWidBool( mSettings->eventExcludePrivateItem(), vbox );
-//  addWidBool( mSettings->eventExcludeConfidentialItem(), vbox );
-
-    topLayout->addStretch(1);
-}
-
-void ExportWebDialog::updateState()
-{
-    const bool exportEvents = mMonthViewCheckBox->isChecked() ||
-                              mEventListCheckBox->isChecked();
-    mDateRangeGroup->setEnabled(exportEvents);
-    mEventPage->setEnabled(exportEvents);
-}
-
diff --git a/src/dialog/exportwebdialog.h b/src/dialog/exportwebdialog.h
deleted file mode 100644
index f2cfe251..00000000
--- a/src/dialog/exportwebdialog.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-  This file is part of KOrganizer.
-
-  Copyright (c) 2001 Cornelius Schumacher <[email protected]>
-  Copyright (C) 2004 Reinhold Kainhofer <[email protected]>
-
-  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; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-  As a special exception, permission is given to link this program
-  with any edition of Qt, and distribute the resulting executable,
-  without including the source code for Qt in the source distribution.
-*/
-#ifndef KORG_EXPORTWEBDIALOG_H
-#define KORG_EXPORTWEBDIALOG_H
-
-#include <Libkdepim/KPrefsDialog>
-class QPushButton;
-namespace KOrg
-{
-class HTMLExportSettings;
-}
-
-/**
-  ExportWebDialog is a class that provides the dialog and functions to export a
-  calendar as web page.
-*/
-class ExportWebDialog : public KPageDialog, public KPIM::KPrefsWidManager
-{
-    Q_OBJECT
-public:
-    explicit ExportWebDialog(KOrg::HTMLExportSettings *settings, QWidget 
*parent = nullptr);
-    virtual ~ExportWebDialog();
-
-public Q_SLOTS:
-    void slotTextChanged(const QString &_text);
-
-protected:
-    void setupGeneralPage();
-    void setupEventPage();
-    void setupTodoPage();
-
-public Q_SLOTS:
-    void setDefaults();
-    void readConfig();
-    void writeConfig();
-
-Q_SIGNALS:
-    void configChanged();
-    void exportHTML(KOrg::HTMLExportSettings *);
-
-protected Q_SLOTS:
-    void slotOk();
-    void slotApply();
-    void slotDefault();
-
-protected:
-    virtual void usrReadConfig() {}
-    virtual void usrWriteConfig() {}
-
-private Q_SLOTS:
-    void updateState();
-
-private:
-    KOrg::HTMLExportSettings *mSettings;
-    QFrame *mGeneralPage;
-    QFrame *mEventPage;
-    QFrame *mTodoPage;
-    QGroupBox *mDateRangeGroup;
-    QCheckBox *mMonthViewCheckBox;
-    QCheckBox *mEventListCheckBox;
-    QPushButton *mExportButton;
-};
-
-#endif // _EXPORTWEBDIALOG_H
diff --git a/src/job/htmlexportjob.cpp b/src/job/htmlexportjob.cpp
deleted file mode 100644
index 44129f02..00000000
--- a/src/job/htmlexportjob.cpp
+++ /dev/null
@@ -1,924 +0,0 @@
-/*
-  This file is part of the kcal library.
-
-  Copyright (c) 2000,2001 Cornelius Schumacher <[email protected]>
-  Copyright (C) 2004 Reinhold Kainhofer <[email protected]>
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-
-  This library 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
-  Library General Public License for more details.
-
-  You should have received a copy of the GNU Library General Public License
-  along with this library; see the file COPYING.LIB.  If not, write to
-  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  Boston, MA 02110-1301, USA.
-*/
-
-#include "htmlexportjob.h"
-#include "htmlexportsettings.h"
-#include "mainwindow.h"
-
-#include <CalendarSupport/Utils>
-
-#include <Akonadi/Contact/ContactSearchJob>
-
-#include <KCalCore/Attendee>
-
-#include <KCalUtils/IncidenceFormatter>
-
-#include "korganizer_debug.h"
-#include <KLocalizedString>
-#include <KMessageBox>
-#include <KIO/FileCopyJob>
-#include <KJobWidgets>
-
-#include <QTemporaryFile>
-#include <QApplication>
-#include <QFile>
-#include <QTextStream>
-#include <QLocale>
-#include <QDesktopServices>
-
-using namespace KOrg;
-
-static QString cleanChars(const QString &txt);
-
-//@cond PRIVATE
-class KOrg::HtmlExportJob::Private
-{
-public:
-    Private(const Akonadi::ETMCalendar::Ptr &calendar,
-            KOrg::HTMLExportSettings *settings, bool autoMode,
-            KOrg::MainWindow *mainWindow, QWidget *parent)
-        : mCalendar(calendar),
-          mSettings(settings),
-          mAutoMode(autoMode),
-          mMainWindow(mainWindow),
-          mParentWidget(parent),
-          mSubJobCount(0)
-    {}
-
-    Akonadi::ETMCalendar::Ptr mCalendar;
-    KOrg::HTMLExportSettings *mSettings;
-    bool mAutoMode;
-    KOrg::MainWindow *mMainWindow;
-    QWidget *mParentWidget;
-    QMap<QDate, QString> mHolidayMap;
-    qulonglong mSubJobCount;
-    QMap<QString, KContacts::Addressee> mOrganizersMap;
-};
-//@endcond
-
-HtmlExportJob::HtmlExportJob(const Akonadi::ETMCalendar::Ptr &calendar,
-                             KOrg::HTMLExportSettings *settings, bool autoMode,
-                             KOrg::MainWindow *mainWindow, QWidget *parent)
-    : KJob(parent), d(new Private(calendar, settings, autoMode, mainWindow, 
parent))
-{
-}
-
-HtmlExportJob::~HtmlExportJob()
-{
-    //qCDebug(KORGANIZER_LOG)<<"HtmlExportJob::~HtmlExportJob()";
-    delete d;
-}
-
-void HtmlExportJob::start()
-{
-    bool canExportItem = false;
-    // first collect the email addresses of all organisators
-    const KCalCore::Event::List events = d->mCalendar->events();
-    for (const KCalCore::Event::Ptr &event : events) {
-        Q_ASSERT(event);
-        const KCalCore::Attendee::List attendees = event->attendees();
-        if (!attendees.isEmpty()) {
-            Akonadi::ContactSearchJob *job = new 
Akonadi::ContactSearchJob(this);
-            job->setQuery(Akonadi::ContactSearchJob::Email, 
event->organizer()->email());
-            job->setProperty("incidenceUid", event->uid());
-            connect(job, &Akonadi::ContactSearchJob::result, this, 
&HtmlExportJob::receivedOrganizerInfo);
-            job->start();
-
-            d->mSubJobCount++;
-            canExportItem = true;
-        }
-    }
-
-    const KCalCore::Todo::List todos = d->mCalendar->todos();
-    for (const KCalCore::Todo::Ptr &todo : todos) {
-        Q_ASSERT(todo);
-        const KCalCore::Attendee::List attendees = todo->attendees();
-        if (!attendees.isEmpty()) {
-            Akonadi::ContactSearchJob *job = new 
Akonadi::ContactSearchJob(this);
-            job->setQuery(Akonadi::ContactSearchJob::Email, 
todo->organizer()->email());
-            job->setProperty("incidenceUid", todo->uid());
-            connect(job, &Akonadi::ContactSearchJob::result, this, 
&HtmlExportJob::receivedOrganizerInfo);
-            job->start();
-
-            d->mSubJobCount++;
-            canExportItem = true;
-        }
-    }
-    if (!canExportItem) {
-        finishExport();
-    }
-}
-
-void HtmlExportJob::receivedOrganizerInfo(KJob *job)
-{
-    d->mSubJobCount--;
-
-    if (!job->error()) {
-        Akonadi::ContactSearchJob *searchJob = 
qobject_cast<Akonadi::ContactSearchJob *>(job);
-        const KContacts::Addressee::List contacts = searchJob->contacts();
-        if (!contacts.isEmpty()) {
-            d->mOrganizersMap.insert(
-                searchJob->property("incidenceUid").toString(), 
contacts.first());
-        }
-    }
-    if (d->mSubJobCount == 0) {
-        finishExport();
-    }
-}
-
-void HtmlExportJob::finishExport()
-{
-    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-
-    bool saveStatus;
-    QString errorMessage;
-    Q_ASSERT(d->mSettings);
-    QUrl dest(QUrl::fromLocalFile(d->mSettings->outputFile()));
-    if (dest.isLocalFile()) {
-        saveStatus = save(dest.toLocalFile());
-        errorMessage = i18n("Unable to write the output file.");
-    } else {
-        QTemporaryFile tf;
-        tf.open();
-        QString tfile = tf.fileName();
-        saveStatus = save(tfile);
-        errorMessage = i18n("Unable to write the temporary file for 
uploading.");
-        auto job = KIO::file_copy(QUrl::fromLocalFile(tfile), dest);
-        KJobWidgets::setWindow(job, d->mParentWidget);
-        if (!job->exec()) {
-            saveStatus = false;
-            errorMessage = i18n("Unable to upload the export file.");
-        }
-    }
-
-    QApplication::restoreOverrideCursor();
-
-    QString saveMessage;
-    if (saveStatus) {
-        QString urlStr;
-        if (dest.isLocalFile()) {
-            urlStr = dest.toLocalFile();
-        } else {
-            urlStr = dest.toDisplayString();
-        }
-
-        saveMessage = i18n("Web page successfully written to \"%1\". Do you 
want to show it?", urlStr);
-    } else {
-        saveMessage = i18n("Export failed. %1", errorMessage);
-    }
-
-    if (!d->mAutoMode) {
-        if (saveStatus) {
-            if (KMessageBox::Yes == KMessageBox::questionYesNo(
-                        d->mParentWidget,
-                        saveMessage,
-                        i18nc("@title:window", "Export Status"), 
KGuiItem(i18n("Show page Web")), KStandardGuiItem::no())) {
-                QDesktopServices::openUrl(dest);
-            }
-        } else {
-            KMessageBox::information(d->mParentWidget,
-                                     saveMessage,
-                                     i18nc("@title:window", "Export Status"));
-
-        }
-    } else {
-        d->mMainWindow->showStatusMessage(
-            i18nc("@info:status",
-                  "Automatic Export: %1", saveMessage));
-    }
-    emitResult();
-}
-
-bool HtmlExportJob::save(const QString &fileName)
-{
-    QString fn(fileName);
-    if (fn.isEmpty() && d->mSettings) {
-        fn = d->mSettings->outputFile();
-    }
-    if (!d->mSettings || fn.isEmpty()) {
-        return false;
-    }
-    QFile f(fileName);
-    if (!f.open(QIODevice::WriteOnly)) {
-        return false;
-    }
-    QTextStream ts(&f);
-    bool success = save(&ts);
-    f.close();
-    return success;
-}
-
-bool HtmlExportJob::save(QTextStream *ts)
-{
-    if (!d->mSettings) {
-        return false;
-    }
-    ts->setCodec("UTF-8");
-    // Write HTML header
-    *ts << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ";
-    *ts << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\";>" << 
endl;
-
-    *ts << "<html><head>" << endl;
-    *ts << "  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
-    *ts << "UTF-8\" />" << endl;
-    if (!d->mSettings->pageTitle().isEmpty()) {
-        *ts << "  <title>" << d->mSettings->pageTitle() << "</title>" << endl;
-    }
-    *ts << "  <style type=\"text/css\">" << endl;
-    *ts << styleSheet();
-    *ts << "  </style>" << endl;
-    *ts << "</head><body>" << endl;
-
-    // FIXME: Write header
-    // (Heading, Calendar-Owner, Calendar-Date, ...)
-
-    if (d->mSettings->eventView() || d->mSettings->monthView() || 
d->mSettings->weekView()) {
-        if (!d->mSettings->eventTitle().isEmpty()) {
-            *ts << "<h1>" << d->mSettings->eventTitle() << "</h1>" << endl;
-        }
-
-        // Write Week View
-        if (d->mSettings->weekView()) {
-            createWeekView(ts);
-        }
-        // Write Month View
-        if (d->mSettings->monthView()) {
-            createMonthView(ts);
-        }
-        // Write Event List
-        if (d->mSettings->eventView()) {
-            createEventList(ts);
-        }
-    }
-
-    // Write Todo List
-    if (d->mSettings->todoView()) {
-        if (!d->mSettings->todoListTitle().isEmpty()) {
-            *ts << "<h1>" << d->mSettings->todoListTitle() << "</h1>" << endl;
-        }
-        createTodoList(ts);
-    }
-
-    // Write Journals
-    if (d->mSettings->journalView()) {
-        if (!d->mSettings->journalTitle().isEmpty()) {
-            *ts << "<h1>" << d->mSettings->journalTitle() << "</h1>" << endl;
-        }
-        createJournalView(ts);
-    }
-
-    // Write Free/Busy
-    if (d->mSettings->freeBusyView()) {
-        if (!d->mSettings->freeBusyTitle().isEmpty()) {
-            *ts << "<h1>" << d->mSettings->freeBusyTitle() << "</h1>" << endl;
-        }
-        createFreeBusyView(ts);
-    }
-
-    createFooter(ts);
-
-    // Write HTML trailer
-    *ts << "</body></html>" << endl;
-
-    return true;
-}
-
-void HtmlExportJob::createMonthView(QTextStream *ts)
-{
-    QDate start = fromDate();
-    start.setYMD(start.year(), start.month(), 1);    // go back to first day 
in month
-
-    QDate end(start.year(), start.month(), start.daysInMonth());
-
-    int startmonth = start.month();
-    int startyear = start.year();
-
-    while (start < toDate()) {
-        // Write header
-        QDate hDate(start.year(), start.month(), 1);
-        QString hMon = hDate.toString(QStringLiteral("MMMM"));
-        QString hYear = hDate.toString(QStringLiteral("yyyy"));
-        *ts << "<h2>"
-            << i18nc("@title month and year", "%1 %2", hMon, hYear)
-            << "</h2>" << endl;
-        if (QLocale().firstDayOfWeek() == 1) {
-            start = start.addDays(1 - start.dayOfWeek());
-        } else {
-            if (start.dayOfWeek() != 7) {
-                start = start.addDays(-start.dayOfWeek());
-            }
-        }
-        *ts << "<table border=\"1\">" << endl;
-
-        // Write table header
-        *ts << "  <tr>";
-        for (int i = 0; i < 7; ++i) {
-            *ts << "<th>" << 
QLocale::system().dayName(start.addDays(i).dayOfWeek()) << "</th>";
-        }
-        *ts << "</tr>" << endl;
-
-        // Write days
-        while (start <= end) {
-            *ts << "  <tr>" << endl;
-            for (int i = 0; i < 7; ++i) {
-                *ts << "    <td valign=\"top\"><table border=\"0\">";
-
-                *ts << "<tr><td ";
-                if (d->mHolidayMap.contains(start) || start.dayOfWeek() == 7) {
-                    *ts << "class=\"dateholiday\"";
-                } else {
-                    *ts << "class=\"date\"";
-                }
-                *ts << ">" << QString::number(start.day());
-
-                if (d->mHolidayMap.contains(start)) {
-                    *ts << " <em>" << d->mHolidayMap[start] << "</em>";
-                }
-
-                *ts << "</td></tr><tr><td valign=\"top\">";
-
-                // Only print events within the from-to range
-                if (start >= fromDate() && start <= toDate()) {
-                    KCalCore::Event::List events = d->mCalendar->events(start, 
d->mCalendar->timeSpec(),
-                                                   
KCalCore::EventSortStartDate,
-                                                   
KCalCore::SortDirectionAscending);
-                    if (!events.isEmpty()) {
-                        *ts << "<table>";
-                        foreach (const KCalCore::Event::Ptr &event, events) {
-                            Q_ASSERT(event);
-                            if (checkSecrecy(event)) {
-                                createEvent(ts, event, start, false);
-                            }
-                        }
-                        *ts << "</table>";
-                    } else {
-                        *ts << "&nbsp;";
-                    }
-                }
-
-                *ts << "</td></tr></table></td>" << endl;
-                start = start.addDays(1);
-            }
-            *ts << "  </tr>" << endl;
-        }
-        *ts << "</table>" << endl;
-        startmonth += 1;
-        if (startmonth > 12) {
-            startyear += 1;
-            startmonth = 1;
-        }
-        start.setYMD(startyear, startmonth, 1);
-        end.setYMD(start.year(), start.month(), start.daysInMonth());
-    }
-}
-
-void HtmlExportJob::createEventList(QTextStream *ts)
-{
-    int columns = 3;
-    *ts << "<table border=\"0\" cellpadding=\"3\" cellspacing=\"3\">" << endl;
-    *ts << "  <tr>" << endl;
-    *ts << "    <th class=\"sum\">" << i18nc("@title:column event start time",
-            "Start Time") << "</th>" << endl;
-    *ts << "    <th>" << i18nc("@title:column event end time",
-                               "End Time") << "</th>" << endl;
-    *ts << "    <th>" << i18nc("@title:column event description",
-                               "Event") << "</th>" << endl;
-    if (d->mSettings->eventLocation()) {
-        *ts << "    <th>" << i18nc("@title:column event locatin",
-                                   "Location") << "</th>" << endl;
-        ++columns;
-    }
-    if (d->mSettings->eventCategories()) {
-        *ts << "    <th>" << i18nc("@title:column event categories",
-                                   "Categories") << "</th>" << endl;
-        ++columns;
-    }
-    if (d->mSettings->eventAttendees()) {
-        *ts << "    <th>" << i18nc("@title:column event attendees",
-                                   "Attendees") << "</th>" << endl;
-        ++columns;
-    }
-
-    *ts << "  </tr>" << endl;
-
-    for (QDate dt = fromDate(); dt <= toDate(); dt = dt.addDays(1)) {
-        qCDebug(KORGANIZER_LOG) << "Getting events for" << dt.toString();
-        KCalCore::Event::List events = d->mCalendar->events(dt, 
d->mCalendar->timeSpec(),
-                                       KCalCore::EventSortStartDate,
-                                       KCalCore::SortDirectionAscending);
-        if (!events.isEmpty()) {
-            *ts << "  <tr><td colspan=\"" << QString::number(columns)
-                << "\" class=\"datehead\"><i>"
-                << QLocale::system().toString(dt)
-                << "</i></td></tr>" << endl;
-
-            foreach (const KCalCore::Event::Ptr &event, events) {
-                Q_ASSERT(event);
-                if (checkSecrecy(event)) {
-                    createEvent(ts, event, dt);
-                }
-            }
-        }
-    }
-
-    *ts << "</table>" << endl;
-}
-
-void HtmlExportJob::createEvent(QTextStream *ts, const KCalCore::Event::Ptr 
&event,
-                                QDate date, bool withDescription)
-{
-    qCDebug(KORGANIZER_LOG) << event->summary();
-    *ts << "  <tr>" << endl;
-
-    if (!event->allDay()) {
-        if (event->isMultiDay(d->mCalendar->timeSpec()) && 
(event->dtStart().date() != date)) {
-            *ts << "    <td>&nbsp;</td>" << endl;
-        } else {
-            *ts << "    <td valign=\"top\">"
-                << 
KCalUtils::IncidenceFormatter::timeToString(event->dtStart(),
-                        true, d->mCalendar->timeSpec())
-                << "</td>" << endl;
-        }
-        if (event->isMultiDay(d->mCalendar->timeSpec()) && 
(event->dtEnd().date() != date)) {
-            *ts << "    <td>&nbsp;</td>" << endl;
-        } else {
-            *ts << "    <td valign=\"top\">"
-                << KCalUtils::IncidenceFormatter::timeToString(event->dtEnd(),
-                        true, d->mCalendar->timeSpec())
-                << "</td>" << endl;
-        }
-    } else {
-        *ts << "    <td>&nbsp;</td><td>&nbsp;</td>" << endl;
-    }
-
-    *ts << "    <td class=\"sum\">" << endl;
-    *ts << "      <b>" << cleanChars(event->summary()) << "</b>" << endl;
-    if (withDescription && !event->description().isEmpty()) {
-        *ts << "      <p>" << breakString(cleanChars(event->description())) << 
"</p>" << endl;
-    }
-    *ts << "    </td>" << endl;
-
-    if (d->mSettings->eventLocation()) {
-        *ts << "  <td>" << endl;
-        formatLocation(ts, event);
-        *ts << "  </td>" << endl;
-    }
-
-    if (d->mSettings->eventCategories()) {
-        *ts << "  <td>" << endl;
-        formatCategories(ts, event);
-        *ts << "  </td>" << endl;
-    }
-
-    if (d->mSettings->eventAttendees()) {
-        *ts << "  <td>" << endl;
-        formatAttendees(ts, event);
-        *ts << "  </td>" << endl;
-    }
-
-    *ts << "  </tr>" << endl;
-}
-
-void HtmlExportJob::createTodoList(QTextStream *ts)
-{
-    KCalCore::Todo::List rawTodoList = d->mCalendar->todos();
-
-    int index = 0;
-    while (index < rawTodoList.count()) {
-        const KCalCore::Todo::Ptr todo = rawTodoList.value(index);
-        Q_ASSERT(todo);
-        //const Akonadi::Item parentItem = 
d->mCalendar->item(todo->relatedTo());
-
-        ++index;
-    }
-
-    // FIXME: Sort list by priorities. This is brute force and should be
-    // replaced by a real sorting algorithm.
-    KCalCore::Todo::List todoList;
-    KCalCore::Todo::List::ConstIterator it;
-    for (int i = 1; i <= 9; ++i) {
-        foreach (const KCalCore::Todo::Ptr &todo, rawTodoList) {
-            if (todo->priority() == i && checkSecrecy(todo)) {
-                todoList.append(todo);
-            }
-        }
-    }
-    foreach (const KCalCore::Todo::Ptr &todo, rawTodoList) {
-        if (todo->priority() == 0 && checkSecrecy(todo)) {
-            todoList.append(todo);
-        }
-    }
-
-    int columns = 3;
-    *ts << "<table border=\"0\" cellpadding=\"3\" cellspacing=\"3\">" << endl;
-    *ts << "  <tr>" << endl;
-    *ts << "    <th class=\"sum\">" << i18nc("@title:column", "To-do") << 
"</th>" << endl;
-    *ts << "    <th>" << i18nc("@title:column to-do priority", "Priority") << 
"</th>" << endl;
-    *ts << "    <th>" << i18nc("@title:column to-do percent completed",
-                               "Completed") << "</th>" << endl;
-    if (d->mSettings->taskDueDate()) {
-        *ts << "    <th>" << i18nc("@title:column to-do due date", "Due Date") 
<< "</th>" << endl;
-        ++columns;
-    }
-    if (d->mSettings->taskLocation()) {
-        *ts << "    <th>" << i18nc("@title:column to-do location", "Location") 
<< "</th>" << endl;
-        ++columns;
-    }
-    if (d->mSettings->taskCategories()) {
-        *ts << "    <th>" << i18nc("@title:column to-do categories", 
"Categories") << "</th>" << endl;
-        ++columns;
-    }
-    if (d->mSettings->taskAttendees()) {
-        *ts << "    <th>" << i18nc("@title:column to-do attendees", 
"Attendees") << "</th>" << endl;
-        ++columns;
-    }
-    *ts << "  </tr>" << endl;
-
-    // Create top-level list.
-    for (it = todoList.constBegin(); it != todoList.constEnd(); ++it) {
-        const QString parentUid = (*it)->relatedTo();
-        if (parentUid.isEmpty()) {
-            createTodo(ts, *it);
-        }
-    }
-
-    //REVIEW(AKONADI_PORT)
-    // relations/relatedTo usage: ok right now, as relations should yield
-    // the same result as mCalendar->findChildren and items are not needed here
-
-    // Create sub-level lists
-    for (it = todoList.constBegin(); it != todoList.constEnd(); ++it) {
-
-        Akonadi::Item item = d->mCalendar->item((*it)->uid());
-        const Akonadi::Item::List relations = 
d->mCalendar->childItems(item.id());
-
-        if (!relations.isEmpty()) {
-            // Generate sub-to-do list
-            *ts << "  <tr>" << endl;
-            *ts << "    <td class=\"subhead\" colspan=";
-            *ts << "\"" << QString::number(columns) << "\"";
-            *ts << "><a name=\"sub" << (*it)->uid() << "\"></a>"
-                << i18nc("@title:column sub-to-dos of the parent to-do",
-                         "Sub-To-dos of: ") << "<a href=\"#"
-                << (*it)->uid() << "\"><b>" << cleanChars((*it)->summary())
-                << "</b></a></td>" << endl;
-            *ts << "  </tr>" << endl;
-
-            KCalCore::Todo::List sortedList;
-            // FIXME: Sort list by priorities. This is brute force and should 
be
-            // replaced by a real sorting algorithm.
-            for (int i = 1; i <= 9; ++i) {
-                foreach (const Akonadi::Item &item, relations) {
-                    KCalCore::Todo::Ptr ev3 = CalendarSupport::todo(item);
-                    if (ev3 && ev3->priority() == i) {
-                        sortedList.append(ev3);
-                    }
-                }
-            }
-
-            foreach (const Akonadi::Item &item, relations) {
-                KCalCore::Todo::Ptr ev3 = CalendarSupport::todo(item);
-                if (ev3 && ev3->priority() == 0) {
-                    sortedList.append(ev3);
-                }
-            }
-
-            KCalCore::Todo::List::ConstIterator it3;
-            for (it3 = sortedList.constBegin(); it3 != sortedList.constEnd(); 
++it3) {
-                createTodo(ts, *it3);
-            }
-        }
-    }
-
-    *ts << "</table>" << endl;
-}
-
-void HtmlExportJob::createTodo(QTextStream *ts, const KCalCore::Todo::Ptr 
&todo)
-{
-
-    const bool completed = todo->isCompleted();
-
-    Akonadi::Item it = d->mCalendar->item(todo->uid());
-    Akonadi::Item::List relations = d->mCalendar->childItems(it.id());
-
-    *ts << "<tr>" << endl;
-
-    *ts << "  <td class=\"sum";
-    if (completed) {
-        *ts << "done";
-    }
-    *ts << "\">" << endl;
-    *ts << "    <a name=\"" << todo->uid() << "\"></a>" << endl;
-    *ts << "    <b>" << cleanChars(todo->summary()) << "</b>" << endl;
-    if (!todo->description().isEmpty()) {
-        *ts << "    <p>" << breakString(cleanChars(todo->description())) << 
"</p>" << endl;
-    }
-    if (!relations.isEmpty()) {
-        *ts << "    <div align=\"right\"><a href=\"#sub" << todo->uid()
-            << "\">" << i18nc("@title:column sub-to-dos of the parent to-do",
-                              "Sub-To-dos") << "</a></div>" << endl;
-    }
-    *ts << "  </td>" << endl;
-
-    *ts << "  <td";
-    if (completed) {
-        *ts << " class=\"done\"";
-    }
-    *ts << ">" << endl;
-    *ts << "    " << todo->priority() << endl;
-    *ts << "  </td>" << endl;
-
-    *ts << "  <td";
-    if (completed) {
-        *ts << " class=\"done\"";
-    }
-    *ts << ">" << endl;
-    *ts << "    " << i18nc("@info to-do percent complete",
-                           "%1 %", todo->percentComplete()) << endl;
-    *ts << "  </td>" << endl;
-
-    if (d->mSettings->taskDueDate()) {
-        *ts << "  <td";
-        if (completed) {
-            *ts << " class=\"done\"";
-        }
-        *ts << ">" << endl;
-        if (todo->hasDueDate()) {
-            *ts << "    " << 
KCalUtils::IncidenceFormatter::dateToString(todo->dtDue(true)) << endl;
-        } else {
-            *ts << "    &nbsp;" << endl;
-        }
-        *ts << "  </td>" << endl;
-    }
-
-    if (d->mSettings->taskLocation()) {
-        *ts << "  <td";
-        if (completed) {
-            *ts << " class=\"done\"";
-        }
-        *ts << ">" << endl;
-        formatLocation(ts, todo);
-        *ts << "  </td>" << endl;
-    }
-
-    if (d->mSettings->taskCategories()) {
-        *ts << "  <td";
-        if (completed) {
-            *ts << " class=\"done\"";
-        }
-        *ts << ">" << endl;
-        formatCategories(ts, todo);
-        *ts << "  </td>" << endl;
-    }
-
-    if (d->mSettings->taskAttendees()) {
-        *ts << "  <td";
-        if (completed) {
-            *ts << " class=\"done\"";
-        }
-        *ts << ">" << endl;
-        formatAttendees(ts, todo);
-        *ts << "  </td>" << endl;
-    }
-
-    *ts << "</tr>" << endl;
-}
-
-void HtmlExportJob::createWeekView(QTextStream *ts)
-{
-    Q_UNUSED(ts);
-    // FIXME: Implement this!
-}
-
-void HtmlExportJob::createJournalView(QTextStream *ts)
-{
-    Q_UNUSED(ts);
-//   Journal::List rawJournalList = d->mCalendar->journals();
-    // FIXME: Implement this!
-}
-
-void HtmlExportJob::createFreeBusyView(QTextStream *ts)
-{
-    Q_UNUSED(ts);
-    // FIXME: Implement this!
-}
-
-bool HtmlExportJob::checkSecrecy(const KCalCore::Incidence::Ptr &incidence)
-{
-    int secrecy = incidence->secrecy();
-    if (secrecy == KCalCore::Incidence::SecrecyPublic) {
-        return true;
-    }
-    if (secrecy == KCalCore::Incidence::SecrecyPrivate && 
!d->mSettings->excludePrivate()) {
-        return true;
-    }
-    if (secrecy == KCalCore::Incidence::SecrecyConfidential &&
-            !d->mSettings->excludeConfidential()) {
-        return true;
-    }
-    return false;
-}
-
-void HtmlExportJob::formatLocation(QTextStream *ts, const 
KCalCore::Incidence::Ptr &incidence)
-{
-    if (!incidence->location().isEmpty()) {
-        *ts << "    " << cleanChars(incidence->location()) << endl;
-    } else {
-        *ts << "    &nbsp;" << endl;
-    }
-}
-
-void HtmlExportJob::formatCategories(QTextStream *ts, const 
KCalCore::Incidence::Ptr &incidence)
-{
-    if (!incidence->categoriesStr().isEmpty()) {
-        *ts << "    " << cleanChars(incidence->categoriesStr()) << endl;
-    } else {
-        *ts << "    &nbsp;" << endl;
-    }
-}
-
-void HtmlExportJob::formatAttendees(QTextStream *ts, const 
KCalCore::Incidence::Ptr &incidence)
-{
-    KCalCore::Attendee::List attendees = incidence->attendees();
-    if (!attendees.isEmpty()) {
-        *ts << "<em>";
-        const KContacts::Addressee organizer = 
d->mOrganizersMap.value(incidence->uid());
-        if (!organizer.isEmpty()) {
-            *ts << "<a href=\"mailto:"; << incidence->organizer()->email() << 
"\">";
-            *ts << cleanChars(organizer.formattedName()) << "</a>" << endl;
-        } else {
-            *ts << incidence->organizer()->fullName();
-        }
-        *ts << "</em><br />";
-        KCalCore::Attendee::List::ConstIterator it;
-        for (it = attendees.constBegin(); it != attendees.constEnd(); ++it) {
-            KCalCore::Attendee::Ptr a = *it;
-            if (!a->email().isEmpty()) {
-                *ts << "<a href=\"mailto:"; << a->email();
-                *ts << "\">" << cleanChars(a->name()) << "</a>";
-            } else {
-                *ts << "    " << cleanChars(a->name());
-            }
-            *ts << "<br />" << endl;
-        }
-    } else {
-        *ts << "    &nbsp;" << endl;
-    }
-}
-
-QString HtmlExportJob::breakString(const QString &text)
-{
-    int number = text.count(QLatin1Char('\n'));
-    if (number <= 0) {
-        return text;
-    } else {
-        QString out;
-        QString tmpText = text;
-        QString tmp;
-        for (int i = 0; i <= number; ++i) {
-            const int pos = tmpText.indexOf(QLatin1Char('\n'));
-            tmp = tmpText.left(pos);
-            tmpText = tmpText.right(tmpText.length() - pos - 1);
-            out += tmp + QLatin1String("<br />");
-        }
-        return out;
-    }
-}
-
-void HtmlExportJob::createFooter(QTextStream *ts)
-{
-    // FIXME: Implement this in a translatable way!
-    QString trailer = i18nc("@info", "This page was created ");
-
-    /*  bool hasPerson = false;
-      bool hasCredit = false;
-      bool hasCreditURL = false;
-      QString mail, name, credit, creditURL;*/
-    if (!d->mSettings->eMail().isEmpty()) {
-        if (!d->mSettings->name().isEmpty()) {
-            trailer += xi18nc("@info/plain page creator email link with name",
-                              "by <link url='mailto:%1'>%2</link> ",
-                              d->mSettings->eMail(), d->mSettings->name());
-        } else {
-            trailer += xi18nc("@info/plain page creator email link",
-                              "by <link url='mailto:%1'>%2</link> ",
-                              d->mSettings->eMail(), d->mSettings->eMail());
-        }
-    } else {
-        if (!d->mSettings->name().isEmpty()) {
-            trailer += i18nc("@info page creator name only",
-                             "by %1 ", d->mSettings->name());
-        }
-    }
-    if (!d->mSettings->creditName().isEmpty()) {
-        if (!d->mSettings->creditURL().isEmpty()) {
-            trailer += xi18nc("@info/plain page credit with name and link",
-                              "with <link url='%1'>%2</link>",
-                              d->mSettings->creditURL(), 
d->mSettings->creditName());
-        } else {
-            trailer += i18nc("@info page credit name only",
-                             "with %1", d->mSettings->creditName());
-        }
-    }
-    *ts << "<p>" << trailer << "</p>" << endl;
-}
-
-QString cleanChars(const QString &text)
-{
-    QString txt = text;
-    txt = txt.replace(QLatin1Char('&'), QStringLiteral("&amp;"));
-    txt = txt.replace(QLatin1Char('<'), QStringLiteral("&lt;"));
-    txt = txt.replace(QLatin1Char('>'), QStringLiteral("&gt;"));
-    txt = txt.replace(QLatin1Char('\"'), QStringLiteral("&quot;"));
-    txt = txt.replace(QStringLiteral("ä"), QStringLiteral("&auml;"));
-    txt = txt.replace(QStringLiteral("Ä"), QStringLiteral("&Auml;"));
-    txt = txt.replace(QStringLiteral("ö"), QStringLiteral("&ouml;"));
-    txt = txt.replace(QStringLiteral("Ö"), QStringLiteral("&Ouml;"));
-    txt = txt.replace(QStringLiteral("ü"), QStringLiteral("&uuml;"));
-    txt = txt.replace(QStringLiteral("Ü"), QStringLiteral("&Uuml;"));
-    txt = txt.replace(QStringLiteral("ß"), QStringLiteral("&szlig;"));
-    txt = txt.replace(QStringLiteral("€"), QStringLiteral("&euro;"));
-    txt = txt.replace(QStringLiteral("é"), QStringLiteral("&eacute;"));
-
-    return txt;
-}
-
-QString HtmlExportJob::styleSheet() const
-{
-    if (!d->mSettings->styleSheet().isEmpty()) {
-        return d->mSettings->styleSheet();
-    }
-
-    QString css;
-
-    if (QApplication::isRightToLeft()) {
-        css += QLatin1String("    body { background-color:white; color:black; 
direction: rtl }\n");
-        css += QLatin1String("    td { text-align:center; 
background-color:#eee }\n");
-        css += QLatin1String("    th { text-align:center; 
background-color:#228; color:white }\n");
-        css += QLatin1String("    td.sumdone { background-color:#ccc }\n");
-        css += QLatin1String("    td.done { background-color:#ccc }\n");
-        css += QLatin1String("    td.subhead { text-align:center; 
background-color:#ccf }\n");
-        css += QLatin1String("    td.datehead { text-align:center; 
background-color:#ccf }\n");
-        css += QLatin1String("    td.space { background-color:white }\n");
-        css += QLatin1String("    td.dateholiday { color:red }\n");
-    } else {
-        css += QLatin1String("    body { background-color:white; color:black 
}\n");
-        css += QLatin1String("    td { text-align:center; 
background-color:#eee }\n");
-        css += QLatin1String("    th { text-align:center; 
background-color:#228; color:white }\n");
-        css += QLatin1String("    td.sum { text-align:left }\n");
-        css += QLatin1String("    td.sumdone { text-align:left; 
background-color:#ccc }\n");
-        css += QLatin1String("    td.done { background-color:#ccc }\n");
-        css += QLatin1String("    td.subhead { text-align:center; 
background-color:#ccf }\n");
-        css += QLatin1String("    td.datehead { text-align:center; 
background-color:#ccf }\n");
-        css += QLatin1String("    td.space { background-color:white }\n");
-        css += QLatin1String("    td.date { text-align:left }\n");
-        css += QLatin1String("    td.dateholiday { text-align:left; color:red 
}\n");
-    }
-
-    return css;
-}
-
-void HtmlExportJob::addHoliday(const QDate &date, const QString &name)
-{
-    if (d->mHolidayMap[date].isEmpty()) {
-        d->mHolidayMap[date] = name;
-    } else {
-        d->mHolidayMap[date] = i18nc("@info holiday by date and name",
-                                     "%1, %2", d->mHolidayMap[date], name);
-    }
-}
-
-QDate HtmlExportJob::fromDate() const
-{
-    return d->mSettings->dateStart().date();
-}
-
-QDate HtmlExportJob::toDate() const
-{
-    return d->mSettings->dateEnd().date();
-}
-
-HTMLExportSettings *HtmlExportJob::settings() const
-{
-    return d->mSettings;
-}
-
diff --git a/src/job/htmlexportjob.h b/src/job/htmlexportjob.h
deleted file mode 100644
index b08d18c6..00000000
--- a/src/job/htmlexportjob.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-  This file is part of the kcal library.
-
-  Copyright (c) 2000-2003 Cornelius Schumacher <[email protected]>
-  Copyright (C) 2004 Reinhold Kainhofer <[email protected]>
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-
-  This library 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
-  Library General Public License for more details.
-
-  You should have received a copy of the GNU Library General Public License
-  along with this library; see the file COPYING.LIB.  If not, write to
-  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-  Boston, MA 02110-1301, USA.
-*/
-
-#ifndef KORG_HTMLEXPORTJOB_H
-#define KORG_HTMLEXPORTJOB_H
-
-#include <KCalCore/Event>
-#include <KCalCore/Todo>
-#include <Akonadi/Calendar/ETMCalendar>
-
-#include <KJob>
-
-class QTextStream;
-
-namespace KOrg
-{
-
-class HTMLExportSettings;
-class MainWindow;
-
-/**
-  This class provides the functions to export a calendar as a HTML page.
-*/
-class HtmlExportJob : public KJob
-{
-    Q_OBJECT
-public:
-    /**
-      Create new HTML exporter for calendar.
-      @param calendar is a pointer to a Akonadi::ETMCalendar instance.
-      @param settings is a pointer to an HTMLExportSettings instance.
-      @param autoMode if true, indicates that this export is for an autosave;
-                      if false, then the export is explicitly user invoked.
-      @param mainWindow is a pointer to KOrganizer MainWindow.
-      @param parent is a pointer to the parent CalendarView.
-    */
-    HtmlExportJob(const Akonadi::ETMCalendar::Ptr &calendar,
-                  HTMLExportSettings *settings, bool autoMode,
-                  KOrg::MainWindow *mainWindow,
-                  QWidget *parent = nullptr);
-
-    virtual ~HtmlExportJob();
-
-    void addHoliday(const QDate &date, const QString &name);
-
-    void start() Q_DECL_OVERRIDE;
-    HTMLExportSettings *settings() const;
-
-protected:
-    void createWeekView(QTextStream *ts);
-    void createMonthView(QTextStream *ts);
-    void createEventList(QTextStream *ts);
-    void createTodoList(QTextStream *ts);
-    void createJournalView(QTextStream *ts);
-    void createFreeBusyView(QTextStream *ts);
-
-    void createTodo(QTextStream *ts, const KCalCore::Todo::Ptr &todo);
-    void createEvent(QTextStream *ts, const KCalCore::Event::Ptr &event, QDate 
date,
-                     bool withDescription = true);
-    void createFooter(QTextStream *ts);
-
-    bool checkSecrecy(const KCalCore::Incidence::Ptr &incidence);
-
-    void formatLocation(QTextStream *ts, const KCalCore::Incidence::Ptr 
&incidence);
-    void formatCategories(QTextStream *ts, const KCalCore::Incidence::Ptr 
&incidence);
-    void formatAttendees(QTextStream *ts, const KCalCore::Incidence::Ptr 
&incidence);
-
-    QString breakString(const QString &text);
-
-    QDate fromDate() const;
-    QDate toDate() const;
-    QString styleSheet() const;
-
-private Q_SLOTS:
-    void receivedOrganizerInfo(KJob *);
-
-private:
-    /**
-      Writes out the calendar in HTML format.
-    */
-    bool save(const QString &fileName = QString());
-
-    /**
-      Writes out calendar to text stream.
-    */
-    bool save(QTextStream *ts);
-
-    void finishExport();
-
-    //@cond PRIVATE
-    Q_DISABLE_COPY(HtmlExportJob)
-    class Private;
-    Private *const d;
-    //@endcond
-};
-
-}
-
-#endif
diff --git a/src/korgmigrateapplication.cpp b/src/korgmigrateapplication.cpp
index a1b50de7..74d3838c 100644
--- a/src/korgmigrateapplication.cpp
+++ b/src/korgmigrateapplication.cpp
@@ -30,7 +30,7 @@ void KOrgMigrateApplication::migrate()
 {
     //Migrate to xdg
     Kdelibs4ConfigMigrator migrate(QStringLiteral("korganizer"));
-    migrate.setConfigFiles(QStringList() << 
QStringLiteral("korganizer_htmlexportrc") << QStringLiteral("korganizerrc") << 
QStringLiteral("freebusyurls"));
+    migrate.setConfigFiles(QStringList() << QStringLiteral("korganizerrc") << 
QStringLiteral("freebusyurls"));
     migrate.setUiFiles(QStringList() << QStringLiteral("korganizer_part.rc") 
<< QStringLiteral("korganizerui.rc"));
     migrate.migrate();
 
diff --git a/src/prefs/koprefs.cpp b/src/prefs/koprefs.cpp
index ccecefdd..c4ff13e8 100644
--- a/src/prefs/koprefs.cpp
+++ b/src/prefs/koprefs.cpp
@@ -53,10 +53,6 @@ KOPrefs::KOPrefs() : KOPrefsBase()
 
     KConfigSkeleton::setCurrentGroup(QStringLiteral("General"));
 
-    // writes into mHtmlExportFile
-    addItemPath(QStringLiteral("HTML Export File"), mHtmlExportFile,
-                QDir::homePath() + QLatin1Char('/') + i18nc("Default export 
file", "calendar.html"));
-
     monthViewFontItem()->setDefaultValue(mDefaultMonthViewFont);
 }
 
@@ -124,16 +120,6 @@ void KOPrefs::setTimeScaleTimezones(const QStringList 
&list)
     mTimeScaleTimeZones = list;
 }
 
-void KOPrefs::setHtmlExportFile(const QString &fileName)
-{
-    mHtmlExportFile = fileName;
-}
-
-QString KOPrefs::htmlExportFile() const
-{
-    return mHtmlExportFile;
-}
-
 EventViews::PrefsPtr KOPrefs::eventViewsPreferences() const
 {
     return mEventViewsPrefs;
diff --git a/src/prefs/koprefs.h b/src/prefs/koprefs.h
index d5d6246e..6dddbe8e 100644
--- a/src/prefs/koprefs.h
+++ b/src/prefs/koprefs.h
@@ -62,9 +62,6 @@ public:
     QColor resourceColor(const QString &);
     QColor resourceColorKnown(const QString &cal) const;
 
-    void setHtmlExportFile(const QString &fileName);
-    QString htmlExportFile() const;
-
     QStringList timeScaleTimezones() const;
     void setTimeScaleTimezones(const QStringList &list);
 
@@ -74,8 +71,6 @@ private:
 
     QStringList mTimeScaleTimeZones;
 
-    QString mHtmlExportFile;
-
     EventViews::PrefsPtr mEventViewsPrefs;
 
 public: // Do not use - except in KOPrefsDialogMain
diff --git a/src/prefs/koprefsdialog.cpp b/src/prefs/koprefsdialog.cpp
index 3e325c64..7a38eaf2 100644
--- a/src/prefs/koprefsdialog.cpp
+++ b/src/prefs/koprefsdialog.cpp
@@ -126,35 +126,11 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
                       i18nc("@title:tab", "Save"));
     QVBoxLayout *saveLayout = new QVBoxLayout(saveFrame);
 
-    QGroupBox *saveGroupBox =
-        new QGroupBox(i18nc("@title:group", "Exporting Calendar"), saveFrame);
-    saveLayout->addWidget(saveGroupBox);
-    QVBoxLayout *saveGroupLayout = new QVBoxLayout;
-    saveGroupBox->setLayout(saveGroupLayout);
-
-    KPIM::KPrefsWidBool *autoExportHTML =
-        addWidBool(KOPrefs::instance()->autoExportItem(), saveGroupBox);
-    saveGroupLayout->addWidget(autoExportHTML->checkBox());
-
-    QBoxLayout *intervalLayout = new QHBoxLayout;
-    saveGroupLayout->addLayout(intervalLayout);
-
-    KPIM::KPrefsWidInt *autoExportInterval =
-        addWidInt(KOPrefs::instance()->autoExportIntervalItem(), saveGroupBox);
-    connect(autoExportHTML->checkBox(), &QAbstractButton::toggled,
-            autoExportInterval->label(), &QWidget::setEnabled);
-    connect(autoExportHTML->checkBox(), &QAbstractButton::toggled,
-            autoExportInterval->spinBox(), &QWidget::setEnabled);
-    intervalLayout->addWidget(autoExportInterval->label());
-    intervalLayout->addWidget(autoExportInterval->spinBox());
-
     KPIM::KPrefsWidBool *confirmItem =
         addWidBool(KOPrefs::instance()->confirmItem(), saveFrame);
     saveLayout->addWidget(confirmItem->checkBox());
     KPIM::KPrefsWidRadios *destinationItem =
         addWidRadios(KOPrefs::instance()->destinationItem(), saveFrame);
-    
autoExportInterval->spinBox()->setEnabled(autoExportHTML->checkBox()->isChecked());
-    
autoExportInterval->label()->setEnabled(autoExportHTML->checkBox()->isChecked());
 
     saveLayout->addWidget(destinationItem->groupBox());
     saveLayout->addStretch(1);
diff --git a/src/settings/htmlexportsettings.kcfg 
b/src/settings/htmlexportsettings.kcfg
deleted file mode 100644
index e9384faa..00000000
--- a/src/settings/htmlexportsettings.kcfg
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0";
-      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
-      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"; >
-  <include>korganizerprivate_export.h</include>
-  <kcfgfile name="korganizer_htmlexportrc">
-    <parameter name="application" />
-  </kcfgfile>
-
-  <group name="$(application)-General">
-    <entry type="String" key="Name">
-      <label>Full name of the calendar owner</label>
-      <tooltip>The full name of the calendar owner for the export</tooltip>
-      <whatsthis>Enter the full name to print for the owner of the 
calendar.</whatsthis>
-    </entry>
-    <entry type="String" key="EMail">
-      <label>Email of the calendar owner</label>
-      <tooltip>The email address of the calendar owner for the export</tooltip>
-      <whatsthis>Enter the email address to print for the owner of the 
calendar.</whatsthis>
-    </entry>
-    <entry type="String" key="Credit Name">
-      <label>Creator application</label>
-      <tooltip>Creator application of the calendar</tooltip>
-      <whatsthis>Enter a creator application of the calendar, for example 
KOrganizer.</whatsthis>
-    </entry>
-    <entry type="String" key="Credit URL">
-      <label>Creator URL</label>
-      <tooltip>URL of the creator application of the calendar.</tooltip>
-      <whatsthis>Enter the URL of the creator application of the calendar, for 
example http://userbase.kde.org/KOrganizer</whatsthis>
-      <default></default>
-    </entry>
-    <entry type="String" key="Page Title">
-      <label>Page Title</label>
-      <default code="true">i18n("Calendar")</default>
-      <tooltip>The title of the exported page</tooltip>
-      <whatsthis>Enter a title for the HTML page.</whatsthis>
-    </entry>
-
-    <entry type="DateTime" key="Date Start">
-      <label>Date start</label>
-      <tooltip>First day of the range to export</tooltip>
-      <whatsthis>First day of the range that shall be exported to 
HTML.</whatsthis>
-    </entry>
-    <entry type="DateTime" key="Date End">
-      <label>Date end</label>
-      <tooltip>Last day of the range to export</tooltip>
-      <whatsthis>Last day of the range that shall be exported to 
HTML.</whatsthis>
-    </entry>
-
-    <entry type="Path" key="Output File">
-      <label>Output filename</label>
-      <tooltip>The file name for the export</tooltip>
-      <whatsthis>The output file name for the HTML export.</whatsthis>
-      <default>$HOME/calendar.html</default>
-    </entry>
-    <entry type="String" key="Style Sheet">
-      <label>Style sheet</label>
-      <tooltip>CSS style sheet to use by the final HTML page</tooltip>
-      <whatsthis>CSS style sheet to be used by the final HTML page. This 
string contains the actual contents of the CSS, not a path to the style 
sheet.</whatsthis>
-    </entry>
-
-    <entry type="Bool" key="Exclude Private">
-      <label>Exclude private incidences from the export</label>
-      <default>true</default>
-      <tooltip>Exclude private items from the export</tooltip>
-      <whatsthis>Check this box if you do NOT want to export your private 
items.</whatsthis>
-    </entry>
-    <entry type="Bool" key="Exclude Confidential">
-      <label>Exclude confidential incidences from the export</label>
-      <default>true</default>
-      <tooltip>Exclude confidential items from the export</tooltip>
-      <whatsthis>Check this box if you do NOT want to export your confidential 
items.</whatsthis>
-    </entry>
-
-  </group>
-
-  <group name="$(application)-Events">
-    <entry type="Bool" key="Event View">
-      <label>Export events as list</label>
-      <default>false</default>
-      <tooltip>Export events as a list</tooltip>
-      <whatsthis>Check this box if you want your events shown as a 
list.</whatsthis>
-    </entry>
-    <entry type="Bool" key="Month View">
-      <label>Export in month view</label>
-      <default>true</default>
-      <tooltip>Export events in a month view</tooltip>
-      <whatsthis>Check this box if you want your events shown in a month 
view.</whatsthis>
-    </entry>
-    <entry type="Bool" key="Week View">
-      <label>Export in week view</label>
-      <default>false</default>
-      <tooltip>Export events in a week view</tooltip>
-      <whatsthis>Check this box if you want your events shown in a week 
view.</whatsthis>
-    </entry>
-    <entry type="String" name="EventTitle" key="Title">
-      <label>Title of the calendar</label>
-      <default code="true">i18n("Calendar")</default>
-      <tooltip>Title for the event calendar</tooltip>
-      <whatsthis>Enter a string to use for the title of the event 
calendar.</whatsthis>
-    </entry>
-
-    <entry type="Bool" name="EventLocation" key="Export Location">
-      <label>Export location of the events</label>
-      <default>true</default>
-      <tooltip>Include the event locations</tooltip>
-      <whatsthis>Check this box if you want the event locations to be 
exported, only if the event has a location.</whatsthis>
-    </entry>
-    <entry type="Bool" name="EventCategories" key="Export Categories">
-      <label>Export categories of the events</label>
-      <default>true</default>
-      <tooltip>Include the event categories</tooltip>
-      <whatsthis>Check this box if you want the event categories to be 
exported.</whatsthis>
-    </entry>
-    <entry type="Bool" name="EventAttendees" key="Export Attendees">
-      <label>Export attendees of the events</label>
-      <default>false</default>
-      <tooltip>Include the event attendees</tooltip>
-      <whatsthis>Check this box if you want the event attendees to be 
exported.</whatsthis>
-    </entry>
-
-  </group>
-
-  <group name="$(application)-Todos">
-    <entry type="Bool" key="Todo View">
-      <label>Export to-do list</label>
-      <default>true</default>
-      <tooltip>Export the to-do list</tooltip>
-      <whatsthis>Check this box if you want your to-do list to also be 
exported to the HTML.</whatsthis>
-    </entry>
-    <entry type="String" key="TodoList Title">
-      <label>Title of the to-do list</label>
-      <default code="true">i18n("To-do List")</default>
-      <tooltip>Title for the to-do list</tooltip>
-      <whatsthis>Enter a string to use for the title of the to-do 
list.</whatsthis>
-    </entry>
-
-    <entry type="Bool" name="TaskDueDate" key="Export Due Date">
-      <label>Export due dates of the to-dos</label>
-      <default>true</default>
-      <tooltip>Include to-do due dates</tooltip>
-      <whatsthis>Check this box if you want the to-do list due dates to be 
exported, if the to-do does have a due date.</whatsthis>
-    </entry>
-    <entry type="Bool" name="TaskLocation" key="Export Location">
-      <label>Export location of the to-dos</label>
-      <default>true</default>
-      <tooltip>Include the to-do locations</tooltip>
-      <whatsthis>Check this box if you want the to-do locations to be 
exported, only if the to-do has a location.</whatsthis>
-    </entry>
-    <entry type="Bool" name="TaskCategories" key="Export Categories">
-      <label>Export categories of the to-dos</label>
-      <default>true</default>
-      <tooltip>Include the to-do categories</tooltip>
-      <whatsthis>Check this box if you want the to-do categories to be 
exported.</whatsthis>
-    </entry>
-    <entry type="Bool" name="TaskAttendees" key="Export Attendees">
-      <label>Export attendees of the to-dos</label>
-      <default>false</default>
-      <tooltip>Include the to-do attendees</tooltip>
-      <whatsthis>Check this box if you want the to-do attendees to be 
exported.</whatsthis>
-    </entry>
-
-  </group>
-
-  <group name="$(application)-Journals">
-    <entry type="Bool" key="Journal View">
-      <label>Export journals</label>
-      <default>false</default>
-      <tooltip>Export journals</tooltip>
-      <whatsthis>Check this box if you want to export journals as 
well.</whatsthis>
-    </entry>
-    <entry type="String" key="Journal Title">
-      <label>Title of the journal list</label>
-      <default code="true">i18n("Journals")</default>
-      <tooltip>Title for the journal list</tooltip>
-      <whatsthis>Enter a title for the Journal list, if Journals are 
exported.</whatsthis>
-    </entry>
-  </group>
-
-  <group name="$(application)-FreeBusy">
-    <entry type="Bool" key="FreeBusy View">
-      <label>Export free/busy list</label>
-      <default>false</default>
-      <tooltip>Export free/busy list</tooltip>
-      <whatsthis>Check this box if you want to export free/busy information as 
well.</whatsthis>
-    </entry>
-    <entry type="String" name="FreeBusyTitle" key="Free/Busy Title">
-      <label>Title of the free/busy list</label>
-      <default code="true">i18n("Busy times")</default>
-      <tooltip>Title for the free/busy list</tooltip>
-      <whatsthis>Enter a title for the free/busy list, if free/busy times are 
exported.</whatsthis>
-    </entry>
-  </group>
-
-</kcfg>
diff --git a/src/settings/htmlexportsettings.kcfgc 
b/src/settings/htmlexportsettings.kcfgc
deleted file mode 100644
index f6266fc4..00000000
--- a/src/settings/htmlexportsettings.kcfgc
+++ /dev/null
@@ -1,15 +0,0 @@
-# Code generation options for kconfig_compiler
-File=htmlexportsettings.kcfg
-ClassName=HTMLExportSettings
-NameSpace=KOrg
-Singleton=false
-Mutators=true
-MemberVariables=public
-GlobalEnums=true
-ItemAccessors=true
-SetUserTexts=true
-Visibility=
-IncludeFiles=KLocalizedString
-TranslationDomain=korganizer
-TranslationSystem=kde
-
diff --git a/src/settings/korganizer.kcfg b/src/settings/korganizer.kcfg
index 7f9d5bf1..f9e7487a 100644
--- a/src/settings/korganizer.kcfg
+++ b/src/settings/korganizer.kcfg
@@ -11,22 +11,6 @@
 
 <!-- General Page: Save Tab -->
   <group name="Save Settings">
-    <entry type="Bool" key="Auto Export">
-      <label>Export to HTML periodically</label>
-      <tooltip>Automatically export your calendar to an HTML file</tooltip>
-      <whatsthis>Check this box to export the calendar to a HTML-file 
periodically. By default, this file will be called calendar.html and placed in 
the user home folder. You can change the file location by selecting the 
&quot;Export Web page&quot; option under the &quot;Export&quot; 
menu.</whatsthis>
-      <default>false</default>
-    </entry>
-
-    <entry type="Int" key="Auto Export Interval">
-      <label>Export &amp;interval in minutes</label>
-      <tooltip>Interval between periodic HTML exports, in minutes</tooltip>
-      <whatsthis>Set the interval between automatic exporting of calendar 
events in minutes here.</whatsthis>
-      <default>10</default>
-      <min>1</min>
-      <max>99999</max>
-    </entry>
-
     <entry type="Bool" key="Confirm Deletes" name="Confirm">
       <label>Confirm deletes</label>
       <tooltip>Always confirm when deleting items</tooltip>

Reply via email to