QXmlSchemaValidator and QAbstractMessageHandler



  • Hi!

    I am validating an XML file against a Schema using Qt's QXmlSchemaValidator great class. To get a fine grained error messages, I subclassed QAbstractMessageHandler class and passed it to QXmlSchemaValidator in order to get those messages. My problem is QXmlSchemaValidator stops reporting messages after the first one. I know I have 2 errors in my XML but it just reports just one. Is this a bug in QXmlSchemaValidator or it is the normal behaviour?

    Thanks in advance



  • Could the trouble be in your handler ? Does it exit/return after the first error ?



  • I just grab the message in void handleMessage(QtMsgType type, const QString& description, const QUrl& identifier, const QSourceLocation& sourceLocation) function, store it in a QList and wait for the next one, which neve came.



  • I think it would be worth asking this on the Qt-Interest mailing list.



  • I'll ask there. Thank you. Anyway, why are two different sites to talk about Qt? Is not better to have everything in just one official site?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.