Pattern obsolete in grepview plugin?

Milian Wolff mail at milianw.de
Mon Jul 19 10:38:15 UTC 2010


On Monday 19 July 2010 03:42:59 George Syron wrote:
>   While fixing the duplicates problem in the grepview plugin, I saw this:
> http://gitorious.org/kdevelop/kdevplatform/blobs/master/plugins/grepview/gr
> epjob.cpp#line205
> 
> The things that came to my mind:
> "%s" is not a regexp, so why use QRegExp? The only answer is: people may
> search for "duplicate" with the pattern "%s\%s", which effectively
> searches for "duplicate%s", but the escaped %s is not handled, so the
> QRegExp should become "[^\\]%s" if I remember right.
> 
> Are other patterns planned? If so, which would that be?
> Thanks for answers.

To me it looks like a simple replace, no QRegExp is needed for that. Simply 
change it to

pattern.replace("%s", patternString);

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100719/4e6fa695/attachment.sig>


More information about the KDevelop-devel mailing list