Ignore:
Timestamp:
03/21/12 21:42:02 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
a9eca6f
Parents:
9a896cc
Message:

Hopefully fixed bug #38: As the alarm message was used to identify the event by setting it to the eventId and in r1359 the alarm message was changed to show the event title, alarms could not be deleted anymore. Therefore, two alarm attributes (int values) were introduced with this commit: "conferenceId" and "eventId" to identify the event and therefore, deleting alarms should work again. Additionally a second (not reported) bug was fixed: Activating an alarm in the treeview set the alarm to the current time plus 10 seconds.

However, I don't know for sure whether this commit fixed bug #38 becaus I don't have a maemo device to test it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/treeview.cpp

    r9a896cc r11d3189  
    2727
    2828#ifdef MAEMO
    29 #include <alarm.h>
     29#include "alarm.h"
    3030#endif
    3131
     
    102102                    // remove alarm from the 'alarmd' alrms list
    103103                    Alarm alarm;
    104                     alarm.deleteAlarm(event.id());
    105                     // TODO: test if removing was successfull
     104                    alarm.deleteAlarm(event.conferenceId(), event.id());
    106105#endif /* MAEMO */
    107106                }
     
    112111                    // add alarm to the 'alarmd'
    113112                    Alarm alarm;
    114                     //int cookie = alarm.addAlarm(event.id(),QDateTime::currentDateTime().addSecs(10)); // testing
    115                     int cookie = alarm.addAlarm(event.id(),event.title(),event.start().addSecs(-15*60)); // 15 minutes before real start
     113                    alarm.addAlarm(event.conferenceId(), event.id(), event.title(),event.start().addSecs(PRE_EVENT_ALARM_SEC));
    116114#endif /* MAEMO */
    117115                }
Note: See TracChangeset for help on using the changeset viewer.