[libcalamares] Coding style
This commit is contained in:
parent
1b3d32ca79
commit
241cb04f06
@ -44,7 +44,7 @@ Label::Label( const QString& locale, LabelFormat format, QObject* parent )
|
||||
void
|
||||
Label::setLabels( const QString& locale, LabelFormat format )
|
||||
{
|
||||
emit localeIdChanged(m_localeId);
|
||||
emit localeIdChanged( m_localeId );
|
||||
//: language[name] (country[name])
|
||||
QString longFormat = QObject::tr( "%1 (%2)" );
|
||||
|
||||
@ -65,10 +65,10 @@ Label::setLabels( const QString& locale, LabelFormat format )
|
||||
countryName = m_locale.nativeCountryName();
|
||||
}
|
||||
m_label = needsCountryName ? longFormat.arg( languageName, countryName ) : languageName;
|
||||
emit labelChanged(m_label);
|
||||
emit labelChanged( m_label );
|
||||
m_englishLabel = needsCountryName ? longFormat.arg( englishName, QLocale::countryToString( m_locale.country() ) )
|
||||
: englishName;
|
||||
emit englishLabelChanged(m_englishLabel);
|
||||
emit englishLabelChanged( m_englishLabel );
|
||||
}
|
||||
|
||||
QLocale
|
||||
|
@ -21,8 +21,8 @@
|
||||
#define LOCALE_LABEL_H
|
||||
|
||||
#include <QLocale>
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
namespace CalamaresUtils
|
||||
{
|
||||
@ -40,9 +40,9 @@ class Label : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString label READ label NOTIFY labelChanged CONSTANT FINAL)
|
||||
Q_PROPERTY(QString englishLabel READ englishLabel NOTIFY englishLabelChanged CONSTANT FINAL)
|
||||
Q_PROPERTY(QString localeId MEMBER m_localeId NOTIFY localeIdChanged CONSTANT FINAL)
|
||||
Q_PROPERTY( QString label READ label NOTIFY labelChanged CONSTANT FINAL )
|
||||
Q_PROPERTY( QString englishLabel READ englishLabel NOTIFY englishLabelChanged CONSTANT FINAL )
|
||||
Q_PROPERTY( QString localeId MEMBER m_localeId NOTIFY localeIdChanged CONSTANT FINAL )
|
||||
|
||||
public:
|
||||
/** @brief Formatting option for label -- add (country) to label. */
|
||||
@ -53,7 +53,7 @@ public:
|
||||
};
|
||||
|
||||
/** @brief Empty locale. This uses the system-default locale. */
|
||||
Label(QObject* parent = nullptr);
|
||||
Label( QObject* parent = nullptr );
|
||||
|
||||
/** @brief Construct from a locale name.
|
||||
*
|
||||
@ -61,7 +61,9 @@ public:
|
||||
* The @p format determines whether the country name is always present
|
||||
* in the label (human-readable form) or only if needed for disambiguation.
|
||||
*/
|
||||
Label( const QString& localeName, LabelFormat format = LabelFormat::IfNeededWithCountry, QObject* parent = nullptr );
|
||||
Label( const QString& localeName,
|
||||
LabelFormat format = LabelFormat::IfNeededWithCountry,
|
||||
QObject* parent = nullptr );
|
||||
|
||||
/** @brief Define a sorting order.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user