-rw-r--r-- | core/pim/datebook/datebook.cpp | 19 |
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 | |||
@@ -186,7 +186,6 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) | |||
186 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); | 186 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); |
187 | channel = new QCopChannel( "QPE/Datebook", this ); | 187 | channel = new QCopChannel( "QPE/Datebook", this ); |
188 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); | 188 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); |
189 | qDebug("olle\n"); | ||
190 | #endif | 189 | #endif |
191 | #endif | 190 | #endif |
192 | 191 | ||
@@ -409,7 +408,6 @@ void DateBook::insertEvent( const Event &e ) | |||
409 | 408 | ||
410 | void DateBook::duplicateEvent( const Event &e ) | 409 | void DateBook::duplicateEvent( const Event &e ) |
411 | { | 410 | { |
412 | qWarning("Hmmm..."); | ||
413 | // Alot of code duplication, as this is almost like editEvent(); | 411 | // Alot of code duplication, as this is almost like editEvent(); |
414 | if (syncing) { | 412 | if (syncing) { |
415 | QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); | 413 | QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); |
@@ -508,6 +506,7 @@ void DateBook::removeEvent( const Event &e ) | |||
508 | db->removeEvent( e ); | 506 | db->removeEvent( e ); |
509 | if ( views->visibleWidget() == dayView && dayView ) | 507 | if ( views->visibleWidget() == dayView && dayView ) |
510 | dayView->redraw(); | 508 | dayView->redraw(); |
509 | |||
511 | } | 510 | } |
512 | 511 | ||
513 | void DateBook::addEvent( const Event &e ) | 512 | void DateBook::addEvent( const Event &e ) |
@@ -991,8 +990,7 @@ void DateBook::slotDoFind( const QString& txt, const QDate &dt, | |||
991 | r.setCaseSensitive( caseSensitive ); | 990 | r.setCaseSensitive( caseSensitive ); |
992 | 991 | ||
993 | 992 | ||
994 | static Event rev, | 993 | static Event rev, nonrev; |
995 | nonrev; | ||
996 | if ( !inSearch ) { | 994 | if ( !inSearch ) { |
997 | rev.setStart( QDateTime(QDate(1960, 1, 1), QTime(0, 0, 0)) ); | 995 | rev.setStart( QDateTime(QDate(1960, 1, 1), QTime(0, 0, 0)) ); |
998 | nonrev.setStart( rev.start() ); | 996 | nonrev.setStart( rev.start() ); |
@@ -1010,18 +1008,15 @@ void DateBook::slotDoFind( const QString& txt, const QDate &dt, | |||
1010 | QDate start = dt; | 1008 | QDate start = dt; |
1011 | for ( it = repeats.begin(); it != repeats.end(); ++it ) { | 1009 | for ( it = repeats.begin(); it != repeats.end(); ++it ) { |
1012 | if ( catComp( (*it).categories(), category ) ) { | 1010 | if ( catComp( (*it).categories(), category ) ) { |
1013 | while ( nextOccurance( *it, start, next ) ) { | 1011 | if ( (*it).match( r ) ) { |
1014 | if ( next < dtEnd ) { | 1012 | if ( nextOccurance( *it, start, next ) ) { |
1015 | if ( (*it).match( r ) && !(next <= rev.start()) ) { | 1013 | if ( next < dtEnd && !(next <= rev.start() ) ) { |
1016 | rev = *it; | 1014 | rev = *it; |
1017 | dtEnd = next; | 1015 | dtEnd = next; |
1018 | rev.setStart( next ); | 1016 | rev.setStart( next ); |
1019 | candidtate = true; | 1017 | candidtate = true; |
1020 | wrapAround = true; | 1018 | wrapAround = true; |
1021 | start = dt; | 1019 | } |
1022 | break; | ||
1023 | } else | ||
1024 | start = next.date().addDays( 1 ); | ||
1025 | } | 1020 | } |
1026 | } | 1021 | } |
1027 | } | 1022 | } |
@@ -1075,8 +1070,6 @@ Event DateBookDBHack::eventByUID(int uid) { | |||
1075 | if ((*it).uid() == uid) return *it; | 1070 | if ((*it).uid() == uid) return *it; |
1076 | } | 1071 | } |
1077 | 1072 | ||
1078 | qDebug("Event not found: uid=%d\n", uid); | ||
1079 | Event ev; | 1073 | Event ev; |
1080 | return ev; // return at least | 1074 | return ev; // return at least |
1081 | } | 1075 | } |
1082 | |||