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

Don't use lambda, const'ify pointer

parent 03edb8b7
Pipeline #36577 failed with stage
in 72 minutes and 46 seconds
......@@ -38,7 +38,7 @@ private:
QScrollArea *mScrollArea = nullptr;
KUrlRequester *mPythonPath = nullptr;
KUrlRequester *mGrammalectePath = nullptr;
bool mDisableDialogBox = false;
const bool mDisableDialogBox = false;
};
#endif // GRAMMALECTECONFIGWIDGET_H
......@@ -23,8 +23,7 @@ void GrammalecteResultJob::start()
if (canStart()) {
mProcess = new QProcess(this);
QTemporaryFile *file = nullptr;
file = new QTemporaryFile(this);
QTemporaryFile *file = new QTemporaryFile(this);
file->open();
file->setPermissions(QFile::ReadUser);
file->write(mText.toUtf8());
......
......@@ -12,6 +12,9 @@
#include <KConfigGroup>
#include <KSharedConfig>
namespace {
static const char myConfigGroupName[] = "LanguageToolConfigDialog";
}
LanguageToolConfigDialog::LanguageToolConfigDialog(QWidget *parent)
: QDialog(parent)
{
......@@ -38,13 +41,13 @@ LanguageToolConfigDialog::~LanguageToolConfigDialog()
void LanguageToolConfigDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "LanguageToolConfigDialog");
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
group.writeEntry("Size", size());
}
void LanguageToolConfigDialog::readConfig()
{
KConfigGroup group(KSharedConfig::openConfig(), "LanguageToolConfigDialog");
KConfigGroup group(KSharedConfig::openConfig(), myConfigGroupName);
const QSize sizeDialog = group.readEntry("Size", QSize(500, 300));
if (sizeDialog.isValid()) {
resize(sizeDialog);
......
......@@ -46,10 +46,7 @@ LanguageToolConfigWidget::LanguageToolConfigWidget(QWidget *parent)
instanceLayout->addWidget(mInstancePath);
mainLayout->addLayout(instanceLayout);
connect(mUseLocalInstance, &QCheckBox::clicked, this, [this](bool b) {
updateWidgets(b);
}
);
connect(mUseLocalInstance, &QCheckBox::clicked, this, &LanguageToolConfigWidget::updateWidgets);
QHBoxLayout *languageLayout = new QHBoxLayout;
languageLayout->setObjectName(QStringLiteral("languagelayout"));
......
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