author | erik <erik> | 2007-04-23 20:38:22 (UTC) |
---|---|---|
committer | erik <erik> | 2007-04-23 20:38:22 (UTC) |
commit | d38e40fe9ee475230425fa83e924c49e5946b87c (patch) (unidiff) | |
tree | f10fceda92538e1bc9cee66f82062773974ec092 /noncore/settings/netsystemtime | |
parent | 1edbb754d3c8cfccf1630e2ad1e531e907555cbd (diff) | |
download | opie-d38e40fe9ee475230425fa83e924c49e5946b87c.zip opie-d38e40fe9ee475230425fa83e924c49e5946b87c.tar.gz opie-d38e40fe9ee475230425fa83e924c49e5946b87c.tar.bz2 |
Fix for bug 1848 where the outcome of setting the time to 12:00AM did not
work.
This commit is based on a patch submitted by harlekin. Thank you!
Diffstat (limited to 'noncore/settings/netsystemtime') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/timetabwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/netsystemtime/timetabwidget.cpp b/noncore/settings/netsystemtime/timetabwidget.cpp index 895514b..e6fcf7f 100644 --- a/noncore/settings/netsystemtime/timetabwidget.cpp +++ b/noncore/settings/netsystemtime/timetabwidget.cpp | |||
@@ -172,17 +172,17 @@ void TimeTabWidget::saveSettings( bool commit ) | |||
172 | 172 | ||
173 | void TimeTabWidget::setDateTime( const QDateTime &dt ) | 173 | void TimeTabWidget::setDateTime( const QDateTime &dt ) |
174 | { | 174 | { |
175 | // Set time | 175 | // Set time |
176 | QTime t = dt.time(); | 176 | QTime t = dt.time(); |
177 | if( use12HourTime ) | 177 | if( use12HourTime ) |
178 | { | 178 | { |
179 | int show_hour = t.hour(); | 179 | int show_hour = t.hour(); |
180 | if ( t.hour() >= 12 ) | 180 | if ( t.hour() > 12 ) |
181 | { | 181 | { |
182 | show_hour -= 12; | 182 | show_hour -= 12; |
183 | cbAmpm->setCurrentItem( ValuePM ); | 183 | cbAmpm->setCurrentItem( ValuePM ); |
184 | } | 184 | } |
185 | else | 185 | else |
186 | { | 186 | { |
187 | cbAmpm->setCurrentItem( ValueAM ); | 187 | cbAmpm->setCurrentItem( ValueAM ); |
188 | } | 188 | } |
@@ -234,17 +234,17 @@ void TimeTabWidget::slotUse12HourTime( int i ) | |||
234 | 234 | ||
235 | int show_hour = sbHour->value(); | 235 | int show_hour = sbHour->value(); |
236 | 236 | ||
237 | if ( use12HourTime ) | 237 | if ( use12HourTime ) |
238 | { | 238 | { |
239 | sbHour->setMinValue( 1 ); | 239 | sbHour->setMinValue( 1 ); |
240 | sbHour->setMaxValue( 12 ); | 240 | sbHour->setMaxValue( 12 ); |
241 | 241 | ||
242 | if ( show_hour >= 12 ) | 242 | if ( show_hour > 12 ) |
243 | { | 243 | { |
244 | show_hour -= 12; | 244 | show_hour -= 12; |
245 | cbAmpm->setCurrentItem( ValuePM ); | 245 | cbAmpm->setCurrentItem( ValuePM ); |
246 | } | 246 | } |
247 | else | 247 | else |
248 | { | 248 | { |
249 | cbAmpm->setCurrentItem( ValueAM ); | 249 | cbAmpm->setCurrentItem( ValueAM ); |
250 | } | 250 | } |