Op 16-12-2011 1:07, Giuseppe D'Angelo schreef:
>
>> fwiw, the usual elegant solution is having a value and a mask parameter.
>> the mask could have two magic values meaning "un-/set all asserted in
>> vlaue" to mean effectively what your bool means. the default argument
>> would be the magic value for setting, so the standard syntax would set
>> all flags named in the first argument.
> I'm not sure I understand this point completely -- isn't that what the
> method does? I.e.
>    rx.setPatternOptions(CaseInsensitiveOption | DotMatchesEverythingOption)
> turns on those two options, and leaves the others unchanged.
>
Really? Now to me _that_ is unexpected behaviour. I would have expected 
that this method call would set the options to exactly 
(CaseInsensitiveOption | DotMatchesEverythingOption), no matter what the 
previous value of the matchingOptions value was.

André
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to