[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Re: Pattern obsolete in grepview plugin?
From:       Milian Wolff <mail () milianw ! de>
Date:       2010-07-19 10:38:15
Message-ID: 201007191238.15372.mail () milianw ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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@milianw.de
http://milianw.de

["signature.asc" (application/pgp-signature)]

-- 
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic