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

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

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