Commit 606ef64d authored by David Faure's avatar David Faure
Browse files

Port KMail from ReadOnlyPart to Part.

parent f7bb8b69
......@@ -49,7 +49,7 @@ set(CALENDARUTILS_LIB_VERSION "5.14.40")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.14.40")
set(KLDAP_LIB_VERSION "5.14.40")
set(KMAILTRANSPORT_LIB_VERSION "5.14.40")
set(KONTACTINTERFACE_LIB_VERSION "5.14.40")
set(KONTACTINTERFACE_LIB_VERSION "5.14.41")
set(KMIME_LIB_VERSION "5.14.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.14.40")
set(AKONADI_VERSION "5.14.40")
......
......@@ -54,7 +54,7 @@ K_PLUGIN_FACTORY(KMailFactory, registerPlugin<KMailPart>();
using namespace KMail;
KMailPart::KMailPart(QWidget *parentWidget, QObject *parent, const QVariantList &)
: KParts::ReadOnlyPart(parent)
: KParts::Part(parent)
, mParentWidget(parentWidget)
{
setComponentName(QStringLiteral("kmail2"), i18n("KMail2"));
......@@ -114,17 +114,11 @@ void KMailPart::updateQuickSearchText()
mainWidget->updateQuickSearchLineText();
}
bool KMailPart::openFile()
{
mainWidget->show();
return true;
}
//-----------------------------------------------------------------------------
void KMailPart::guiActivateEvent(KParts::GUIActivateEvent *e)
{
KParts::ReadOnlyPart::guiActivateEvent(e);
KParts::Part::guiActivateEvent(e);
if (e->activated()) {
mainWidget->initializeFilterActions(true);
mainWidget->tagActionManager()->createActions();
......
......@@ -32,7 +32,7 @@
class KMMainWidget;
class KMailPart : public KParts::ReadOnlyPart
class KMailPart : public KParts::Part
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.kmail.kmailpart")
......@@ -49,7 +49,6 @@ public Q_SLOTS:
void updateQuickSearchText();
protected:
bool openFile() override;
void guiActivateEvent(KParts::GUIActivateEvent *e) override;
private:
......
......@@ -53,7 +53,7 @@ using KPIM::BroadcastStatus;
#include <QLocale>
SummaryViewPart::SummaryViewPart(KontactInterface::Core *core, const KAboutData &aboutData, QObject *parent)
: KParts::ReadOnlyPart(parent)
: KParts::Part(parent)
, mCore(core)
, mFrame(nullptr)
, mConfigAction(nullptr)
......@@ -88,11 +88,6 @@ SummaryViewPart::~SummaryViewPart()
saveLayout();
}
bool SummaryViewPart::openFile()
{
return true;
}
void SummaryViewPart::partActivateEvent(KParts::PartActivateEvent *event)
{
// inform the plugins that the part has been activated so that they can
......@@ -101,7 +96,7 @@ void SummaryViewPart::partActivateEvent(KParts::PartActivateEvent *event)
updateSummaries();
}
KParts::ReadOnlyPart::partActivateEvent(event);
KParts::Part::partActivateEvent(event);
}
void SummaryViewPart::updateSummaries()
......
......@@ -24,7 +24,7 @@
#ifndef SUMMARYVIEW_PART_H
#define SUMMARYVIEW_PART_H
#include <KParts/ReadOnlyPart>
#include <KParts/Part>
#include <QMap>
class DropWidget;
......@@ -41,7 +41,7 @@ class QFrame;
class QLabel;
class QVBoxLayout;
class SummaryViewPart : public KParts::ReadOnlyPart
class SummaryViewPart : public KParts::Part
{
Q_OBJECT
......@@ -59,7 +59,6 @@ Q_SIGNALS:
void textChanged(const QString &);
protected:
Q_REQUIRED_RESULT bool openFile() override;
void partActivateEvent(KParts::PartActivateEvent *event) override;
protected Q_SLOTS:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment