Commit 7150e3fc authored by David Faure's avatar David Faure
Browse files

Port knotes from KParts::ReadOnlyPart to KParts::Part

This doesn't support opening specific files/URLs using the KParts API
parent d845225f
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
#include <QMenu> #include <QMenu>
KNotesPart::KNotesPart(QObject *parent) KNotesPart::KNotesPart(QObject *parent)
: KParts::ReadOnlyPart(parent) : KParts::Part(parent)
, mNotesWidget(nullptr) , mNotesWidget(nullptr)
, mPublisher(nullptr) , mPublisher(nullptr)
, mNotePrintPreview(nullptr) , mNotePrintPreview(nullptr)
...@@ -342,11 +342,6 @@ void KNotesPart::printSelectedNotes(bool preview) ...@@ -342,11 +342,6 @@ void KNotesPart::printSelectedNotes(bool preview)
} }
} }
bool KNotesPart::openFile()
{
return false;
}
// public KNotes D-Bus interface implementation // public KNotes D-Bus interface implementation
void KNotesPart::newNote(const QString &name, const QString &text) void KNotesPart::newNote(const QString &name, const QString &text)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <AkonadiCore/Item> #include <AkonadiCore/Item>
#include <KViewStateMaintainer> #include <KViewStateMaintainer>
#include <KParts/ReadOnlyPart> #include <KParts/Part>
#include <QListWidgetItem> #include <QListWidgetItem>
#include <QPointer> #include <QPointer>
...@@ -48,7 +48,7 @@ namespace KDNSSD { ...@@ -48,7 +48,7 @@ namespace KDNSSD {
class PublicService; class PublicService;
} }
class KNotesPart : public KParts::ReadOnlyPart class KNotesPart : public KParts::Part
{ {
Q_OBJECT Q_OBJECT
...@@ -56,8 +56,6 @@ public: ...@@ -56,8 +56,6 @@ public:
explicit KNotesPart(QObject *parent = nullptr); explicit KNotesPart(QObject *parent = nullptr);
~KNotesPart() override; ~KNotesPart() override;
bool openFile() override;
public Q_SLOTS: public Q_SLOTS:
void newNote(const QString &name = QString(), const QString &text = QString()); void newNote(const QString &name = QString(), const QString &text = QString());
void newNoteFromClipboard(const QString &name = QString()); void newNoteFromClipboard(const QString &name = QString());
......
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