-rw-r--r-- | libkcal/phoneformat.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 7e1c9cd..94744fb 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp @@ -171,6 +171,12 @@ public: alarm->setEnabled( true ); int alarmOffset = alarmDt.secsTo( todo->dtStart() ); - alarm->setStartOffset( alarmOffset ); + alarm->setStartOffset( -alarmOffset ); alarmString = QString::number( alarmOffset ); + } else { + Alarm *alarm; + if ( todo->alarms().count() > 0 ) { + alarm = todo->alarms().first(); + alarm->setEnabled( false ); + } } // csum ***************************************** @@ -449,6 +455,12 @@ public: alarm->setEnabled( true ); int alarmOffset = alarmDt.secsTo( event->dtStart() ); - alarm->setStartOffset( alarmOffset ); + alarm->setStartOffset( -alarmOffset ); alarmString = QString::number( alarmOffset ); + } else { + Alarm *alarm; + if ( event->alarms().count() > 0 ) { + alarm = event->alarms().first(); + alarm->setEnabled( false ); + } } // csum ***************************************** |