summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/netsystemtime/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp
index ba96f33..385d355 100644
--- a/noncore/settings/netsystemtime/mainwindow.cpp
+++ b/noncore/settings/netsystemtime/mainwindow.cpp
@@ -170,51 +170,51 @@ void MainWindow::runNTP()
QMessageBox::warning( this, tr( "Continue?" ), msg, QMessageBox::Yes, QMessageBox::No )
)
{
case QMessageBox::Yes: break;
case QMessageBox::No: return;
default: return;
}
}
QString srv = settingsTab->ntpServer();
// Send information to time server tab if enabled
if ( ntpTabEnabled )
{
ntpTab->setStartTime( QDateTime::currentDateTime().toString() );
QString output = tr( "Running:\nntpdate " );
output.append( srv );
ntpTab->addNtpOutput( output );
}
if ( !ntpProcess )
{
ntpProcess = new OProcess();
connect( ntpProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),
- this, SLOT(slotNtpOutput(OProcess*,char*,int)) );
+ this, SLOT(slotNtpOutput(Opie::Core::OProcess*,char*,int)) );
connect( ntpProcess, SIGNAL(processExited(Opie::Core::OProcess*)),
- this, SLOT(slotNtpFinished(OProcess*)) );
+ this, SLOT(slotNtpFinished(Opie::Core::OProcess*)) );
}
else
ntpProcess->clearArguments();
*ntpProcess << "ntpdate" << srv;
bool ret = ntpProcess->start( OProcess::NotifyOnExit, OProcess::AllOutput );
if ( !ret )
{
QMessageBox::critical( this, tr( "Error" ), tr( "Error while getting time from network." ) );
if ( ntpTabEnabled )
ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) );
}
}
bool MainWindow::ntpDelayElapsed()
{
// Determine if time elapsed is greater than time delay
Config config( "ntp" );
config.setGroup( "lookups" );
_lookupDiff = TimeConversion::toUTC( QDateTime::currentDateTime() ) - config.readNumEntry( "time", 0 );
if ( _lookupDiff < 0 )
return true;
return ( _lookupDiff - ( ntpDelay * 60) ) > 0;