mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-31 16:54:46 +00:00
initialstart: Ensure initial value of 24 hour switch is obtained
Otherwise the switch's state is always off.
This commit is contained in:
parent
5169ae7579
commit
5f9f6b2d18
1 changed files with 5 additions and 0 deletions
|
|
@ -19,6 +19,11 @@ TimeUtil::TimeUtil(QObject *parent)
|
||||||
, m_filterModel{new TimeZoneFilterProxy{this}}
|
, m_filterModel{new TimeZoneFilterProxy{this}}
|
||||||
{
|
{
|
||||||
m_filterModel->setSourceModel(m_timeZoneModel);
|
m_filterModel->setSourceModel(m_timeZoneModel);
|
||||||
|
|
||||||
|
// retrieve is24HourTime
|
||||||
|
auto config = KSharedConfig::openConfig(QStringLiteral("kdeglobals"), KConfig::SimpleConfig);
|
||||||
|
auto group = KConfigGroup(config, "Locale");
|
||||||
|
m_is24HourTime = group.readEntry(QStringLiteral("TimeFormat"), FORMAT24H) == FORMAT24H;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TimeUtil::is24HourTime() const
|
bool TimeUtil::is24HourTime() const
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue