summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonimpl.cpp
authorzautrix <zautrix>2005-04-08 23:40:38 (UTC)
committer zautrix <zautrix>2005-04-08 23:40:38 (UTC)
commita74c23d91e80343cd1ccfd1fe712958fad1d5891 (patch) (unidiff)
tree2dc90dffe822e1425ace17cdbf9e420fa0be6ac7 /kalarmd/simplealarmdaemonimpl.cpp
parentc4bab697d650c249cdff45b753b9e6df2a817877 (diff)
downloadkdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.zip
kdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.tar.gz
kdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.tar.bz2
ad fix
Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 294ce7d..2a463b3 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -296,25 +296,27 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& )
296 int len = mess.mid( 10 ).find("+++"); 296 int len = mess.mid( 10 ).find("+++");
297 if ( len < 2 ) 297 if ( len < 2 )
298 error = true; 298 error = true;
299 else { 299 else {
300 tempfilename = mess.mid( 10, len ); 300 tempfilename = mess.mid( 10, len );
301 if ( !QFile::exists( tempfilename ) ) 301 if ( !QFile::exists( tempfilename ) )
302 error = true; 302 error = true;
303 } 303 }
304 if ( error ) { 304 if ( error ) {
305 mAlarmMessage = "Procedure Alarm\nError - File not found\n"; 305 mAlarmMessage = "Procedure Alarm\nError - File not found\n";
306 mAlarmMessage += mess.mid( 10+len+3+9 ); 306 mAlarmMessage += mess.mid( 10+len+3+9 );
307 } else { 307 } else {
308 QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); 308 {
309 QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
310 }
309 //qDebug("-----system command %s ",tempfilename.latin1() ); 311 //qDebug("-----system command %s ",tempfilename.latin1() );
310 if ( vfork () == 0 ) { 312 if ( vfork () == 0 ) {
311 execl ( tempfilename.latin1(), 0 ); 313 execl ( tempfilename.latin1(), 0 );
312 return; 314 return;
313 } 315 }
314 return; 316 return;
315 } 317 }
316 318
317 //qDebug("+++++++system command %s ",tempfilename.latin1() ); 319 //qDebug("+++++++system command %s ",tempfilename.latin1() );
318 } 320 }
319 if ( mess.left( 11 ) == "audio_alarm") { 321 if ( mess.left( 11 ) == "audio_alarm") {
320 bool error = false; 322 bool error = false;
@@ -609,26 +611,27 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
609 mRunningTimerText = QString::number ( minutes ) + ( " minutes"); 611 mRunningTimerText = QString::number ( minutes ) + ( " minutes");
610 } 612 }
611 } 613 }
612 //minutes = 1; 614 //minutes = 1;
613 615
614 mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); 616 mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 );
615 timerMesssage = mess; 617 timerMesssage = mess;
616 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); 618 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1());
617 mTimerTime = 1; 619 mTimerTime = 1;
618} 620}
619 621
620void SimpleAlarmDaemonImpl::writeFile() 622void SimpleAlarmDaemonImpl::writeFile()
621{ 623{
622 QCopEnvelope e("QPE/Application/kopi", "-writeFile"); 624 QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
625 //QCopEnvelope e("QPE/Application/kopi", "-writeFile");
623} 626}
624void SimpleAlarmDaemonImpl::showWN() 627void SimpleAlarmDaemonImpl::showWN()
625{ 628{
626 QCopEnvelope e("QPE/Application/kopi", "-showWN"); 629 QCopEnvelope e("QPE/Application/kopi", "-showWN");
627} 630}
628void SimpleAlarmDaemonImpl::newTodo() 631void SimpleAlarmDaemonImpl::newTodo()
629{ 632{
630 QCopEnvelope e("QPE/Application/kopi", "-newTodo"); 633 QCopEnvelope e("QPE/Application/kopi", "-newTodo");
631} 634}
632 635
633void SimpleAlarmDaemonImpl::newEvent() 636void SimpleAlarmDaemonImpl::newEvent()
634{ 637{