summaryrefslogtreecommitdiffstats
path: root/sminputdialog.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2024-11-09 13:17:26 +0100
committerArno <arno@disconnect.de>2024-11-09 13:17:26 +0100
commit6a60dd9a73cf336a67fdce4f8e067953c765fad9 (patch)
treead9ca57296e94b1b795aa588e338d07110b6e1eb /sminputdialog.h
parent714bca79318b828c3ca8af1c9a4e7a65ad5fa578 (diff)
downloadSheMov-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.h2
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();