Keyboard: refactor type declaration
This commit is contained in:
parent
2c0802d18e
commit
8d9f75ffba
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -59,9 +60,9 @@ KeyboardLayoutModel::data( const QModelIndex& index, int role ) const
|
|||||||
void
|
void
|
||||||
KeyboardLayoutModel::init()
|
KeyboardLayoutModel::init()
|
||||||
{
|
{
|
||||||
QMap< QString, KeyboardGlobal::KeyboardInfo > layouts =
|
KeyboardGlobal::LayoutsMap layouts =
|
||||||
KeyboardGlobal::getKeyboardLayouts();
|
KeyboardGlobal::getKeyboardLayouts();
|
||||||
for ( QMap< QString, KeyboardGlobal::KeyboardInfo >::const_iterator it = layouts.constBegin();
|
for ( KeyboardGlobal::LayoutsMap::const_iterator it = layouts.constBegin();
|
||||||
it != layouts.constEnd(); ++it )
|
it != layouts.constEnd(); ++it )
|
||||||
{
|
{
|
||||||
m_layouts.append( qMakePair( it.key(), it.value() ) );
|
m_layouts.append( qMakePair( it.key(), it.value() ) );
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Originally from the Manjaro Installation Framework
|
* Originally from the Manjaro Installation Framework
|
||||||
* by Roland Singer <roland@manjaro.org>
|
* by Roland Singer <roland@manjaro.org>
|
||||||
@ -44,12 +45,15 @@ public:
|
|||||||
QMap< QString, QString > variants;
|
QMap< QString, QString > variants;
|
||||||
};
|
};
|
||||||
|
|
||||||
static QMap< QString, KeyboardInfo > getKeyboardLayouts();
|
using LayoutsMap = QMap< QString, KeyboardInfo >;
|
||||||
|
|
||||||
|
static LayoutsMap getKeyboardLayouts();
|
||||||
static QMap< QString, QString > getKeyboardModels();
|
static QMap< QString, QString > getKeyboardModels();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QMap< QString, QString > parseKeyboardModels(QString filepath);
|
static QMap< QString, QString > parseKeyboardModels(QString filepath);
|
||||||
static QMap< QString, KeyboardInfo > parseKeyboardLayouts(QString filepath);
|
static LayoutsMap parseKeyboardLayouts(QString filepath);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // KEYBOARDGLOBAL_H
|
#endif // KEYBOARDGLOBAL_H
|
||||||
|
Loading…
Reference in New Issue
Block a user