Summary: | [PATCH] Support regular expressions and case sensitivity in TOC search input | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Elvis Stansvik <elvstone> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Support regular expressions and case sensitivity in TOC search input
Screenshot Support regular expressions and case sensitivity in TOC search input - Second patch Support regular expressions and case sensitivity in TOC search input - Third patch Support regular expressions and case sensitivity in TOC search input - Fourth patch |
Description
Elvis Stansvik
2009-08-22 18:22:12 UTC
Created attachment 36357 [details]
Support regular expressions and case sensitivity in TOC search input
Created attachment 36358 [details]
Screenshot
Created attachment 36611 [details]
Support regular expressions and case sensitivity in TOC search input - Second patch
After some input from tsdgeos on IRC yesterday, I'm attaching a new version of the patch with the following improvements:
o Save the search options to the settings.
o Use i18nc() instead of i18n(), to give some context to translators.
o Add the same kind of support to the Reviews side panel, since it uses the same search line widget.
Please review and tell me if there's something else that needs fixing!
Created attachment 36612 [details]
Support regular expressions and case sensitivity in TOC search input - Third patch
This is a slightly improved version of the previous patch; I corrected the i18nc() context message to be a bit more correct.
tsdgeos pretty much said he thought the patch was good, but I'd love to get an OK on this one from you pino ;) Created attachment 37411 [details] Support regular expressions and case sensitivity in TOC search input - Fourth patch This is the fourth version of this patch, and includes two suggestions from Pino: o Use QRegExp all the time, but with PatterSyntax QRegExp::FixedString for plain text search. And construct the QRegExp object in advance, not in the loop. o Use QRegExp::indexIn() instead of QString::indexOf() [1]. OK to commit? [1] http://labs.trolltech.com/blogs/2008/11/04/910/ SVN commit 1035766 by astan: Support case sensitivity and regular expressions in the Contents and Reviews side panel. The search options are accessed using a context sub-menu in the search input field. Fixes bug 204787. I'm intentionally leaving out support for saving the current search options to the config, as pinotree said he was researching a more maintainable approach to this. BUG: 204787 M +56 -2 ktreeviewsearchline.cpp M +22 -0 ktreeviewsearchline.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1035766 |