Fix typos in QBBSystemLocaleData
Change-Id: Ic893cdf4a274af660fae7f39011851318f0d244b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
21c23ca539
commit
2523f20c61
@ -85,7 +85,7 @@ QBBSystemLocaleData::QBBSystemLocaleData()
|
|||||||
// subsequent call to QSocketNotifier constructor to fail.
|
// subsequent call to QSocketNotifier constructor to fail.
|
||||||
QMetaObject::invokeMethod(this, "installSocketNotifiers", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, "installSocketNotifiers", Qt::QueuedConnection);
|
||||||
|
|
||||||
readLangageLocale();
|
readLanguageLocale();
|
||||||
readRegionLocale();
|
readRegionLocale();
|
||||||
readMeasurementSystem();
|
readMeasurementSystem();
|
||||||
readHourFormat();
|
readHourFormat();
|
||||||
@ -123,8 +123,8 @@ QVariant QBBSystemLocaleData::dateTimeFormat(QLocale::FormatType formatType)
|
|||||||
|
|
||||||
QLocale QBBSystemLocaleData::languageLocale()
|
QLocale QBBSystemLocaleData::languageLocale()
|
||||||
{
|
{
|
||||||
if (!lc_langage.isEmpty())
|
if (!lc_language.isEmpty())
|
||||||
return QLocale(QLatin1String(lc_langage));
|
return QLocale(QLatin1String(lc_language));
|
||||||
|
|
||||||
return QLocale::c();
|
return QLocale::c();
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ void QBBSystemLocaleData::installSocketNotifiers()
|
|||||||
Q_ASSERT(QCoreApplication::instance());
|
Q_ASSERT(QCoreApplication::instance());
|
||||||
|
|
||||||
languageNotifier = new QSocketNotifier(languageFd, QSocketNotifier::Read, this);
|
languageNotifier = new QSocketNotifier(languageFd, QSocketNotifier::Read, this);
|
||||||
QObject::connect(languageNotifier, SIGNAL(activated(int)), this, SLOT(readLangageLocale()));
|
QObject::connect(languageNotifier, SIGNAL(activated(int)), this, SLOT(readLanguageLocale()));
|
||||||
|
|
||||||
regionNotifier = new QSocketNotifier(regionFd, QSocketNotifier::Read, this);
|
regionNotifier = new QSocketNotifier(regionFd, QSocketNotifier::Read, this);
|
||||||
QObject::connect(regionNotifier, SIGNAL(activated(int)), this, SLOT(readRegionLocale()));
|
QObject::connect(regionNotifier, SIGNAL(activated(int)), this, SLOT(readRegionLocale()));
|
||||||
@ -155,9 +155,9 @@ void QBBSystemLocaleData::installSocketNotifiers()
|
|||||||
QObject::connect(hourNotifier, SIGNAL(activated(int)), this, SLOT(readHourFormat()));
|
QObject::connect(hourNotifier, SIGNAL(activated(int)), this, SLOT(readHourFormat()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBBSystemLocaleData::readLangageLocale()
|
void QBBSystemLocaleData::readLanguageLocale()
|
||||||
{
|
{
|
||||||
lc_langage = readPpsValue("_CS_LOCALE", languageFd);
|
lc_language = readPpsValue("_CS_LOCALE", languageFd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBBSystemLocaleData::readRegionLocale()
|
void QBBSystemLocaleData::readRegionLocale()
|
||||||
|
@ -67,16 +67,16 @@ public:
|
|||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void installSocketNotifiers();
|
void installSocketNotifiers();
|
||||||
void readLangageLocale();
|
void readLanguageLocale();
|
||||||
void readRegionLocale();
|
void readRegionLocale();
|
||||||
void readMeasurementSystem();
|
void readMeasurementSystem();
|
||||||
void readHourFormat();
|
void readHourFormat();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QByteArray readPpsValue(const char* ppsObject, int ppsFd);
|
QByteArray readPpsValue(const char *ppsObject, int ppsFd);
|
||||||
QString getCorrectFormat(const QString &baseFormat, QLocale::FormatType typeFormat);
|
QString getCorrectFormat(const QString &baseFormat, QLocale::FormatType typeFormat);
|
||||||
|
|
||||||
QByteArray lc_langage;
|
QByteArray lc_language;
|
||||||
QByteArray lc_region;
|
QByteArray lc_region;
|
||||||
uint m_measurementSystem;
|
uint m_measurementSystem;
|
||||||
bool is24HourFormat;
|
bool is24HourFormat;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user