Hi.
I have a model where the user (via a WLineEdit) can enter a search
string or a regular expression to search in the model. This is then
passed on to a WSortFilterProxyModel->setFilterRegExp() to filter and
display the results.
I subclasses the filterAcceptRow() to be able to do simple text matching
if the search string was not a regular expression. (Qt solves this
easy with the QRegExp::FixedString option instead of the need for
subclassing)
However, if the user types a search string which contains an unmatched
parenthesis I get fatal errors. Is this expected behavior?
Actually, this alone gives fatal errors:
WRegExp rx("Hello(World"); //by purpose give an unmatched unescaped
parenthesis
Before I can check validity with rx.isValid(), the session is destroyed.
[error] Error during event handling: Unmatched ( or \(
[fatal] Unmatched ( or \(
Suggestions? Is this a bug, or do I need to test the user input before
passed to WSortFilterProxyModel->setFilterRegExp() ?
-Magnus
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest