author | zecke <zecke> | 2004-02-18 22:11:25 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-18 22:11:25 (UTC) |
commit | 71b6aa6d19ed2e4690cd98ecdb7dbfe40f857653 (patch) (unidiff) | |
tree | 2d300c075b052fa1ad7e4814f52256e51fd7d8ba | |
parent | 859ad22772e90dfbd4a8c0760ddc52d451f50011 (diff) | |
download | opie-71b6aa6d19ed2e4690cd98ecdb7dbfe40f857653.zip opie-71b6aa6d19ed2e4690cd98ecdb7dbfe40f857653.tar.gz opie-71b6aa6d19ed2e4690cd98ecdb7dbfe40f857653.tar.bz2 |
be more clever when it comes to searching events
Fix bug 1193
-rw-r--r-- | core/pim/datebook/datebook.cpp | 35 |
1 files changed, 14 insertions, 21 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 | |||
@@ -188,3 +188,2 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) | |||
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 |
@@ -411,3 +410,2 @@ 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(); |
@@ -510,2 +508,3 @@ void DateBook::removeEvent( const Event &e ) | |||
510 | dayView->redraw(); | 508 | dayView->redraw(); |
509 | |||
511 | } | 510 | } |
@@ -993,4 +992,3 @@ void DateBook::slotDoFind( const QString& txt, const QDate &dt, | |||
993 | 992 | ||
994 | static Event rev, | 993 | static Event rev, nonrev; |
995 | nonrev; | ||
996 | if ( !inSearch ) { | 994 | if ( !inSearch ) { |
@@ -1012,17 +1010,14 @@ void DateBook::slotDoFind( const QString& txt, const QDate &dt, | |||
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; | 1020 | } |
1023 | } else | 1021 | } |
1024 | start = next.date().addDays( 1 ); | 1022 | } |
1025 | } | ||
1026 | } | ||
1027 | } | ||
1028 | } | 1023 | } |
@@ -1077,3 +1072,2 @@ Event DateBookDBHack::eventByUID(int uid) { | |||
1077 | 1072 | ||
1078 | qDebug("Event not found: uid=%d\n", uid); | ||
1079 | Event ev; | 1073 | Event ev; |
@@ -1081,2 +1075 @@ Event DateBookDBHack::eventByUID(int uid) { | |||
1081 | } | } | |
1082 | |||