[keyboard] Apply coding style
- Include order - ci/calamaresstyle - modern alias for job-list
This commit is contained in:
parent
df0a98b2a4
commit
ba8811c628
@ -18,11 +18,11 @@
|
|||||||
|
|
||||||
#include "KeyboardViewStep.h"
|
#include "KeyboardViewStep.h"
|
||||||
|
|
||||||
#include "JobQueue.h"
|
|
||||||
#include "GlobalStorage.h"
|
|
||||||
|
|
||||||
#include "KeyboardPage.h"
|
#include "KeyboardPage.h"
|
||||||
|
|
||||||
|
#include "GlobalStorage.h"
|
||||||
|
#include "JobQueue.h"
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardViewStepFactory, registerPlugin< KeyboardViewStep >(); )
|
CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardViewStepFactory, registerPlugin< KeyboardViewStep >(); )
|
||||||
|
|
||||||
KeyboardViewStep::KeyboardViewStep( QObject* parent )
|
KeyboardViewStep::KeyboardViewStep( QObject* parent )
|
||||||
@ -40,8 +40,10 @@ KeyboardViewStep::KeyboardViewStep( QObject* parent )
|
|||||||
KeyboardViewStep::~KeyboardViewStep()
|
KeyboardViewStep::~KeyboardViewStep()
|
||||||
{
|
{
|
||||||
if ( m_widget && m_widget->parent() == nullptr )
|
if ( m_widget && m_widget->parent() == nullptr )
|
||||||
|
{
|
||||||
m_widget->deleteLater();
|
m_widget->deleteLater();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@ -111,9 +113,7 @@ void
|
|||||||
KeyboardViewStep::onLeave()
|
KeyboardViewStep::onLeave()
|
||||||
{
|
{
|
||||||
m_widget->finalize();
|
m_widget->finalize();
|
||||||
m_jobs = m_widget->createJobs( m_xOrgConfFileName,
|
m_jobs = m_widget->createJobs( m_xOrgConfFileName, m_convertedKeymapPath, m_writeEtcDefaultKeyboard );
|
||||||
m_convertedKeymapPath,
|
|
||||||
m_writeEtcDefaultKeyboard );
|
|
||||||
m_prettyStatus = m_widget->prettyStatus();
|
m_prettyStatus = m_widget->prettyStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,29 +121,35 @@ KeyboardViewStep::onLeave()
|
|||||||
void
|
void
|
||||||
KeyboardViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
KeyboardViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||||
{
|
{
|
||||||
if ( configurationMap.contains( "xOrgConfFileName" ) &&
|
if ( configurationMap.contains( "xOrgConfFileName" )
|
||||||
configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String &&
|
&& configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String
|
||||||
!configurationMap.value( "xOrgConfFileName" ).toString().isEmpty() )
|
&& !configurationMap.value( "xOrgConfFileName" ).toString().isEmpty() )
|
||||||
{
|
{
|
||||||
m_xOrgConfFileName = configurationMap.value( "xOrgConfFileName" )
|
m_xOrgConfFileName = configurationMap.value( "xOrgConfFileName" ).toString();
|
||||||
.toString();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_xOrgConfFileName = "00-keyboard.conf";
|
m_xOrgConfFileName = "00-keyboard.conf";
|
||||||
|
}
|
||||||
|
|
||||||
if ( configurationMap.contains( "convertedKeymapPath" ) &&
|
if ( configurationMap.contains( "convertedKeymapPath" )
|
||||||
configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String &&
|
&& configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String
|
||||||
!configurationMap.value( "convertedKeymapPath" ).toString().isEmpty() )
|
&& !configurationMap.value( "convertedKeymapPath" ).toString().isEmpty() )
|
||||||
{
|
{
|
||||||
m_convertedKeymapPath = configurationMap.value( "convertedKeymapPath" )
|
m_convertedKeymapPath = configurationMap.value( "convertedKeymapPath" ).toString();
|
||||||
.toString();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_convertedKeymapPath = QString();
|
m_convertedKeymapPath = QString();
|
||||||
|
}
|
||||||
|
|
||||||
if ( configurationMap.contains( "writeEtcDefaultKeyboard" ) &&
|
if ( configurationMap.contains( "writeEtcDefaultKeyboard" )
|
||||||
configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool )
|
&& configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool )
|
||||||
|
{
|
||||||
m_writeEtcDefaultKeyboard = configurationMap.value( "writeEtcDefaultKeyboard" ).toBool();
|
m_writeEtcDefaultKeyboard = configurationMap.value( "writeEtcDefaultKeyboard" ).toBool();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_writeEtcDefaultKeyboard = true;
|
m_writeEtcDefaultKeyboard = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -20,12 +20,11 @@
|
|||||||
#ifndef KEYBOARDVIEWSTEP_H
|
#ifndef KEYBOARDVIEWSTEP_H
|
||||||
#define KEYBOARDVIEWSTEP_H
|
#define KEYBOARDVIEWSTEP_H
|
||||||
|
|
||||||
#include <QObject>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
#include "utils/PluginFactory.h"
|
#include "utils/PluginFactory.h"
|
||||||
#include "viewpages/ViewStep.h"
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include <QObject>
|
||||||
|
|
||||||
class KeyboardPage;
|
class KeyboardPage;
|
||||||
|
|
||||||
@ -48,7 +47,7 @@ public:
|
|||||||
bool isAtBeginning() const override;
|
bool isAtBeginning() const override;
|
||||||
bool isAtEnd() const override;
|
bool isAtEnd() const override;
|
||||||
|
|
||||||
QList< Calamares::job_ptr > jobs() const override;
|
Calamares::JobList jobs() const override;
|
||||||
|
|
||||||
void onActivate() override;
|
void onActivate() override;
|
||||||
void onLeave() override;
|
void onLeave() override;
|
||||||
@ -64,7 +63,7 @@ private:
|
|||||||
QString m_convertedKeymapPath;
|
QString m_convertedKeymapPath;
|
||||||
bool m_writeEtcDefaultKeyboard;
|
bool m_writeEtcDefaultKeyboard;
|
||||||
|
|
||||||
QList< Calamares::job_ptr > m_jobs;
|
Calamares::JobList m_jobs;
|
||||||
};
|
};
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardViewStepFactory )
|
CALAMARES_PLUGIN_FACTORY_DECLARATION( KeyboardViewStepFactory )
|
||||||
|
Loading…
Reference in New Issue
Block a user