From e3008657c49725429b03f99402ad14518e5a4f43 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 5 Jul 2017 12:10:06 -0400 Subject: [PATCH] Modules: accept 'viewmodule' as alias of 'view', improve logging on error. --- src/libcalamaresui/modulesystem/Module.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libcalamaresui/modulesystem/Module.cpp b/src/libcalamaresui/modulesystem/Module.cpp index 6f19d36a4..ee99ae473 100644 --- a/src/libcalamaresui/modulesystem/Module.cpp +++ b/src/libcalamaresui/modulesystem/Module.cpp @@ -76,7 +76,7 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor, << instanceId; return nullptr; } - if ( typeString == "view" ) + if ( ( typeString == "view" ) || ( typeString == "viewmodule" ) ) { if ( intfString == "qtplugin" ) { @@ -88,6 +88,8 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor, m = new PythonQtViewModule(); } #endif + else + cLog() << "Bad interface" << intfString << "for module type" << typeString; } else if ( typeString == "job" ) { @@ -105,7 +107,12 @@ Module::fromDescriptor( const QVariantMap& moduleDescriptor, m = new PythonJobModule(); } #endif + else + cLog() << "Bad interface" << intfString << "for module type" << typeString; } + else + cLog() << "Bad module type" << typeString; + if ( !m ) { cLog() << Q_FUNC_INFO << "bad module type or interface string"