Diffstat (limited to 'noncore/settings/netsystemtime/predicttabwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/predicttabwidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/netsystemtime/predicttabwidget.cpp b/noncore/settings/netsystemtime/predicttabwidget.cpp index 8dc889f..a9fe418 100644 --- a/noncore/settings/netsystemtime/predicttabwidget.cpp +++ b/noncore/settings/netsystemtime/predicttabwidget.cpp | |||
@@ -111,24 +111,25 @@ PredictTabWidget::PredictTabWidget( QWidget *parent ) | |||
111 | { | 111 | { |
112 | grpname = "lookup_"; | 112 | grpname = "lookup_"; |
113 | grpname.append( QString::number( i ) ); | 113 | grpname.append( QString::number( i ) ); |
114 | config.setGroup( grpname ); | 114 | config.setGroup( grpname ); |
115 | last = config.readEntry( "secsSinceLast", 0 ).toFloat(); | 115 | last = config.readEntry( "secsSinceLast", 0 ).toFloat(); |
116 | shift = QString( config.readEntry( "timeShift", 0 ) ).toFloat(); | 116 | shift = QString( config.readEntry( "timeShift", 0 ) ).toFloat(); |
117 | shiftPerSec = shift / last; | 117 | shiftPerSec = shift / last; |
118 | _shiftPerSec += shiftPerSec; | 118 | _shiftPerSec += shiftPerSec; |
119 | tblLookups->setText( i, 0, QString::number( shiftPerSec * 60 * 60 ) ); | 119 | tblLookups->setText( i, 0, QString::number( shiftPerSec * 60 * 60 ) ); |
120 | tblLookups->setText( i, 2, QString::number( shift ) ); | 120 | tblLookups->setText( i, 2, QString::number( shift ) ); |
121 | tblLookups->setText( i, 1, QString::number( last / ( 60 * 60 ) ) ); | 121 | tblLookups->setText( i, 1, QString::number( last / ( 60 * 60 ) ) ); |
122 | } | 122 | } |
123 | if(lookupCount) | ||
123 | _shiftPerSec /= lookupCount; | 124 | _shiftPerSec /= lookupCount; |
124 | QString drift = QString::number( _shiftPerSec * 60 * 60); | 125 | QString drift = QString::number( _shiftPerSec * 60 * 60); |
125 | drift.append( tr( " s/h" ) ); | 126 | drift.append( tr( " s/h" ) ); |
126 | lblDrift->setText( drift ); | 127 | lblDrift->setText( drift ); |
127 | 128 | ||
128 | Config lconfig( "locale" ); | 129 | Config lconfig( "locale" ); |
129 | lconfig.setGroup( "Location" ); | 130 | lconfig.setGroup( "Location" ); |
130 | tz = lconfig.readEntry( "Timezone", "America/New_York" ); | 131 | tz = lconfig.readEntry( "Timezone", "America/New_York" ); |
131 | } | 132 | } |
132 | 133 | ||
133 | PredictTabWidget::~PredictTabWidget() | 134 | PredictTabWidget::~PredictTabWidget() |
134 | { | 135 | { |