|
1 | 1 | /* |
2 | | - * SPDX-FileCopyrightText: <text>2013~2022 CSSlayer <wengxt@gmail.com>, Naoaki Iwakiri |
3 | | - * <naokiri@gmail.com></text> |
| 2 | + * SPDX-FileCopyrightText: <text>2013~2022 CSSlayer <wengxt@gmail.com>, Naoaki |
| 3 | + * Iwakiri <naokiri@gmail.com></text> |
4 | 4 | * |
5 | 5 | * SPDX-License-Identifier: GPL-3.0-or-later |
6 | 6 | * |
|
9 | 9 | #include "adddictdialog.h" |
10 | 10 | #include "dictmodel.h" |
11 | 11 | #include "skk_dict_config.h" |
| 12 | +#include <QComboBox> |
12 | 13 | #include <QDebug> |
| 14 | +#include <QDialogButtonBox> |
13 | 15 | #include <QFileDialog> |
| 16 | +#include <QLineEdit> |
| 17 | +#include <QPushButton> |
14 | 18 | #include <fcitx-utils/standardpath.h> |
15 | 19 | #include <fcitxqti18nhelper.h> |
16 | 20 |
|
@@ -38,6 +42,8 @@ AddDictDialog::AddDictDialog(QWidget *parent) |
38 | 42 | &AddDictDialog::indexChanged); |
39 | 43 | connect(m_ui->urlLineEdit, &QLineEdit::textChanged, this, |
40 | 44 | &AddDictDialog::validate); |
| 45 | + connect(m_ui->encodingEdit, &QLineEdit::textChanged, this, |
| 46 | + &AddDictDialog::validate); |
41 | 47 | } |
42 | 48 |
|
43 | 49 | QMap<QString, QString> AddDictDialog::dictionary() { |
@@ -112,6 +118,7 @@ void AddDictDialog::browseClicked() { |
112 | 118 | if (!path.isEmpty()) { |
113 | 119 | m_ui->urlLineEdit->setText(path); |
114 | 120 | } |
| 121 | + validate(); |
115 | 122 | } |
116 | 123 | void AddDictDialog::setDictionary(QMap<QString, QString> &dict) { |
117 | 124 | m_ui->urlLineEdit->setText(dict["file"]); |
|
0 commit comments