[users] Fix reading shells from the config file.

This commit is contained in:
Philip 2016-12-23 09:45:39 +01:00
parent 742deb1203
commit edade9423f

View File

@ -22,6 +22,7 @@
#include "JobQueue.h" #include "JobQueue.h"
#include "GlobalStorage.h" #include "GlobalStorage.h"
#include "utils/Logger.h"
CALAMARES_PLUGIN_FACTORY_DEFINITION( UsersViewStepFactory, registerPlugin<UsersViewStep>(); ) CALAMARES_PLUGIN_FACTORY_DEFINITION( UsersViewStepFactory, registerPlugin<UsersViewStep>(); )
@ -161,9 +162,14 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap )
} }
if ( configurationMap.contains( "availableShells" ) && if ( configurationMap.contains( "availableShells" ) &&
configurationMap.value( "availableShells" ).type() == QVariant::List ) configurationMap.value( "availableShells" ).type() == QVariant::String )
{ {
m_widget->setAvailableShells( configurationMap.value( "availableShells" ).toStringList() ); QStringList shells;
for (QString& shell : configurationMap.value( "availableShells" ).toString().split(",")) {
shells.append( shell.trimmed() );
}
m_widget->setAvailableShells(shells);
} }
if ( configurationMap.contains( "avatarFilePath" ) && if ( configurationMap.contains( "avatarFilePath" ) &&