author | tille <tille> | 2002-07-06 16:11:39 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-06 16:11:39 (UTC) |
commit | 8beb5fcdbca8110dc586a7e620bf8eae892087fb (patch) (side-by-side diff) | |
tree | e3f96de0e645f160fd54bdcb6b4c36a25f4437c1 | |
parent | b83751deab22e8e25d21265bd59ab53766109ca2 (diff) | |
download | opie-8beb5fcdbca8110dc586a7e620bf8eae892087fb.zip opie-8beb5fcdbca8110dc586a7e620bf8eae892087fb.tar.gz opie-8beb5fcdbca8110dc586a7e620bf8eae892087fb.tar.bz2 |
qcop calls
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 10 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/settime.cpp | 0 |
2 files changed, 7 insertions, 3 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index 2b779fa..15dae93 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp @@ -265,61 +265,65 @@ void Ntp::slotCheckNtp(int i) connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); if ( ntpDelayElapsed() ) { slotRunNtp(); disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) ); connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) ); }else{ disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) ); connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); } }else{ preditctTime(); ButtonSetTime->setText( tr("Set predicted time") ); if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer()); connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); } } void Ntp::slotProbeNtpServer() { qDebug("Ntp::slotProbeNtpServer()"); ntpSock->connectToHost( getNtpServer() ,123); } void Ntp::slotNtpDelayChanged(int delay) { ntpTimer->changeInterval( delay*1000*60 ); } void Ntp::ntpOutPut(QString out) { MultiLineEditntpOutPut->append(out); MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE); } void Ntp::makeChannel() { channel = new QCopChannel( "QPE/Application/netsystemtime", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); } void Ntp::receive(const QCString &msg, const QByteArray &arg) { - qDebug("QCop "+msg+" "+QCString(arg)); - if ( msg == "open(QString)" ) + qDebug("QCop(Ntp) "+msg+" "+QCString(arg)); + if ( msg == "ntpLookup(QString)" ) { - // qApp->exec(); + slotRunNtp(); + } + if ( msg == "setPredictedTime(QString)" ) + { + setPredictTime(); }else{ qDebug("Ntp::receive: Huh what do ya want"); } } void Ntp::setDocument(const QString &fileName) { }
\ No newline at end of file diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp index 9c5323a..b0fcb74 100644 --- a/noncore/settings/netsystemtime/settime.cpp +++ b/noncore/settings/netsystemtime/settime.cpp |