[fbreader] Don't require book language to be in languagePatterns.zip

There ain't that many languages there, really. Not setting the language
may cause some format plugins to reset book encoding to "windows-1252".
This commit is contained in:
Slava Monich 2019-03-31 02:02:42 +02:00
parent 6b81b44c47
commit ffb9e883fa

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2009-2010 Geometer Plus <contact@geometerplus.com> * Copyright (C) 2009-2010 Geometer Plus <contact@geometerplus.com>
* Copyright (C) 2019 Slava Monich <slava.monich@jolla.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -238,14 +239,6 @@ void Book::setTitle(const std::string &title) {
} }
void Book::setLanguage(const std::string &language) { void Book::setLanguage(const std::string &language) {
if (!language.empty()) {
const std::vector<std::string> &codes = ZLLanguageList::languageCodes();
std::vector<std::string>::const_iterator it =
std::find(codes.begin(), codes.end(), language);
if (it == codes.end()) {
return;
}
}
myLanguage = language; myLanguage = language;
} }