[keyboardq] fix build

This commit is contained in:
demmm 2020-10-25 18:35:03 +01:00
parent fea403186f
commit f6e6774f92
2 changed files with 5 additions and 42 deletions

View File

@ -2,6 +2,7 @@
* *
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com> * SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com>
* SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is Free Software: see the License-Identifier above. * Calamares is Free Software: see the License-Identifier above.
@ -10,9 +11,10 @@
#include "KeyboardQmlViewStep.h" #include "KeyboardQmlViewStep.h"
#include "Config.h"
#include "GlobalStorage.h" #include "GlobalStorage.h"
#include "JobQueue.h" #include "JobQueue.h"
#include "utils/Variant.h"
CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardQmlViewStepFactory, registerPlugin< KeyboardQmlViewStep >(); ) CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardQmlViewStepFactory, registerPlugin< KeyboardQmlViewStep >(); )
@ -20,7 +22,6 @@ KeyboardQmlViewStep::KeyboardQmlViewStep( QObject* parent )
: Calamares::QmlViewStep( parent ) : Calamares::QmlViewStep( parent )
, m_config( new Config( this ) ) , m_config( new Config( this ) )
, m_nextEnabled( false ) , m_nextEnabled( false )
, m_writeEtcDefaultKeyboard( true )
{ {
m_config->init(); m_config->init();
m_nextEnabled = true; m_nextEnabled = true;
@ -66,7 +67,7 @@ KeyboardQmlViewStep::isAtEnd() const
Calamares::JobList Calamares::JobList
KeyboardQmlViewStep::jobs() const KeyboardQmlViewStep::jobs() const
{ {
return m_jobs; return m_config->createJobs();
} }
void void
@ -79,7 +80,6 @@ void
KeyboardQmlViewStep::onLeave() KeyboardQmlViewStep::onLeave()
{ {
m_config->finalize(); m_config->finalize();
// m_jobs = m_config->createJobs( m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard );
m_prettyStatus = m_config->prettyStatus(); m_prettyStatus = m_config->prettyStatus();
} }
@ -92,39 +92,6 @@ KeyboardQmlViewStep::getConfig()
void void
KeyboardQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) KeyboardQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{ {
using namespace CalamaresUtils;
if ( configurationMap.contains( "xOrgConfFileName" )
&& configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String
&& !getString( configurationMap, "xOrgConfFileName" ).isEmpty() )
{
m_xOrgConfFileName = getString( configurationMap, "xOrgConfFileName" );
}
else
{
m_xOrgConfFileName = "00-keyboard.conf";
}
if ( configurationMap.contains( "convertedKeymapPath" )
&& configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String
&& !getString( configurationMap, "convertedKeymapPath" ).isEmpty() )
{
m_convertedKeymapPath = getString( configurationMap, "convertedKeymapPath" );
}
else
{
m_convertedKeymapPath = QString();
}
if ( configurationMap.contains( "writeEtcDefaultKeyboard" )
&& configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool )
{
m_writeEtcDefaultKeyboard = getBool( configurationMap, "writeEtcDefaultKeyboard", true );
}
else
{
m_writeEtcDefaultKeyboard = true;
}
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); Calamares::QmlViewStep::setConfigurationMap( configurationMap );
} }

View File

@ -19,6 +19,7 @@
#include <QObject> #include <QObject>
class Config;
class KeyboardPage; class KeyboardPage;
class PLUGINDLLEXPORT KeyboardQmlViewStep : public Calamares::QmlViewStep class PLUGINDLLEXPORT KeyboardQmlViewStep : public Calamares::QmlViewStep
@ -50,11 +51,6 @@ private:
bool m_nextEnabled; bool m_nextEnabled;
QString m_prettyStatus; QString m_prettyStatus;
QString m_xOrgConfFileName;
QString m_convertedKeymapPath;
bool m_writeEtcDefaultKeyboard;
Calamares::JobList m_jobs;
}; };
CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardQmlViewStepFactory ) CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardQmlViewStepFactory )