On Wednesday August 19 2009, Marc Mutz wrote:
> Hi,
>
> On looking at QXmlSchemaValidator, I was surprised to see validate()
> returns bool.

Ah, overlooked the QAbstractMessageHandler setter.
Ignore me. Well done :)

> It surprised me because the _very use case_ of a schema validator is to
> have more fine-grained messages than yes/no. Consider this:
>
> $ g++ -o foo foo.cpp
> error: invalid input
>
> How useful would that be? :(
>
> Please add line (maybe column) information of the error, as well as at
> least a human-readable string that explains what's wrong:
>  error:8: element "Foo" not allowed in <Bar>
>  error:9: attribute "name" of type 'integer' of element "Foo" is larger
> than 4
>
> At the very least, in case you don't mind releasing an incomplete solution,
> return a QXmlSchemaError from validate() so you're not stuck with that damn
> bool for the rest of Qt 4.
>
> Thanks,
> Marc



-- 
Marc Mutz <[email protected]> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to