diff --git a/src/libcalamaresui/modulesystem/ViewModule.cpp b/src/libcalamaresui/modulesystem/ViewModule.cpp index 1f940b30b..317d32712 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.cpp +++ b/src/libcalamaresui/modulesystem/ViewModule.cpp @@ -52,27 +52,32 @@ ViewModule::loadSelf() PluginFactory* pf = qobject_cast< PluginFactory* >( m_loader->instance() ); if ( !pf ) { - cDebug() << Q_FUNC_INFO << "No factory:" << m_loader->errorString(); + cWarning() << Q_FUNC_INFO << "No factory:" << m_loader->errorString(); return; } m_viewStep = pf->create< Calamares::ViewStep >(); if ( !m_viewStep ) { - cDebug() << Q_FUNC_INFO << "create() failed" << m_loader->errorString(); + cWarning() << Q_FUNC_INFO << "create() failed" << m_loader->errorString(); return; } -// cDebug() << "ViewModule loading self for instance" << instanceKey() -// << "\nViewModule at address" << this -// << "\nCalamares::PluginFactory at address" << pf -// << "\nViewStep at address" << m_viewStep; + } + + // TODO: allow internal view steps to be created here; they would + // have to be linked into the main application somehow. + // If any method created the view step, use it now. + if ( m_viewStep ) + { m_viewStep->setModuleInstanceKey( instanceKey() ); m_viewStep->setConfigurationMap( m_configurationMap ); ViewManager::instance()->addViewStep( m_viewStep ); m_loaded = true; cDebug() << "ViewModule" << instanceKey() << "loading complete."; } + else + cWarning() << Q_FUNC_INFO << "No view step was created"; }