mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Preferences: Don't list duplicated spellcheck dictionaries
Closes #2195
This commit is contained in:
parent
85f8cf881e
commit
fb38307783
@ -429,6 +429,9 @@ Preferences::Preferences(BrowserWindow* window)
|
|||||||
const QStringList files = dir.entryList({QSL("*.bdic")});
|
const QStringList files = dir.entryList({QSL("*.bdic")});
|
||||||
for (const QString &file : files) {
|
for (const QString &file : files) {
|
||||||
const QString lang = file.left(file.size() - 5);
|
const QString lang = file.left(file.size() - 5);
|
||||||
|
if (!ui->spellcheckLanguages->findItems(lang, Qt::MatchExactly).isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
QListWidgetItem *item = new QListWidgetItem;
|
QListWidgetItem *item = new QListWidgetItem;
|
||||||
item->setText(createLanguageItem(lang));
|
item->setText(createLanguageItem(lang));
|
||||||
item->setData(Qt::UserRole, lang);
|
item->setData(Qt::UserRole, lang);
|
||||||
|
Loading…
Reference in New Issue
Block a user