[Development] QRegularExpression -- first round of API review

Giuseppe D'Angelo dangelog at gmail.com
Tue Jan 17 16:14:26 CET 2012


2012/1/17 Thiago Macieira <thiago.macieira at intel.com>:
> You have a method with two option flags:
>   QRegularExpressionMatch match(const QString &subject,
>                                  int offset                = 0,
>                                  MatchType matchType       = NormalMatch,
>                                  MatchOptions matchOptions = NoMatchOption)
> const;
>
> Why can't you fold the partial match into the matchOptions as
> AllowPartialMatchOption ?

I surely can, I'm just not sure that it makes sense. :)
The fact is that the match type is one and only one
(normal/partial/etc); the match options are orthogonal to the specific
match type (f.i. anchor the match at the offset) and can possibly be
more than one at one time. We should then decide what if both the kind
of partial matchings are specified at the same time.
-- 
Giuseppe D'Angelo



More information about the Development mailing list