| 84 | } |
| 85 | |
| 86 | void SubstitutionsTable::setSourceLanguageModel(QStringListModel *model) |
| 87 | { |
| 88 | sourceLanguages_ = model; |
| 89 | connect(model, &QStringListModel::modelReset, // |
| 90 | this, [this] { |
| 91 | if (rowCount() > 0) // must be at least 1 if inited |
| 92 | setSubstitutions(substitutions()); |
| 93 | }); |
| 94 | } |
| 95 | |
| 96 | void SubstitutionsTable::setSubstitutions(const Substitutions &substitutions) |
| 97 | { |