summaryrefslogtreecommitdiff
path: root/core/pim
Side-by-side diff
Diffstat (limited to 'core/pim') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 706cc08..832b2f8 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -185,9 +185,8 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
QCopChannel *channel = new QCopChannel( "QPE/System", this );
connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) );
channel = new QCopChannel( "QPE/Datebook", this );
connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) );
- qDebug("olle\n");
#endif
#endif
qDebug("done t=%d", t.elapsed() );
@@ -408,9 +407,8 @@ void DateBook::insertEvent( const Event &e )
}
void DateBook::duplicateEvent( const Event &e )
{
- qWarning("Hmmm...");
// Alot of code duplication, as this is almost like editEvent();
if (syncing) {
QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") );
return;
@@ -507,8 +505,9 @@ void DateBook::removeEvent( const Event &e )
db->removeEvent( e );
if ( views->visibleWidget() == dayView && dayView )
dayView->redraw();
+
}
void DateBook::addEvent( const Event &e )
{
@@ -990,10 +989,9 @@ void DateBook::slotDoFind( const QString& txt, const QDate &dt,
QRegExp r( txt );
r.setCaseSensitive( caseSensitive );
- static Event rev,
- nonrev;
+ static Event rev, nonrev;
if ( !inSearch ) {
rev.setStart( QDateTime(QDate(1960, 1, 1), QTime(0, 0, 0)) );
nonrev.setStart( rev.start() );
inSearch = true;
@@ -1009,20 +1007,17 @@ void DateBook::slotDoFind( const QString& txt, const QDate &dt,
QValueListConstIterator<Event> it;
QDate start = dt;
for ( it = repeats.begin(); it != repeats.end(); ++it ) {
if ( catComp( (*it).categories(), category ) ) {
- while ( nextOccurance( *it, start, next ) ) {
- if ( next < dtEnd ) {
- if ( (*it).match( r ) && !(next <= rev.start()) ) {
+ if ( (*it).match( r ) ) {
+ if ( nextOccurance( *it, start, next ) ) {
+ if ( next < dtEnd && !(next <= rev.start() ) ) {
rev = *it;
dtEnd = next;
rev.setStart( next );
candidtate = true;
wrapAround = true;
- start = dt;
- break;
- } else
- start = next.date().addDays( 1 );
+ }
}
}
}
}
@@ -1074,9 +1069,7 @@ Event DateBookDBHack::eventByUID(int uid) {
for (it = myRepeatEvents.begin(); it != myRepeatEvents.end(); it++) {
if ((*it).uid() == uid) return *it;
}
- qDebug("Event not found: uid=%d\n", uid);
Event ev;
return ev; // return at least
}
-