-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 0555bc7..b0e78f1 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp | |||
@@ -375,31 +375,31 @@ QDate DateBookWeekLst::weekDate() const | |||
375 | 375 | ||
376 | // Calculate offset to first day of week. | 376 | // Calculate offset to first day of week. |
377 | int dayoffset=d.dayOfWeek(); | 377 | int dayoffset=d.dayOfWeek(); |
378 | if(bStartOnMonday) dayoffset--; | 378 | if(bStartOnMonday) dayoffset--; |
379 | else if( dayoffset == 7 ) | 379 | else if( dayoffset == 7 ) |
380 | dayoffset = 0; | 380 | dayoffset = 0; |
381 | 381 | ||
382 | return d.addDays(-dayoffset); | 382 | return d.addDays(-dayoffset); |
383 | } | 383 | } |
384 | 384 | ||
385 | void DateBookWeekLst::getEvents() { | 385 | void DateBookWeekLst::getEvents() { |
386 | QDate start = weekDate(); //date(); | 386 | QDate start = weekDate(); //date(); |
387 | QDate stop = start.addDays(7); | 387 | QDate stop = start.addDays(6); |
388 | QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop); | 388 | QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop); |
389 | 389 | ||
390 | if (view) delete view; | 390 | if (view) delete view; |
391 | if (dbl) { | 391 | if (dbl) { |
392 | QDate start2=start.addDays(8); | 392 | QDate start2=start.addDays(7); |
393 | stop=start2.addDays(7); | 393 | stop=start2.addDays(6); |
394 | QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop); | 394 | QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop); |
395 | view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll); | 395 | view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll); |
396 | } else { | 396 | } else { |
397 | view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll); | 397 | view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll); |
398 | } | 398 | } |
399 | 399 | ||
400 | connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | 400 | connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); |
401 | connect (view, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | 401 | connect (view, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); |
402 | connect (view, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | 402 | connect (view, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); |
403 | connect (view, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | 403 | connect (view, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); |
404 | connect (view, SIGNAL(redraw()), this, SLOT(redraw())); | 404 | connect (view, SIGNAL(redraw()), this, SLOT(redraw())); |
405 | connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | 405 | connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); |