From f8afb15c4ceaef8745b573c4dbcd44ad1716a516 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Mar 2021 20:47:27 +0100 Subject: [PATCH] [libcalamaresui] Improve logging for QML modules - mention which instance produces warnings - tag additional debugging from the same method with Logger::SubEntry --- src/libcalamaresui/viewpages/QmlViewStep.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libcalamaresui/viewpages/QmlViewStep.cpp b/src/libcalamaresui/viewpages/QmlViewStep.cpp index 17a1ea79c..b0392e404 100644 --- a/src/libcalamaresui/viewpages/QmlViewStep.cpp +++ b/src/libcalamaresui/viewpages/QmlViewStep.cpp @@ -168,7 +168,7 @@ QmlViewStep::loadComplete() } if ( m_qmlComponent->isReady() && !m_qmlObject ) { - cDebug() << "QML component complete" << m_qmlFileName; + cDebug() << Logger::SubEntry << "QML component complete" << m_qmlFileName << "creating object"; // Don't do this again disconnect( m_qmlComponent, &QQmlComponent::statusChanged, this, &QmlViewStep::loadComplete ); @@ -196,7 +196,7 @@ QmlViewStep::showQml() { if ( !m_qmlWidget || !m_qmlObject ) { - cDebug() << "showQml() called but no QML object"; + cWarning() << "showQml() called but no QML object"; return; } if ( m_spinner ) @@ -208,7 +208,7 @@ QmlViewStep::showQml() } else { - cDebug() << "showQml() called twice"; + cWarning() << "showQml() called twice"; } if ( ViewManager::instance()->currentStep() == this ) @@ -228,7 +228,7 @@ QmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) = CalamaresUtils::qmlSearchNames().find( CalamaresUtils::getString( configurationMap, "qmlSearch" ), ok ); if ( !ok ) { - cDebug() << "Bad QML search mode."; + cWarning() << "Bad QML search mode set for" << moduleInstanceKey(); } QString qmlFile = CalamaresUtils::getString( configurationMap, "qmlFilename" ); @@ -253,7 +253,7 @@ QmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } else { - cWarning() << "QML configuration set after component has loaded."; + cWarning() << "QML configuration set after component" << moduleInstanceKey() << "has loaded."; } }