I digged a little into sddm source code to find the code causing this and this is what I found. I added setenv manually so it finds the KDE QML files. Is there some kind of initialization not done ? The messages appear when ScreenModel() is called.
//// GreeterApp.cpp
GreeterApp::GreeterApp(int &argc, char **argv) : QGuiApplication(argc, argv) {
// point instance to this
self = this;
// Parse arguments
bool testing = false;
if (arguments().contains("--test-mode"))
testing = true;
// get socket name
QString socket = parameter(arguments(), "--socket", "");
setenv("QML2_IMPORT_PATH", "/opt/qt5/lib/qt5/qml:/usr/lib/qt5/qml:/lib/qt5/qml:/opt/kf5/lib/qt5/qml", 1);
setenv("QML_IMPORT_PATH", "/opt/qt5/lib/qt5/qml:/usr/lib/qt5/qml:/lib/qt5/qml:/opt/kf5/lib/qt5/qml", 1);
// get theme path
QString themePath = parameter(arguments(), "--theme", "");
// create view
m_view = new QQuickView();
m_view->setResizeMode(QQuickView::SizeRootObjectToView);
m_view->engine()->addImportPath(IMPORTS_INSTALL_DIR);
// read theme metadata
m_metadata = new ThemeMetadata(QString("%1/metadata.desktop").arg(themePath));
// Translations
// Components translation
m_components_tranlator = new QTranslator();
if (m_components_tranlator->load(QLocale::system(), "", "", COMPONENTS_TRANSLATION_DIR))
installTranslator(m_components_tranlator);
// Theme specific translation
m_theme_translator = new QTranslator();
if (m_theme_translator->load(QLocale::system(), "", "",
QString("%1/%2/").arg(themePath, m_metadata->translationsDirectory())))
installTranslator(m_theme_translator);
// get theme config file
QString configFile = QString("%1/%2").arg(themePath).arg(m_metadata->configFile());
// read theme config
m_themeConfig = new ThemeConfig(configFile);
// set default icon theme from greeter theme
if (m_themeConfig->contains("iconTheme"))
QIcon::setThemeName(m_themeConfig->value("iconTheme").toString());
// set cursor theme according to greeter theme
if (m_themeConfig->contains("cursorTheme"))
qputenv("XCURSOR_THEME", m_themeConfig->value("cursorTheme").toString().toUtf8());
// create models
m_sessionModel = new SessionModel();
/////////// ScreenModel() is called here
m_screenModel = new ScreenModel();
m_userModel = new UserModel();
m_proxy = new GreeterProxy(socket);
m_keyboard = new KeyboardModel();
if(!testing && !m_proxy->isConnected()) {
qCritical() << "Cannot connect to the daemon - is it running?";
exit(EXIT_FAILURE);
}
// Set numlock upon start
if (m_keyboard->enabled()) {
if (mainConfig.Numlock.get() == MainConfig::NUM_SET_ON)
m_keyboard->setNumLockState(true);
else if (mainConfig.Numlock.get() == MainConfig::NUM_SET_OFF)
m_keyboard->setNumLockState(false);
}
m_proxy->setSessionModel(m_sessionModel);
// connect proxy signals
QObject::connect(m_proxy, SIGNAL(loginSucceeded()), m_view, SLOT(close()));
// set context properties
m_view->rootContext()->setContextProperty("sessionModel", m_sessionModel);
m_view->rootContext()->setContextProperty("screenModel", m_screenModel);
m_view->rootContext()->setContextProperty("userModel", m_userModel);
m_view->rootContext()->setContextProperty("config", *m_themeConfig);
m_view->rootContext()->setContextProperty("sddm", m_proxy);
m_view->rootContext()->setContextProperty("keyboard", m_keyboard);
// get theme main script
QString mainScript = QString("%1/%2").arg(themePath).arg(m_metadata->mainScript());
// set main script as source
m_view->setSource(QUrl::fromLocalFile(mainScript));
// connect screen update signals
connect(m_screenModel, SIGNAL(primaryChanged()), this, SLOT(show()));
show();
}
//// ScreenModel.cpp
ScreenModel::ScreenModel(QObject *parent) : QAbstractListModel(parent), d(new ScreenModelPrivate()) {
// The messages appear at this code
connect(QGuiApplication::instance(), SIGNAL(screenAdded(QScreen*)), this, SLOT(onScreenAdded(QScreen*)));
initScreens(true);
}