Commit 66662eeb authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/app/DefaultTranslator): handle correcty extra selectors

parent 64e54ca6
......@@ -32,6 +32,7 @@
#include "App.hpp"
#include <QFileSelector>
#include <QMenu>
#include <QQmlComponent>
#include <QQmlContext>
......@@ -114,6 +115,8 @@ void App::initContentApp () {
CoreManager::init();
qInfo() << "Core manager initialized.";
qInfo() << "Activated selectors:" << QQmlFileSelector::get(&m_engine)->selector()->allSelectors();
// Register types ans make sub windows.
registerTypes();
createSubWindows();
......
......@@ -33,8 +33,12 @@ DefaultTranslator::DefaultTranslator () {
QFileInfo info(it.next());
if (info.suffix() == "qml") {
QString basename = info.baseName();
// Ignore extra selectors.
QString dir = info.absoluteDir().dirName();
if (dir == "+linux" || dir == "+mac" || dir == "+windows")
continue;
QString basename = info.baseName();
if (m_contexts.contains(basename))
qWarning() << QStringLiteral("QML context `%1` already exists in contexts list.").arg(basename);
else
......
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