Commit 7ed2463d authored by Felipe Borges's avatar Felipe Borges Committed by Christoph Cullmann
Browse files

Implemenet KTextEditor::SessionConfigInterface on project plugin


Signed-off-by: Felipe Borges's avatarFelipe Borges <bumbleblo2013@gmail.com>
parent a693be56
......@@ -10,6 +10,7 @@
#include "kateproject.h"
#include "kateprojectconfigpage.h"
#include "kateprojectpluginview.h"
#include <iostream>
#include <kcoreaddons_version.h>
#include <ktexteditor/application.h>
......@@ -567,10 +568,17 @@ void KateProjectPlugin::registerVariables()
return QDir::toNativeSeparators(QDir(kateProject->baseDir()).absolutePath());
});
}
void KateProjectPlugin::unregisterVariables()
{
auto editor = KTextEditor::Editor::instance();
editor->unregisterVariableMatch(QStringLiteral("Project:Path"));
editor->unregisterVariableMatch(QStringLiteral("Project:NativePath"));
}
void KateProjectPlugin::readSessionConfig(const KConfigGroup &config)
{
}
void KateProjectPlugin::writeSessionConfig(KConfigGroup &config)
{
}
......@@ -13,11 +13,11 @@
#include <QThreadPool>
#include <KTextEditor/Plugin>
#include <KTextEditor/SessionConfigInterface>
#include <KXMLGUIClient>
#include <ktexteditor/document.h>
#include <ktexteditor/mainwindow.h>
#include <KXMLGUIClient>
#include "kateprojectcompletion.h"
class KateProject;
......@@ -29,9 +29,10 @@ enum class ClickAction : uint8_t {
StageUnstage,
};
class KateProjectPlugin : public KTextEditor::Plugin
class KateProjectPlugin : public KTextEditor::Plugin, public KTextEditor::SessionConfigInterface
{
Q_OBJECT
Q_INTERFACES(KTextEditor::SessionConfigInterface)
public:
explicit KateProjectPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
......@@ -189,6 +190,9 @@ private:
KateProject *detectMercurial(const QDir &dir);
KateProject *detectFossil(const QDir &dir);
void readSessionConfig(const KConfigGroup &config) override;
void writeSessionConfig(KConfigGroup &config) override;
void readConfig();
void writeConfig();
......
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