Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit cf5aae81 authored by Laurent Montel's avatar Laurent Montel 😁

Fix typo

parent 96d94283
......@@ -24,22 +24,22 @@
#include <QStandardPaths>
#include <QTest>
#include <QDialogButtonBox>
QTEST_MAIN(LanguagetoolConfigDialogTest)
LanguagetoolConfigDialogTest::LanguagetoolConfigDialogTest(QObject *parent)
QTEST_MAIN(LanguageToolConfigDialogTest)
LanguageToolConfigDialogTest::LanguageToolConfigDialogTest(QObject *parent)
: QObject(parent)
{
QStandardPaths::setTestModeEnabled(true);
}
void LanguagetoolConfigDialogTest::shouldHaveDefaultValue()
void LanguageToolConfigDialogTest::shouldHaveDefaultValue()
{
LanguagetoolConfigDialog w(nullptr, true);
LanguageToolConfigDialog w(nullptr, true);
QVERIFY(!w.windowTitle().isEmpty());
QVBoxLayout *mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
LanguagetoolConfigWidget *mConfigWidget = w.findChild<LanguagetoolConfigWidget *>(QStringLiteral("configwidget"));
LanguageToolConfigWidget *mConfigWidget = w.findChild<LanguageToolConfigWidget *>(QStringLiteral("configwidget"));
QVERIFY(mConfigWidget);
QDialogButtonBox *box = w.findChild<QDialogButtonBox *>(QStringLiteral("box"));
......
......@@ -22,12 +22,12 @@
#include <QObject>
class LanguagetoolConfigDialogTest : public QObject
class LanguageToolConfigDialogTest : public QObject
{
Q_OBJECT
public:
explicit LanguagetoolConfigDialogTest(QObject *parent = nullptr);
~LanguagetoolConfigDialogTest() = default;
explicit LanguageToolConfigDialogTest(QObject *parent = nullptr);
~LanguageToolConfigDialogTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
......
......@@ -21,16 +21,16 @@
#include "languagetoolconfigwidget.h"
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN(LanguagetoolConfigWidgetTest)
LanguagetoolConfigWidgetTest::LanguagetoolConfigWidgetTest(QObject *parent)
QTEST_MAIN(LanguageToolConfigWidgetTest)
LanguageToolConfigWidgetTest::LanguageToolConfigWidgetTest(QObject *parent)
: QObject(parent)
{
}
void LanguagetoolConfigWidgetTest::shouldHaveDefaultValue()
void LanguageToolConfigWidgetTest::shouldHaveDefaultValue()
{
LanguagetoolConfigWidget w;
LanguageToolConfigWidget w;
QVBoxLayout *mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
......
......@@ -22,12 +22,12 @@
#include <QObject>
class LanguagetoolConfigWidgetTest : public QObject
class LanguageToolConfigWidgetTest : public QObject
{
Q_OBJECT
public:
explicit LanguagetoolConfigWidgetTest(QObject *parent = nullptr);
~LanguagetoolConfigWidgetTest() = default;
explicit LanguageToolConfigWidgetTest(QObject *parent = nullptr);
~LanguageToolConfigWidgetTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
......
......@@ -20,8 +20,8 @@
#include "languagetoolgrammarerrortest.h"
#include <QTest>
QTEST_GUILESS_MAIN(LanguagetoolGrammarErrorTest)
LanguagetoolGrammarErrorTest::LanguagetoolGrammarErrorTest(QObject *parent)
QTEST_GUILESS_MAIN(LanguageToolGrammarErrorTest)
LanguageToolGrammarErrorTest::LanguageToolGrammarErrorTest(QObject *parent)
: QObject(parent)
{
}
......@@ -22,12 +22,12 @@
#include <QObject>
class LanguagetoolGrammarErrorTest : public QObject
class LanguageToolGrammarErrorTest : public QObject
{
Q_OBJECT
public:
explicit LanguagetoolGrammarErrorTest(QObject *parent = nullptr);
~LanguagetoolGrammarErrorTest() = default;
explicit LanguageToolGrammarErrorTest(QObject *parent = nullptr);
~LanguageToolGrammarErrorTest() = default;
};
#endif // LANGUAGETOOLGRAMMARERRORTEST_H
......@@ -21,16 +21,16 @@
#include "languagetoolresultjobtest.h"
#include "languagetoolresultjob.h"
#include <QTest>
QTEST_MAIN(LanguagetoolResultJobTest)
LanguagetoolResultJobTest::LanguagetoolResultJobTest(QObject *parent)
QTEST_MAIN(LanguageToolResultJobTest)
LanguageToolResultJobTest::LanguageToolResultJobTest(QObject *parent)
: QObject(parent)
{
}
void LanguagetoolResultJobTest::shouldHaveDefaultValue()
void LanguageToolResultJobTest::shouldHaveDefaultValue()
{
LanguagetoolResultJob job;
LanguageToolResultJob job;
QVERIFY(!job.networkAccessManager());
QVERIFY(job.arguments().isEmpty());
QVERIFY(!job.canStart());
......@@ -39,9 +39,9 @@ void LanguagetoolResultJobTest::shouldHaveDefaultValue()
QVERIFY(job.language().isEmpty());
}
void LanguagetoolResultJobTest::shouldBeAbleToStart()
void LanguageToolResultJobTest::shouldBeAbleToStart()
{
LanguagetoolResultJob job;
LanguageToolResultJob job;
QVERIFY(!job.canStart());
job.setText(QStringLiteral("foo"));
QVERIFY(!job.canStart());
......
......@@ -22,12 +22,12 @@
#include <QObject>
class LanguagetoolResultJobTest : public QObject
class LanguageToolResultJobTest : public QObject
{
Q_OBJECT
public:
explicit LanguagetoolResultJobTest(QObject *parent = nullptr);
~LanguagetoolResultJobTest() = default;
explicit LanguageToolResultJobTest(QObject *parent = nullptr);
~LanguageToolResultJobTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
void shouldBeAbleToStart();
......
......@@ -22,16 +22,16 @@
#include <QTest>
#include <QHBoxLayout>
#include <grammarresulttextedit.h>
QTEST_MAIN(LanguagetoolResultWidgetTest)
LanguagetoolResultWidgetTest::LanguagetoolResultWidgetTest(QObject *parent)
QTEST_MAIN(LanguageToolResultWidgetTest)
LanguageToolResultWidgetTest::LanguageToolResultWidgetTest(QObject *parent)
: QObject(parent)
{
}
void LanguagetoolResultWidgetTest::shouldHaveDefaultValue()
void LanguageToolResultWidgetTest::shouldHaveDefaultValue()
{
LanguagetoolResultWidget w;
LanguageToolResultWidget w;
QHBoxLayout *mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
......
......@@ -21,12 +21,12 @@
#include <QObject>
class LanguagetoolResultWidgetTest : public QObject
class LanguageToolResultWidgetTest : public QObject
{
Q_OBJECT
public:
explicit LanguagetoolResultWidgetTest(QObject *parent = nullptr);
~LanguagetoolResultWidgetTest() = default;
explicit LanguageToolResultWidgetTest(QObject *parent = nullptr);
~LanguageToolResultWidgetTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
......
......@@ -30,24 +30,24 @@
#include <QHBoxLayout>
#include <QTextBlock>
LanguagetoolInterface::LanguagetoolInterface(KActionCollection *ac, QWidget *parent)
LanguageToolInterface::LanguageToolInterface(KActionCollection *ac, QWidget *parent)
: MessageComposer::PluginEditorGrammarCustomToolsViewInterface(parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
mGrammarResultWidget = new LanguagetoolResultWidget(this);
connect(mGrammarResultWidget, &LanguagetoolResultWidget::replaceText, this, &LanguagetoolInterface::slotReplaceText);
connect(mGrammarResultWidget, &LanguagetoolResultWidget::checkAgain, this, &LanguagetoolInterface::checkAgain);
mGrammarResultWidget = new LanguageToolResultWidget(this);
connect(mGrammarResultWidget, &LanguageToolResultWidget::replaceText, this, &LanguageToolInterface::slotReplaceText);
connect(mGrammarResultWidget, &LanguageToolResultWidget::checkAgain, this, &LanguageToolInterface::checkAgain);
layout->addWidget(mGrammarResultWidget);
createAction(ac);
}
LanguagetoolInterface::~LanguagetoolInterface()
LanguageToolInterface::~LanguageToolInterface()
{
}
void LanguagetoolInterface::slotReplaceText(const MessageComposer::PluginGrammarAction &act)
void LanguageToolInterface::slotReplaceText(const MessageComposer::PluginGrammarAction &act)
{
if (richTextEditor()) {
QTextBlock block = richTextEditor()->document()->findBlockByNumber(act.blockId() - 1);
......@@ -61,7 +61,7 @@ void LanguagetoolInterface::slotReplaceText(const MessageComposer::PluginGrammar
}
}
void LanguagetoolInterface::slotActivateGrammalecte(bool state)
void LanguageToolInterface::slotActivateGrammalecte(bool state)
{
if (state) {
mGrammarResultWidget->show();
......@@ -73,22 +73,22 @@ void LanguagetoolInterface::slotActivateGrammalecte(bool state)
}
}
KToggleAction *LanguagetoolInterface::action() const
KToggleAction *LanguageToolInterface::action() const
{
return mAction;
}
void LanguagetoolInterface::createAction(KActionCollection *ac)
void LanguageToolInterface::createAction(KActionCollection *ac)
{
mAction = new KToggleAction(i18n("&Check Grammar (LanguageTool)"), this);
connect(mAction, &KToggleAction::triggered, this, &LanguagetoolInterface::slotActivateGrammalecte);
connect(mAction, &KToggleAction::triggered, this, &LanguageToolInterface::slotActivateGrammalecte);
if (ac) {
ac->addAction(QStringLiteral("checkgrammar-languagetool"), mAction);
}
mAction->setChecked(false);
}
void LanguagetoolInterface::checkAgain()
void LanguageToolInterface::checkAgain()
{
if (richTextEditor()) {
mGrammarResultWidget->setText(richTextEditor()->toPlainText());
......
......@@ -21,13 +21,13 @@
#include <MessageComposer/PluginEditorGrammarCustomToolsViewInterface>
class KActionCollection;
class LanguagetoolResultWidget;
class LanguagetoolInterface : public MessageComposer::PluginEditorGrammarCustomToolsViewInterface
class LanguageToolResultWidget;
class LanguageToolInterface : public MessageComposer::PluginEditorGrammarCustomToolsViewInterface
{
Q_OBJECT
public:
explicit LanguagetoolInterface(KActionCollection *ac, QWidget *parent = nullptr);
~LanguagetoolInterface() override;
explicit LanguageToolInterface(KActionCollection *ac, QWidget *parent = nullptr);
~LanguageToolInterface() override;
KToggleAction *action() const override;
......@@ -36,7 +36,7 @@ private:
void slotActivateGrammalecte(bool state);
void createAction(KActionCollection *ac);
void checkAgain();
LanguagetoolResultWidget *mGrammarResultWidget = nullptr;
LanguageToolResultWidget *mGrammarResultWidget = nullptr;
KToggleAction *mAction = nullptr;
};
......
......@@ -27,41 +27,41 @@
#include <QPointer>
K_PLUGIN_CLASS_WITH_JSON(LanguagetoolPlugin, "kmail_languagetoolplugin.json")
LanguagetoolPlugin::LanguagetoolPlugin(QObject *parent, const QList<QVariant> &)
K_PLUGIN_CLASS_WITH_JSON(LanguageToolPlugin, "kmail_languagetoolplugin.json")
LanguageToolPlugin::LanguageToolPlugin(QObject *parent, const QList<QVariant> &)
: PimCommon::CustomToolsPlugin(parent)
{
}
LanguagetoolPlugin::~LanguagetoolPlugin()
LanguageToolPlugin::~LanguageToolPlugin()
{
}
PimCommon::CustomToolsViewInterface *LanguagetoolPlugin::createView(KActionCollection *ac, PimCommon::CustomToolsWidgetNg *parent)
PimCommon::CustomToolsViewInterface *LanguageToolPlugin::createView(KActionCollection *ac, PimCommon::CustomToolsWidgetNg *parent)
{
LanguagetoolInterface *view = new LanguagetoolInterface(ac, parent);
LanguageToolInterface *view = new LanguageToolInterface(ac, parent);
connect(view, &LanguagetoolInterface::toolsWasClosed, parent, &PimCommon::CustomToolsWidgetNg::slotToolsWasClosed);
connect(view, &LanguagetoolInterface::insertText, parent, &PimCommon::CustomToolsWidgetNg::insertText);
connect(view, &LanguagetoolInterface::activateView, parent, &PimCommon::CustomToolsWidgetNg::slotActivateView);
connect(view, &LanguageToolInterface::toolsWasClosed, parent, &PimCommon::CustomToolsWidgetNg::slotToolsWasClosed);
connect(view, &LanguageToolInterface::insertText, parent, &PimCommon::CustomToolsWidgetNg::insertText);
connect(view, &LanguageToolInterface::activateView, parent, &PimCommon::CustomToolsWidgetNg::slotActivateView);
return view;
}
QString LanguagetoolPlugin::customToolName() const
QString LanguageToolPlugin::customToolName() const
{
return i18n("Languagetool Plugin");
return i18n("LanguageTool Plugin");
}
bool LanguagetoolPlugin::hasConfigureDialog() const
bool LanguageToolPlugin::hasConfigureDialog() const
{
return true;
}
void LanguagetoolPlugin::showConfigureDialog(QWidget *parent)
void LanguageToolPlugin::showConfigureDialog(QWidget *parent)
{
QPointer<LanguagetoolConfigDialog> dlg = new LanguagetoolConfigDialog(parent);
QPointer<LanguageToolConfigDialog> dlg = new LanguageToolConfigDialog(parent);
if (dlg->exec()) {
LanguagetoolManager::self()->loadSettings();
LanguageToolManager::self()->loadSettings();
}
delete dlg;
}
......
......@@ -22,12 +22,12 @@
#include <PimCommon/CustomToolsPlugin>
#include <QVariant>
class LanguagetoolPlugin : public PimCommon::CustomToolsPlugin
class LanguageToolPlugin : public PimCommon::CustomToolsPlugin
{
Q_OBJECT
public:
explicit LanguagetoolPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
~LanguagetoolPlugin() override;
explicit LanguageToolPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
~LanguageToolPlugin() override;
PimCommon::CustomToolsViewInterface *createView(KActionCollection *ac, PimCommon::CustomToolsWidgetNg *parent) override;
Q_REQUIRED_RESULT QString customToolName() const override;
......
/*
Copyright (C) 2019 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "languagetoolcombobox.h"
LanguagetoolComboBox::LanguagetoolComboBox()
LanguageToolComboBox::LanguageToolComboBox(QWidget *parent)
: QComboBox(parent)
{
}
LanguageToolComboBox::~LanguageToolComboBox()
{
}
/*
Copyright (C) 2019 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef LANGUAGETOOLCOMBOBOX_H
#define LANGUAGETOOLCOMBOBOX_H
class LanguagetoolComboBox
#include <QComboBox>
#include "libkmaillanguagetool_export.h"
class LIBKMAILLANGUAGETOOL_EXPORT LanguageToolComboBox : public QComboBox
{
Q_OBJECT
public:
LanguagetoolComboBox();
explicit LanguageToolComboBox(QWidget *parent = nullptr);
~LanguageToolComboBox();
};
#endif // LANGUAGETOOLCOMBOBOX_H
......@@ -25,39 +25,39 @@
#include <KConfigGroup>
#include <KSharedConfig>
LanguagetoolConfigDialog::LanguagetoolConfigDialog(QWidget *parent, bool disableMessageBox)
LanguageToolConfigDialog::LanguageToolConfigDialog(QWidget *parent, bool disableMessageBox)
: QDialog(parent)
{
setWindowTitle(i18n("Configure Grammalecte"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mConfigWidget = new LanguagetoolConfigWidget(this, disableMessageBox);
mConfigWidget = new LanguageToolConfigWidget(this, disableMessageBox);
mConfigWidget->setObjectName(QStringLiteral("configwidget"));
mainLayout->addWidget(mConfigWidget);
QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
box->setObjectName(QStringLiteral("box"));
mainLayout->addWidget(box);
connect(box, &QDialogButtonBox::accepted, this, &LanguagetoolConfigDialog::accept);
connect(box, &QDialogButtonBox::rejected, this, &LanguagetoolConfigDialog::reject);
connect(box, &QDialogButtonBox::accepted, this, &LanguageToolConfigDialog::accept);
connect(box, &QDialogButtonBox::rejected, this, &LanguageToolConfigDialog::reject);
readConfig();
}
LanguagetoolConfigDialog::~LanguagetoolConfigDialog()
LanguageToolConfigDialog::~LanguageToolConfigDialog()
{
writeConfig();
}
void LanguagetoolConfigDialog::writeConfig()
void LanguageToolConfigDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "LanguagetoolConfigDialog");
KConfigGroup group(KSharedConfig::openConfig(), "LanguageToolConfigDialog");
group.writeEntry("Size", size());
}
void LanguagetoolConfigDialog::readConfig()
void LanguageToolConfigDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "LanguagetoolConfigDialog");
KConfigGroup group(KSharedConfig::openConfig(), "LanguageToolConfigDialog");
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -21,18 +21,18 @@
#define LANGUAGETOOLCONFIGDIALOG_H
#include <QDialog>
#include "libkmaillanguagetool_export.h"
class LanguagetoolConfigWidget;
class LIBKMAILLANGUAGETOOL_EXPORT LanguagetoolConfigDialog : public QDialog
class LanguageToolConfigWidget;
class LIBKMAILLANGUAGETOOL_EXPORT LanguageToolConfigDialog : public QDialog
{
Q_OBJECT
public:
explicit LanguagetoolConfigDialog(QWidget *parent = nullptr, bool disableMessageBox = false);
~LanguagetoolConfigDialog();
explicit LanguageToolConfigDialog(QWidget *parent = nullptr, bool disableMessageBox = false);
~LanguageToolConfigDialog();
private:
Q_DISABLE_COPY(LanguagetoolConfigDialog)
Q_DISABLE_COPY(LanguageToolConfigDialog)
void writeConfig();
void readConfig();
LanguagetoolConfigWidget *mConfigWidget = nullptr;
LanguageToolConfigWidget *mConfigWidget = nullptr;
};
#endif // LANGUAGETOOLCONFIGDIALOG_H
......@@ -30,7 +30,7 @@
#include <QVariant>
#include <KUrlRequester>
LanguagetoolConfigWidget::LanguagetoolConfigWidget(QWidget *parent, bool disableMessageBox)
LanguageToolConfigWidget::LanguageToolConfigWidget(QWidget *parent, bool disableMessageBox)
: QWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
......@@ -38,15 +38,15 @@ LanguagetoolConfigWidget::LanguagetoolConfigWidget(QWidget *parent, bool disable
mainLayout->setMargin(0);
}
LanguagetoolConfigWidget::~LanguagetoolConfigWidget()
LanguageToolConfigWidget::~LanguageToolConfigWidget()
{
saveSettings();
}
void LanguagetoolConfigWidget::loadSettings()
void LanguageToolConfigWidget::loadSettings()
{
}
void LanguagetoolConfigWidget::saveSettings()
void LanguageToolConfigWidget::saveSettings()
{
}
......@@ -24,16 +24,16 @@
#include "libkmaillanguagetool_export.h"
class QCheckBox;
class KUrlRequester;
class LIBKMAILLANGUAGETOOL_EXPORT LanguagetoolConfigWidget : public QWidget
class LIBKMAILLANGUAGETOOL_EXPORT LanguageToolConfigWidget : public QWidget
{
Q_OBJECT
public:
explicit LanguagetoolConfigWidget(QWidget *parent = nullptr, bool disableMessageBox = false);
~LanguagetoolConfigWidget();
explicit LanguageToolConfigWidget(QWidget *parent = nullptr, bool disableMessageBox = false);
~LanguageToolConfigWidget();
void loadSettings();
void saveSettings();
private:
Q_DISABLE_COPY(LanguagetoolConfigWidget)
Q_DISABLE_COPY(LanguageToolConfigWidget)
};
#endif // LANGUAGETOOLCONFIGWIDGET_H
......@@ -21,17 +21,17 @@
#include <QJsonArray>
LanguagetoolGrammarError::LanguagetoolGrammarError()
LanguageToolGrammarError::LanguageToolGrammarError()
{
}
LanguagetoolGrammarError::~LanguagetoolGrammarError()
LanguageToolGrammarError::~LanguageToolGrammarError()
{
}
void LanguagetoolGrammarError::parse(const QJsonObject &obj, int blockindex)
void LanguageToolGrammarError::parse(const QJsonObject &obj, int blockindex)
{
//We use block id index based on 1 in API
mBlockId = blockindex + 1;
......@@ -51,7 +51,7 @@ void LanguagetoolGrammarError::parse(const QJsonObject &obj, int blockindex)
}
QStringList LanguagetoolGrammarError::parseSuggestion(const QJsonObject &obj)
QStringList LanguageToolGrammarError::parseSuggestion(const QJsonObject &obj)
{
QStringList lst;
const QJsonArray array = obj[QStringLiteral("replacements")].toArray();
......
......@@ -22,16 +22,16 @@
#include "grammarerror.h"
#include "liblanguagetool_private_export.h"
class LIBLANGUAGETOOLPRIVATE_TESTS_EXPORT LanguagetoolGrammarError : public GrammarError
class LIBLANGUAGETOOLPRIVATE_TESTS_EXPORT LanguageToolGrammarError : public GrammarError
{
public:
LanguagetoolGrammarError();
~LanguagetoolGrammarError() override;
LanguageToolGrammarError();
~LanguageToolGrammarError() override;
void parse(const QJsonObject &obj, int blockindex) override;
private:
static QStringList parseSuggestion(const QJsonObject &obj);
};
Q_DECLARE_METATYPE(LanguagetoolGrammarError)
Q_DECLARE_TYPEINFO(LanguagetoolGrammarError, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(LanguageToolGrammarError)
Q_DECLARE_TYPEINFO(LanguageToolGrammarError, Q_MOVABLE_TYPE);
#endif // LANGUAGETOOLGRAMMARERROR_H
......@@ -23,59 +23,59 @@
#include <KSharedConfig>
#include <QNetworkAccessManager>
LanguagetoolManager::LanguagetoolManager(QObject *parent)
LanguageToolManager::LanguageToolManager(QObject *parent)
: QObject(parent)
, mNetworkAccessManager(new QNetworkAccessManager(this))
{
loadSettings();
}
LanguagetoolManager::~LanguagetoolManager()
LanguageToolManager::~LanguageToolManager()
{
}
LanguagetoolManager *LanguagetoolManager::self()
LanguageToolManager