summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp
index 01d9a98..1f9f8c3 100644
--- a/noncore/settings/netsystemtime/mainwindow.cpp
+++ b/noncore/settings/netsystemtime/mainwindow.cpp
@@ -288,65 +288,65 @@ void MainWindow::slotGetNTPTime()
void MainWindow::slotTimerGetNTPTime()
{
ntpInteractive = false;
runNTP();
}
void MainWindow::slotProbeNTPServer()
{
ntpSock->connectToHost( settingsTab->ntpServer(), 123 );
}
void MainWindow::slotNtpOutput( OProcess *, char *buffer, int buflen )
{
QString output = QString( buffer ).left( buflen );
ntpOutput.append( output );
if ( ntpTabEnabled )
ntpTab->addNtpOutput( output );
}
void MainWindow::slotNtpFinished( OProcess *p )
{
QString output;
QDateTime dt = QDateTime::currentDateTime();
// Re-enable set time buttons & change app caption to indicate time update is happening
if ( ntpTabEnabled )
ntpTab->setNTPBtnEnabled( true );
timeTab->setNTPBtnEnabled( true );
setCaption( tr( "SystemTime" ) );
// Verify run was successful
- if ( p->exitStatus() != 0 || !p->normalExit() )
+ if ( p->exitStatus() != 0 )
{
if ( isVisible() && ntpInteractive )
{
output = tr( "Error while getting time from\n server: " );
output.append( settingsTab->ntpServer() );
QMessageBox::critical(this, tr( "Error" ), output );
}
// slotCheckNtp(-1);
return;
}
// Set controls on time tab to new time value
timeTab->setDateTime( dt );
// Write out lookup information
Config config( "ntp" );
config.setGroup( "lookups" );
int lastLookup = config.readNumEntry( "time", 0 );
int lookupCount = config.readNumEntry( "count", 0 );
bool lastNtp = config.readBoolEntry( "lastNtp", false );
int time = TimeConversion::toUTC( QDateTime::currentDateTime() );
config.writeEntry( "time", time );
// Calculate new time/time shift
QString _offset = "offset";
QString _sec = "sec";
QRegExp _reOffset = QRegExp( _offset );
QRegExp _reEndOffset = QRegExp( _sec );
int posOffset = _reOffset.match( ntpOutput );
int posEndOffset = _reEndOffset.match( ntpOutput, posOffset );
posOffset += _offset.length() + 1;
QString diff = ntpOutput.mid( posOffset, posEndOffset - posOffset - 1 );