[modules] Use new convenience logging methods

main
Adriaan de Groot 7 years ago
parent 60f440f72b
commit 3f77fb1d16

@ -110,7 +110,7 @@ ContextualProcessJob::setConfigurationMap( const QVariantMap& configurationMap )
if ( iter.value().type() != QVariant::Map )
{
cDebug() << "WARNING:" << moduleInstanceKey() << "bad configuration values for" << variableName;
cWarning() << moduleInstanceKey() << "bad configuration values for" << variableName;
continue;
}
@ -120,7 +120,7 @@ ContextualProcessJob::setConfigurationMap( const QVariantMap& configurationMap )
QString valueString = valueiter.key();
if ( variableName.isEmpty() )
{
cDebug() << "WARNING:" << moduleInstanceKey() << "variable" << variableName << "unrecognized value" << valueiter.key();
cWarning() << moduleInstanceKey() << "variable" << variableName << "unrecognized value" << valueiter.key();
continue;
}

@ -115,13 +115,13 @@ bool KeyBoardPreview::loadCodes() {
process.start("ckbcomp", param);
if (!process.waitForStarted())
{
cDebug() << "WARNING: ckbcomp not found , keyboard preview disabled";
cWarning() << "ckbcomp not found , keyboard preview disabled";
return false;
}
if (!process.waitForFinished())
{
cDebug() << "WARNING: ckbcomp failed, keyboard preview disabled";
cWarning() << "ckbcomp failed, keyboard preview disabled";
return false;
}

@ -346,7 +346,7 @@ LocalePage::init( const QString& initialRegion,
if ( m_localeGenLines.isEmpty() )
{
cDebug() << "WARNING: cannot acquire a list of available locales."
cWarning() << "cannot acquire a list of available locales."
<< "The locale and localecfg modules will be broken as long as this "
"system does not provide"
<< "\n\t "
@ -454,7 +454,7 @@ LocalePage::guessLocaleConfiguration() const
// If we cannot say anything about available locales
if ( m_localeGenLines.isEmpty() )
{
cDebug() << "WARNING: guessLocaleConfiguration can't guess from an empty list.";
cWarning() << "guessLocaleConfiguration can't guess from an empty list.";
return LocaleConfiguration::createDefault();
}

@ -220,7 +220,7 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
}
else
{
cDebug() << "WARNING: RequirementsChecker entry 'check' is incomplete.";
cWarning() << "RequirementsChecker entry 'check' is incomplete.";
incompleteConfiguration = true;
}
@ -232,14 +232,14 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
}
else
{
cDebug() << "WARNING: RequirementsChecker entry 'required' is incomplete.";
cWarning() << "RequirementsChecker entry 'required' is incomplete.";
incompleteConfiguration = true;
}
// Help out with consistency, but don't fix
for ( const auto& r : m_entriesToRequire )
if ( !m_entriesToCheck.contains( r ) )
cDebug() << "WARNING: RequirementsChecker requires" << r << "but does not check it.";
cWarning() << "RequirementsChecker requires" << r << "but does not check it.";
if ( configurationMap.contains( "requiredStorage" ) &&
( configurationMap.value( "requiredStorage" ).type() == QVariant::Double ||
@ -249,7 +249,7 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
m_requiredStorageGB = configurationMap.value( "requiredStorage" ).toDouble( &ok );
if ( !ok )
{
cDebug() << "WARNING: RequirementsChecker entry 'requiredStorage' is invalid.";
cWarning() << "RequirementsChecker entry 'requiredStorage' is invalid.";
m_requiredStorageGB = 3.;
}
@ -257,7 +257,7 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
}
else
{
cDebug() << "WARNING: RequirementsChecker entry 'requiredStorage' is missing.";
cWarning() << "RequirementsChecker entry 'requiredStorage' is missing.";
m_requiredStorageGB = 3.;
incompleteConfiguration = true;
}
@ -270,14 +270,14 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
m_requiredRamGB = configurationMap.value( "requiredRam" ).toDouble( &ok );
if ( !ok )
{
cDebug() << "WARNING: RequirementsChecker entry 'requiredRam' is invalid.";
cWarning() << "RequirementsChecker entry 'requiredRam' is invalid.";
m_requiredRamGB = 1.;
incompleteConfiguration = true;
}
}
else
{
cDebug() << "WARNING: RequirementsChecker entry 'requiredRam' is missing.";
cWarning() << "RequirementsChecker entry 'requiredRam' is missing.";
m_requiredRamGB = 1.;
incompleteConfiguration = true;
}
@ -289,7 +289,7 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
if ( m_checkHasInternetUrl.isEmpty() ||
!QUrl( m_checkHasInternetUrl ).isValid() )
{
cDebug() << "WARNING: RequirementsChecker entry 'internetCheckUrl' is invalid in welcome.conf" << m_checkHasInternetUrl
cWarning() << "RequirementsChecker entry 'internetCheckUrl' is invalid in welcome.conf" << m_checkHasInternetUrl
<< "reverting to default (http://example.com).";
m_checkHasInternetUrl = "http://example.com";
incompleteConfiguration = true;
@ -297,7 +297,7 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
}
else
{
cDebug() << "WARNING: RequirementsChecker entry 'internetCheckUrl' is undefined in welcome.conf,"
cWarning() << "RequirementsChecker entry 'internetCheckUrl' is undefined in welcome.conf,"
"reverting to default (http://example.com).";
m_checkHasInternetUrl = "http://example.com";
@ -305,7 +305,7 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
}
if ( incompleteConfiguration )
cDebug() << "WARNING: RequirementsChecker configuration map:\n" << configurationMap;
cWarning() << "RequirementsChecker configuration map:\n" << configurationMap;
}
@ -320,7 +320,7 @@ bool
RequirementsChecker::checkEnoughStorage( qint64 requiredSpace )
{
#ifdef WITHOUT_LIBPARTED
cDebug() << "WARNING: RequirementsChecker is configured without libparted.";
cWarning() << "RequirementsChecker is configured without libparted.";
return false;
#else
return check_big_enough( requiredSpace );

Loading…
Cancel
Save