Summary: | Match the names of the authors in the search filter | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | LuRan <hephooey_dev> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | christophe |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.6 |
Description
LuRan
2010-06-24 19:22:42 UTC
If I'm not mistaken, the following patch should do that: Index: src/searchbar.cpp =================================================================== --- src/searchbar.cpp (révision 1175239) +++ src/searchbar.cpp (copie de travail) @@ -185,6 +185,8 @@ textCriteria << subjCrit; Criterion crit1( Criterion::Description, Criterion::Contains, d->searchText); textCriteria << crit1; + Criterion authCrit( Criterion::Author, Criterion::Contains, d->searchText); + textCriteria << authCrit; } if (d->searchCombo->currentIndex()) Index: src/articlematcher.h =================================================================== --- src/articlematcher.h (révision 1175239) +++ src/articlematcher.h (copie de travail) @@ -112,7 +112,7 @@ public: enum Subject { - Title, Description, Link, Status, KeepFlag + Title, Description, Link, Status, KeepFlag, Author }; static QString subjectToString(Subject subj); Index: src/articlematcher.cpp =================================================================== --- src/articlematcher.cpp (révision 1175239) +++ src/articlematcher.cpp (copie de travail) @@ -59,6 +59,8 @@ return QString::fromLatin1("Status"); case KeepFlag: return QString::fromLatin1("KeepFlag"); + case Author: + return QString::fromLatin1("Author"); default: // should never happen (TM) return QString::fromLatin1("Description"); } @@ -76,6 +78,8 @@ return Status; else if (subjStr == QString::fromLatin1("KeepFlag")) return KeepFlag; + else if (subjStr == QString::fromLatin1("Author")) + return Author; // hopefully never reached return Description; @@ -167,7 +171,10 @@ concreteSubject = QVariant(article.status()); break; case KeepFlag: - concreteSubject = QVariant(article.keep()); + concreteSubject = QVariant(article.keep()); + break; + case Author: + concreteSubject = QVariant(article.authorName()); default: break; } @Frank, can I commit this ? Great work, I tried this patch, and it works beautifully. Thanks a lot. SVN commit 1178003 by cgiboudeaux: Let the search filter look for authors. BUG: 242712 FIXED-IN: 4.6 M +7 -0 articlematcher.cpp M +1 -1 articlematcher.h M +2 -0 searchbar.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1178003 SVN commit 1178006 by cgiboudeaux: Backport r1178003 from trunk to 4.5 Let the search filter look for authors. CCBUG: 242712 M +7 -0 articlematcher.cpp M +1 -1 articlematcher.h M +2 -0 searchbar.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1178006 SVN commit 1178007 by cgiboudeaux: Backport r1178003 from trunk to 4.4: Let the search filter look for authors. CCBUG:242712 MERGE: none M +7 -0 articlematcher.cpp M +1 -1 articlematcher.h M +2 -0 searchbar.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1178007 |