Commit 23e63a76 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Avoid calling twice completer

parent e44a6981
......@@ -36,6 +36,7 @@ public:
, textEdit(editor)
, q(qq)
{
createCompleter();
}
TextEditorCompleterPrivate(QPlainTextEdit *editor, TextEditorCompleter *qq)
......@@ -44,6 +45,7 @@ public:
, textEdit(nullptr)
, q(qq)
{
createCompleter();
}
void setCompletion(const QString &completion);
......@@ -168,7 +170,6 @@ QCompleter *TextEditorCompleter::completer() const
void TextEditorCompleter::setCompleterStringList(const QStringList &listWord)
{
d->createCompleter();
d->completer->setModel(new QStringListModel(QStringList() << listWord << QStringLiteral("TESTING"), d->completer));
}
......
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