Commit d95f5239 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(DefaultTranslator): deal with 5.9 components

parent 5dd0161a
......@@ -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:;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment