mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 21:58:06 +00:00
fix(DefaultTranslator): deal with 5.9 components
This commit is contained in:
parent
5dd0161a68
commit
d95f523946
1 changed files with 7 additions and 3 deletions
|
|
@ -33,10 +33,13 @@ DefaultTranslator::DefaultTranslator (QObject *parent) : QTranslator(parent) {
|
|||
QFileInfo info(it.next());
|
||||
|
||||
if (info.suffix() == "qml") {
|
||||
// Ignore extra selectors.
|
||||
QString dir = info.absoluteDir().absolutePath();
|
||||
if (dir.contains("+linux") || dir.contains("+mac") || dir.contains("+windows"))
|
||||
continue;
|
||||
|
||||
// Ignore extra selectors.
|
||||
// TODO: Remove 5.9 support in July 2018.
|
||||
for (const auto &selector : { "+linux", "+mac", "+windows", "+5.9" })
|
||||
if (dir.contains(selector))
|
||||
goto end;
|
||||
|
||||
// Ignore default imports.
|
||||
if (dir.startsWith(":/QtQuick"))
|
||||
|
|
@ -48,6 +51,7 @@ DefaultTranslator::DefaultTranslator (QObject *parent) : QTranslator(parent) {
|
|||
else
|
||||
mContexts << basename;
|
||||
}
|
||||
end:;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue