From 6a60dd9a73cf336a67fdce4f8e067953c765fad9 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 9 Nov 2024 13:17:26 +0100 Subject: Fix handling of QCompleter in SmInputDialog setCompleter() assumed that QLineEdit always had a valid completer and schedule it for later deletion. This caused random crashes when there was no deleter. So make sure that mLE always a valid deleter and set the model instead of a new completer. --- sminputdialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sminputdialog.h') diff --git a/sminputdialog.h b/sminputdialog.h index 4f2eb7e..43f3e53 100644 --- a/sminputdialog.h +++ b/sminputdialog.h @@ -12,7 +12,7 @@ class SmInputDialog : public QDialog { explicit SmInputDialog(const QString &label, QWidget *parent = nullptr); void setText(QString &text); const QString text() const { return mLE->text(); } - void setCompleter(QCompleter *completer); + void setCompleterModel(const QStringList &model); private: void setupDialog(); -- cgit v1.2.3-70-g09d2