-rw-r--r-- | libkcal/event.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libkcal/event.cpp b/libkcal/event.cpp index 9b99855..7cd81fa 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp | |||
@@ -160,33 +160,35 @@ void Event::setTransparency(Event::Transparency transparency) | |||
160 | mTransparency = transparency; | 160 | mTransparency = transparency; |
161 | updated(); | 161 | updated(); |
162 | } | 162 | } |
163 | 163 | ||
164 | Event::Transparency Event::transparency() const | 164 | Event::Transparency Event::transparency() const |
165 | { | 165 | { |
166 | return mTransparency; | 166 | return mTransparency; |
167 | } | 167 | } |
168 | 168 | ||
169 | void Event::setDuration(int seconds) | 169 | void Event::setDuration(int seconds) |
170 | { | 170 | { |
171 | setHasEndDate(false); | 171 | setHasEndDate(false); |
172 | Incidence::setDuration(seconds); | 172 | Incidence::setDuration(seconds); |
173 | } | 173 | } |
174 | QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const | 174 | QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const |
175 | { | 175 | { |
176 | 176 | *ok = false; | |
177 | if ( !alarmEnabled() ) | ||
178 | return QDateTime (); | ||
177 | bool yes; | 179 | bool yes; |
178 | QDateTime incidenceStart = getNextOccurence( start_dt, &yes ); | 180 | QDateTime incidenceStart = getNextOccurence( start_dt, &yes ); |
179 | if ( ! yes || cancelled() ) { | 181 | if ( ! yes || cancelled() ) { |
180 | *ok = false; | 182 | *ok = false; |
181 | return QDateTime (); | 183 | return QDateTime (); |
182 | } | 184 | } |
183 | 185 | ||
184 | bool enabled = false; | 186 | bool enabled = false; |
185 | Alarm* alarm; | 187 | Alarm* alarm; |
186 | int off = 0; | 188 | int off = 0; |
187 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; | 189 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; |
188 | // if ( QDateTime::currentDateTime() > incidenceStart ){ | 190 | // if ( QDateTime::currentDateTime() > incidenceStart ){ |
189 | // *ok = false; | 191 | // *ok = false; |
190 | // return incidenceStart; | 192 | // return incidenceStart; |
191 | // } | 193 | // } |
192 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 194 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |