summaryrefslogtreecommitdiffabout
path: root/libkcal/event.cpp
Unidiff
Diffstat (limited to 'libkcal/event.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/event.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index 7256f05..de8dceb 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -86,13 +86,13 @@ bool Event::contains ( Event* from )
86 return false; 86 return false;
87 } 87 }
88 } 88 }
89 QStringList cat = categories(); 89 QStringList cat = categories();
90 QStringList catFrom = from->categories(); 90 QStringList catFrom = from->categories();
91 QString nCat; 91 QString nCat;
92 int iii; 92 unsigned int iii;
93 for ( iii = 0; iii < catFrom.count();++iii ) { 93 for ( iii = 0; iii < catFrom.count();++iii ) {
94 nCat = catFrom[iii]; 94 nCat = catFrom[iii];
95 if ( !nCat.isEmpty() ) 95 if ( !nCat.isEmpty() )
96 if ( !cat.contains( nCat )) { 96 if ( !cat.contains( nCat )) {
97 return false; 97 return false;
98 } 98 }
@@ -117,14 +117,12 @@ void Event::setDtEnd(const QDateTime &dtEnd)
117 117
118QDateTime Event::dtEnd() const 118QDateTime Event::dtEnd() const
119{ 119{
120 if (hasEndDate()) return mDtEnd; 120 if (hasEndDate()) return mDtEnd;
121 if (hasDuration()) return dtStart().addSecs(duration()); 121 if (hasDuration()) return dtStart().addSecs(duration());
122 122
123 kdDebug(5800) << "Warning! Event '" << summary()
124 << "' does have neither end date nor duration." << endl;
125 return dtStart(); 123 return dtStart();
126} 124}
127 125
128QString Event::dtEndTimeStr() const 126QString Event::dtEndTimeStr() const
129{ 127{
130 return KGlobal::locale()->formatTime(mDtEnd.time()); 128 return KGlobal::locale()->formatTime(mDtEnd.time());
@@ -182,13 +180,13 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const
182 *ok = false; 180 *ok = false;
183 return QDateTime (); 181 return QDateTime ();
184 } 182 }
185 183
186 bool enabled = false; 184 bool enabled = false;
187 Alarm* alarm; 185 Alarm* alarm;
188 int off; 186 int off = 0;
189 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; 187 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );;
190 // if ( QDateTime::currentDateTime() > incidenceStart ){ 188 // if ( QDateTime::currentDateTime() > incidenceStart ){
191// *ok = false; 189// *ok = false;
192// return incidenceStart; 190// return incidenceStart;
193// } 191// }
194 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 192 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {