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

Fix autotest + allow to reload option

parent e67c90bb
......@@ -72,7 +72,12 @@ void GrammalecteConfigWidget::slotGetSettingsError()
void GrammalecteConfigWidget::slotGetSettingsFinished(const QVector<GrammalecteGenerateConfigOptionJob::Option> &result)
{
mListOptions.clear();
mListOptions.reserve(result.count());
delete mGrammarTabWidget->layout();
QVBoxLayout *layout = new QVBoxLayout(mGrammarTabWidget);
layout->setObjectName(QStringLiteral("grammartablayout"));
for (const GrammalecteGenerateConfigOptionJob::Option &opt : result) {
QCheckBox *box = new QCheckBox(opt.description, this);
box->setProperty("optionname", opt.optionName);
......
......@@ -25,12 +25,13 @@
#include <QLineEdit>
#include <QTest>
#include <QVBoxLayout>
#include <QStandardPaths>
QTEST_MAIN(LanguageToolConfigWidgetTest)
LanguageToolConfigWidgetTest::LanguageToolConfigWidgetTest(QObject *parent)
: QObject(parent)
{
QStandardPaths::setTestModeEnabled(true);
}
void LanguageToolConfigWidgetTest::shouldHaveDefaultValue()
......
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