summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-03-28 11:58:29 (UTC)
committer umopapisdn <umopapisdn>2003-03-28 11:58:29 (UTC)
commit6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a (patch) (side-by-side diff)
tree4b25e548986b560f2fbe5f91ce61491046dcc361
parent469731b3a6cb94037330d1f40398bede57a7c0f2 (diff)
downloadopie-6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a.zip
opie-6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a.tar.gz
opie-6cee1b34ffc7b3b8a0c8e1831fff0cc1af0e708a.tar.bz2
Bugfix: (Bug #000782) Display events with no duration, unless it's an "effective event" ending at 00:00 starting at a previous day. (i.e ending at midnight)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp2
-rw-r--r--core/pim/datebook/datebookweek.cpp2
-rw-r--r--core/pim/datebook/datebookweeklst.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index 5d472a6..af98e06 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -300,25 +300,25 @@ void DateBookDay::redraw()
if ( isUpdatesEnabled() )
relayoutPage();
}
void DateBookDay::getEvents()
{
widgetList.clear();
QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate );
QValueListIterator<EffectiveEvent> it;
for ( it = eventList.begin(); it != eventList.end(); ++it ) {
EffectiveEvent ev=*it;
- if(!(ev.end().hour()==ev.start().hour() && ev.end().minute()==ev.start().minute())) { // Skip effective events with no duration. (i.e ending at 00:00)
+ if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day.
DateBookDayWidget* w = new DateBookDayWidget( *it, this );
connect( w, SIGNAL( deleteMe( const Event & ) ),
this, SIGNAL( removeEvent( const Event & ) ) );
connect( w, SIGNAL( duplicateMe( const Event & ) ),
this, SIGNAL( duplicateEvent( const Event & ) ) );
connect( w, SIGNAL( editMe( const Event & ) ),
this, SIGNAL( editEvent( const Event & ) ) );
connect( w, SIGNAL( beamMe( const Event & ) ),
this, SIGNAL( beamEvent( const Event & ) ) );
widgetList.append( w );
}
}
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp
index 5bbf86a..874cf24 100644
--- a/core/pim/datebook/datebookweek.cpp
+++ b/core/pim/datebook/datebookweek.cpp
@@ -130,25 +130,25 @@ void DateBookWeekView::initNames()
}
}
}
void DateBookWeekView::showEvents( QValueList<EffectiveEvent> &ev )
{
items.clear();
QValueListIterator<EffectiveEvent> it;
for ( it = ev.begin(); it != ev.end(); ++it ) {
DateBookWeekItem *i = new DateBookWeekItem( *it );
- if(!(i->event().end().hour()==i->event().start().hour() && i->event().end().minute()==i->event().start().minute())) { // Skip effective events with no duration. (i.e ending at 00:00)
+ if(!((i->event().end().hour()==0) && (i->event().end().minute()==0) && (i->event().startDate()!=i->event().date()))) { // Skip events ending at 00:00 starting at another day.
positionItem( i );
items.append( i );
}
}
viewport()->update();
}
void DateBookWeekView::moveToHour( int h )
{
int offset = h*rowHeight;
setContentsPos( 0, offset );
}
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 4ceb360..3d6a029 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -202,25 +202,25 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
connect(hdr, SIGNAL(showDate(int,int,int)),
this, SIGNAL(showDate(int,int,int)));
connect(hdr, SIGNAL(addEvent(const QDateTime &,
const QDateTime &,
const QString &, const QString &)),
this, SIGNAL(addEvent(const QDateTime &,
const QDateTime &,
const QString &, const QString &)));
layout->addWidget(hdr);
// Events
while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) {
- 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)
+ if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) { // Skip events ending at 00:00 starting at another day.
DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,this);
layout->addWidget(l);
connect (l, SIGNAL(editEvent(const Event &)),
this, SIGNAL(editEvent(const Event &)));
}
it++;
}
layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));
}
}
DateBookWeekLstView::~DateBookWeekLstView(){}