scripting: Print QQmlComponent errors

This makes it easier to spot errors in declarative scripts.
This commit is contained in:
Vlad Zahorodnii 2021-12-05 18:01:38 +02:00
parent 0765a08cc8
commit 5b04aa3ebe

View file

@ -555,7 +555,7 @@ void KWin::DeclarativeScript::run()
void KWin::DeclarativeScript::createComponent()
{
if (m_component->isError()) {
qCDebug(KWIN_SCRIPTING) << "Component failed to load: " << m_component->errors();
qCWarning(KWIN_SCRIPTING) << "Component failed to load: " << m_component->errors();
} else {
if (QObject *object = m_component->create(m_context)) {
object->setParent(this);