summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-03-23 20:49:17 (UTC)
committer umopapisdn <umopapisdn>2003-03-23 20:49:17 (UTC)
commit90772042f0d726149093675cede488676a94562b (patch) (unidiff)
tree853a03e23255c8b8fdfd74cc284cbd02663c94a7
parentb5606a63c9f3524f9475b6ac79f0b6bcc7162fa6 (diff)
downloadopie-90772042f0d726149093675cede488676a94562b.zip
opie-90772042f0d726149093675cede488676a94562b.tar.gz
opie-90772042f0d726149093675cede488676a94562b.tar.bz2
Bugfix: (bug #0000211) Events ending at mat the following day. Fix for weeklistview.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookweeklst.cpp42
1 files changed, 22 insertions, 20 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 9089fe9..e8e12ba 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -147,21 +147,21 @@ DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev,
147 event(ev) 147 event(ev)
148{ 148{
149 char s[10]; 149 char s[10];
150 if ( ev.startDate() != ev.date() ) { // multiday event (not first day) 150 if ( ev.startDate() != ev.date() ) { // multiday event (not first day)
151 if ( ev.endDate() == ev.date() ) { // last day 151 if ( ev.endDate() == ev.date() ) { // last day
152 strcpy(s, "__|__"); 152 strcpy(s, "__|__");
153 } else { 153 } else {
154 strcpy(s, " |---"); 154 strcpy(s, " |---");
155 } 155 }
156 } else { 156 } else {
157 if(ev.event().type() == Event::Normal ) 157 if(ev.event().type() == Event::Normal )
158 sprintf(s,"%.2d:%.2d",ev.start().hour(),ev.start().minute()); 158 sprintf(s,"%.2d:%.2d",ev.start().hour(),ev.start().minute());
159 else 159 else
160 sprintf(s," "); 160 sprintf(s," ");
161 } 161 }
162 setText(QString(s) + " " + ev.description()); 162 setText(QString(s) + " " + ev.description());
163 connect(this, SIGNAL(clicked()), this, SLOT(editMe())); 163 connect(this, SIGNAL(clicked()), this, SLOT(editMe()));
164 setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); 164 setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) );
165} 165}
166void DateBookWeekLstEvent::editMe() { 166void DateBookWeekLstEvent::editMe() {
167 emit editEvent(event.event()); 167 emit editEvent(event.event());
@@ -208,11 +208,13 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
208 208
209 // Events 209 // Events
210 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { 210 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) {
211 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,this); 211 if(!((*it).end().hour()==(*it).start().hour() && (*it).end().minute()==(*it).start().minute())) {// Skip effective events with no duration. (i.e ending at 00:00)
212 layout->addWidget(l); 212 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,this);
213 connect (l, SIGNAL(editEvent(const Event &)), 213 layout->addWidget(l);
214 this, SIGNAL(editEvent(const Event &))); 214 connect (l, SIGNAL(editEvent(const Event &)),
215 it++; 215 this, SIGNAL(editEvent(const Event &)));
216 }
217 it++;
216 } 218 }
217 219
218 layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding)); 220 layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));