diff options
author | Arno <arno@disconnect.de> | 2024-11-09 13:17:26 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2024-11-09 13:17:26 +0100 |
commit | 6a60dd9a73cf336a67fdce4f8e067953c765fad9 (patch) | |
tree | ad9ca57296e94b1b795aa588e338d07110b6e1eb /sminputdialog.h | |
parent | 714bca79318b828c3ca8af1c9a4e7a65ad5fa578 (diff) | |
download | SheMov-6a60dd9a73cf336a67fdce4f8e067953c765fad9.tar.gz SheMov-6a60dd9a73cf336a67fdce4f8e067953c765fad9.tar.bz2 SheMov-6a60dd9a73cf336a67fdce4f8e067953c765fad9.zip |
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.
Diffstat (limited to 'sminputdialog.h')
-rw-r--r-- | sminputdialog.h | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |