From e1b2c9deb5943faae2b29be6a5c006f75bb73f06 Mon Sep 17 00:00:00 2001 From: Qt by Nokia Date: Wed, 27 Apr 2011 12:05:43 +0200 Subject: Initial import from the monolithic Qt. This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12 --- tests/README | 18 + tests/auto/auto.pro | 49 + tests/auto/bic/.gitignore | 2 + .../data/QtXmlPatterns.4.4.0.linux-gcc-ia32.txt | 2571 ++++++++++++++ .../data/QtXmlPatterns.4.5.0.linux-gcc-amd64.txt | 3270 ++++++++++++++++++ .../data/QtXmlPatterns.4.5.0.linux-gcc-ia32.txt | 2600 ++++++++++++++ .../data/QtXmlPatterns.4.6.0.linux-gcc-amd64.txt | 3561 ++++++++++++++++++++ .../data/QtXmlPatterns.4.6.0.linux-gcc-ia32.txt | 2891 ++++++++++++++++ .../data/QtXmlPatterns.4.7.0.linux-gcc-ia32.txt | 2896 ++++++++++++++++ tests/auto/checkxmlfiles/.gitignore | 1 + tests/auto/checkxmlfiles/checkxmlfiles.pro | 19 + tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp | 126 + tests/auto/network-settings.h | 420 +++ tests/auto/patternistexamplefiletree/.gitignore | 1 + .../patternistexamplefiletree.pro | 5 + .../tst_patternistexamplefiletree.cpp | 74 + tests/auto/patternistexamples/.gitignore | 1 + .../auto/patternistexamples/patternistexamples.pro | 22 + .../patternistexamples/tst_patternistexamples.cpp | 373 ++ tests/auto/patternistheaders/.gitignore | 1 + tests/auto/patternistheaders/patternistheaders.pro | 5 + .../patternistheaders/tst_patternistheaders.cpp | 143 + tests/auto/qabstractmessagehandler/.gitignore | 1 + .../qabstractmessagehandler.pro | 5 + .../tst_qabstractmessagehandler.cpp | 192 ++ tests/auto/qabstracturiresolver/.gitignore | 1 + tests/auto/qabstracturiresolver/TestURIResolver.h | 70 + .../qabstracturiresolver/qabstracturiresolver.pro | 6 + .../tst_qabstracturiresolver.cpp | 132 + tests/auto/qabstractxmlforwarditerator/.gitignore | 1 + .../qabstractxmlforwarditerator.pro | 5 + .../tst_qabstractxmlforwarditerator.cpp | 87 + tests/auto/qabstractxmlnodemodel/.gitignore | 1 + tests/auto/qabstractxmlnodemodel/LoadingModel.cpp | 360 ++ tests/auto/qabstractxmlnodemodel/LoadingModel.h | 99 + tests/auto/qabstractxmlnodemodel/TestNodeModel.h | 139 + .../qabstractxmlnodemodel.pro | 14 + tests/auto/qabstractxmlnodemodel/tree.xml | 15 + .../tst_qabstractxmlnodemodel.cpp | 407 +++ tests/auto/qabstractxmlreceiver/.gitignore | 1 + .../qabstractxmlreceiver/TestAbstractXmlReceiver.h | 138 + .../qabstractxmlreceiver/qabstractxmlreceiver.pro | 5 + .../tst_qabstractxmlreceiver.cpp | 95 + tests/auto/qapplicationargumentparser/.gitignore | 3 + .../qapplicationargumentparser.pro | 6 + .../tst_qapplicationargumentparser.cpp | 160 + tests/auto/qautoptr/.gitignore | 1 + tests/auto/qautoptr/qautoptr.pro | 4 + tests/auto/qautoptr/tst_qautoptr.cpp | 339 ++ tests/auto/qsimplexmlnodemodel/.gitignore | 1 + .../auto/qsimplexmlnodemodel/TestSimpleNodeModel.h | 132 + .../qsimplexmlnodemodel/qsimplexmlnodemodel.pro | 4 + .../tst_qsimplexmlnodemodel.cpp | 172 + tests/auto/qsourcelocation/.gitignore | 1 + tests/auto/qsourcelocation/qsourcelocation.pro | 4 + tests/auto/qsourcelocation/tst_qsourcelocation.cpp | 398 +++ tests/auto/qxmlformatter/.gitignore | 1 + tests/auto/qxmlformatter/baselines/.gitattributes | 1 + .../baselines/K2-DirectConElemContent-46.xml | 1 + .../auto/qxmlformatter/baselines/adjacentNodes.xml | 16 + .../auto/qxmlformatter/baselines/classExample.xml | 5 + .../baselines/documentElementWithWS.xml | 1 + .../auto/qxmlformatter/baselines/documentNodes.xml | 3 + .../qxmlformatter/baselines/elementsWithWS.xml | 8 + .../auto/qxmlformatter/baselines/emptySequence.xml | 1 + .../baselines/indentedAdjacentNodes.xml | 16 + .../baselines/indentedMixedContent.xml | 20 + .../auto/qxmlformatter/baselines/mixedContent.xml | 17 + .../baselines/mixedTopLevelContent.xml | 1 + .../baselines/nodesAndWhitespaceAtomics.xml | 4 + .../qxmlformatter/baselines/onlyDocumentNode.xml | 1 + tests/auto/qxmlformatter/baselines/prolog.xml | 17 + .../qxmlformatter/baselines/simpleDocument.xml | 3 + .../auto/qxmlformatter/baselines/singleElement.xml | 1 + .../qxmlformatter/baselines/singleTextNode.xml | 1 + .../baselines/textNodeAtomicValue.xml | 1 + .../auto/qxmlformatter/baselines/threeAtomics.xml | 1 + .../input/K2-DirectConElemContent-46.xq | 1 + tests/auto/qxmlformatter/input/adjacentNodes.xml | 16 + tests/auto/qxmlformatter/input/adjacentNodes.xq | 1 + tests/auto/qxmlformatter/input/classExample.xml | 1 + tests/auto/qxmlformatter/input/classExample.xq | 1 + .../qxmlformatter/input/documentElementWithWS.xml | 2 + .../qxmlformatter/input/documentElementWithWS.xq | 1 + tests/auto/qxmlformatter/input/documentNodes.xq | 7 + tests/auto/qxmlformatter/input/elementsWithWS.xml | 12 + tests/auto/qxmlformatter/input/elementsWithWS.xq | 1 + tests/auto/qxmlformatter/input/emptySequence.xq | 2 + .../qxmlformatter/input/indentedAdjacentNodes.xml | 16 + .../qxmlformatter/input/indentedAdjacentNodes.xq | 1 + .../qxmlformatter/input/indentedMixedContent.xml | 16 + .../qxmlformatter/input/indentedMixedContent.xq | 1 + tests/auto/qxmlformatter/input/mixedContent.xml | 1 + tests/auto/qxmlformatter/input/mixedContent.xq | 1 + .../qxmlformatter/input/mixedTopLevelContent.xq | 16 + .../input/nodesAndWhitespaceAtomics.xq | 13 + tests/auto/qxmlformatter/input/onlyDocumentNode.xq | 1 + tests/auto/qxmlformatter/input/prolog.xml | 17 + tests/auto/qxmlformatter/input/prolog.xq | 1 + tests/auto/qxmlformatter/input/simpleDocument.xml | 4 + tests/auto/qxmlformatter/input/simpleDocument.xq | 1 + tests/auto/qxmlformatter/input/singleElement.xml | 1 + tests/auto/qxmlformatter/input/singleElement.xq | 1 + tests/auto/qxmlformatter/input/singleTextNode.xq | 1 + .../qxmlformatter/input/textNodeAtomicValue.xq | 1 + tests/auto/qxmlformatter/input/threeAtomics.xq | 1 + tests/auto/qxmlformatter/qxmlformatter.pro | 10 + tests/auto/qxmlformatter/tst_qxmlformatter.cpp | 205 ++ tests/auto/qxmlitem/.gitignore | 1 + tests/auto/qxmlitem/qxmlitem.pro | 4 + tests/auto/qxmlitem/tst_qxmlitem.cpp | 373 ++ tests/auto/qxmlname/.gitignore | 1 + tests/auto/qxmlname/qxmlname.pro | 4 + tests/auto/qxmlname/tst_qxmlname.cpp | 565 ++++ tests/auto/qxmlnamepool/.gitignore | 1 + tests/auto/qxmlnamepool/qxmlnamepool.pro | 4 + tests/auto/qxmlnamepool/tst_qxmlnamepool.cpp | 90 + tests/auto/qxmlnodemodelindex/.gitignore | 1 + .../auto/qxmlnodemodelindex/qxmlnodemodelindex.pro | 4 + .../qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp | 197 ++ tests/auto/qxmlquery/.gitignore | 1 + tests/auto/qxmlquery/MessageSilencer.h | 84 + tests/auto/qxmlquery/MessageValidator.cpp | 102 + tests/auto/qxmlquery/MessageValidator.h | 83 + tests/auto/qxmlquery/NetworkOverrider.h | 98 + tests/auto/qxmlquery/PushBaseliner.h | 149 + tests/auto/qxmlquery/TestFundament.cpp | 91 + tests/auto/qxmlquery/TestFundament.h | 67 + tests/auto/qxmlquery/data/notWellformed.xml | 1 + tests/auto/qxmlquery/data/oneElement.xml | 1 + tests/auto/qxmlquery/input.qrc | 9 + tests/auto/qxmlquery/input.xml | 2 + tests/auto/qxmlquery/pushBaselines/allAtomics.ref | 45 + tests/auto/qxmlquery/pushBaselines/concat.ref | 3 + .../auto/qxmlquery/pushBaselines/emptySequence.ref | 2 + .../auto/qxmlquery/pushBaselines/errorFunction.ref | 1 + .../auto/qxmlquery/pushBaselines/nodeSequence.ref | 81 + tests/auto/qxmlquery/pushBaselines/oneElement.ref | 5 + tests/auto/qxmlquery/pushBaselines/onePlusOne.ref | 3 + .../qxmlquery/pushBaselines/onlyDocumentNode.ref | 4 + .../auto/qxmlquery/pushBaselines/openDocument.ref | 22 + tests/auto/qxmlquery/qxmlquery.pro | 34 + tests/auto/qxmlquery/tst_qxmlquery.cpp | 3481 +++++++++++++++++++ tests/auto/qxmlresultitems/.gitignore | 1 + tests/auto/qxmlresultitems/qxmlresultitems.pro | 4 + tests/auto/qxmlresultitems/tst_qxmlresultitems.cpp | 240 ++ tests/auto/qxmlschema/.gitignore | 1 + tests/auto/qxmlschema/qxmlschema.pro | 5 + tests/auto/qxmlschema/tst_qxmlschema.cpp | 406 +++ tests/auto/qxmlschemavalidator/.gitignore | 1 + .../qxmlschemavalidator/qxmlschemavalidator.pro | 5 + .../tst_qxmlschemavalidator.cpp | 479 +++ tests/auto/qxmlserializer/.gitignore | 1 + tests/auto/qxmlserializer/qxmlserializer.pro | 4 + tests/auto/qxmlserializer/tst_qxmlserializer.cpp | 198 ++ tests/auto/xmlpatterns.pri | 36 + tests/auto/xmlpatterns/.gitattributes | 3 + tests/auto/xmlpatterns/.gitignore | 5 + tests/auto/xmlpatterns/XSLTTODO | 1450 ++++++++ tests/auto/xmlpatterns/baselines/globals.xml | 12 + tests/auto/xmlpatterns/queries/README | 4 + tests/auto/xmlpatterns/queries/allAtomics.xq | 50 + .../xmlpatterns/queries/allAtomicsExternally.xq | 33 + .../xmlpatterns/queries/completelyEmptyQuery.xq | 0 tests/auto/xmlpatterns/queries/concat.xq | 1 + tests/auto/xmlpatterns/queries/emptySequence.xq | 2 + tests/auto/xmlpatterns/queries/errorFunction.xq | 1 + .../xmlpatterns/queries/externalStringVariable.xq | 1 + tests/auto/xmlpatterns/queries/externalVariable.xq | 2 + .../queries/externalVariableUsedTwice.xq | 1 + tests/auto/xmlpatterns/queries/flwor.xq | 4 + tests/auto/xmlpatterns/queries/globals.gccxml | 33 + tests/auto/xmlpatterns/queries/invalidRegexp.xq | 1 + .../auto/xmlpatterns/queries/invalidRegexpFlag.xq | 1 + tests/auto/xmlpatterns/queries/nodeSequence.xq | 31 + .../xmlpatterns/queries/nonexistingCollection.xq | 1 + tests/auto/xmlpatterns/queries/oneElement.xq | 1 + tests/auto/xmlpatterns/queries/onePlusOne.xq | 1 + tests/auto/xmlpatterns/queries/onlyDocumentNode.xq | 1 + tests/auto/xmlpatterns/queries/openDocument.xq | 1 + tests/auto/xmlpatterns/queries/reportGlobals.xq | 101 + tests/auto/xmlpatterns/queries/simpleDocument.xml | 1 + .../xmlpatterns/queries/simpleLibraryModule.xq | 5 + tests/auto/xmlpatterns/queries/staticBaseURI.xq | 3 + tests/auto/xmlpatterns/queries/staticError.xq | 1 + tests/auto/xmlpatterns/queries/syntaxError.xq | 1 + tests/auto/xmlpatterns/queries/threeVariables.xq | 1 + tests/auto/xmlpatterns/queries/twoVariables.xq | 1 + tests/auto/xmlpatterns/queries/typeError.xq | 1 + .../queries/unavailableExternalVariable.xq | 2 + .../xmlpatterns/queries/unsupportedCollation.xq | 2 + tests/auto/xmlpatterns/queries/wrongArity.xq | 1 + tests/auto/xmlpatterns/queries/zeroDivision.xq | 1 + .../stderrBaselines/Anunboundexternalvariable.txt | 1 + .../stderrBaselines/Asimplemathquery.txt | 0 .../stderrBaselines/Asingledashthatsinvalid.txt | 2 + .../Asinglequerythatdoesnotexist.txt | 1 + .../stderrBaselines/Basicuseofoutputqueryfirst.txt | 0 .../stderrBaselines/Basicuseofoutputquerylast.txt | 0 .../stderrBaselines/Bindanexternalvariable.txt | 0 .../Bindanexternalvariablequeryappearinglast.txt | 0 .../Callanamedtemplateandusenofocus..txt | 0 .../xmlpatterns/stderrBaselines/Callfnerror.txt | 1 + .../Ensureisuricanappearafterthequeryfilename.txt | 0 .../stderrBaselines/Evaluatealibrarymodule.txt | 1 + .../Evaluateastylesheetwithnocontextdocument.txt | 1 + .../stderrBaselines/Invalidtemplatename.txt | 1 + .../Invokeatemplateandusepassparameters..txt | 0 .../xmlpatterns/stderrBaselines/Invokeversion.txt | 1 + .../Invokewithcoloninvariablename..txt | 1 + .../Invokewithinvalidparamvalue..txt | 1 + .../Invokewithmissingnameinparamarg..txt | 1 + .../Invokewithparamthathasnovalue..txt | 0 ...nvokewithparamthathastwoadjacentequalsigns..txt | 0 .../stderrBaselines/LoadqueryviaFTP.txt | 0 .../stderrBaselines/LoadqueryviaHTTP.txt | 0 .../stderrBaselines/Loadqueryviadatascheme.txt | 0 ...vedagainstCWDnotthelocationoftheexecutable..txt | 0 ...dinstancedocumentcausescrashincoloringcode..txt | 1 + ...lformedstylesheetcausescrashincoloringcode..txt | 1 + .../stderrBaselines/Openannonexistentfile.txt | 1 + .../Openanonexistingcollection..txt | 1 + .../auto/xmlpatterns/stderrBaselines/Passhelp.txt | 31 + ...inanexternalvariablebutthequerydoesntuseit..txt | 0 ...stylesheetfileandafocusfilewhichdoesntexist.txt | 1 + ...inastylesheetfilewhichcontainsanXQueryquery.txt | 1 + ...astylsheetfileandafocusfilewhichdoesntexist.txt | 15 + ...sinastylsheetfilewhichcontainsanXQueryquery.txt | 16 + .../Passingasingledashisinsufficient.txt | 2 + ...ingtwodashesthelastisinterpretedasafilename.txt | 1 + .../stderrBaselines/PassininvalidURI.txt | 1 + ...hetwolastgetsinterpretedastwoqueryarguments.txt | 2 + ...Theavailableflagsareformattedinacomplexway..txt | 5 + ...aluatestoasingledocumentnodewithnochildren..txt | 0 .../Runaquerywhichevaluatestotheemptysequence..txt | 0 .../Specifyanamedtemplatethatdoesnotexists.txt | 0 .../Specifyanamedtemplatethatexists.txt | 0 .../stderrBaselines/Specifynoargumentsatall..txt | 2 + ...Specifythesameparametertwicedifferentvalues.txt | 1 + .../Specifythesameparametertwicesamevalues.txt | 1 + .../Specifytwodifferentquerynames.txt | 2 + .../Specifytwoidenticalquerynames.txt | 2 + ...t.ThequerynaturallycontainsanerrorXPTY0004..txt | 2 + ...orOutput.ThequerynaturallycontainsXPST0003..txt | 1 + .../stderrBaselines/Triggerastaticerror..txt | 1 + .../xmlpatterns/stderrBaselines/Unknownswitchd.txt | 2 + .../stderrBaselines/Unknownswitchunknownswitch.txt | 2 + .../xmlpatterns/stderrBaselines/Useanativepath.txt | 0 .../Useanexternalvariablemultipletimes..txt | 0 .../Useasimplifiedstylesheetmodule.txt | 0 .../auto/xmlpatterns/stderrBaselines/Usefndoc.txt | 0 .../Usefndoctogetherwithnoformatfirst.txt | 0 .../Usefndoctogetherwithnoformatlast.txt | 0 ...surewetruncatenotappendthecontentweproduce..txt | 0 .../xmlpatterns/stderrBaselines/Useoutputtwice.txt | 2 + .../xmlpatterns/stderrBaselines/Useparamthrice.txt | 0 .../xmlpatterns/stderrBaselines/Useparamtwice.txt | 0 .../Wedontsupportformatanylonger.txt | 2 + .../XQuerydataXQuerykeywordmessagemarkups.txt | 1 + .../XQueryexpressionmessagemarkups.txt | 1 + .../XQueryfunctionmessagemarkups.txt | 1 + .../stderrBaselines/XQuerytypemessagemarkups.txt | 1 + .../stderrBaselines/XQueryurimessagemarkups.txt | 1 + .../initialtemplatedoesntworkwithXQueries..txt | 1 + .../initialtemplatemustbefollowedbyavalue.txt | 1 + .../initialtemplatemustbefollowedbyavalue2.txt | 2 + .../onequeryandaterminatingdashattheend.txt | 0 .../stderrBaselines/onequerywithaprecedingdash.txt | 0 .../xmlpatterns/stderrBaselines/onlynoformat.txt | 2 + .../stderrBaselines/outputwithanonwritablefile.txt | 1 + .../paramismissingsomultiplequeriesappear.txt | 1 + tests/auto/xmlpatterns/stylesheets/bool070.xml | 1 + tests/auto/xmlpatterns/stylesheets/bool070.xsl | 6 + .../xmlpatterns/stylesheets/copyWholeDocument.xsl | 9 + .../xmlpatterns/stylesheets/documentElement.xml | 1 + .../stylesheets/namedAndRootTemplate.xsl | 5 + .../auto/xmlpatterns/stylesheets/namedTemplate.xsl | 8 + .../auto/xmlpatterns/stylesheets/notWellformed.xsl | 9 + .../xmlpatterns/stylesheets/onlyRootTemplate.xsl | 9 + tests/auto/xmlpatterns/stylesheets/parameters.xsl | 41 + .../xmlpatterns/stylesheets/queryAsStylesheet.xsl | 1 + .../stylesheets/simplifiedStylesheetModule.xml | 1 + .../stylesheets/simplifiedStylesheetModule.xsl | 4 + .../auto/xmlpatterns/stylesheets/useParameters.xsl | 16 + tests/auto/xmlpatterns/tst_xmlpatterns.cpp | 1023 ++++++ tests/auto/xmlpatterns/xmlpatterns.pro | 11 + tests/auto/xmlpatternsdiagnosticsts/.gitattributes | 6 + tests/auto/xmlpatternsdiagnosticsts/.gitignore | 2 + tests/auto/xmlpatternsdiagnosticsts/Baseline.xml | 2 + .../TestSuite/DiagnosticsCatalog.xml | 1046 ++++++ .../ExpectedTestResults/ShouldFail/fail-1.txt | 1 + .../ExpectedTestResults/ShouldFail/fail-2.txt | 1 + .../ExpectedTestResults/ShouldFail/fail-3.txt | 1 + .../ExpectedTestResults/ShouldFail/succeed-10.txt | 1 + .../ShouldFail/succeed-11-1.txt | 1 + .../ShouldFail/succeed-11-2.txt | 1 + .../ShouldFail/succeed-12-1.txt | 1 + .../ShouldFail/succeed-12-2.txt | 1 + .../ExpectedTestResults/ShouldFail/succeed-9-1.txt | 1 + .../ExpectedTestResults/ShouldFail/succeed-9-2.txt | 1 + .../ExpectedTestResults/ShouldFail/succeed-9-3.txt | 1 + .../ShouldSucceed/succeed-1.txt | 1 + .../ShouldSucceed/succeed-11.txt | 1 + .../ShouldSucceed/succeed-13.txt | 1 + .../ShouldSucceed/succeed-14.txt | 3 + .../ShouldSucceed/succeed-2-1.txt | 1 + .../ShouldSucceed/succeed-2-2.txt | 1 + .../ShouldSucceed/succeed-2-3.txt | 1 + .../ShouldSucceed/succeed-2-4.txt | 1 + .../ShouldSucceed/succeed-2-5.txt | 1 + .../ShouldSucceed/succeed-2-6.txt | 1 + .../ShouldSucceed/succeed-6-1.txt | 1 + .../ShouldSucceed/succeed-6-2.txt | 1 + .../ShouldSucceed/succeed-7-1.txt | 1 + .../ShouldSucceed/succeed-7-2.txt | 1 + .../ShouldSucceed/succeed-8.txt | 1 + .../ShouldSucceed/succeed-9.txt | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-1.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-10.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-11.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-12.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-14.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-15.xq | 2 + .../TestSuite/Queries/XQuery/ShouldFail/fail-16.xq | 2 + .../TestSuite/Queries/XQuery/ShouldFail/fail-17.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-18.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-2.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-3.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-4.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-5.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-6.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-7.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-8.xq | 1 + .../TestSuite/Queries/XQuery/ShouldFail/fail-9.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-1.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-10.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-11.xq | 3 + .../Queries/XQuery/ShouldSucceed/succeed-12.xq | 2 + .../Queries/XQuery/ShouldSucceed/succeed-13.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-14.xq | 2 + .../Queries/XQuery/ShouldSucceed/succeed-2.xq | 2 + .../Queries/XQuery/ShouldSucceed/succeed-3.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-4.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-5.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-6.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-7.xq | 1 + .../Queries/XQuery/ShouldSucceed/succeed-8.xq | 2 + .../Queries/XQuery/ShouldSucceed/succeed-9.xq | 1 + .../TestSuite/TestSources/bib2.xml | 40 + .../TestSuite/TestSources/emptydoc.xml | 1 + .../xmlpatternsdiagnosticsts/TestSuite/validate.sh | 44 + .../tst_xmlpatternsdiagnosticsts.cpp | 80 + .../xmlpatternsdiagnosticsts.pro | 27 + tests/auto/xmlpatternsschema/.gitignore | 1 + .../xmlpatternsschema/tst_xmlpatternsschema.cpp | 1028 ++++++ tests/auto/xmlpatternsschema/xmlpatternsschema.pro | 6 + tests/auto/xmlpatternsschemats/.gitignore | 4 + tests/auto/xmlpatternsschemats/Baseline.xml | 2 + .../auto/xmlpatternsschemats/TESTSUITE/.gitignore | 3 + .../xmlpatternsschemats/TESTSUITE/unifyCatalog.xsl | 21 + .../xmlpatternsschemats/TESTSUITE/updateSuite.sh | 60 + .../tst_xmlpatternsschemats.cpp | 78 + .../xmlpatternsschemats/xmlpatternsschemats.pro | 27 + tests/auto/xmlpatternssdk/ASTItem.cpp | 161 + tests/auto/xmlpatternssdk/ASTItem.h | 115 + .../auto/xmlpatternssdk/DebugExpressionFactory.cpp | 264 ++ tests/auto/xmlpatternssdk/DebugExpressionFactory.h | 128 + tests/auto/xmlpatternssdk/ErrorHandler.cpp | 166 + tests/auto/xmlpatternssdk/ErrorHandler.h | 149 + tests/auto/xmlpatternssdk/ErrorItem.cpp | 142 + tests/auto/xmlpatternssdk/ErrorItem.h | 94 + tests/auto/xmlpatternssdk/ExitCode.h | 105 + tests/auto/xmlpatternssdk/ExpressionInfo.cpp | 54 + tests/auto/xmlpatternssdk/ExpressionInfo.h | 80 + tests/auto/xmlpatternssdk/ExpressionNamer.cpp | 316 ++ tests/auto/xmlpatternssdk/ExpressionNamer.h | 281 ++ tests/auto/xmlpatternssdk/ExternalSourceLoader.cpp | 140 + tests/auto/xmlpatternssdk/ExternalSourceLoader.h | 137 + tests/auto/xmlpatternssdk/Global.cpp | 83 + tests/auto/xmlpatternssdk/Global.h | 128 + tests/auto/xmlpatternssdk/ResultThreader.cpp | 76 + tests/auto/xmlpatternssdk/ResultThreader.h | 110 + tests/auto/xmlpatternssdk/TestBaseLine.cpp | 511 +++ tests/auto/xmlpatternssdk/TestBaseLine.h | 212 ++ tests/auto/xmlpatternssdk/TestCase.cpp | 439 +++ tests/auto/xmlpatternssdk/TestCase.h | 256 ++ tests/auto/xmlpatternssdk/TestContainer.cpp | 151 + tests/auto/xmlpatternssdk/TestContainer.h | 123 + tests/auto/xmlpatternssdk/TestGroup.cpp | 143 + tests/auto/xmlpatternssdk/TestGroup.h | 93 + tests/auto/xmlpatternssdk/TestItem.h | 133 + tests/auto/xmlpatternssdk/TestResult.cpp | 158 + tests/auto/xmlpatternssdk/TestResult.h | 179 + tests/auto/xmlpatternssdk/TestResultHandler.cpp | 98 + tests/auto/xmlpatternssdk/TestResultHandler.h | 115 + tests/auto/xmlpatternssdk/TestSuite.cpp | 269 ++ tests/auto/xmlpatternssdk/TestSuite.h | 160 + tests/auto/xmlpatternssdk/TestSuiteHandler.cpp | 312 ++ tests/auto/xmlpatternssdk/TestSuiteHandler.h | 169 + tests/auto/xmlpatternssdk/TestSuiteResult.cpp | 173 + tests/auto/xmlpatternssdk/TestSuiteResult.h | 93 + tests/auto/xmlpatternssdk/TreeItem.cpp | 62 + tests/auto/xmlpatternssdk/TreeItem.h | 114 + tests/auto/xmlpatternssdk/TreeModel.cpp | 184 + tests/auto/xmlpatternssdk/TreeModel.h | 110 + tests/auto/xmlpatternssdk/Worker.cpp | 258 ++ tests/auto/xmlpatternssdk/Worker.h | 100 + tests/auto/xmlpatternssdk/XMLWriter.cpp | 669 ++++ tests/auto/xmlpatternssdk/XMLWriter.h | 403 +++ tests/auto/xmlpatternssdk/XQTSTestCase.cpp | 286 ++ tests/auto/xmlpatternssdk/XQTSTestCase.h | 149 + tests/auto/xmlpatternssdk/XSDTSTestCase.cpp | 375 +++ tests/auto/xmlpatternssdk/XSDTSTestCase.h | 161 + tests/auto/xmlpatternssdk/XSDTestSuiteHandler.cpp | 910 +++++ tests/auto/xmlpatternssdk/XSDTestSuiteHandler.h | 121 + tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp | 234 ++ tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.h | 158 + .../xmlpatternssdk/docs/XMLIndenterExample.cpp | 63 + .../docs/XMLIndenterExampleResult.xml | 3 + .../auto/xmlpatternssdk/docs/XMLWriterExample.cpp | 63 + .../xmlpatternssdk/docs/XMLWriterExampleResult.xml | 3 + tests/auto/xmlpatternssdk/tests/XMLWriterTest.cpp | 186 + tests/auto/xmlpatternssdk/tests/XMLWriterTest.h | 77 + tests/auto/xmlpatternssdk/xmlpatternssdk.pro | 88 + .../complex-type-including-anonymous-type.xsd | 24 + .../files/dateTime-with-microseconds.xml | 1 + .../files/dateTime-with-microseconds.xsd | 12 + .../files/indirect-datatype.xsd | 6 + .../files/indirect-import-a.xsd | 5 + .../files/indirect-import-b.xsd | 4 + .../files/indirect-import-c.xsd | 4 + .../files/indirect-include-a.xsd | 5 + .../files/indirect-include-b.xsd | 4 + .../files/indirect-include-c.xsd | 4 + .../files/indirect-redefine-a.xsd | 5 + .../files/indirect-redefine-b.xsd | 4 + .../files/indirect-redefine-c.xsd | 4 + tests/auto/xmlpatternsvalidator/files/instance.xml | 3 + .../xmlpatternsvalidator/files/invalid_schema.xsd | 12 + .../files/other_valid_schema.xsd | 12 + .../files/sa_invalid_instance.xml | 3 + .../files/sa_valid_instance.xml | 3 + .../xmlpatternsvalidator/files/valid_schema.xsd | 12 + .../tst_xmlpatternsvalidator.cpp | 234 ++ .../xmlpatternsvalidator/xmlpatternsvalidator.pro | 5 + tests/auto/xmlpatternsview/.gitignore | 1 + tests/auto/xmlpatternsview/tst_xmlpatternsview.cpp | 74 + .../view/FunctionSignaturesView.cpp | 60 + .../xmlpatternsview/view/FunctionSignaturesView.h | 75 + tests/auto/xmlpatternsview/view/MainWindow.cpp | 508 +++ tests/auto/xmlpatternsview/view/MainWindow.h | 178 + tests/auto/xmlpatternsview/view/TestCaseView.cpp | 179 + tests/auto/xmlpatternsview/view/TestCaseView.h | 91 + tests/auto/xmlpatternsview/view/TestResultView.cpp | 163 + tests/auto/xmlpatternsview/view/TestResultView.h | 86 + tests/auto/xmlpatternsview/view/TreeSortFilter.cpp | 122 + tests/auto/xmlpatternsview/view/TreeSortFilter.h | 98 + tests/auto/xmlpatternsview/view/UserTestCase.cpp | 159 + tests/auto/xmlpatternsview/view/UserTestCase.h | 126 + tests/auto/xmlpatternsview/view/XDTItemItem.cpp | 119 + tests/auto/xmlpatternsview/view/XDTItemItem.h | 92 + tests/auto/xmlpatternsview/view/main.cpp | 62 + tests/auto/xmlpatternsview/view/ui_BaseLinePage.ui | 48 + .../view/ui_FunctionSignaturesView.ui | 70 + tests/auto/xmlpatternsview/view/ui_MainWindow.ui | 319 ++ tests/auto/xmlpatternsview/view/ui_TestCaseView.ui | 224 ++ .../auto/xmlpatternsview/view/ui_TestResultView.ui | 239 ++ tests/auto/xmlpatternsview/view/view.pro | 35 + tests/auto/xmlpatternsview/xmlpatternsview.pro | 12 + tests/auto/xmlpatternsxqts/.gitattributes | 1 + tests/auto/xmlpatternsxqts/.gitignore | 3 + tests/auto/xmlpatternsxqts/Baseline.xml | 2 + tests/auto/xmlpatternsxqts/TODO | 241 ++ tests/auto/xmlpatternsxqts/summarizeBaseline.sh | 50 + tests/auto/xmlpatternsxqts/summarizeBaseline.xsl | 25 + tests/auto/xmlpatternsxqts/tst_suitetest.cpp | 178 + tests/auto/xmlpatternsxqts/tst_suitetest.h | 107 + tests/auto/xmlpatternsxqts/tst_xmlpatternsxqts.cpp | 106 + tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro | 21 + tests/auto/xmlpatternsxslts/.gitignore | 4 + tests/auto/xmlpatternsxslts/Baseline.xml | 2 + tests/auto/xmlpatternsxslts/XSLTS/.gitignore | 8 + tests/auto/xmlpatternsxslts/XSLTS/updateSuite.sh | 60 + .../auto/xmlpatternsxslts/tst_xmlpatternsxslts.cpp | 80 + tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro | 26 + tests/global/.gitignore | 2 + tests/tests.pro | 2 + 487 files changed, 50810 insertions(+) create mode 100644 tests/README create mode 100644 tests/auto/auto.pro create mode 100644 tests/auto/bic/.gitignore create mode 100644 tests/auto/bic/data/QtXmlPatterns.4.4.0.linux-gcc-ia32.txt create mode 100644 tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-amd64.txt create mode 100644 tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-ia32.txt create mode 100644 tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-amd64.txt create mode 100644 tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-ia32.txt create mode 100644 tests/auto/bic/data/QtXmlPatterns.4.7.0.linux-gcc-ia32.txt create mode 100644 tests/auto/checkxmlfiles/.gitignore create mode 100644 tests/auto/checkxmlfiles/checkxmlfiles.pro create mode 100644 tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp create mode 100644 tests/auto/network-settings.h create mode 100644 tests/auto/patternistexamplefiletree/.gitignore create mode 100644 tests/auto/patternistexamplefiletree/patternistexamplefiletree.pro create mode 100644 tests/auto/patternistexamplefiletree/tst_patternistexamplefiletree.cpp create mode 100644 tests/auto/patternistexamples/.gitignore create mode 100644 tests/auto/patternistexamples/patternistexamples.pro create mode 100644 tests/auto/patternistexamples/tst_patternistexamples.cpp create mode 100644 tests/auto/patternistheaders/.gitignore create mode 100644 tests/auto/patternistheaders/patternistheaders.pro create mode 100644 tests/auto/patternistheaders/tst_patternistheaders.cpp create mode 100644 tests/auto/qabstractmessagehandler/.gitignore create mode 100644 tests/auto/qabstractmessagehandler/qabstractmessagehandler.pro create mode 100644 tests/auto/qabstractmessagehandler/tst_qabstractmessagehandler.cpp create mode 100644 tests/auto/qabstracturiresolver/.gitignore create mode 100644 tests/auto/qabstracturiresolver/TestURIResolver.h create mode 100644 tests/auto/qabstracturiresolver/qabstracturiresolver.pro create mode 100644 tests/auto/qabstracturiresolver/tst_qabstracturiresolver.cpp create mode 100644 tests/auto/qabstractxmlforwarditerator/.gitignore create mode 100644 tests/auto/qabstractxmlforwarditerator/qabstractxmlforwarditerator.pro create mode 100644 tests/auto/qabstractxmlforwarditerator/tst_qabstractxmlforwarditerator.cpp create mode 100644 tests/auto/qabstractxmlnodemodel/.gitignore create mode 100644 tests/auto/qabstractxmlnodemodel/LoadingModel.cpp create mode 100644 tests/auto/qabstractxmlnodemodel/LoadingModel.h create mode 100644 tests/auto/qabstractxmlnodemodel/TestNodeModel.h create mode 100644 tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro create mode 100644 tests/auto/qabstractxmlnodemodel/tree.xml create mode 100644 tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel.cpp create mode 100644 tests/auto/qabstractxmlreceiver/.gitignore create mode 100644 tests/auto/qabstractxmlreceiver/TestAbstractXmlReceiver.h create mode 100644 tests/auto/qabstractxmlreceiver/qabstractxmlreceiver.pro create mode 100644 tests/auto/qabstractxmlreceiver/tst_qabstractxmlreceiver.cpp create mode 100644 tests/auto/qapplicationargumentparser/.gitignore create mode 100644 tests/auto/qapplicationargumentparser/qapplicationargumentparser.pro create mode 100644 tests/auto/qapplicationargumentparser/tst_qapplicationargumentparser.cpp create mode 100644 tests/auto/qautoptr/.gitignore create mode 100644 tests/auto/qautoptr/qautoptr.pro create mode 100644 tests/auto/qautoptr/tst_qautoptr.cpp create mode 100644 tests/auto/qsimplexmlnodemodel/.gitignore create mode 100644 tests/auto/qsimplexmlnodemodel/TestSimpleNodeModel.h create mode 100644 tests/auto/qsimplexmlnodemodel/qsimplexmlnodemodel.pro create mode 100644 tests/auto/qsimplexmlnodemodel/tst_qsimplexmlnodemodel.cpp create mode 100644 tests/auto/qsourcelocation/.gitignore create mode 100644 tests/auto/qsourcelocation/qsourcelocation.pro create mode 100644 tests/auto/qsourcelocation/tst_qsourcelocation.cpp create mode 100644 tests/auto/qxmlformatter/.gitignore create mode 100644 tests/auto/qxmlformatter/baselines/.gitattributes create mode 100644 tests/auto/qxmlformatter/baselines/K2-DirectConElemContent-46.xml create mode 100644 tests/auto/qxmlformatter/baselines/adjacentNodes.xml create mode 100644 tests/auto/qxmlformatter/baselines/classExample.xml create mode 100644 tests/auto/qxmlformatter/baselines/documentElementWithWS.xml create mode 100644 tests/auto/qxmlformatter/baselines/documentNodes.xml create mode 100644 tests/auto/qxmlformatter/baselines/elementsWithWS.xml create mode 100644 tests/auto/qxmlformatter/baselines/emptySequence.xml create mode 100644 tests/auto/qxmlformatter/baselines/indentedAdjacentNodes.xml create mode 100644 tests/auto/qxmlformatter/baselines/indentedMixedContent.xml create mode 100644 tests/auto/qxmlformatter/baselines/mixedContent.xml create mode 100644 tests/auto/qxmlformatter/baselines/mixedTopLevelContent.xml create mode 100644 tests/auto/qxmlformatter/baselines/nodesAndWhitespaceAtomics.xml create mode 100644 tests/auto/qxmlformatter/baselines/onlyDocumentNode.xml create mode 100644 tests/auto/qxmlformatter/baselines/prolog.xml create mode 100644 tests/auto/qxmlformatter/baselines/simpleDocument.xml create mode 100644 tests/auto/qxmlformatter/baselines/singleElement.xml create mode 100644 tests/auto/qxmlformatter/baselines/singleTextNode.xml create mode 100644 tests/auto/qxmlformatter/baselines/textNodeAtomicValue.xml create mode 100644 tests/auto/qxmlformatter/baselines/threeAtomics.xml create mode 100644 tests/auto/qxmlformatter/input/K2-DirectConElemContent-46.xq create mode 100644 tests/auto/qxmlformatter/input/adjacentNodes.xml create mode 100644 tests/auto/qxmlformatter/input/adjacentNodes.xq create mode 100644 tests/auto/qxmlformatter/input/classExample.xml create mode 100644 tests/auto/qxmlformatter/input/classExample.xq create mode 100644 tests/auto/qxmlformatter/input/documentElementWithWS.xml create mode 100644 tests/auto/qxmlformatter/input/documentElementWithWS.xq create mode 100644 tests/auto/qxmlformatter/input/documentNodes.xq create mode 100644 tests/auto/qxmlformatter/input/elementsWithWS.xml create mode 100644 tests/auto/qxmlformatter/input/elementsWithWS.xq create mode 100644 tests/auto/qxmlformatter/input/emptySequence.xq create mode 100644 tests/auto/qxmlformatter/input/indentedAdjacentNodes.xml create mode 100644 tests/auto/qxmlformatter/input/indentedAdjacentNodes.xq create mode 100644 tests/auto/qxmlformatter/input/indentedMixedContent.xml create mode 100644 tests/auto/qxmlformatter/input/indentedMixedContent.xq create mode 100644 tests/auto/qxmlformatter/input/mixedContent.xml create mode 100644 tests/auto/qxmlformatter/input/mixedContent.xq create mode 100644 tests/auto/qxmlformatter/input/mixedTopLevelContent.xq create mode 100644 tests/auto/qxmlformatter/input/nodesAndWhitespaceAtomics.xq create mode 100644 tests/auto/qxmlformatter/input/onlyDocumentNode.xq create mode 100644 tests/auto/qxmlformatter/input/prolog.xml create mode 100644 tests/auto/qxmlformatter/input/prolog.xq create mode 100644 tests/auto/qxmlformatter/input/simpleDocument.xml create mode 100644 tests/auto/qxmlformatter/input/simpleDocument.xq create mode 100644 tests/auto/qxmlformatter/input/singleElement.xml create mode 100644 tests/auto/qxmlformatter/input/singleElement.xq create mode 100644 tests/auto/qxmlformatter/input/singleTextNode.xq create mode 100644 tests/auto/qxmlformatter/input/textNodeAtomicValue.xq create mode 100644 tests/auto/qxmlformatter/input/threeAtomics.xq create mode 100644 tests/auto/qxmlformatter/qxmlformatter.pro create mode 100644 tests/auto/qxmlformatter/tst_qxmlformatter.cpp create mode 100644 tests/auto/qxmlitem/.gitignore create mode 100644 tests/auto/qxmlitem/qxmlitem.pro create mode 100644 tests/auto/qxmlitem/tst_qxmlitem.cpp create mode 100644 tests/auto/qxmlname/.gitignore create mode 100644 tests/auto/qxmlname/qxmlname.pro create mode 100644 tests/auto/qxmlname/tst_qxmlname.cpp create mode 100644 tests/auto/qxmlnamepool/.gitignore create mode 100644 tests/auto/qxmlnamepool/qxmlnamepool.pro create mode 100644 tests/auto/qxmlnamepool/tst_qxmlnamepool.cpp create mode 100644 tests/auto/qxmlnodemodelindex/.gitignore create mode 100644 tests/auto/qxmlnodemodelindex/qxmlnodemodelindex.pro create mode 100644 tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp create mode 100644 tests/auto/qxmlquery/.gitignore create mode 100644 tests/auto/qxmlquery/MessageSilencer.h create mode 100644 tests/auto/qxmlquery/MessageValidator.cpp create mode 100644 tests/auto/qxmlquery/MessageValidator.h create mode 100644 tests/auto/qxmlquery/NetworkOverrider.h create mode 100644 tests/auto/qxmlquery/PushBaseliner.h create mode 100644 tests/auto/qxmlquery/TestFundament.cpp create mode 100644 tests/auto/qxmlquery/TestFundament.h create mode 100644 tests/auto/qxmlquery/data/notWellformed.xml create mode 100644 tests/auto/qxmlquery/data/oneElement.xml create mode 100644 tests/auto/qxmlquery/input.qrc create mode 100644 tests/auto/qxmlquery/input.xml create mode 100644 tests/auto/qxmlquery/pushBaselines/allAtomics.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/concat.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/emptySequence.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/errorFunction.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/nodeSequence.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/oneElement.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/onePlusOne.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/onlyDocumentNode.ref create mode 100644 tests/auto/qxmlquery/pushBaselines/openDocument.ref create mode 100644 tests/auto/qxmlquery/qxmlquery.pro create mode 100644 tests/auto/qxmlquery/tst_qxmlquery.cpp create mode 100644 tests/auto/qxmlresultitems/.gitignore create mode 100644 tests/auto/qxmlresultitems/qxmlresultitems.pro create mode 100644 tests/auto/qxmlresultitems/tst_qxmlresultitems.cpp create mode 100644 tests/auto/qxmlschema/.gitignore create mode 100644 tests/auto/qxmlschema/qxmlschema.pro create mode 100644 tests/auto/qxmlschema/tst_qxmlschema.cpp create mode 100644 tests/auto/qxmlschemavalidator/.gitignore create mode 100644 tests/auto/qxmlschemavalidator/qxmlschemavalidator.pro create mode 100644 tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp create mode 100644 tests/auto/qxmlserializer/.gitignore create mode 100644 tests/auto/qxmlserializer/qxmlserializer.pro create mode 100644 tests/auto/qxmlserializer/tst_qxmlserializer.cpp create mode 100644 tests/auto/xmlpatterns.pri create mode 100644 tests/auto/xmlpatterns/.gitattributes create mode 100644 tests/auto/xmlpatterns/.gitignore create mode 100644 tests/auto/xmlpatterns/XSLTTODO create mode 100644 tests/auto/xmlpatterns/baselines/globals.xml create mode 100644 tests/auto/xmlpatterns/queries/README create mode 100644 tests/auto/xmlpatterns/queries/allAtomics.xq create mode 100644 tests/auto/xmlpatterns/queries/allAtomicsExternally.xq create mode 100644 tests/auto/xmlpatterns/queries/completelyEmptyQuery.xq create mode 100644 tests/auto/xmlpatterns/queries/concat.xq create mode 100644 tests/auto/xmlpatterns/queries/emptySequence.xq create mode 100644 tests/auto/xmlpatterns/queries/errorFunction.xq create mode 100644 tests/auto/xmlpatterns/queries/externalStringVariable.xq create mode 100644 tests/auto/xmlpatterns/queries/externalVariable.xq create mode 100644 tests/auto/xmlpatterns/queries/externalVariableUsedTwice.xq create mode 100644 tests/auto/xmlpatterns/queries/flwor.xq create mode 100644 tests/auto/xmlpatterns/queries/globals.gccxml create mode 100644 tests/auto/xmlpatterns/queries/invalidRegexp.xq create mode 100644 tests/auto/xmlpatterns/queries/invalidRegexpFlag.xq create mode 100644 tests/auto/xmlpatterns/queries/nodeSequence.xq create mode 100644 tests/auto/xmlpatterns/queries/nonexistingCollection.xq create mode 100644 tests/auto/xmlpatterns/queries/oneElement.xq create mode 100644 tests/auto/xmlpatterns/queries/onePlusOne.xq create mode 100644 tests/auto/xmlpatterns/queries/onlyDocumentNode.xq create mode 100644 tests/auto/xmlpatterns/queries/openDocument.xq create mode 100644 tests/auto/xmlpatterns/queries/reportGlobals.xq create mode 100644 tests/auto/xmlpatterns/queries/simpleDocument.xml create mode 100644 tests/auto/xmlpatterns/queries/simpleLibraryModule.xq create mode 100644 tests/auto/xmlpatterns/queries/staticBaseURI.xq create mode 100644 tests/auto/xmlpatterns/queries/staticError.xq create mode 100644 tests/auto/xmlpatterns/queries/syntaxError.xq create mode 100644 tests/auto/xmlpatterns/queries/threeVariables.xq create mode 100644 tests/auto/xmlpatterns/queries/twoVariables.xq create mode 100644 tests/auto/xmlpatterns/queries/typeError.xq create mode 100644 tests/auto/xmlpatterns/queries/unavailableExternalVariable.xq create mode 100644 tests/auto/xmlpatterns/queries/unsupportedCollation.xq create mode 100644 tests/auto/xmlpatterns/queries/wrongArity.xq create mode 100644 tests/auto/xmlpatterns/queries/zeroDivision.xq create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Anunboundexternalvariable.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Asimplemathquery.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Asingledashthatsinvalid.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Asinglequerythatdoesnotexist.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputqueryfirst.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputquerylast.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariable.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariablequeryappearinglast.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Callanamedtemplateandusenofocus..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Callfnerror.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Ensureisuricanappearafterthequeryfilename.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Evaluatealibrarymodule.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Evaluateastylesheetwithnocontextdocument.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invalidtemplatename.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invokeatemplateandusepassparameters..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invokeversion.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invokewithcoloninvariablename..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invokewithinvalidparamvalue..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invokewithmissingnameinparamarg..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathasnovalue..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathastwoadjacentequalsigns..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaFTP.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaHTTP.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Loadqueryviadatascheme.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/MakesurequerypathsareresolvedagainstCWDnotthelocationoftheexecutable..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Notwellformedinstancedocumentcausescrashincoloringcode..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Notwellformedstylesheetcausescrashincoloringcode..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Openannonexistentfile.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Openanonexistingcollection..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Passhelp.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Passinanexternalvariablebutthequerydoesntuseit..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Passinastylesheetfileandafocusfilewhichdoesntexist.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/PassinastylesheetfilewhichcontainsanXQueryquery.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Passinastylsheetfileandafocusfilewhichdoesntexist.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/PassinastylsheetfilewhichcontainsanXQueryquery.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Passingasingledashisinsufficient.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Passingtwodashesthelastisinterpretedasafilename.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/PassininvalidURI.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Passthreedashesthetwolastgetsinterpretedastwoqueryarguments.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestoasingledocumentnodewithnochildren..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestotheemptysequence..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatdoesnotexists.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatexists.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Specifynoargumentsatall..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicedifferentvalues.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicesamevalues.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Specifytwodifferentquerynames.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Specifytwoidenticalquerynames.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/TriggeranassertinQPatternistColorOutput.ThequerynaturallycontainsanerrorXPTY0004..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/TriggerasecondassertinQPatternistColorOutput.ThequerynaturallycontainsXPST0003..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Triggerastaticerror..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Unknownswitchd.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Unknownswitchunknownswitch.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Useanativepath.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Useanexternalvariablemultipletimes..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Useasimplifiedstylesheetmodule.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Usefndoc.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatfirst.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatlast.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Useoutputonafilewithexistingcontenttoensurewetruncatenotappendthecontentweproduce..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Useoutputtwice.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Useparamthrice.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Useparamtwice.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/Wedontsupportformatanylonger.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/XQuerydataXQuerykeywordmessagemarkups.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/XQueryexpressionmessagemarkups.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/XQueryfunctionmessagemarkups.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/XQuerytypemessagemarkups.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/XQueryurimessagemarkups.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/initialtemplatedoesntworkwithXQueries..txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue2.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/onequeryandaterminatingdashattheend.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/onequerywithaprecedingdash.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/onlynoformat.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/outputwithanonwritablefile.txt create mode 100644 tests/auto/xmlpatterns/stderrBaselines/paramismissingsomultiplequeriesappear.txt create mode 100644 tests/auto/xmlpatterns/stylesheets/bool070.xml create mode 100644 tests/auto/xmlpatterns/stylesheets/bool070.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/copyWholeDocument.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/documentElement.xml create mode 100644 tests/auto/xmlpatterns/stylesheets/namedAndRootTemplate.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/namedTemplate.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/notWellformed.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/onlyRootTemplate.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/parameters.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xml create mode 100644 tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xsl create mode 100644 tests/auto/xmlpatterns/stylesheets/useParameters.xsl create mode 100644 tests/auto/xmlpatterns/tst_xmlpatterns.cpp create mode 100644 tests/auto/xmlpatterns/xmlpatterns.pro create mode 100644 tests/auto/xmlpatternsdiagnosticsts/.gitattributes create mode 100644 tests/auto/xmlpatternsdiagnosticsts/.gitignore create mode 100644 tests/auto/xmlpatternsdiagnosticsts/Baseline.xml create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml create mode 100644 tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml create mode 100755 tests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh create mode 100644 tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp create mode 100644 tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro create mode 100644 tests/auto/xmlpatternsschema/.gitignore create mode 100644 tests/auto/xmlpatternsschema/tst_xmlpatternsschema.cpp create mode 100644 tests/auto/xmlpatternsschema/xmlpatternsschema.pro create mode 100644 tests/auto/xmlpatternsschemats/.gitignore create mode 100644 tests/auto/xmlpatternsschemats/Baseline.xml create mode 100644 tests/auto/xmlpatternsschemats/TESTSUITE/.gitignore create mode 100644 tests/auto/xmlpatternsschemats/TESTSUITE/unifyCatalog.xsl create mode 100755 tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh create mode 100644 tests/auto/xmlpatternsschemats/tst_xmlpatternsschemats.cpp create mode 100644 tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro create mode 100644 tests/auto/xmlpatternssdk/ASTItem.cpp create mode 100644 tests/auto/xmlpatternssdk/ASTItem.h create mode 100644 tests/auto/xmlpatternssdk/DebugExpressionFactory.cpp create mode 100644 tests/auto/xmlpatternssdk/DebugExpressionFactory.h create mode 100644 tests/auto/xmlpatternssdk/ErrorHandler.cpp create mode 100644 tests/auto/xmlpatternssdk/ErrorHandler.h create mode 100644 tests/auto/xmlpatternssdk/ErrorItem.cpp create mode 100644 tests/auto/xmlpatternssdk/ErrorItem.h create mode 100644 tests/auto/xmlpatternssdk/ExitCode.h create mode 100644 tests/auto/xmlpatternssdk/ExpressionInfo.cpp create mode 100644 tests/auto/xmlpatternssdk/ExpressionInfo.h create mode 100644 tests/auto/xmlpatternssdk/ExpressionNamer.cpp create mode 100644 tests/auto/xmlpatternssdk/ExpressionNamer.h create mode 100644 tests/auto/xmlpatternssdk/ExternalSourceLoader.cpp create mode 100644 tests/auto/xmlpatternssdk/ExternalSourceLoader.h create mode 100644 tests/auto/xmlpatternssdk/Global.cpp create mode 100644 tests/auto/xmlpatternssdk/Global.h create mode 100644 tests/auto/xmlpatternssdk/ResultThreader.cpp create mode 100644 tests/auto/xmlpatternssdk/ResultThreader.h create mode 100644 tests/auto/xmlpatternssdk/TestBaseLine.cpp create mode 100644 tests/auto/xmlpatternssdk/TestBaseLine.h create mode 100644 tests/auto/xmlpatternssdk/TestCase.cpp create mode 100644 tests/auto/xmlpatternssdk/TestCase.h create mode 100644 tests/auto/xmlpatternssdk/TestContainer.cpp create mode 100644 tests/auto/xmlpatternssdk/TestContainer.h create mode 100644 tests/auto/xmlpatternssdk/TestGroup.cpp create mode 100644 tests/auto/xmlpatternssdk/TestGroup.h create mode 100644 tests/auto/xmlpatternssdk/TestItem.h create mode 100644 tests/auto/xmlpatternssdk/TestResult.cpp create mode 100644 tests/auto/xmlpatternssdk/TestResult.h create mode 100644 tests/auto/xmlpatternssdk/TestResultHandler.cpp create mode 100644 tests/auto/xmlpatternssdk/TestResultHandler.h create mode 100644 tests/auto/xmlpatternssdk/TestSuite.cpp create mode 100644 tests/auto/xmlpatternssdk/TestSuite.h create mode 100644 tests/auto/xmlpatternssdk/TestSuiteHandler.cpp create mode 100644 tests/auto/xmlpatternssdk/TestSuiteHandler.h create mode 100644 tests/auto/xmlpatternssdk/TestSuiteResult.cpp create mode 100644 tests/auto/xmlpatternssdk/TestSuiteResult.h create mode 100644 tests/auto/xmlpatternssdk/TreeItem.cpp create mode 100644 tests/auto/xmlpatternssdk/TreeItem.h create mode 100644 tests/auto/xmlpatternssdk/TreeModel.cpp create mode 100644 tests/auto/xmlpatternssdk/TreeModel.h create mode 100644 tests/auto/xmlpatternssdk/Worker.cpp create mode 100644 tests/auto/xmlpatternssdk/Worker.h create mode 100644 tests/auto/xmlpatternssdk/XMLWriter.cpp create mode 100644 tests/auto/xmlpatternssdk/XMLWriter.h create mode 100644 tests/auto/xmlpatternssdk/XQTSTestCase.cpp create mode 100644 tests/auto/xmlpatternssdk/XQTSTestCase.h create mode 100644 tests/auto/xmlpatternssdk/XSDTSTestCase.cpp create mode 100644 tests/auto/xmlpatternssdk/XSDTSTestCase.h create mode 100644 tests/auto/xmlpatternssdk/XSDTestSuiteHandler.cpp create mode 100644 tests/auto/xmlpatternssdk/XSDTestSuiteHandler.h create mode 100644 tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp create mode 100644 tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.h create mode 100644 tests/auto/xmlpatternssdk/docs/XMLIndenterExample.cpp create mode 100644 tests/auto/xmlpatternssdk/docs/XMLIndenterExampleResult.xml create mode 100644 tests/auto/xmlpatternssdk/docs/XMLWriterExample.cpp create mode 100644 tests/auto/xmlpatternssdk/docs/XMLWriterExampleResult.xml create mode 100644 tests/auto/xmlpatternssdk/tests/XMLWriterTest.cpp create mode 100644 tests/auto/xmlpatternssdk/tests/XMLWriterTest.h create mode 100644 tests/auto/xmlpatternssdk/xmlpatternssdk.pro create mode 100644 tests/auto/xmlpatternsvalidator/files/complex-type-including-anonymous-type.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml create mode 100644 tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/instance.xml create mode 100644 tests/auto/xmlpatternsvalidator/files/invalid_schema.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/other_valid_schema.xsd create mode 100644 tests/auto/xmlpatternsvalidator/files/sa_invalid_instance.xml create mode 100644 tests/auto/xmlpatternsvalidator/files/sa_valid_instance.xml create mode 100644 tests/auto/xmlpatternsvalidator/files/valid_schema.xsd create mode 100644 tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp create mode 100644 tests/auto/xmlpatternsvalidator/xmlpatternsvalidator.pro create mode 100644 tests/auto/xmlpatternsview/.gitignore create mode 100644 tests/auto/xmlpatternsview/tst_xmlpatternsview.cpp create mode 100644 tests/auto/xmlpatternsview/view/FunctionSignaturesView.cpp create mode 100644 tests/auto/xmlpatternsview/view/FunctionSignaturesView.h create mode 100644 tests/auto/xmlpatternsview/view/MainWindow.cpp create mode 100644 tests/auto/xmlpatternsview/view/MainWindow.h create mode 100644 tests/auto/xmlpatternsview/view/TestCaseView.cpp create mode 100644 tests/auto/xmlpatternsview/view/TestCaseView.h create mode 100644 tests/auto/xmlpatternsview/view/TestResultView.cpp create mode 100644 tests/auto/xmlpatternsview/view/TestResultView.h create mode 100644 tests/auto/xmlpatternsview/view/TreeSortFilter.cpp create mode 100644 tests/auto/xmlpatternsview/view/TreeSortFilter.h create mode 100644 tests/auto/xmlpatternsview/view/UserTestCase.cpp create mode 100644 tests/auto/xmlpatternsview/view/UserTestCase.h create mode 100644 tests/auto/xmlpatternsview/view/XDTItemItem.cpp create mode 100644 tests/auto/xmlpatternsview/view/XDTItemItem.h create mode 100644 tests/auto/xmlpatternsview/view/main.cpp create mode 100644 tests/auto/xmlpatternsview/view/ui_BaseLinePage.ui create mode 100644 tests/auto/xmlpatternsview/view/ui_FunctionSignaturesView.ui create mode 100644 tests/auto/xmlpatternsview/view/ui_MainWindow.ui create mode 100644 tests/auto/xmlpatternsview/view/ui_TestCaseView.ui create mode 100644 tests/auto/xmlpatternsview/view/ui_TestResultView.ui create mode 100644 tests/auto/xmlpatternsview/view/view.pro create mode 100644 tests/auto/xmlpatternsview/xmlpatternsview.pro create mode 100644 tests/auto/xmlpatternsxqts/.gitattributes create mode 100644 tests/auto/xmlpatternsxqts/.gitignore create mode 100644 tests/auto/xmlpatternsxqts/Baseline.xml create mode 100644 tests/auto/xmlpatternsxqts/TODO create mode 100755 tests/auto/xmlpatternsxqts/summarizeBaseline.sh create mode 100644 tests/auto/xmlpatternsxqts/summarizeBaseline.xsl create mode 100644 tests/auto/xmlpatternsxqts/tst_suitetest.cpp create mode 100644 tests/auto/xmlpatternsxqts/tst_suitetest.h create mode 100644 tests/auto/xmlpatternsxqts/tst_xmlpatternsxqts.cpp create mode 100644 tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro create mode 100644 tests/auto/xmlpatternsxslts/.gitignore create mode 100644 tests/auto/xmlpatternsxslts/Baseline.xml create mode 100644 tests/auto/xmlpatternsxslts/XSLTS/.gitignore create mode 100755 tests/auto/xmlpatternsxslts/XSLTS/updateSuite.sh create mode 100644 tests/auto/xmlpatternsxslts/tst_xmlpatternsxslts.cpp create mode 100644 tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro create mode 100644 tests/global/.gitignore create mode 100644 tests/tests.pro (limited to 'tests') diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..f94d5a2 --- /dev/null +++ b/tests/README @@ -0,0 +1,18 @@ +This directory contains autotests and benchmarks based on QTestlib. In order +to run the autotests reliably, you need to configure a desktop to match the +test environment that these tests are written for. + +Linux X11: + + * The user must be logged in to an active desktop; you can't run the + autotests without a valid DISPLAY that allows X11 connections. + + * The tests are run against a KDE3 or KDE4 desktop. + + * Window manager uses "click to focus", and not "focus follows mouse". Many + tests move the mouse cursor around and expect this to not affect focus + and activation. + + * Disable "click to activate", i.e., when a window is opened, the window + manager should automatically activate it (give it input focus) and not + wait for the user to click the window. diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro new file mode 100644 index 0000000..b9244d6 --- /dev/null +++ b/tests/auto/auto.pro @@ -0,0 +1,49 @@ +TEMPLATE=subdirs +SUBDIRS=\ + checkxmlfiles \ + patternistexamplefiletree \ + patternistexamples \ + patternistheaders \ + qabstractmessagehandler \ + qabstracturiresolver \ + qabstractxmlforwarditerator \ + qabstractxmlnodemodel \ + qabstractxmlreceiver \ + qapplicationargumentparser \ + qautoptr \ + qsimplexmlnodemodel \ + qsourcelocation \ + qxmlformatter \ + qxmlitem \ + qxmlname \ + qxmlnamepool \ + qxmlnodemodelindex \ + qxmlquery \ + qxmlresultitems \ + qxmlschema \ + qxmlschemavalidator \ + qxmlserializer \ + xmlpatterns \ + xmlpatternsdiagnosticsts \ + xmlpatternsschema \ + xmlpatternsschemats \ + xmlpatternssdk \ + xmlpatternsvalidator \ + xmlpatternsview \ + xmlpatternsxqts \ + xmlpatternsxslts \ + +xmlpatternsdiagnosticsts.depends = xmlpatternssdk +xmlpatternsview.depends = xmlpatternssdk +xmlpatternsxslts.depends = xmlpatternssdk +xmlpatternsxqts.depends = xmlpatternssdk +xmlpatternsschemats.depends = xmlpatternssdk +xmlpatternsxqts.depends = xmlpatternssdk + +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + xmlpatternsdiagnosticsts \ + xmlpatternsview \ + xmlpatternssdk \ + xmlpatternsxqts \ + xmlpatternsxslts \ + diff --git a/tests/auto/bic/.gitignore b/tests/auto/bic/.gitignore new file mode 100644 index 0000000..6f26b86 --- /dev/null +++ b/tests/auto/bic/.gitignore @@ -0,0 +1,2 @@ +qt_temp.*.*lass +test.cpp diff --git a/tests/auto/bic/data/QtXmlPatterns.4.4.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtXmlPatterns.4.4.0.linux-gcc-ia32.txt new file mode 100644 index 0000000..2353104 --- /dev/null +++ b/tests/auto/bic/data/QtXmlPatterns.4.4.0.linux-gcc-ia32.txt @@ -0,0 +1,2571 @@ +Class QSysInfo + size=1 align=1 + base size=0 base align=1 +QSysInfo (0xb77a39d8) 0 empty + +Class QBool + size=1 align=1 + base size=1 base align=1 +QBool (0xb77b7000) 0 + +Class qIsNull(double)::U + size=8 align=4 + base size=8 base align=4 +qIsNull(double)::U (0xb77b799c) 0 + +Class qIsNull(float)::U + size=4 align=4 + base size=4 base align=4 +qIsNull(float)::U (0xb77b7a50) 0 + +Class QFlag + size=4 align=4 + base size=4 base align=4 +QFlag (0xb77cda50) 0 + +Class QLatin1Char + size=1 align=1 + base size=1 base align=1 +QLatin1Char (0xb77eb4ec) 0 + +Class QChar + size=2 align=2 + base size=2 base align=2 +QChar (0xb77eb960) 0 + +Class QBasicAtomicInt + size=4 align=4 + base size=4 base align=4 +QBasicAtomicInt (0xb69dd0f0) 0 + +Class QAtomicInt + size=4 align=4 + base size=4 base align=4 +QAtomicInt (0xb6a04240) 0 + QBasicAtomicInt (0xb6a080b4) 0 + +Class __locale_struct + size=116 align=4 + base size=116 base align=4 +__locale_struct (0xb6a1c000) 0 + +Class QByteArray::Data + size=20 align=4 + base size=20 base align=4 +QByteArray::Data (0xb6a4b1e0) 0 + +Class QByteArray + size=4 align=4 + base size=4 base align=4 +QByteArray (0xb6a1c5dc) 0 + +Class QByteRef + size=8 align=4 + base size=8 base align=4 +QByteRef (0xb6a7a1e0) 0 + +Class QInternal + size=1 align=1 + base size=0 base align=1 +QInternal (0xb697cca8) 0 empty + +Class QString::Null + size=1 align=1 + base size=0 base align=1 +QString::Null (0xb69c1fb4) 0 empty + +Class QString::Data + size=20 align=4 + base size=20 base align=4 +QString::Data (0xb67d14ec) 0 + +Class QString + size=4 align=4 + base size=4 base align=4 +QString (0xb697ce10) 0 + +Class QLatin1String + size=4 align=4 + base size=4 base align=4 +QLatin1String (0xb684412c) 0 + +Class QCharRef + size=8 align=4 + base size=8 base align=4 +QCharRef (0xb68929d8) 0 + +Class QConstString + size=4 align=4 + base size=4 base align=4 +QConstString (0xb66fdb00) 0 + QString (0xb6745474) 0 + +Class QStringRef + size=12 align=4 + base size=12 base align=4 +QStringRef (0xb6755618) 0 + +Vtable for std::exception +std::exception::_ZTVSt9exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9exception) +8 std::exception::~exception +12 std::exception::~exception +16 std::exception::what + +Class std::exception + size=4 align=4 + base size=4 base align=4 +std::exception (0xb67aa384) 0 nearly-empty + vptr=((& std::exception::_ZTVSt9exception) + 8u) + +Vtable for std::bad_exception +std::bad_exception::_ZTVSt13bad_exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt13bad_exception) +8 std::bad_exception::~bad_exception +12 std::bad_exception::~bad_exception +16 std::bad_exception::what + +Class std::bad_exception + size=4 align=4 + base size=4 base align=4 +std::bad_exception (0xb67b4100) 0 nearly-empty + vptr=((& std::bad_exception::_ZTVSt13bad_exception) + 8u) + std::exception (0xb67aa690) 0 nearly-empty + primary-for std::bad_exception (0xb67b4100) + +Vtable for std::bad_alloc +std::bad_alloc::_ZTVSt9bad_alloc: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9bad_alloc) +8 std::bad_alloc::~bad_alloc +12 std::bad_alloc::~bad_alloc +16 std::bad_alloc::what + +Class std::bad_alloc + size=4 align=4 + base size=4 base align=4 +std::bad_alloc (0xb67b4240) 0 nearly-empty + vptr=((& std::bad_alloc::_ZTVSt9bad_alloc) + 8u) + std::exception (0xb67aa960) 0 nearly-empty + primary-for std::bad_alloc (0xb67b4240) + +Class std::nothrow_t + size=1 align=1 + base size=0 base align=1 +std::nothrow_t (0xb67aac30) 0 empty + +Class QListData::Data + size=24 align=4 + base size=24 base align=4 +QListData::Data (0xb67aae88) 0 + +Class QListData + size=4 align=4 + base size=4 base align=4 +QListData (0xb67aae4c) 0 + +Class QTextCodec::ConverterState + size=28 align=4 + base size=28 base align=4 +QTextCodec::ConverterState (0xb6656ec4) 0 + +Vtable for QTextCodec +QTextCodec::_ZTV10QTextCodec: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QTextCodec) +8 __cxa_pure_virtual +12 QTextCodec::aliases +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QTextCodec::~QTextCodec +32 QTextCodec::~QTextCodec + +Class QTextCodec + size=4 align=4 + base size=4 base align=4 +QTextCodec (0xb6656438) 0 nearly-empty + vptr=((& QTextCodec::_ZTV10QTextCodec) + 8u) + +Class QTextEncoder + size=32 align=4 + base size=32 base align=4 +QTextEncoder (0xb668f9d8) 0 + +Class QTextDecoder + size=32 align=4 + base size=32 base align=4 +QTextDecoder (0xb668ff3c) 0 + +Class QGenericArgument + size=8 align=4 + base size=8 base align=4 +QGenericArgument (0xb6699528) 0 + +Class QGenericReturnArgument + size=8 align=4 + base size=8 base align=4 +QGenericReturnArgument (0xb66a2000) 0 + QGenericArgument (0xb6699960) 0 + +Class QMetaObject + size=16 align=4 + base size=16 base align=4 +QMetaObject (0xb6699c6c) 0 + +Vtable for QObjectData +QObjectData::_ZTV11QObjectData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QObjectData) +8 __cxa_pure_virtual +12 __cxa_pure_virtual + +Class QObjectData + size=24 align=4 + base size=24 base align=4 +QObjectData (0xb66b1e88) 0 + vptr=((& QObjectData::_ZTV11QObjectData) + 8u) + +Vtable for QObject +QObject::_ZTV7QObject: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QObject) +8 QObject::metaObject +12 QObject::qt_metacast +16 QObject::qt_metacall +20 QObject::~QObject +24 QObject::~QObject +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObject + size=8 align=4 + base size=8 base align=4 +QObject (0xb64d00f0) 0 + vptr=((& QObject::_ZTV7QObject) + 8u) + +Vtable for QObjectUserData +QObjectUserData::_ZTV15QObjectUserData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QObjectUserData) +8 QObjectUserData::~QObjectUserData +12 QObjectUserData::~QObjectUserData + +Class QObjectUserData + size=4 align=4 + base size=4 base align=4 +QObjectUserData (0xb64f1654) 0 nearly-empty + vptr=((& QObjectUserData::_ZTV15QObjectUserData) + 8u) + +Vtable for QIODevice +QIODevice::_ZTV9QIODevice: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QIODevice) +8 QIODevice::metaObject +12 QIODevice::qt_metacast +16 QIODevice::qt_metacall +20 QIODevice::~QIODevice +24 QIODevice::~QIODevice +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QIODevice::isSequential +60 QIODevice::open +64 QIODevice::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QIODevice::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 __cxa_pure_virtual +112 QIODevice::readLineData +116 __cxa_pure_virtual + +Class QIODevice + size=8 align=4 + base size=8 base align=4 +QIODevice (0xb64f5e80) 0 + vptr=((& QIODevice::_ZTV9QIODevice) + 8u) + QObject (0xb64f1fb4) 0 + primary-for QIODevice (0xb64f5e80) + +Vtable for QDataStream +QDataStream::_ZTV11QDataStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QDataStream) +8 QDataStream::~QDataStream +12 QDataStream::~QDataStream + +Class QDataStream + size=28 align=4 + base size=28 base align=4 +QDataStream (0xb6542168) 0 + vptr=((& QDataStream::_ZTV11QDataStream) + 8u) + +Class QRegExp + size=4 align=4 + base size=4 base align=4 +QRegExp (0xb65681e0) 0 + +Class QStringMatcher + size=1036 align=4 + base size=1036 base align=4 +QStringMatcher (0xb6588ac8) 0 + +Class QStringList + size=4 align=4 + base size=4 base align=4 +QStringList (0xb6566f80) 0 + QList (0xb6596078) 0 + +Vtable for QFactoryInterface +QFactoryInterface::_ZTV17QFactoryInterface: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QFactoryInterface) +8 QFactoryInterface::~QFactoryInterface +12 QFactoryInterface::~QFactoryInterface +16 __cxa_pure_virtual + +Class QFactoryInterface + size=4 align=4 + base size=4 base align=4 +QFactoryInterface (0xb63d9078) 0 nearly-empty + vptr=((& QFactoryInterface::_ZTV17QFactoryInterface) + 8u) + +Vtable for QTextCodecFactoryInterface +QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QTextCodecFactoryInterface) +8 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +12 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +16 __cxa_pure_virtual +20 __cxa_pure_virtual + +Class QTextCodecFactoryInterface + size=4 align=4 + base size=4 base align=4 +QTextCodecFactoryInterface (0xb65abf40) 0 nearly-empty + vptr=((& QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface) + 8u) + QFactoryInterface (0xb63d9654) 0 nearly-empty + primary-for QTextCodecFactoryInterface (0xb65abf40) + +Vtable for QTextCodecPlugin +QTextCodecPlugin::_ZTV16QTextCodecPlugin: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QTextCodecPlugin) +8 QTextCodecPlugin::metaObject +12 QTextCodecPlugin::qt_metacast +16 QTextCodecPlugin::qt_metacall +20 QTextCodecPlugin::~QTextCodecPlugin +24 QTextCodecPlugin::~QTextCodecPlugin +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 QTextCodecPlugin::keys +80 QTextCodecPlugin::create +84 (int (*)(...))-0x000000008 +88 (int (*)(...))(& _ZTI16QTextCodecPlugin) +92 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD1Ev +96 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD0Ev +100 QTextCodecPlugin::_ZThn8_NK16QTextCodecPlugin4keysEv +104 QTextCodecPlugin::_ZThn8_N16QTextCodecPlugin6createERK7QString + +Class QTextCodecPlugin + size=12 align=4 + base size=12 base align=4 +QTextCodecPlugin (0xb63df960) 0 + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 8u) + QObject (0xb63d999c) 0 + primary-for QTextCodecPlugin (0xb63df960) + QTextCodecFactoryInterface (0xb63e40c0) 8 nearly-empty + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 92u) + QFactoryInterface (0xb63d99d8) 8 nearly-empty + primary-for QTextCodecFactoryInterface (0xb63e40c0) + +Class QMutex + size=4 align=4 + base size=4 base align=4 +QMutex (0xb63f021c) 0 + +Class QMutexLocker + size=4 align=4 + base size=4 base align=4 +QMutexLocker (0xb63f0b04) 0 + +Vtable for QtConcurrent::Exception +QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent9ExceptionE) +8 QtConcurrent::Exception::~Exception +12 QtConcurrent::Exception::~Exception +16 std::exception::what +20 QtConcurrent::Exception::raise +24 QtConcurrent::Exception::clone + +Class QtConcurrent::Exception + size=4 align=4 + base size=4 base align=4 +QtConcurrent::Exception (0xb63e4980) 0 nearly-empty + vptr=((& QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE) + 8u) + std::exception (0xb6401000) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb63e4980) + +Vtable for QtConcurrent::UnhandledException +QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent18UnhandledExceptionE) +8 QtConcurrent::UnhandledException::~UnhandledException +12 QtConcurrent::UnhandledException::~UnhandledException +16 std::exception::what +20 QtConcurrent::UnhandledException::raise +24 QtConcurrent::UnhandledException::clone + +Class QtConcurrent::UnhandledException + size=4 align=4 + base size=4 base align=4 +QtConcurrent::UnhandledException (0xb63e4a40) 0 nearly-empty + vptr=((& QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE) + 8u) + QtConcurrent::Exception (0xb63e4a80) 0 nearly-empty + primary-for QtConcurrent::UnhandledException (0xb63e4a40) + std::exception (0xb64011a4) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb63e4a80) + +Class QtConcurrent::internal::ExceptionHolder + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionHolder (0xb6401348) 0 + +Class QtConcurrent::internal::ExceptionStore + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionStore (0xb6401528) 0 + +Class QMapData::Node + size=8 align=4 + base size=8 base align=4 +QMapData::Node (0xb64015a0) 0 + +Class QMapData + size=72 align=4 + base size=72 base align=4 +QMapData (0xb6401564) 0 + +Class QHashData::Node + size=8 align=4 + base size=8 base align=4 +QHashData::Node (0xb64a7e4c) 0 + +Class QHashData + size=32 align=4 + base size=32 base align=4 +QHashData (0xb64a7e10) 0 + +Class QHashDummyValue + size=1 align=1 + base size=0 base align=1 +QHashDummyValue (0xb62c6744) 0 empty + +Class _IO_marker + size=12 align=4 + base size=12 base align=4 +_IO_marker (0xb635699c) 0 + +Class _IO_FILE + size=148 align=4 + base size=148 base align=4 +_IO_FILE (0xb63569d8) 0 + +Vtable for QTextStream +QTextStream::_ZTV11QTextStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTextStream) +8 QTextStream::~QTextStream +12 QTextStream::~QTextStream + +Class QTextStream + size=8 align=4 + base size=8 base align=4 +QTextStream (0xb6356a8c) 0 + vptr=((& QTextStream::_ZTV11QTextStream) + 8u) + +Class QTextStreamManipulator + size=24 align=4 + base size=22 base align=4 +QTextStreamManipulator (0xb63a6e88) 0 + +Vtable for QTextIStream +QTextIStream::_ZTV12QTextIStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextIStream) +8 QTextIStream::~QTextIStream +12 QTextIStream::~QTextIStream + +Class QTextIStream + size=8 align=4 + base size=8 base align=4 +QTextIStream (0xb6364e00) 0 + vptr=((& QTextIStream::_ZTV12QTextIStream) + 8u) + QTextStream (0xb63b8f00) 0 + primary-for QTextIStream (0xb6364e00) + +Vtable for QTextOStream +QTextOStream::_ZTV12QTextOStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextOStream) +8 QTextOStream::~QTextOStream +12 QTextOStream::~QTextOStream + +Class QTextOStream + size=8 align=4 + base size=8 base align=4 +QTextOStream (0xb61cc0c0) 0 + vptr=((& QTextOStream::_ZTV12QTextOStream) + 8u) + QTextStream (0xb61c599c) 0 + primary-for QTextOStream (0xb61cc0c0) + +Class wait + size=4 align=4 + base size=4 base align=4 +wait (0xb61d5384) 0 + +Class timespec + size=8 align=4 + base size=8 base align=4 +timespec (0xb61d5690) 0 + +Class timeval + size=8 align=4 + base size=8 base align=4 +timeval (0xb61d56cc) 0 + +Class __pthread_internal_slist + size=4 align=4 + base size=4 base align=4 +__pthread_internal_slist (0xb61d57f8) 0 + +Class random_data + size=28 align=4 + base size=28 base align=4 +random_data (0xb61d5dd4) 0 + +Class drand48_data + size=24 align=4 + base size=24 base align=4 +drand48_data (0xb61d5e10) 0 + +Class QVectorData + size=16 align=4 + base size=16 base align=4 +QVectorData (0xb61d5e4c) 0 + +Class QDebug::Stream + size=24 align=4 + base size=22 base align=4 +QDebug::Stream (0xb6291d98) 0 + +Class QDebug + size=4 align=4 + base size=4 base align=4 +QDebug (0xb6291d5c) 0 + +Class QtConcurrent::ResultItem + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultItem (0xb60f7b40) 0 + +Class QtConcurrent::ResultIteratorBase + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultIteratorBase (0xb610f618) 0 + +Vtable for QtConcurrent::ResultStoreBase +QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent15ResultStoreBaseE) +8 QtConcurrent::ResultStoreBase::~ResultStoreBase +12 QtConcurrent::ResultStoreBase::~ResultStoreBase + +Class QtConcurrent::ResultStoreBase + size=28 align=4 + base size=28 base align=4 +QtConcurrent::ResultStoreBase (0xb610fbf4) 0 + vptr=((& QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE) + 8u) + +Vtable for QFutureInterfaceBase +QFutureInterfaceBase::_ZTV20QFutureInterfaceBase: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QFutureInterfaceBase) +8 QFutureInterfaceBase::~QFutureInterfaceBase +12 QFutureInterfaceBase::~QFutureInterfaceBase + +Class QFutureInterfaceBase + size=8 align=4 + base size=8 base align=4 +QFutureInterfaceBase (0xb613830c) 0 + vptr=((& QFutureInterfaceBase::_ZTV20QFutureInterfaceBase) + 8u) + +Vtable for QFutureWatcherBase +QFutureWatcherBase::_ZTV18QFutureWatcherBase: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFutureWatcherBase) +8 QFutureWatcherBase::metaObject +12 QFutureWatcherBase::qt_metacast +16 QFutureWatcherBase::qt_metacall +20 QFutureWatcherBase::~QFutureWatcherBase +24 QFutureWatcherBase::~QFutureWatcherBase +28 QFutureWatcherBase::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QFutureWatcherBase::connectNotify +52 QFutureWatcherBase::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QFutureWatcherBase + size=8 align=4 + base size=8 base align=4 +QFutureWatcherBase (0xb61ad6c0) 0 + vptr=((& QFutureWatcherBase::_ZTV18QFutureWatcherBase) + 8u) + QObject (0xb61abc6c) 0 + primary-for QFutureWatcherBase (0xb61ad6c0) + +Vtable for QRunnable +QRunnable::_ZTV9QRunnable: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QRunnable) +8 __cxa_pure_virtual +12 QRunnable::~QRunnable +16 QRunnable::~QRunnable + +Class QRunnable + size=8 align=4 + base size=8 base align=4 +QRunnable (0xb5fd7690) 0 + vptr=((& QRunnable::_ZTV9QRunnable) + 8u) + +Vtable for QThread +QThread::_ZTV7QThread: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QThread) +8 QThread::metaObject +12 QThread::qt_metacast +16 QThread::qt_metacall +20 QThread::~QThread +24 QThread::~QThread +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QThread::run + +Class QThread + size=8 align=4 + base size=8 base align=4 +QThread (0xb5fce8c0) 0 + vptr=((& QThread::_ZTV7QThread) + 8u) + QObject (0xb5fd7fb4) 0 + primary-for QThread (0xb5fce8c0) + +Vtable for QThreadPool +QThreadPool::_ZTV11QThreadPool: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QThreadPool) +8 QThreadPool::metaObject +12 QThreadPool::qt_metacast +16 QThreadPool::qt_metacall +20 QThreadPool::~QThreadPool +24 QThreadPool::~QThreadPool +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QThreadPool + size=8 align=4 + base size=8 base align=4 +QThreadPool (0xb5fcec00) 0 + vptr=((& QThreadPool::_ZTV11QThreadPool) + 8u) + QObject (0xb5fe6dd4) 0 + primary-for QThreadPool (0xb5fcec00) + +Class QWaitCondition + size=4 align=4 + base size=4 base align=4 +QWaitCondition (0xb5ffb7bc) 0 + +Class QtConcurrent::ThreadEngineSemaphore + size=12 align=4 + base size=12 base align=4 +QtConcurrent::ThreadEngineSemaphore (0xb5ffba8c) 0 + +Vtable for QtConcurrent::ThreadEngineBase +QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE: 11u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent16ThreadEngineBaseE) +8 QtConcurrent::ThreadEngineBase::run +12 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +16 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +20 QtConcurrent::ThreadEngineBase::start +24 QtConcurrent::ThreadEngineBase::finish +28 QtConcurrent::ThreadEngineBase::threadFunction +32 QtConcurrent::ThreadEngineBase::shouldStartThread +36 QtConcurrent::ThreadEngineBase::shouldThrottleThread +40 __cxa_pure_virtual + +Class QtConcurrent::ThreadEngineBase + size=32 align=4 + base size=32 base align=4 +QtConcurrent::ThreadEngineBase (0xb60082c0) 0 + vptr=((& QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE) + 8u) + QRunnable (0xb6009780) 0 + primary-for QtConcurrent::ThreadEngineBase (0xb60082c0) + +VTT for QtConcurrent::ThreadEngine +QtConcurrent::ThreadEngine::_ZTTN12QtConcurrent12ThreadEngineIvEE: 2u entries +0 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 12u) +4 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 68u) + +Class std::input_iterator_tag + size=1 align=1 + base size=0 base align=1 +std::input_iterator_tag (0xb601fa8c) 0 empty + +Class std::output_iterator_tag + size=1 align=1 + base size=0 base align=1 +std::output_iterator_tag (0xb601fac8) 0 empty + +Class std::forward_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::forward_iterator_tag (0xb6029140) 0 empty + std::input_iterator_tag (0xb601fb04) 0 empty + +Class std::bidirectional_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::bidirectional_iterator_tag (0xb60291c0) 0 empty + std::forward_iterator_tag (0xb6029200) 0 empty + std::input_iterator_tag (0xb601fb40) 0 empty + +Class std::random_access_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::random_access_iterator_tag (0xb6029280) 0 empty + std::bidirectional_iterator_tag (0xb60292c0) 0 empty + std::forward_iterator_tag (0xb6029300) 0 empty + std::input_iterator_tag (0xb601fb7c) 0 empty + +Class std::__true_type + size=1 align=1 + base size=0 base align=1 +std::__true_type (0xb601fe88) 0 empty + +Class std::__false_type + size=1 align=1 + base size=0 base align=1 +std::__false_type (0xb601fec4) 0 empty + +Class lconv + size=56 align=4 + base size=56 base align=4 +lconv (0xb5f2eb7c) 0 + +Class sched_param + size=4 align=4 + base size=4 base align=4 +sched_param (0xb5f2edd4) 0 + +Class __sched_param + size=4 align=4 + base size=4 base align=4 +__sched_param (0xb5f2ee10) 0 + +Class tm + size=44 align=4 + base size=44 base align=4 +tm (0xb5f2eec4) 0 + +Class itimerspec + size=16 align=4 + base size=16 base align=4 +itimerspec (0xb5f2ef3c) 0 + +Class _pthread_cleanup_buffer + size=16 align=4 + base size=16 base align=4 +_pthread_cleanup_buffer (0xb5f59168) 0 + +Class __pthread_cleanup_frame + size=16 align=4 + base size=16 base align=4 +__pthread_cleanup_frame (0xb5f5930c) 0 + +Class __pthread_cleanup_class + size=16 align=4 + base size=16 base align=4 +__pthread_cleanup_class (0xb5f59348) 0 + +Vtable for __cxxabiv1::__forced_unwind +__cxxabiv1::__forced_unwind::_ZTVN10__cxxabiv115__forced_unwindE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN10__cxxabiv115__forced_unwindE) +8 __cxxabiv1::__forced_unwind::~__forced_unwind +12 __cxxabiv1::__forced_unwind::~__forced_unwind +16 __cxa_pure_virtual + +Class __cxxabiv1::__forced_unwind + size=4 align=4 + base size=4 base align=4 +__cxxabiv1::__forced_unwind (0xb5fb3e10) 0 nearly-empty + vptr=((& __cxxabiv1::__forced_unwind::_ZTVN10__cxxabiv115__forced_unwindE) + 8u) + +Class std::locale + size=4 align=4 + base size=4 base align=4 +std::locale (0xb5ce5744) 0 + +Vtable for std::locale::facet +std::locale::facet::_ZTVNSt6locale5facetE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTINSt6locale5facetE) +8 std::locale::facet::~facet +12 std::locale::facet::~facet + +Class std::locale::facet + size=8 align=4 + base size=8 base align=4 +std::locale::facet (0xb5d97bb8) 0 + vptr=((& std::locale::facet::_ZTVNSt6locale5facetE) + 8u) + +Class std::locale::id + size=4 align=4 + base size=4 base align=4 +std::locale::id (0xb5da2564) 0 + +Class std::locale::_Impl + size=20 align=4 + base size=20 base align=4 +std::locale::_Impl (0xb5da28ac) 0 + +Vtable for std::ios_base::failure +std::ios_base::failure::_ZTVNSt8ios_base7failureE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTINSt8ios_base7failureE) +8 std::ios_base::failure::~failure +12 std::ios_base::failure::~failure +16 std::ios_base::failure::what + +Class std::ios_base::failure + size=8 align=4 + base size=8 base align=4 +std::ios_base::failure (0xb5bd2f40) 0 + vptr=((& std::ios_base::failure::_ZTVNSt8ios_base7failureE) + 8u) + std::exception (0xb5be7780) 0 nearly-empty + primary-for std::ios_base::failure (0xb5bd2f40) + +Class std::ios_base::_Callback_list + size=16 align=4 + base size=16 base align=4 +std::ios_base::_Callback_list (0xb5bf5a14) 0 + +Class std::ios_base::_Words + size=8 align=4 + base size=8 base align=4 +std::ios_base::_Words (0xb5bf5fb4) 0 + +Class std::ios_base::Init + size=1 align=1 + base size=0 base align=1 +std::ios_base::Init (0xb5bf83c0) 0 empty + +Vtable for std::ios_base +std::ios_base::_ZTVSt8ios_base: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt8ios_base) +8 std::ios_base::~ios_base +12 std::ios_base::~ios_base + +Class std::ios_base + size=112 align=4 + base size=112 base align=4 +std::ios_base (0xb5be7744) 0 + vptr=((& std::ios_base::_ZTVSt8ios_base) + 8u) + +Class std::ctype_base + size=1 align=1 + base size=0 base align=1 +std::ctype_base (0xb5c19f3c) 0 empty + +Class std::__num_base + size=1 align=1 + base size=0 base align=1 +std::__num_base (0xb5acee88) 0 empty + +VTT for std::basic_ostream > +std::basic_ostream >::_ZTTSo: 2u entries +0 ((& std::basic_ostream >::_ZTVSo) + 12u) +4 ((& std::basic_ostream >::_ZTVSo) + 32u) + +VTT for std::basic_ostream > +std::basic_ostream >::_ZTTSt13basic_ostreamIwSt11char_traitsIwEE: 2u entries +0 ((& std::basic_ostream >::_ZTVSt13basic_ostreamIwSt11char_traitsIwEE) + 12u) +4 ((& std::basic_ostream >::_ZTVSt13basic_ostreamIwSt11char_traitsIwEE) + 32u) + +VTT for std::basic_istream > +std::basic_istream >::_ZTTSi: 2u entries +0 ((& std::basic_istream >::_ZTVSi) + 12u) +4 ((& std::basic_istream >::_ZTVSi) + 32u) + +VTT for std::basic_istream > +std::basic_istream >::_ZTTSt13basic_istreamIwSt11char_traitsIwEE: 2u entries +0 ((& std::basic_istream >::_ZTVSt13basic_istreamIwSt11char_traitsIwEE) + 12u) +4 ((& std::basic_istream >::_ZTVSt13basic_istreamIwSt11char_traitsIwEE) + 32u) + +Construction vtable for std::basic_istream > (0xb5aaa380 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSd0_Si: 10u entries +0 12u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISi) +12 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = char, _Traits = std::char_traits] +16 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = char, _Traits = std::char_traits] +20 -12u +24 (int (*)(...))-0x00000000c +28 (int (*)(...))(& _ZTISi) +32 std::basic_istream >::_ZTv0_n12_NSiD1Ev +36 std::basic_istream >::_ZTv0_n12_NSiD0Ev + +Construction vtable for std::basic_ostream > (0xb5aaa400 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSd8_So: 10u entries +0 4u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISo) +12 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = char, _Traits = std::char_traits] +16 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = char, _Traits = std::char_traits] +20 -4u +24 (int (*)(...))-0x000000004 +28 (int (*)(...))(& _ZTISo) +32 std::basic_ostream >::_ZTv0_n12_NSoD1Ev +36 std::basic_ostream >::_ZTv0_n12_NSoD0Ev + +VTT for std::basic_iostream > +std::basic_iostream >::_ZTTSd: 7u entries +0 ((& std::basic_iostream >::_ZTVSd) + 12u) +4 ((& std::basic_iostream >::_ZTCSd0_Si) + 12u) +8 ((& std::basic_iostream >::_ZTCSd0_Si) + 32u) +12 ((& std::basic_iostream >::_ZTCSd8_So) + 12u) +16 ((& std::basic_iostream >::_ZTCSd8_So) + 32u) +20 ((& std::basic_iostream >::_ZTVSd) + 52u) +24 ((& std::basic_iostream >::_ZTVSd) + 32u) + +Construction vtable for std::basic_istream > (0xb5aaa700 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E: 10u entries +0 12u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt13basic_istreamIwSt11char_traitsIwEE) +12 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = wchar_t, _Traits = std::char_traits] +16 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = wchar_t, _Traits = std::char_traits] +20 -12u +24 (int (*)(...))-0x00000000c +28 (int (*)(...))(& _ZTISt13basic_istreamIwSt11char_traitsIwEE) +32 std::basic_istream >::_ZTv0_n12_NSt13basic_istreamIwSt11char_traitsIwEED1Ev +36 std::basic_istream >::_ZTv0_n12_NSt13basic_istreamIwSt11char_traitsIwEED0Ev + +Construction vtable for std::basic_ostream > (0xb5aaa780 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE8_St13basic_ostreamIwS1_E: 10u entries +0 4u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt13basic_ostreamIwSt11char_traitsIwEE) +12 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = wchar_t, _Traits = std::char_traits] +16 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = wchar_t, _Traits = std::char_traits] +20 -4u +24 (int (*)(...))-0x000000004 +28 (int (*)(...))(& _ZTISt13basic_ostreamIwSt11char_traitsIwEE) +32 std::basic_ostream >::_ZTv0_n12_NSt13basic_ostreamIwSt11char_traitsIwEED1Ev +36 std::basic_ostream >::_ZTv0_n12_NSt13basic_ostreamIwSt11char_traitsIwEED0Ev + +VTT for std::basic_iostream > +std::basic_iostream >::_ZTTSt14basic_iostreamIwSt11char_traitsIwEE: 7u entries +0 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 12u) +4 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E) + 12u) +8 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E) + 32u) +12 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE8_St13basic_ostreamIwS1_E) + 12u) +16 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE8_St13basic_ostreamIwS1_E) + 32u) +20 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 52u) +24 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 32u) + +Class QtConcurrent::BlockSizeManager + size=72 align=4 + base size=72 base align=4 +QtConcurrent::BlockSizeManager (0xb5a78f3c) 0 + +Class QLibraryInfo + size=1 align=1 + base size=0 base align=1 +QLibraryInfo (0xb5756708) 0 empty + +Vtable for QFile +QFile::_ZTV5QFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI5QFile) +8 QFile::metaObject +12 QFile::qt_metacast +16 QFile::qt_metacall +20 QFile::~QFile +24 QFile::~QFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QFile::fileEngine + +Class QFile + size=8 align=4 + base size=8 base align=4 +QFile (0xb5747e00) 0 + vptr=((& QFile::_ZTV5QFile) + 8u) + QIODevice (0xb5747e40) 0 + primary-for QFile (0xb5747e00) + QObject (0xb57567f8) 0 + primary-for QIODevice (0xb5747e40) + +Class QFileInfo + size=4 align=4 + base size=4 base align=4 +QFileInfo (0xb5784d20) 0 + +Class QDir + size=4 align=4 + base size=4 base align=4 +QDir (0xb55b6528) 0 + +Class QAbstractFileEngine::ExtensionOption + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionOption (0xb5619708) 0 empty + +Class QAbstractFileEngine::ExtensionReturn + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionReturn (0xb5619744) 0 empty + +Class QAbstractFileEngine::MapExtensionOption + size=20 align=4 + base size=20 base align=4 +QAbstractFileEngine::MapExtensionOption (0xb5602240) 0 + QAbstractFileEngine::ExtensionOption (0xb5619780) 0 empty + +Class QAbstractFileEngine::MapExtensionReturn + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::MapExtensionReturn (0xb56022c0) 0 + QAbstractFileEngine::ExtensionReturn (0xb5619870) 0 empty + +Class QAbstractFileEngine::UnMapExtensionOption + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::UnMapExtensionOption (0xb5602340) 0 + QAbstractFileEngine::ExtensionOption (0xb56198ac) 0 empty + +Vtable for QAbstractFileEngine +QAbstractFileEngine::_ZTV19QAbstractFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractFileEngine) +8 QAbstractFileEngine::~QAbstractFileEngine +12 QAbstractFileEngine::~QAbstractFileEngine +16 QAbstractFileEngine::open +20 QAbstractFileEngine::close +24 QAbstractFileEngine::flush +28 QAbstractFileEngine::size +32 QAbstractFileEngine::pos +36 QAbstractFileEngine::seek +40 QAbstractFileEngine::isSequential +44 QAbstractFileEngine::remove +48 QAbstractFileEngine::copy +52 QAbstractFileEngine::rename +56 QAbstractFileEngine::link +60 QAbstractFileEngine::mkdir +64 QAbstractFileEngine::rmdir +68 QAbstractFileEngine::setSize +72 QAbstractFileEngine::caseSensitive +76 QAbstractFileEngine::isRelativePath +80 QAbstractFileEngine::entryList +84 QAbstractFileEngine::fileFlags +88 QAbstractFileEngine::setPermissions +92 QAbstractFileEngine::fileName +96 QAbstractFileEngine::ownerId +100 QAbstractFileEngine::owner +104 QAbstractFileEngine::fileTime +108 QAbstractFileEngine::setFileName +112 QAbstractFileEngine::handle +116 QAbstractFileEngine::beginEntryList +120 QAbstractFileEngine::endEntryList +124 QAbstractFileEngine::read +128 QAbstractFileEngine::readLine +132 QAbstractFileEngine::write +136 QAbstractFileEngine::extension +140 QAbstractFileEngine::supportsExtension + +Class QAbstractFileEngine + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngine (0xb5609e4c) 0 + vptr=((& QAbstractFileEngine::_ZTV19QAbstractFileEngine) + 8u) + +Vtable for QAbstractFileEngineHandler +QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QAbstractFileEngineHandler) +8 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +12 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +16 __cxa_pure_virtual + +Class QAbstractFileEngineHandler + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngineHandler (0xb562ad98) 0 nearly-empty + vptr=((& QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler) + 8u) + +Vtable for QAbstractFileEngineIterator +QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QAbstractFileEngineIterator) +8 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +12 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QAbstractFileEngineIterator::currentFileInfo +32 QAbstractFileEngineIterator::entryInfo + +Class QAbstractFileEngineIterator + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngineIterator (0xb562af3c) 0 + vptr=((& QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator) + 8u) + +Vtable for QBuffer +QBuffer::_ZTV7QBuffer: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QBuffer) +8 QBuffer::metaObject +12 QBuffer::qt_metacast +16 QBuffer::qt_metacall +20 QBuffer::~QBuffer +24 QBuffer::~QBuffer +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QIODevice::isSequential +60 QBuffer::open +64 QBuffer::close +68 QBuffer::pos +72 QBuffer::size +76 QBuffer::seek +80 QBuffer::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QBuffer::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QBuffer::readData +112 QIODevice::readLineData +116 QBuffer::writeData + +Class QBuffer + size=8 align=4 + base size=8 base align=4 +QBuffer (0xb5602580) 0 + vptr=((& QBuffer::_ZTV7QBuffer) + 8u) + QIODevice (0xb56025c0) 0 + primary-for QBuffer (0xb5602580) + QObject (0xb5636438) 0 + primary-for QIODevice (0xb56025c0) + +Vtable for QDirIterator +QDirIterator::_ZTV12QDirIterator: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QDirIterator) +8 QDirIterator::~QDirIterator +12 QDirIterator::~QDirIterator + +Class QDirIterator + size=8 align=4 + base size=8 base align=4 +QDirIterator (0xb56480f0) 0 + vptr=((& QDirIterator::_ZTV12QDirIterator) + 8u) + +Vtable for QFileSystemWatcher +QFileSystemWatcher::_ZTV18QFileSystemWatcher: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFileSystemWatcher) +8 QFileSystemWatcher::metaObject +12 QFileSystemWatcher::qt_metacast +16 QFileSystemWatcher::qt_metacall +20 QFileSystemWatcher::~QFileSystemWatcher +24 QFileSystemWatcher::~QFileSystemWatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QFileSystemWatcher + size=8 align=4 + base size=8 base align=4 +QFileSystemWatcher (0xb5602a00) 0 + vptr=((& QFileSystemWatcher::_ZTV18QFileSystemWatcher) + 8u) + QObject (0xb56556cc) 0 + primary-for QFileSystemWatcher (0xb5602a00) + +Vtable for QFSFileEngine +QFSFileEngine::_ZTV13QFSFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QFSFileEngine) +8 QFSFileEngine::~QFSFileEngine +12 QFSFileEngine::~QFSFileEngine +16 QFSFileEngine::open +20 QFSFileEngine::close +24 QFSFileEngine::flush +28 QFSFileEngine::size +32 QFSFileEngine::pos +36 QFSFileEngine::seek +40 QFSFileEngine::isSequential +44 QFSFileEngine::remove +48 QFSFileEngine::copy +52 QFSFileEngine::rename +56 QFSFileEngine::link +60 QFSFileEngine::mkdir +64 QFSFileEngine::rmdir +68 QFSFileEngine::setSize +72 QFSFileEngine::caseSensitive +76 QFSFileEngine::isRelativePath +80 QFSFileEngine::entryList +84 QFSFileEngine::fileFlags +88 QFSFileEngine::setPermissions +92 QFSFileEngine::fileName +96 QFSFileEngine::ownerId +100 QFSFileEngine::owner +104 QFSFileEngine::fileTime +108 QFSFileEngine::setFileName +112 QFSFileEngine::handle +116 QFSFileEngine::beginEntryList +120 QFSFileEngine::endEntryList +124 QFSFileEngine::read +128 QFSFileEngine::readLine +132 QFSFileEngine::write +136 QFSFileEngine::extension +140 QFSFileEngine::supportsExtension + +Class QFSFileEngine + size=8 align=4 + base size=8 base align=4 +QFSFileEngine (0xb5602cc0) 0 + vptr=((& QFSFileEngine::_ZTV13QFSFileEngine) + 8u) + QAbstractFileEngine (0xb566b078) 0 + primary-for QFSFileEngine (0xb5602cc0) + +Vtable for QProcess +QProcess::_ZTV8QProcess: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QProcess) +8 QProcess::metaObject +12 QProcess::qt_metacast +16 QProcess::qt_metacall +20 QProcess::~QProcess +24 QProcess::~QProcess +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QProcess::isSequential +60 QIODevice::open +64 QProcess::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QProcess::atEnd +84 QIODevice::reset +88 QProcess::bytesAvailable +92 QProcess::bytesToWrite +96 QProcess::canReadLine +100 QProcess::waitForReadyRead +104 QProcess::waitForBytesWritten +108 QProcess::readData +112 QIODevice::readLineData +116 QProcess::writeData +120 QProcess::setupChildProcess + +Class QProcess + size=8 align=4 + base size=8 base align=4 +QProcess (0xb5602dc0) 0 + vptr=((& QProcess::_ZTV8QProcess) + 8u) + QIODevice (0xb5602e00) 0 + primary-for QProcess (0xb5602dc0) + QObject (0xb566ba50) 0 + primary-for QIODevice (0xb5602e00) + +Vtable for QSystemLocale +QSystemLocale::_ZTV13QSystemLocale: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSystemLocale) +8 QSystemLocale::~QSystemLocale +12 QSystemLocale::~QSystemLocale +16 QSystemLocale::query +20 QSystemLocale::fallbackLocale + +Class QSystemLocale + size=4 align=4 + base size=4 base align=4 +QSystemLocale (0xb568d474) 0 nearly-empty + vptr=((& QSystemLocale::_ZTV13QSystemLocale) + 8u) + +Class QLocale::Data + size=4 align=2 + base size=4 base align=2 +QLocale::Data (0xb56ae8ac) 0 + +Class QLocale + size=4 align=4 + base size=4 base align=4 +QLocale (0xb568d690) 0 + +Class QResource + size=4 align=4 + base size=4 base align=4 +QResource (0xb54c2690) 0 + +Class QMetaType + size=1 align=1 + base size=0 base align=1 +QMetaType (0xb54c2b7c) 0 empty + +Class QVariant::PrivateShared + size=8 align=4 + base size=8 base align=4 +QVariant::PrivateShared (0xb552d21c) 0 + +Class QVariant::Private::Data + size=8 align=4 + base size=8 base align=4 +QVariant::Private::Data (0xb552d3fc) 0 + +Class QVariant::Private + size=12 align=4 + base size=12 base align=4 +QVariant::Private (0xb552d2d0) 0 + +Class QVariant::Handler + size=36 align=4 + base size=36 base align=4 +QVariant::Handler (0xb552dac8) 0 + +Class QVariant + size=12 align=4 + base size=12 base align=4 +QVariant (0xb5516564) 0 + +Class QVariantComparisonHelper + size=4 align=4 + base size=4 base align=4 +QVariantComparisonHelper (0xb5585474) 0 + +Vtable for QSettings +QSettings::_ZTV9QSettings: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QSettings) +8 QSettings::metaObject +12 QSettings::qt_metacast +16 QSettings::qt_metacall +20 QSettings::~QSettings +24 QSettings::~QSettings +28 QSettings::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSettings + size=8 align=4 + base size=8 base align=4 +QSettings (0xb55942c0) 0 + vptr=((& QSettings::_ZTV9QSettings) + 8u) + QObject (0xb559a03c) 0 + primary-for QSettings (0xb55942c0) + +Vtable for QTemporaryFile +QTemporaryFile::_ZTV14QTemporaryFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QTemporaryFile) +8 QTemporaryFile::metaObject +12 QTemporaryFile::qt_metacast +16 QTemporaryFile::qt_metacall +20 QTemporaryFile::~QTemporaryFile +24 QTemporaryFile::~QTemporaryFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QTemporaryFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QTemporaryFile::fileEngine + +Class QTemporaryFile + size=8 align=4 + base size=8 base align=4 +QTemporaryFile (0xb5594ec0) 0 + vptr=((& QTemporaryFile::_ZTV14QTemporaryFile) + 8u) + QFile (0xb5594f00) 0 + primary-for QTemporaryFile (0xb5594ec0) + QIODevice (0xb5594f40) 0 + primary-for QFile (0xb5594f00) + QObject (0xb53c7d98) 0 + primary-for QIODevice (0xb5594f40) + +Class QUrl + size=4 align=4 + base size=4 base align=4 +QUrl (0xb53d6f00) 0 + +Vtable for QEventLoop +QEventLoop::_ZTV10QEventLoop: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QEventLoop) +8 QEventLoop::metaObject +12 QEventLoop::qt_metacast +16 QEventLoop::qt_metacall +20 QEventLoop::~QEventLoop +24 QEventLoop::~QEventLoop +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QEventLoop + size=8 align=4 + base size=8 base align=4 +QEventLoop (0xb53dbac0) 0 + vptr=((& QEventLoop::_ZTV10QEventLoop) + 8u) + QObject (0xb5419708) 0 + primary-for QEventLoop (0xb53dbac0) + +Vtable for QAbstractEventDispatcher +QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QAbstractEventDispatcher) +8 QAbstractEventDispatcher::metaObject +12 QAbstractEventDispatcher::qt_metacast +16 QAbstractEventDispatcher::qt_metacall +20 QAbstractEventDispatcher::~QAbstractEventDispatcher +24 QAbstractEventDispatcher::~QAbstractEventDispatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 __cxa_pure_virtual +88 __cxa_pure_virtual +92 __cxa_pure_virtual +96 __cxa_pure_virtual +100 QAbstractEventDispatcher::startingUp +104 QAbstractEventDispatcher::closingDown + +Class QAbstractEventDispatcher + size=8 align=4 + base size=8 base align=4 +QAbstractEventDispatcher (0xb53dbe40) 0 + vptr=((& QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher) + 8u) + QObject (0xb54390f0) 0 + primary-for QAbstractEventDispatcher (0xb53dbe40) + +Class QModelIndex + size=16 align=4 + base size=16 base align=4 +QModelIndex (0xb5439fb4) 0 + +Class QPersistentModelIndex + size=4 align=4 + base size=4 base align=4 +QPersistentModelIndex (0xb5460474) 0 + +Vtable for QAbstractItemModel +QAbstractItemModel::_ZTV18QAbstractItemModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractItemModel) +8 QAbstractItemModel::metaObject +12 QAbstractItemModel::qt_metacast +16 QAbstractItemModel::qt_metacall +20 QAbstractItemModel::~QAbstractItemModel +24 QAbstractItemModel::~QAbstractItemModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractItemModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractItemModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractItemModel + size=8 align=4 + base size=8 base align=4 +QAbstractItemModel (0xb5449a00) 0 + vptr=((& QAbstractItemModel::_ZTV18QAbstractItemModel) + 8u) + QObject (0xb5460ca8) 0 + primary-for QAbstractItemModel (0xb5449a00) + +Vtable for QAbstractTableModel +QAbstractTableModel::_ZTV19QAbstractTableModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractTableModel) +8 QAbstractTableModel::metaObject +12 QAbstractTableModel::qt_metacast +16 QAbstractTableModel::qt_metacall +20 QAbstractTableModel::~QAbstractTableModel +24 QAbstractTableModel::~QAbstractTableModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractTableModel::index +60 QAbstractTableModel::parent +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractTableModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractTableModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractTableModel + size=8 align=4 + base size=8 base align=4 +QAbstractTableModel (0xb5449ec0) 0 + vptr=((& QAbstractTableModel::_ZTV19QAbstractTableModel) + 8u) + QAbstractItemModel (0xb5449f00) 0 + primary-for QAbstractTableModel (0xb5449ec0) + QObject (0xb548b834) 0 + primary-for QAbstractItemModel (0xb5449f00) + +Vtable for QAbstractListModel +QAbstractListModel::_ZTV18QAbstractListModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractListModel) +8 QAbstractListModel::metaObject +12 QAbstractListModel::qt_metacast +16 QAbstractListModel::qt_metacall +20 QAbstractListModel::~QAbstractListModel +24 QAbstractListModel::~QAbstractListModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractListModel::index +60 QAbstractListModel::parent +64 __cxa_pure_virtual +68 QAbstractListModel::columnCount +72 QAbstractListModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractListModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractListModel + size=8 align=4 + base size=8 base align=4 +QAbstractListModel (0xb549a140) 0 + vptr=((& QAbstractListModel::_ZTV18QAbstractListModel) + 8u) + QAbstractItemModel (0xb549a180) 0 + primary-for QAbstractListModel (0xb549a140) + QObject (0xb549d294) 0 + primary-for QAbstractItemModel (0xb549a180) + +Class QBasicTimer + size=4 align=4 + base size=4 base align=4 +QBasicTimer (0xb54aed20) 0 + +Vtable for QEvent +QEvent::_ZTV6QEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QEvent) +8 QEvent::~QEvent +12 QEvent::~QEvent + +Class QEvent + size=12 align=4 + base size=12 base align=4 +QEvent (0xb52b75a0) 0 + vptr=((& QEvent::_ZTV6QEvent) + 8u) + +Vtable for QTimerEvent +QTimerEvent::_ZTV11QTimerEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTimerEvent) +8 QTimerEvent::~QTimerEvent +12 QTimerEvent::~QTimerEvent + +Class QTimerEvent + size=16 align=4 + base size=16 base align=4 +QTimerEvent (0xb549ab80) 0 + vptr=((& QTimerEvent::_ZTV11QTimerEvent) + 8u) + QEvent (0xb52c9294) 0 + primary-for QTimerEvent (0xb549ab80) + +Vtable for QChildEvent +QChildEvent::_ZTV11QChildEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QChildEvent) +8 QChildEvent::~QChildEvent +12 QChildEvent::~QChildEvent + +Class QChildEvent + size=16 align=4 + base size=16 base align=4 +QChildEvent (0xb549ac40) 0 + vptr=((& QChildEvent::_ZTV11QChildEvent) + 8u) + QEvent (0xb52c94ec) 0 + primary-for QChildEvent (0xb549ac40) + +Vtable for QCustomEvent +QCustomEvent::_ZTV12QCustomEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QCustomEvent) +8 QCustomEvent::~QCustomEvent +12 QCustomEvent::~QCustomEvent + +Class QCustomEvent + size=12 align=4 + base size=12 base align=4 +QCustomEvent (0xb549ae00) 0 + vptr=((& QCustomEvent::_ZTV12QCustomEvent) + 8u) + QEvent (0xb52c9d5c) 0 + primary-for QCustomEvent (0xb549ae00) + +Vtable for QDynamicPropertyChangeEvent +QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QDynamicPropertyChangeEvent) +8 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent +12 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent + +Class QDynamicPropertyChangeEvent + size=16 align=4 + base size=16 base align=4 +QDynamicPropertyChangeEvent (0xb549af00) 0 + vptr=((& QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent) + 8u) + QEvent (0xb52d90b4) 0 + primary-for QDynamicPropertyChangeEvent (0xb549af00) + +Vtable for QCoreApplication +QCoreApplication::_ZTV16QCoreApplication: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QCoreApplication) +8 QCoreApplication::metaObject +12 QCoreApplication::qt_metacast +16 QCoreApplication::qt_metacall +20 QCoreApplication::~QCoreApplication +24 QCoreApplication::~QCoreApplication +28 QCoreApplication::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QCoreApplication::notify +60 QCoreApplication::compressEvent + +Class QCoreApplication + size=8 align=4 + base size=8 base align=4 +QCoreApplication (0xb549afc0) 0 + vptr=((& QCoreApplication::_ZTV16QCoreApplication) + 8u) + QObject (0xb52d930c) 0 + primary-for QCoreApplication (0xb549afc0) + +Class __exception + size=32 align=4 + base size=32 base align=4 +__exception (0xb52eed5c) 0 + +Class QMetaMethod + size=8 align=4 + base size=8 base align=4 +QMetaMethod (0xb53200f0) 0 + +Class QMetaEnum + size=8 align=4 + base size=8 base align=4 +QMetaEnum (0xb5320690) 0 + +Class QMetaProperty + size=20 align=4 + base size=20 base align=4 +QMetaProperty (0xb5320bb8) 0 + +Class QMetaClassInfo + size=8 align=4 + base size=8 base align=4 +QMetaClassInfo (0xb5320ec4) 0 + +Vtable for QMimeData +QMimeData::_ZTV9QMimeData: 17u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QMimeData) +8 QMimeData::metaObject +12 QMimeData::qt_metacast +16 QMimeData::qt_metacall +20 QMimeData::~QMimeData +24 QMimeData::~QMimeData +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QMimeData::hasFormat +60 QMimeData::formats +64 QMimeData::retrieveData + +Class QMimeData + size=8 align=4 + base size=8 base align=4 +QMimeData (0xb5334240) 0 + vptr=((& QMimeData::_ZTV9QMimeData) + 8u) + QObject (0xb533630c) 0 + primary-for QMimeData (0xb5334240) + +Vtable for QObjectCleanupHandler +QObjectCleanupHandler::_ZTV21QObjectCleanupHandler: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QObjectCleanupHandler) +8 QObjectCleanupHandler::metaObject +12 QObjectCleanupHandler::qt_metacast +16 QObjectCleanupHandler::qt_metacall +20 QObjectCleanupHandler::~QObjectCleanupHandler +24 QObjectCleanupHandler::~QObjectCleanupHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObjectCleanupHandler + size=12 align=4 + base size=12 base align=4 +QObjectCleanupHandler (0xb5334500) 0 + vptr=((& QObjectCleanupHandler::_ZTV21QObjectCleanupHandler) + 8u) + QObject (0xb5336e88) 0 + primary-for QObjectCleanupHandler (0xb5334500) + +Vtable for QSharedMemory +QSharedMemory::_ZTV13QSharedMemory: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSharedMemory) +8 QSharedMemory::metaObject +12 QSharedMemory::qt_metacast +16 QSharedMemory::qt_metacall +20 QSharedMemory::~QSharedMemory +24 QSharedMemory::~QSharedMemory +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSharedMemory + size=8 align=4 + base size=8 base align=4 +QSharedMemory (0xb5334740) 0 + vptr=((& QSharedMemory::_ZTV13QSharedMemory) + 8u) + QObject (0xb5347708) 0 + primary-for QSharedMemory (0xb5334740) + +Vtable for QSignalMapper +QSignalMapper::_ZTV13QSignalMapper: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSignalMapper) +8 QSignalMapper::metaObject +12 QSignalMapper::qt_metacast +16 QSignalMapper::qt_metacall +20 QSignalMapper::~QSignalMapper +24 QSignalMapper::~QSignalMapper +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSignalMapper + size=8 align=4 + base size=8 base align=4 +QSignalMapper (0xb5334a00) 0 + vptr=((& QSignalMapper::_ZTV13QSignalMapper) + 8u) + QObject (0xb535a4ec) 0 + primary-for QSignalMapper (0xb5334a00) + +Vtable for QSocketNotifier +QSocketNotifier::_ZTV15QSocketNotifier: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QSocketNotifier) +8 QSocketNotifier::metaObject +12 QSocketNotifier::qt_metacast +16 QSocketNotifier::qt_metacall +20 QSocketNotifier::~QSocketNotifier +24 QSocketNotifier::~QSocketNotifier +28 QSocketNotifier::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSocketNotifier + size=20 align=4 + base size=17 base align=4 +QSocketNotifier (0xb5334cc0) 0 + vptr=((& QSocketNotifier::_ZTV15QSocketNotifier) + 8u) + QObject (0xb5364654) 0 + primary-for QSocketNotifier (0xb5334cc0) + +Class QSystemSemaphore + size=4 align=4 + base size=4 base align=4 +QSystemSemaphore (0xb53736cc) 0 + +Vtable for QTimer +QTimer::_ZTV6QTimer: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QTimer) +8 QTimer::metaObject +12 QTimer::qt_metacast +16 QTimer::qt_metacall +20 QTimer::~QTimer +24 QTimer::~QTimer +28 QObject::event +32 QObject::eventFilter +36 QTimer::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QTimer + size=24 align=4 + base size=21 base align=4 +QTimer (0xb5376040) 0 + vptr=((& QTimer::_ZTV6QTimer) + 8u) + QObject (0xb5373bf4) 0 + primary-for QTimer (0xb5376040) + +Vtable for QTranslator +QTranslator::_ZTV11QTranslator: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTranslator) +8 QTranslator::metaObject +12 QTranslator::qt_metacast +16 QTranslator::qt_metacall +20 QTranslator::~QTranslator +24 QTranslator::~QTranslator +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTranslator::translate +60 QTranslator::isEmpty + +Class QTranslator + size=8 align=4 + base size=8 base align=4 +QTranslator (0xb53764c0) 0 + vptr=((& QTranslator::_ZTV11QTranslator) + 8u) + QObject (0xb537fd5c) 0 + primary-for QTranslator (0xb53764c0) + +Vtable for QLibrary +QLibrary::_ZTV8QLibrary: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QLibrary) +8 QLibrary::metaObject +12 QLibrary::qt_metacast +16 QLibrary::qt_metacall +20 QLibrary::~QLibrary +24 QLibrary::~QLibrary +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QLibrary + size=16 align=4 + base size=13 base align=4 +QLibrary (0xb53767c0) 0 + vptr=((& QLibrary::_ZTV8QLibrary) + 8u) + QObject (0xb5392b7c) 0 + primary-for QLibrary (0xb53767c0) + +Vtable for QPluginLoader +QPluginLoader::_ZTV13QPluginLoader: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QPluginLoader) +8 QPluginLoader::metaObject +12 QPluginLoader::qt_metacast +16 QPluginLoader::qt_metacall +20 QPluginLoader::~QPluginLoader +24 QPluginLoader::~QPluginLoader +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QPluginLoader + size=16 align=4 + base size=13 base align=4 +QPluginLoader (0xb5376b40) 0 + vptr=((& QPluginLoader::_ZTV13QPluginLoader) + 8u) + QObject (0xb51b1654) 0 + primary-for QPluginLoader (0xb5376b40) + +Class QUuid + size=16 align=4 + base size=16 base align=4 +QUuid (0xb51c421c) 0 + +Class QReadWriteLock + size=4 align=4 + base size=4 base align=4 +QReadWriteLock (0xb51d8078) 0 + +Class QReadLocker + size=4 align=4 + base size=4 base align=4 +QReadLocker (0xb51d83fc) 0 + +Class QWriteLocker + size=4 align=4 + base size=4 base align=4 +QWriteLocker (0xb51e58e8) 0 + +Class QSemaphore + size=4 align=4 + base size=4 base align=4 +QSemaphore (0xb51ecdd4) 0 + +Class QThreadStorageData + size=4 align=4 + base size=4 base align=4 +QThreadStorageData (0xb51f30b4) 0 + +Class QBitArray + size=4 align=4 + base size=4 base align=4 +QBitArray (0xb51f34b0) 0 + +Class QBitRef + size=8 align=4 + base size=8 base align=4 +QBitRef (0xb522d1e0) 0 + +Class QByteArrayMatcher + size=1032 align=4 + base size=1032 base align=4 +QByteArrayMatcher (0xb5239168) 0 + +Class QCryptographicHash + size=4 align=4 + base size=4 base align=4 +QCryptographicHash (0xb5239b40) 0 + +Class QDate + size=4 align=4 + base size=4 base align=4 +QDate (0xb5239ec4) 0 + +Class QTime + size=4 align=4 + base size=4 base align=4 +QTime (0xb526b960) 0 + +Class QDateTime + size=4 align=4 + base size=4 base align=4 +QDateTime (0xb5273384) 0 + +Class QPoint + size=8 align=4 + base size=8 base align=4 +QPoint (0xb52868ac) 0 + +Class QPointF + size=16 align=4 + base size=16 base align=4 +QPointF (0xb508b8ac) 0 + +Class QLine + size=16 align=4 + base size=16 base align=4 +QLine (0xb50ad870) 0 + +Class QLineF + size=32 align=4 + base size=32 base align=4 +QLineF (0xb50ced98) 0 + +Class QLinkedListData + size=20 align=4 + base size=20 base align=4 +QLinkedListData (0xb51023fc) 0 + +Class QSize + size=8 align=4 + base size=8 base align=4 +QSize (0xb5166708) 0 + +Class QSizeF + size=16 align=4 + base size=16 base align=4 +QSizeF (0xb4f95384) 0 + +Class QRect + size=16 align=4 + base size=16 base align=4 +QRect (0xb4fbe1e0) 0 + +Class QRectF + size=32 align=4 + base size=32 base align=4 +QRectF (0xb5014ca8) 0 + +Class QSharedData + size=4 align=4 + base size=4 base align=4 +QSharedData (0xb5070870) 0 + +Class QTextBoundaryFinder + size=28 align=4 + base size=28 base align=4 +QTextBoundaryFinder (0xb5084a8c) 0 + +Vtable for QTimeLine +QTimeLine::_ZTV9QTimeLine: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QTimeLine) +8 QTimeLine::metaObject +12 QTimeLine::qt_metacast +16 QTimeLine::qt_metacall +20 QTimeLine::~QTimeLine +24 QTimeLine::~QTimeLine +28 QObject::event +32 QObject::eventFilter +36 QTimeLine::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTimeLine::valueForTime + +Class QTimeLine + size=8 align=4 + base size=8 base align=4 +QTimeLine (0xb4e947c0) 0 + vptr=((& QTimeLine::_ZTV9QTimeLine) + 8u) + QObject (0xb4e9f438) 0 + primary-for QTimeLine (0xb4e947c0) + +Class QXmlStreamStringRef + size=12 align=4 + base size=12 base align=4 +QXmlStreamStringRef (0xb4eb17f8) 0 + +Class QXmlStreamAttribute + size=56 align=4 + base size=53 base align=4 +QXmlStreamAttribute (0xb4ed599c) 0 + +Class QXmlStreamAttributes + size=4 align=4 + base size=4 base align=4 +QXmlStreamAttributes (0xb4ee0240) 0 + QVector (0xb4eef0b4) 0 + +Class QXmlStreamNamespaceDeclaration + size=28 align=4 + base size=28 base align=4 +QXmlStreamNamespaceDeclaration (0xb4eef0f0) 0 + +Class QXmlStreamNotationDeclaration + size=40 align=4 + base size=40 base align=4 +QXmlStreamNotationDeclaration (0xb4eefc30) 0 + +Class QXmlStreamEntityDeclaration + size=64 align=4 + base size=64 base align=4 +QXmlStreamEntityDeclaration (0xb4f0f924) 0 + +Vtable for QXmlStreamEntityResolver +QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QXmlStreamEntityResolver) +8 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +12 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +16 QXmlStreamEntityResolver::resolveEntity +20 QXmlStreamEntityResolver::resolveUndeclaredEntity + +Class QXmlStreamEntityResolver + size=4 align=4 + base size=4 base align=4 +QXmlStreamEntityResolver (0xb4f219d8) 0 nearly-empty + vptr=((& QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver) + 8u) + +Class QXmlStreamReader + size=4 align=4 + base size=4 base align=4 +QXmlStreamReader (0xb4f21b7c) 0 + +Class QXmlStreamWriter + size=4 align=4 + base size=4 base align=4 +QXmlStreamWriter (0xb4f52168) 0 + +Class QSourceLocation + size=20 align=4 + base size=20 base align=4 +QSourceLocation (0xb4ceb21c) 0 + +Vtable for QAbstractMessageHandler +QAbstractMessageHandler::_ZTV23QAbstractMessageHandler: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI23QAbstractMessageHandler) +8 QAbstractMessageHandler::metaObject +12 QAbstractMessageHandler::qt_metacast +16 QAbstractMessageHandler::qt_metacall +20 QAbstractMessageHandler::~QAbstractMessageHandler +24 QAbstractMessageHandler::~QAbstractMessageHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractMessageHandler + size=8 align=4 + base size=8 base align=4 +QAbstractMessageHandler (0xb4c9cb00) 0 + vptr=((& QAbstractMessageHandler::_ZTV23QAbstractMessageHandler) + 8u) + QObject (0xb4ceb924) 0 + primary-for QAbstractMessageHandler (0xb4c9cb00) + +Vtable for QAbstractUriResolver +QAbstractUriResolver::_ZTV20QAbstractUriResolver: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractUriResolver) +8 QAbstractUriResolver::metaObject +12 QAbstractUriResolver::qt_metacast +16 QAbstractUriResolver::qt_metacall +20 QAbstractUriResolver::~QAbstractUriResolver +24 QAbstractUriResolver::~QAbstractUriResolver +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractUriResolver + size=8 align=4 + base size=8 base align=4 +QAbstractUriResolver (0xb4c9cdc0) 0 + vptr=((& QAbstractUriResolver::_ZTV20QAbstractUriResolver) + 8u) + QObject (0xb4cfd528) 0 + primary-for QAbstractUriResolver (0xb4c9cdc0) + +Class QXmlName + size=8 align=4 + base size=8 base align=4 +QXmlName (0xb4d0d0b4) 0 + +Class QPatternist::NodeIndexStorage + size=20 align=4 + base size=20 base align=4 +QPatternist::NodeIndexStorage (0xb4d1b12c) 0 + +Class QXmlNodeModelIndex + size=20 align=4 + base size=20 base align=4 +QXmlNodeModelIndex (0xb4d1b3c0) 0 + +Vtable for QAbstractXmlNodeModel +QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QAbstractXmlNodeModel) +8 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +12 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QAbstractXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QAbstractXmlNodeModel (0xb4d0c900) 0 + vptr=((& QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel) + 8u) + QSharedData (0xb4d42b04) 4 + +Class QXmlItem + size=20 align=4 + base size=20 base align=4 +QXmlItem (0xb4d4a99c) 0 + +Vtable for QAbstractXmlReceiver +QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractXmlReceiver) +8 QAbstractXmlReceiver::~QAbstractXmlReceiver +12 QAbstractXmlReceiver::~QAbstractXmlReceiver +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 __cxa_pure_virtual +52 __cxa_pure_virtual +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractXmlReceiver::whitespaceOnly +68 QAbstractXmlReceiver::item + +Class QAbstractXmlReceiver + size=8 align=4 + base size=8 base align=4 +QAbstractXmlReceiver (0xb4d5b1e0) 0 + vptr=((& QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver) + 8u) + +Class QXmlQuery + size=4 align=4 + base size=4 base align=4 +QXmlQuery (0xb4d5b690) 0 + +Vtable for QSimpleXmlNodeModel +QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QSimpleXmlNodeModel) +8 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +12 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +16 QSimpleXmlNodeModel::baseUri +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 QSimpleXmlNodeModel::stringValue +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 QSimpleXmlNodeModel::namespaceBindings +76 QSimpleXmlNodeModel::elementById +80 QSimpleXmlNodeModel::nodesByIdref +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QSimpleXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QSimpleXmlNodeModel (0xb4d0ce80) 0 + vptr=((& QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel) + 8u) + QAbstractXmlNodeModel (0xb4d0cec0) 0 + primary-for QSimpleXmlNodeModel (0xb4d0ce80) + QSharedData (0xb4d5ba50) 4 + +Vtable for QXmlSerializer +QXmlSerializer::_ZTV14QXmlSerializer: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QXmlSerializer) +8 QXmlSerializer::~QXmlSerializer +12 QXmlSerializer::~QXmlSerializer +16 QXmlSerializer::startElement +20 QXmlSerializer::endElement +24 QXmlSerializer::attribute +28 QXmlSerializer::comment +32 QXmlSerializer::characters +36 QXmlSerializer::startDocument +40 QXmlSerializer::endDocument +44 QXmlSerializer::processingInstruction +48 QXmlSerializer::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlSerializer::startOfSequence +60 QXmlSerializer::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlSerializer::item + +Class QXmlSerializer + size=8 align=4 + base size=8 base align=4 +QXmlSerializer (0xb4d0cfc0) 0 + vptr=((& QXmlSerializer::_ZTV14QXmlSerializer) + 8u) + QAbstractXmlReceiver (0xb4d5bd98) 0 + primary-for QXmlSerializer (0xb4d0cfc0) + +Vtable for QXmlFormatter +QXmlFormatter::_ZTV13QXmlFormatter: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QXmlFormatter) +8 QXmlFormatter::~QXmlFormatter +12 QXmlFormatter::~QXmlFormatter +16 QXmlFormatter::startElement +20 QXmlFormatter::endElement +24 QXmlFormatter::attribute +28 QXmlFormatter::comment +32 QXmlFormatter::characters +36 QXmlFormatter::startDocument +40 QXmlFormatter::endDocument +44 QXmlFormatter::processingInstruction +48 QXmlFormatter::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlFormatter::startOfSequence +60 QXmlFormatter::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlFormatter::item + +Class QXmlFormatter + size=8 align=4 + base size=8 base align=4 +QXmlFormatter (0xb4d710c0) 0 + vptr=((& QXmlFormatter::_ZTV13QXmlFormatter) + 8u) + QXmlSerializer (0xb4d71100) 0 + primary-for QXmlFormatter (0xb4d710c0) + QAbstractXmlReceiver (0xb4d7603c) 0 + primary-for QXmlSerializer (0xb4d71100) + +Class QXmlNamePool + size=4 align=4 + base size=4 base align=4 +QXmlNamePool (0xb4d76348) 0 + +Vtable for QXmlResultItems +QXmlResultItems::_ZTV15QXmlResultItems: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QXmlResultItems) +8 QXmlResultItems::~QXmlResultItems +12 QXmlResultItems::~QXmlResultItems + +Class QXmlResultItems + size=8 align=4 + base size=8 base align=4 +QXmlResultItems (0xb4d76690) 0 + vptr=((& QXmlResultItems::_ZTV15QXmlResultItems) + 8u) + diff --git a/tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-amd64.txt new file mode 100644 index 0000000..65c885d --- /dev/null +++ b/tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-amd64.txt @@ -0,0 +1,3270 @@ +Class QSysInfo + size=1 align=1 + base size=0 base align=1 +QSysInfo (0x7f593a280460) 0 empty + +Class QBool + size=1 align=1 + base size=1 base align=1 +QBool (0x7f593a297150) 0 + +Class qIsNull(double)::U + size=8 align=8 + base size=8 base align=8 +qIsNull(double)::U (0x7f593a2ad540) 0 + +Class qIsNull(float)::U + size=4 align=4 + base size=4 base align=4 +qIsNull(float)::U (0x7f593a2ad7e0) 0 + +Class QFlag + size=4 align=4 + base size=4 base align=4 +QFlag (0x7f593a2e5620) 0 + +Class QIncompatibleFlag + size=4 align=4 + base size=4 base align=4 +QIncompatibleFlag (0x7f593a2e5e00) 0 + +Class QInternal + size=1 align=1 + base size=0 base align=1 +QInternal (0x7f59398be540) 0 empty + +Class QGenericArgument + size=16 align=8 + base size=16 base align=8 +QGenericArgument (0x7f59398be850) 0 + +Class QGenericReturnArgument + size=16 align=8 + base size=16 base align=8 +QGenericReturnArgument (0x7f59398da3f0) 0 + QGenericArgument (0x7f59398da460) 0 + +Class QMetaObject + size=32 align=8 + base size=32 base align=8 +QMetaObject (0x7f59398dacb0) 0 + +Class QMetaObjectExtraData + size=16 align=8 + base size=16 base align=8 +QMetaObjectExtraData (0x7f5939901cb0) 0 + +Class QLatin1Char + size=1 align=1 + base size=1 base align=1 +QLatin1Char (0x7f593990d700) 0 + +Class QChar + size=2 align=2 + base size=2 base align=2 +QChar (0x7f59399112a0) 0 + +Class QBasicAtomicInt + size=4 align=4 + base size=4 base align=4 +QBasicAtomicInt (0x7f593977d380) 0 + +Class QAtomicInt + size=4 align=4 + base size=4 base align=4 +QAtomicInt (0x7f59397b9d20) 0 + QBasicAtomicInt (0x7f59397b9d90) 0 + +Class __locale_struct + size=232 align=8 + base size=232 base align=8 +__locale_struct (0x7f59397de1c0) 0 + +Class QByteArray::Data + size=32 align=8 + base size=32 base align=8 +QByteArray::Data (0x7f59396577e0) 0 + +Class QByteArray + size=8 align=8 + base size=8 base align=8 +QByteArray (0x7f5939612540) 0 + +Class QByteRef + size=16 align=8 + base size=12 base align=8 +QByteRef (0x7f59396aca80) 0 + +Class QString::Null + size=1 align=1 + base size=0 base align=1 +QString::Null (0x7f59395b5700) 0 empty + +Class QString::Data + size=32 align=8 + base size=32 base align=8 +QString::Data (0x7f59395c4ee0) 0 + +Class QString + size=8 align=8 + base size=8 base align=8 +QString (0x7f59395345b0) 0 + +Class QLatin1String + size=8 align=8 + base size=8 base align=8 +QLatin1String (0x7f593949f000) 0 + +Class QCharRef + size=16 align=8 + base size=12 base align=8 +QCharRef (0x7f5939336620) 0 + +Class QConstString + size=8 align=8 + base size=8 base align=8 +QConstString (0x7f593927fee0) 0 + QString (0x7f593927ff50) 0 + +Class QStringRef + size=16 align=8 + base size=16 base align=8 +QStringRef (0x7f593929fbd0) 0 + +Vtable for std::exception +std::exception::_ZTVSt9exception: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt9exception) +16 std::exception::~exception +24 std::exception::~exception +32 std::exception::what + +Class std::exception + size=8 align=8 + base size=8 base align=8 +std::exception (0x7f593915a620) 0 nearly-empty + vptr=((& std::exception::_ZTVSt9exception) + 16u) + +Vtable for std::bad_exception +std::bad_exception::_ZTVSt13bad_exception: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt13bad_exception) +16 std::bad_exception::~bad_exception +24 std::bad_exception::~bad_exception +32 std::bad_exception::what + +Class std::bad_exception + size=8 align=8 + base size=8 base align=8 +std::bad_exception (0x7f593917d000) 0 nearly-empty + vptr=((& std::bad_exception::_ZTVSt13bad_exception) + 16u) + std::exception (0x7f593917d070) 0 nearly-empty + primary-for std::bad_exception (0x7f593917d000) + +Vtable for std::bad_alloc +std::bad_alloc::_ZTVSt9bad_alloc: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt9bad_alloc) +16 std::bad_alloc::~bad_alloc +24 std::bad_alloc::~bad_alloc +32 std::bad_alloc::what + +Class std::bad_alloc + size=8 align=8 + base size=8 base align=8 +std::bad_alloc (0x7f593917d8c0) 0 nearly-empty + vptr=((& std::bad_alloc::_ZTVSt9bad_alloc) + 16u) + std::exception (0x7f593917d930) 0 nearly-empty + primary-for std::bad_alloc (0x7f593917d8c0) + +Class std::nothrow_t + size=1 align=1 + base size=0 base align=1 +std::nothrow_t (0x7f593918e0e0) 0 empty + +Class QListData::Data + size=32 align=8 + base size=32 base align=8 +QListData::Data (0x7f593918e620) 0 + +Class QListData + size=8 align=8 + base size=8 base align=8 +QListData (0x7f593918e5b0) 0 + +Vtable for QObjectData +QObjectData::_ZTV11QObjectData: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QObjectData) +16 __cxa_pure_virtual +24 __cxa_pure_virtual + +Class QObjectData + size=40 align=8 + base size=40 base align=8 +QObjectData (0x7f5939091bd0) 0 + vptr=((& QObjectData::_ZTV11QObjectData) + 16u) + +Vtable for QObject +QObject::_ZTV7QObject: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI7QObject) +16 QObject::metaObject +24 QObject::qt_metacast +32 QObject::qt_metacall +40 QObject::~QObject +48 QObject::~QObject +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QObject + size=16 align=8 + base size=16 base align=8 +QObject (0x7f5939091ee0) 0 + vptr=((& QObject::_ZTV7QObject) + 16u) + +Vtable for QObjectUserData +QObjectUserData::_ZTV15QObjectUserData: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QObjectUserData) +16 QObjectUserData::~QObjectUserData +24 QObjectUserData::~QObjectUserData + +Class QObjectUserData + size=8 align=8 + base size=8 base align=8 +QObjectUserData (0x7f5938f223f0) 0 nearly-empty + vptr=((& QObjectUserData::_ZTV15QObjectUserData) + 16u) + +Vtable for QIODevice +QIODevice::_ZTV9QIODevice: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QIODevice) +16 QIODevice::metaObject +24 QIODevice::qt_metacast +32 QIODevice::qt_metacall +40 QIODevice::~QIODevice +48 QIODevice::~QIODevice +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QIODevice::isSequential +120 QIODevice::open +128 QIODevice::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QIODevice::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 __cxa_pure_virtual +224 QIODevice::readLineData +232 __cxa_pure_virtual + +Class QIODevice + size=16 align=8 + base size=16 base align=8 +QIODevice (0x7f5938f22930) 0 + vptr=((& QIODevice::_ZTV9QIODevice) + 16u) + QObject (0x7f5938f229a0) 0 + primary-for QIODevice (0x7f5938f22930) + +Vtable for QDataStream +QDataStream::_ZTV11QDataStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QDataStream) +16 QDataStream::~QDataStream +24 QDataStream::~QDataStream + +Class QDataStream + size=40 align=8 + base size=40 base align=8 +QDataStream (0x7f5938f992a0) 0 + vptr=((& QDataStream::_ZTV11QDataStream) + 16u) + +Class QHashData::Node + size=16 align=8 + base size=16 base align=8 +QHashData::Node (0x7f5938e1f150) 0 + +Class QHashData + size=40 align=8 + base size=40 base align=8 +QHashData (0x7f5938e1f0e0) 0 + +Class QHashDummyValue + size=1 align=1 + base size=0 base align=1 +QHashDummyValue (0x7f5938e2fee0) 0 empty + +Class QMapData::Node + size=16 align=8 + base size=16 base align=8 +QMapData::Node (0x7f5938d42690) 0 + +Class QMapData + size=128 align=8 + base size=128 base align=8 +QMapData (0x7f5938d42620) 0 + +Vtable for QSystemLocale +QSystemLocale::_ZTV13QSystemLocale: 6u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QSystemLocale) +16 QSystemLocale::~QSystemLocale +24 QSystemLocale::~QSystemLocale +32 QSystemLocale::query +40 QSystemLocale::fallbackLocale + +Class QSystemLocale + size=8 align=8 + base size=8 base align=8 +QSystemLocale (0x7f5938c55e00) 0 nearly-empty + vptr=((& QSystemLocale::_ZTV13QSystemLocale) + 16u) + +Class QLocale::Data + size=4 align=2 + base size=4 base align=2 +QLocale::Data (0x7f5938cb43f0) 0 + +Class QLocale + size=8 align=8 + base size=8 base align=8 +QLocale (0x7f5938c780e0) 0 + +Class QTextCodec::ConverterState + size=32 align=8 + base size=32 base align=8 +QTextCodec::ConverterState (0x7f5938d02e70) 0 + +Vtable for QTextCodec +QTextCodec::_ZTV10QTextCodec: 9u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QTextCodec) +16 __cxa_pure_virtual +24 QTextCodec::aliases +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 QTextCodec::~QTextCodec +64 QTextCodec::~QTextCodec + +Class QTextCodec + size=8 align=8 + base size=8 base align=8 +QTextCodec (0x7f5938ceba80) 0 nearly-empty + vptr=((& QTextCodec::_ZTV10QTextCodec) + 16u) + +Class QTextEncoder + size=40 align=8 + base size=40 base align=8 +QTextEncoder (0x7f5938b6e3f0) 0 + +Class QTextDecoder + size=40 align=8 + base size=40 base align=8 +QTextDecoder (0x7f5938b77230) 0 + +Class _IO_marker + size=24 align=8 + base size=24 base align=8 +_IO_marker (0x7f5938b7f2a0) 0 + +Class _IO_FILE + size=216 align=8 + base size=216 base align=8 +_IO_FILE (0x7f5938b7f310) 0 + +Vtable for QTextStream +QTextStream::_ZTV11QTextStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QTextStream) +16 QTextStream::~QTextStream +24 QTextStream::~QTextStream + +Class QTextStream + size=16 align=8 + base size=16 base align=8 +QTextStream (0x7f5938b7f3f0) 0 + vptr=((& QTextStream::_ZTV11QTextStream) + 16u) + +Class QTextStreamManipulator + size=40 align=8 + base size=38 base align=8 +QTextStreamManipulator (0x7f5938a17ee0) 0 + +Vtable for QTextIStream +QTextIStream::_ZTV12QTextIStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QTextIStream) +16 QTextIStream::~QTextIStream +24 QTextIStream::~QTextIStream + +Class QTextIStream + size=16 align=8 + base size=16 base align=8 +QTextIStream (0x7f5938a441c0) 0 + vptr=((& QTextIStream::_ZTV12QTextIStream) + 16u) + QTextStream (0x7f5938a44230) 0 + primary-for QTextIStream (0x7f5938a441c0) + +Vtable for QTextOStream +QTextOStream::_ZTV12QTextOStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QTextOStream) +16 QTextOStream::~QTextOStream +24 QTextOStream::~QTextOStream + +Class QTextOStream + size=16 align=8 + base size=16 base align=8 +QTextOStream (0x7f5938a59070) 0 + vptr=((& QTextOStream::_ZTV12QTextOStream) + 16u) + QTextStream (0x7f5938a590e0) 0 + primary-for QTextOStream (0x7f5938a59070) + +Class wait + size=4 align=4 + base size=4 base align=4 +wait (0x7f5938a65ee0) 0 + +Class timespec + size=16 align=8 + base size=16 base align=8 +timespec (0x7f5938a73230) 0 + +Class timeval + size=16 align=8 + base size=16 base align=8 +timeval (0x7f5938a732a0) 0 + +Class __pthread_internal_list + size=16 align=8 + base size=16 base align=8 +__pthread_internal_list (0x7f5938a733f0) 0 + +Class random_data + size=48 align=8 + base size=48 base align=8 +random_data (0x7f5938a739a0) 0 + +Class drand48_data + size=24 align=8 + base size=24 base align=8 +drand48_data (0x7f5938a73a10) 0 + +Class QVectorData + size=16 align=4 + base size=16 base align=4 +QVectorData (0x7f5938a73a80) 0 + +Class QDebug::Stream + size=40 align=8 + base size=34 base align=8 +QDebug::Stream (0x7f59389ee230) 0 + +Class QDebug + size=8 align=8 + base size=8 base align=8 +QDebug (0x7f59389ee1c0) 0 + +Class QNoDebug + size=1 align=1 + base size=0 base align=1 +QNoDebug (0x7f593888c070) 0 empty + +Vtable for QFile +QFile::_ZTV5QFile: 31u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI5QFile) +16 QFile::metaObject +24 QFile::qt_metacast +32 QFile::qt_metacall +40 QFile::~QFile +48 QFile::~QFile +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QFile::isSequential +120 QFile::open +128 QFile::close +136 QFile::pos +144 QFile::size +152 QFile::seek +160 QFile::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 QFile::readData +224 QFile::readLineData +232 QFile::writeData +240 QFile::fileEngine + +Class QFile + size=16 align=8 + base size=16 base align=8 +QFile (0x7f593889e620) 0 + vptr=((& QFile::_ZTV5QFile) + 16u) + QIODevice (0x7f593889e690) 0 + primary-for QFile (0x7f593889e620) + QObject (0x7f593889e700) 0 + primary-for QIODevice (0x7f593889e690) + +Vtable for QTemporaryFile +QTemporaryFile::_ZTV14QTemporaryFile: 31u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI14QTemporaryFile) +16 QTemporaryFile::metaObject +24 QTemporaryFile::qt_metacast +32 QTemporaryFile::qt_metacall +40 QTemporaryFile::~QTemporaryFile +48 QTemporaryFile::~QTemporaryFile +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QFile::isSequential +120 QTemporaryFile::open +128 QFile::close +136 QFile::pos +144 QFile::size +152 QFile::seek +160 QFile::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 QFile::readData +224 QFile::readLineData +232 QFile::writeData +240 QTemporaryFile::fileEngine + +Class QTemporaryFile + size=16 align=8 + base size=16 base align=8 +QTemporaryFile (0x7f5938708850) 0 + vptr=((& QTemporaryFile::_ZTV14QTemporaryFile) + 16u) + QFile (0x7f59387088c0) 0 + primary-for QTemporaryFile (0x7f5938708850) + QIODevice (0x7f5938708930) 0 + primary-for QFile (0x7f59387088c0) + QObject (0x7f59387089a0) 0 + primary-for QIODevice (0x7f5938708930) + +Class QFileInfo + size=8 align=8 + base size=8 base align=8 +QFileInfo (0x7f593872af50) 0 + +Class QRegExp + size=8 align=8 + base size=8 base align=8 +QRegExp (0x7f5938786770) 0 + +Class QStringMatcher + size=1048 align=8 + base size=1048 base align=8 +QStringMatcher (0x7f59387d35b0) 0 + +Class QStringList + size=8 align=8 + base size=8 base align=8 +QStringList (0x7f59387e7070) 0 + QList (0x7f59387e70e0) 0 + +Class QDir + size=8 align=8 + base size=8 base align=8 +QDir (0x7f5938674cb0) 0 + +Class QAbstractFileEngine::ExtensionOption + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionOption (0x7f593850de70) 0 empty + +Class QAbstractFileEngine::ExtensionReturn + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionReturn (0x7f593850dee0) 0 empty + +Class QAbstractFileEngine::MapExtensionOption + size=24 align=8 + base size=20 base align=8 +QAbstractFileEngine::MapExtensionOption (0x7f593850df50) 0 + QAbstractFileEngine::ExtensionOption (0x7f5938522000) 0 empty + +Class QAbstractFileEngine::MapExtensionReturn + size=8 align=8 + base size=8 base align=8 +QAbstractFileEngine::MapExtensionReturn (0x7f59385221c0) 0 + QAbstractFileEngine::ExtensionReturn (0x7f5938522230) 0 empty + +Class QAbstractFileEngine::UnMapExtensionOption + size=8 align=8 + base size=8 base align=8 +QAbstractFileEngine::UnMapExtensionOption (0x7f59385222a0) 0 + QAbstractFileEngine::ExtensionOption (0x7f5938522310) 0 empty + +Vtable for QAbstractFileEngine +QAbstractFileEngine::_ZTV19QAbstractFileEngine: 36u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QAbstractFileEngine) +16 QAbstractFileEngine::~QAbstractFileEngine +24 QAbstractFileEngine::~QAbstractFileEngine +32 QAbstractFileEngine::open +40 QAbstractFileEngine::close +48 QAbstractFileEngine::flush +56 QAbstractFileEngine::size +64 QAbstractFileEngine::pos +72 QAbstractFileEngine::seek +80 QAbstractFileEngine::isSequential +88 QAbstractFileEngine::remove +96 QAbstractFileEngine::copy +104 QAbstractFileEngine::rename +112 QAbstractFileEngine::link +120 QAbstractFileEngine::mkdir +128 QAbstractFileEngine::rmdir +136 QAbstractFileEngine::setSize +144 QAbstractFileEngine::caseSensitive +152 QAbstractFileEngine::isRelativePath +160 QAbstractFileEngine::entryList +168 QAbstractFileEngine::fileFlags +176 QAbstractFileEngine::setPermissions +184 QAbstractFileEngine::fileName +192 QAbstractFileEngine::ownerId +200 QAbstractFileEngine::owner +208 QAbstractFileEngine::fileTime +216 QAbstractFileEngine::setFileName +224 QAbstractFileEngine::handle +232 QAbstractFileEngine::beginEntryList +240 QAbstractFileEngine::endEntryList +248 QAbstractFileEngine::read +256 QAbstractFileEngine::readLine +264 QAbstractFileEngine::write +272 QAbstractFileEngine::extension +280 QAbstractFileEngine::supportsExtension + +Class QAbstractFileEngine + size=16 align=8 + base size=16 base align=8 +QAbstractFileEngine (0x7f59386fde00) 0 + vptr=((& QAbstractFileEngine::_ZTV19QAbstractFileEngine) + 16u) + +Vtable for QAbstractFileEngineHandler +QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI26QAbstractFileEngineHandler) +16 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +24 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +32 __cxa_pure_virtual + +Class QAbstractFileEngineHandler + size=8 align=8 + base size=8 base align=8 +QAbstractFileEngineHandler (0x7f5938552000) 0 nearly-empty + vptr=((& QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler) + 16u) + +Vtable for QAbstractFileEngineIterator +QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator: 9u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI27QAbstractFileEngineIterator) +16 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +24 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 QAbstractFileEngineIterator::currentFileInfo +64 QAbstractFileEngineIterator::entryInfo + +Class QAbstractFileEngineIterator + size=16 align=8 + base size=16 base align=8 +QAbstractFileEngineIterator (0x7f59385521c0) 0 + vptr=((& QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator) + 16u) + +Vtable for QFSFileEngine +QFSFileEngine::_ZTV13QFSFileEngine: 36u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QFSFileEngine) +16 QFSFileEngine::~QFSFileEngine +24 QFSFileEngine::~QFSFileEngine +32 QFSFileEngine::open +40 QFSFileEngine::close +48 QFSFileEngine::flush +56 QFSFileEngine::size +64 QFSFileEngine::pos +72 QFSFileEngine::seek +80 QFSFileEngine::isSequential +88 QFSFileEngine::remove +96 QFSFileEngine::copy +104 QFSFileEngine::rename +112 QFSFileEngine::link +120 QFSFileEngine::mkdir +128 QFSFileEngine::rmdir +136 QFSFileEngine::setSize +144 QFSFileEngine::caseSensitive +152 QFSFileEngine::isRelativePath +160 QFSFileEngine::entryList +168 QFSFileEngine::fileFlags +176 QFSFileEngine::setPermissions +184 QFSFileEngine::fileName +192 QFSFileEngine::ownerId +200 QFSFileEngine::owner +208 QFSFileEngine::fileTime +216 QFSFileEngine::setFileName +224 QFSFileEngine::handle +232 QFSFileEngine::beginEntryList +240 QFSFileEngine::endEntryList +248 QFSFileEngine::read +256 QFSFileEngine::readLine +264 QFSFileEngine::write +272 QFSFileEngine::extension +280 QFSFileEngine::supportsExtension + +Class QFSFileEngine + size=16 align=8 + base size=16 base align=8 +QFSFileEngine (0x7f5938552a10) 0 + vptr=((& QFSFileEngine::_ZTV13QFSFileEngine) + 16u) + QAbstractFileEngine (0x7f5938552a80) 0 + primary-for QFSFileEngine (0x7f5938552a10) + +Vtable for QProcess +QProcess::_ZTV8QProcess: 31u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI8QProcess) +16 QProcess::metaObject +24 QProcess::qt_metacast +32 QProcess::qt_metacall +40 QProcess::~QProcess +48 QProcess::~QProcess +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QProcess::isSequential +120 QIODevice::open +128 QProcess::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QProcess::atEnd +168 QIODevice::reset +176 QProcess::bytesAvailable +184 QProcess::bytesToWrite +192 QProcess::canReadLine +200 QProcess::waitForReadyRead +208 QProcess::waitForBytesWritten +216 QProcess::readData +224 QIODevice::readLineData +232 QProcess::writeData +240 QProcess::setupChildProcess + +Class QProcess + size=16 align=8 + base size=16 base align=8 +QProcess (0x7f5938569d20) 0 + vptr=((& QProcess::_ZTV8QProcess) + 16u) + QIODevice (0x7f5938569d90) 0 + primary-for QProcess (0x7f5938569d20) + QObject (0x7f5938569e00) 0 + primary-for QIODevice (0x7f5938569d90) + +Class QResource + size=8 align=8 + base size=8 base align=8 +QResource (0x7f59385a5230) 0 + +Vtable for QDirIterator +QDirIterator::_ZTV12QDirIterator: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QDirIterator) +16 QDirIterator::~QDirIterator +24 QDirIterator::~QDirIterator + +Class QDirIterator + size=16 align=8 + base size=16 base align=8 +QDirIterator (0x7f59385a5cb0) 0 + vptr=((& QDirIterator::_ZTV12QDirIterator) + 16u) + +Vtable for QBuffer +QBuffer::_ZTV7QBuffer: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI7QBuffer) +16 QBuffer::metaObject +24 QBuffer::qt_metacast +32 QBuffer::qt_metacall +40 QBuffer::~QBuffer +48 QBuffer::~QBuffer +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QBuffer::connectNotify +104 QBuffer::disconnectNotify +112 QIODevice::isSequential +120 QBuffer::open +128 QBuffer::close +136 QBuffer::pos +144 QBuffer::size +152 QBuffer::seek +160 QBuffer::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QBuffer::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 QBuffer::readData +224 QIODevice::readLineData +232 QBuffer::writeData + +Class QBuffer + size=16 align=8 + base size=16 base align=8 +QBuffer (0x7f59385d6a80) 0 + vptr=((& QBuffer::_ZTV7QBuffer) + 16u) + QIODevice (0x7f59385d6af0) 0 + primary-for QBuffer (0x7f59385d6a80) + QObject (0x7f59385d6b60) 0 + primary-for QIODevice (0x7f59385d6af0) + +Vtable for QFileSystemWatcher +QFileSystemWatcher::_ZTV18QFileSystemWatcher: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QFileSystemWatcher) +16 QFileSystemWatcher::metaObject +24 QFileSystemWatcher::qt_metacast +32 QFileSystemWatcher::qt_metacall +40 QFileSystemWatcher::~QFileSystemWatcher +48 QFileSystemWatcher::~QFileSystemWatcher +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QFileSystemWatcher + size=16 align=8 + base size=16 base align=8 +QFileSystemWatcher (0x7f59385ff690) 0 + vptr=((& QFileSystemWatcher::_ZTV18QFileSystemWatcher) + 16u) + QObject (0x7f59385ff700) 0 + primary-for QFileSystemWatcher (0x7f59385ff690) + +Class QUrl + size=8 align=8 + base size=8 base align=8 +QUrl (0x7f59383f1bd0) 0 + +Class QMetaType + size=1 align=1 + base size=0 base align=1 +QMetaType (0x7f593847c3f0) 0 empty + +Class QVariant::PrivateShared + size=16 align=8 + base size=12 base align=8 +QVariant::PrivateShared (0x7f593834e930) 0 + +Class QVariant::Private::Data + size=8 align=8 + base size=8 base align=8 +QVariant::Private::Data (0x7f593834ec40) 0 + +Class QVariant::Private + size=16 align=8 + base size=12 base align=8 +QVariant::Private (0x7f593834ea10) 0 + +Class QVariant::Handler + size=72 align=8 + base size=72 base align=8 +QVariant::Handler (0x7f593835c930) 0 + +Class QVariant + size=16 align=8 + base size=16 base align=8 +QVariant (0x7f593831daf0) 0 + +Class QVariantComparisonHelper + size=8 align=8 + base size=8 base align=8 +QVariantComparisonHelper (0x7f5938201cb0) 0 + +Vtable for QSettings +QSettings::_ZTV9QSettings: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QSettings) +16 QSettings::metaObject +24 QSettings::qt_metacast +32 QSettings::qt_metacall +40 QSettings::~QSettings +48 QSettings::~QSettings +56 QSettings::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSettings + size=16 align=8 + base size=16 base align=8 +QSettings (0x7f5938226cb0) 0 + vptr=((& QSettings::_ZTV9QSettings) + 16u) + QObject (0x7f5938226d20) 0 + primary-for QSettings (0x7f5938226cb0) + +Class QXmlStreamStringRef + size=16 align=8 + base size=16 base align=8 +QXmlStreamStringRef (0x7f59382a8070) 0 + +Class QXmlStreamAttribute + size=80 align=8 + base size=73 base align=8 +QXmlStreamAttribute (0x7f59382c6850) 0 + +Class QXmlStreamAttributes + size=8 align=8 + base size=8 base align=8 +QXmlStreamAttributes (0x7f59380ee380) 0 + QVector (0x7f59380ee3f0) 0 + +Class QXmlStreamNamespaceDeclaration + size=40 align=8 + base size=40 base align=8 +QXmlStreamNamespaceDeclaration (0x7f59380ee850) 0 + +Class QXmlStreamNotationDeclaration + size=56 align=8 + base size=56 base align=8 +QXmlStreamNotationDeclaration (0x7f593812f1c0) 0 + +Class QXmlStreamEntityDeclaration + size=88 align=8 + base size=88 base align=8 +QXmlStreamEntityDeclaration (0x7f593814f070) 0 + +Vtable for QXmlStreamEntityResolver +QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver: 6u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI24QXmlStreamEntityResolver) +16 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +24 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +32 QXmlStreamEntityResolver::resolveEntity +40 QXmlStreamEntityResolver::resolveUndeclaredEntity + +Class QXmlStreamEntityResolver + size=8 align=8 + base size=8 base align=8 +QXmlStreamEntityResolver (0x7f593816c9a0) 0 nearly-empty + vptr=((& QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver) + 16u) + +Class QXmlStreamReader + size=8 align=8 + base size=8 base align=8 +QXmlStreamReader (0x7f593816cb60) 0 + +Class QXmlStreamWriter + size=8 align=8 + base size=8 base align=8 +QXmlStreamWriter (0x7f59381a9a10) 0 + +Class QPoint + size=8 align=4 + base size=8 base align=4 +QPoint (0x7f5937fe5150) 0 + +Class QPointF + size=16 align=8 + base size=16 base align=8 +QPointF (0x7f593801dd90) 0 + +Class QLine + size=16 align=4 + base size=16 base align=4 +QLine (0x7f593805abd0) 0 + +Class QLineF + size=32 align=8 + base size=32 base align=8 +QLineF (0x7f5938094a80) 0 + +Class QSize + size=8 align=4 + base size=8 base align=4 +QSize (0x7f5937ef0540) 0 + +Class QSizeF + size=16 align=8 + base size=16 base align=8 +QSizeF (0x7f5937f3b380) 0 + +Class QRect + size=16 align=4 + base size=16 base align=4 +QRect (0x7f5937f899a0) 0 + +Class QRectF + size=32 align=8 + base size=32 base align=8 +QRectF (0x7f5937e38380) 0 + +Class QSharedData + size=4 align=4 + base size=4 base align=4 +QSharedData (0x7f5937ce3150) 0 + +Vtable for QtSharedPointer::ExternalRefCountData +QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN15QtSharedPointer20ExternalRefCountDataE) +16 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +24 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +32 QtSharedPointer::ExternalRefCountData::destroy + +Class QtSharedPointer::ExternalRefCountData + size=16 align=8 + base size=16 base align=8 +QtSharedPointer::ExternalRefCountData (0x7f5937d13af0) 0 + vptr=((& QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE) + 16u) + +Class QLinkedListData + size=32 align=8 + base size=32 base align=8 +QLinkedListData (0x7f5937d9bc40) 0 + +Class QBitArray + size=8 align=8 + base size=8 base align=8 +QBitArray (0x7f5937c66b60) 0 + +Class QBitRef + size=16 align=8 + base size=12 base align=8 +QBitRef (0x7f5937ada930) 0 + +Class QByteArrayMatcher + size=1040 align=8 + base size=1040 base align=8 +QByteArrayMatcher (0x7f5937af3310) 0 + +Class QCryptographicHash + size=8 align=8 + base size=8 base align=8 +QCryptographicHash (0x7f5937b05a10) 0 + +Class QTextBoundaryFinder + size=48 align=8 + base size=48 base align=8 +QTextBoundaryFinder (0x7f5937b33460) 0 + +Class QDate + size=4 align=4 + base size=4 base align=4 +QDate (0x7f5937b497e0) 0 + +Class QTime + size=4 align=4 + base size=4 base align=4 +QTime (0x7f5937b71770) 0 + +Class QDateTime + size=8 align=8 + base size=8 base align=8 +QDateTime (0x7f5937b8fd20) 0 + +Vtable for QTimeLine +QTimeLine::_ZTV9QTimeLine: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QTimeLine) +16 QTimeLine::metaObject +24 QTimeLine::qt_metacast +32 QTimeLine::qt_metacall +40 QTimeLine::~QTimeLine +48 QTimeLine::~QTimeLine +56 QObject::event +64 QObject::eventFilter +72 QTimeLine::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QTimeLine::valueForTime + +Class QTimeLine + size=16 align=8 + base size=16 base align=8 +QTimeLine (0x7f5937bc21c0) 0 + vptr=((& QTimeLine::_ZTV9QTimeLine) + 16u) + QObject (0x7f5937bc2230) 0 + primary-for QTimeLine (0x7f5937bc21c0) + +Vtable for QRunnable +QRunnable::_ZTV9QRunnable: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QRunnable) +16 __cxa_pure_virtual +24 QRunnable::~QRunnable +32 QRunnable::~QRunnable + +Class QRunnable + size=16 align=8 + base size=12 base align=8 +QRunnable (0x7f59379ea070) 0 + vptr=((& QRunnable::_ZTV9QRunnable) + 16u) + +Class QMutex + size=8 align=8 + base size=8 base align=8 +QMutex (0x7f59379f8700) 0 + +Class QMutexLocker + size=8 align=8 + base size=8 base align=8 +QMutexLocker (0x7f5937a052a0) 0 + +Vtable for QtConcurrent::Exception +QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE: 7u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent9ExceptionE) +16 QtConcurrent::Exception::~Exception +24 QtConcurrent::Exception::~Exception +32 std::exception::what +40 QtConcurrent::Exception::raise +48 QtConcurrent::Exception::clone + +Class QtConcurrent::Exception + size=8 align=8 + base size=8 base align=8 +QtConcurrent::Exception (0x7f5937a1c5b0) 0 nearly-empty + vptr=((& QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE) + 16u) + std::exception (0x7f5937a1c620) 0 nearly-empty + primary-for QtConcurrent::Exception (0x7f5937a1c5b0) + +Vtable for QtConcurrent::UnhandledException +QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE: 7u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent18UnhandledExceptionE) +16 QtConcurrent::UnhandledException::~UnhandledException +24 QtConcurrent::UnhandledException::~UnhandledException +32 std::exception::what +40 QtConcurrent::UnhandledException::raise +48 QtConcurrent::UnhandledException::clone + +Class QtConcurrent::UnhandledException + size=8 align=8 + base size=8 base align=8 +QtConcurrent::UnhandledException (0x7f5937a1c850) 0 nearly-empty + vptr=((& QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE) + 16u) + QtConcurrent::Exception (0x7f5937a1c8c0) 0 nearly-empty + primary-for QtConcurrent::UnhandledException (0x7f5937a1c850) + std::exception (0x7f5937a1c930) 0 nearly-empty + primary-for QtConcurrent::Exception (0x7f5937a1c8c0) + +Class QtConcurrent::internal::ExceptionHolder + size=8 align=8 + base size=8 base align=8 +QtConcurrent::internal::ExceptionHolder (0x7f5937a1cb60) 0 + +Class QtConcurrent::internal::ExceptionStore + size=8 align=8 + base size=8 base align=8 +QtConcurrent::internal::ExceptionStore (0x7f5937a1cee0) 0 + +Class QtConcurrent::ResultItem + size=16 align=8 + base size=16 base align=8 +QtConcurrent::ResultItem (0x7f5937a1cf50) 0 + +Class QtConcurrent::ResultIteratorBase + size=16 align=8 + base size=12 base align=8 +QtConcurrent::ResultIteratorBase (0x7f5937a33e70) 0 + +Vtable for QtConcurrent::ResultStoreBase +QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent15ResultStoreBaseE) +16 QtConcurrent::ResultStoreBase::~ResultStoreBase +24 QtConcurrent::ResultStoreBase::~ResultStoreBase + +Class QtConcurrent::ResultStoreBase + size=48 align=8 + base size=44 base align=8 +QtConcurrent::ResultStoreBase (0x7f5937a37a10) 0 + vptr=((& QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE) + 16u) + +Vtable for QFutureInterfaceBase +QFutureInterfaceBase::_ZTV20QFutureInterfaceBase: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QFutureInterfaceBase) +16 QFutureInterfaceBase::~QFutureInterfaceBase +24 QFutureInterfaceBase::~QFutureInterfaceBase + +Class QFutureInterfaceBase + size=16 align=8 + base size=16 base align=8 +QFutureInterfaceBase (0x7f5937a77e70) 0 + vptr=((& QFutureInterfaceBase::_ZTV20QFutureInterfaceBase) + 16u) + +Vtable for QThread +QThread::_ZTV7QThread: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI7QThread) +16 QThread::metaObject +24 QThread::qt_metacast +32 QThread::qt_metacall +40 QThread::~QThread +48 QThread::~QThread +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QThread::run + +Class QThread + size=16 align=8 + base size=16 base align=8 +QThread (0x7f593795ce00) 0 + vptr=((& QThread::_ZTV7QThread) + 16u) + QObject (0x7f593795ce70) 0 + primary-for QThread (0x7f593795ce00) + +Vtable for QThreadPool +QThreadPool::_ZTV11QThreadPool: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QThreadPool) +16 QThreadPool::metaObject +24 QThreadPool::qt_metacast +32 QThreadPool::qt_metacall +40 QThreadPool::~QThreadPool +48 QThreadPool::~QThreadPool +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QThreadPool + size=16 align=8 + base size=16 base align=8 +QThreadPool (0x7f593798fcb0) 0 + vptr=((& QThreadPool::_ZTV11QThreadPool) + 16u) + QObject (0x7f593798fd20) 0 + primary-for QThreadPool (0x7f593798fcb0) + +Class QWaitCondition + size=8 align=8 + base size=8 base align=8 +QWaitCondition (0x7f59379a7540) 0 + +Class QtConcurrent::ThreadEngineSemaphore + size=24 align=8 + base size=24 base align=8 +QtConcurrent::ThreadEngineSemaphore (0x7f59379a7a80) 0 + +Vtable for QtConcurrent::ThreadEngineBase +QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE: 11u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent16ThreadEngineBaseE) +16 QtConcurrent::ThreadEngineBase::run +24 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +32 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +40 QtConcurrent::ThreadEngineBase::start +48 QtConcurrent::ThreadEngineBase::finish +56 QtConcurrent::ThreadEngineBase::threadFunction +64 QtConcurrent::ThreadEngineBase::shouldStartThread +72 QtConcurrent::ThreadEngineBase::shouldThrottleThread +80 __cxa_pure_virtual + +Class QtConcurrent::ThreadEngineBase + size=64 align=8 + base size=64 base align=8 +QtConcurrent::ThreadEngineBase (0x7f59379c8460) 0 + vptr=((& QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE) + 16u) + QRunnable (0x7f59379c84d0) 0 + primary-for QtConcurrent::ThreadEngineBase (0x7f59379c8460) + +VTT for QtConcurrent::ThreadEngine +QtConcurrent::ThreadEngine::_ZTTN12QtConcurrent12ThreadEngineIvEE: 2u entries +0 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 24u) +8 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 136u) + +Class std::input_iterator_tag + size=1 align=1 + base size=0 base align=1 +std::input_iterator_tag (0x7f5937809850) 0 empty + +Class std::output_iterator_tag + size=1 align=1 + base size=0 base align=1 +std::output_iterator_tag (0x7f59378098c0) 0 empty + +Class std::forward_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::forward_iterator_tag (0x7f5937809930) 0 empty + std::input_iterator_tag (0x7f59378099a0) 0 empty + +Class std::bidirectional_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::bidirectional_iterator_tag (0x7f5937809a10) 0 empty + std::forward_iterator_tag (0x7f5937809a80) 0 empty + std::input_iterator_tag (0x7f5937809af0) 0 empty + +Class std::random_access_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::random_access_iterator_tag (0x7f5937809b60) 0 empty + std::bidirectional_iterator_tag (0x7f5937809bd0) 0 empty + std::forward_iterator_tag (0x7f5937809c40) 0 empty + std::input_iterator_tag (0x7f5937809cb0) 0 empty + +Class std::__true_type + size=1 align=1 + base size=0 base align=1 +std::__true_type (0x7f593781a2a0) 0 empty + +Class std::__false_type + size=1 align=1 + base size=0 base align=1 +std::__false_type (0x7f593781a310) 0 empty + +Class lconv + size=96 align=8 + base size=96 base align=8 +lconv (0x7f59375f6620) 0 + +Class sched_param + size=4 align=4 + base size=4 base align=4 +sched_param (0x7f59375f6a80) 0 + +Class __sched_param + size=4 align=4 + base size=4 base align=4 +__sched_param (0x7f59375f6af0) 0 + +Class tm + size=56 align=8 + base size=56 base align=8 +tm (0x7f59375f6bd0) 0 + +Class itimerspec + size=32 align=8 + base size=32 base align=8 +itimerspec (0x7f59375f6cb0) 0 + +Class _pthread_cleanup_buffer + size=32 align=8 + base size=32 base align=8 +_pthread_cleanup_buffer (0x7f59375f6d20) 0 + +Class __pthread_cleanup_frame + size=24 align=8 + base size=24 base align=8 +__pthread_cleanup_frame (0x7f59375f6e70) 0 + +Class __pthread_cleanup_class + size=24 align=8 + base size=24 base align=8 +__pthread_cleanup_class (0x7f59375f6ee0) 0 + +Vtable for __cxxabiv1::__forced_unwind +__cxxabiv1::__forced_unwind::_ZTVN10__cxxabiv115__forced_unwindE: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN10__cxxabiv115__forced_unwindE) +16 __cxxabiv1::__forced_unwind::~__forced_unwind +24 __cxxabiv1::__forced_unwind::~__forced_unwind +32 __cxa_pure_virtual + +Class __cxxabiv1::__forced_unwind + size=8 align=8 + base size=8 base align=8 +__cxxabiv1::__forced_unwind (0x7f593750ca80) 0 nearly-empty + vptr=((& __cxxabiv1::__forced_unwind::_ZTVN10__cxxabiv115__forced_unwindE) + 16u) + +Class std::locale + size=8 align=8 + base size=8 base align=8 +std::locale (0x7f59373bd5b0) 0 + +Vtable for std::locale::facet +std::locale::facet::_ZTVNSt6locale5facetE: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTINSt6locale5facetE) +16 std::locale::facet::~facet +24 std::locale::facet::~facet + +Class std::locale::facet + size=16 align=8 + base size=12 base align=8 +std::locale::facet (0x7f5937261cb0) 0 + vptr=((& std::locale::facet::_ZTVNSt6locale5facetE) + 16u) + +Class std::locale::id + size=8 align=8 + base size=8 base align=8 +std::locale::id (0x7f59372742a0) 0 + +Class std::locale::_Impl + size=40 align=8 + base size=40 base align=8 +std::locale::_Impl (0x7f59372748c0) 0 + +Vtable for std::ios_base::failure +std::ios_base::failure::_ZTVNSt8ios_base7failureE: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTINSt8ios_base7failureE) +16 std::ios_base::failure::~failure +24 std::ios_base::failure::~failure +32 std::ios_base::failure::what + +Class std::ios_base::failure + size=16 align=8 + base size=16 base align=8 +std::ios_base::failure (0x7f5937103070) 0 + vptr=((& std::ios_base::failure::_ZTVNSt8ios_base7failureE) + 16u) + std::exception (0x7f59371030e0) 0 nearly-empty + primary-for std::ios_base::failure (0x7f5937103070) + +Class std::ios_base::_Callback_list + size=24 align=8 + base size=24 base align=8 +std::ios_base::_Callback_list (0x7f5937110310) 0 + +Class std::ios_base::_Words + size=16 align=8 + base size=16 base align=8 +std::ios_base::_Words (0x7f5937110d90) 0 + +Class std::ios_base::Init + size=1 align=1 + base size=0 base align=1 +std::ios_base::Init (0x7f59371194d0) 0 empty + +Vtable for std::ios_base +std::ios_base::_ZTVSt8ios_base: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt8ios_base) +16 std::ios_base::~ios_base +24 std::ios_base::~ios_base + +Class std::ios_base + size=216 align=8 + base size=216 base align=8 +std::ios_base (0x7f5937103000) 0 + vptr=((& std::ios_base::_ZTVSt8ios_base) + 16u) + +Class std::ctype_base + size=1 align=1 + base size=0 base align=1 +std::ctype_base (0x7f5937190930) 0 empty + +Class std::__num_base + size=1 align=1 + base size=0 base align=1 +std::__num_base (0x7f59370b41c0) 0 empty + +VTT for std::basic_ostream > +std::basic_ostream >::_ZTTSo: 2u entries +0 ((& std::basic_ostream >::_ZTVSo) + 24u) +8 ((& std::basic_ostream >::_ZTVSo) + 64u) + +VTT for std::basic_ostream > +std::basic_ostream >::_ZTTSt13basic_ostreamIwSt11char_traitsIwEE: 2u entries +0 ((& std::basic_ostream >::_ZTVSt13basic_ostreamIwSt11char_traitsIwEE) + 24u) +8 ((& std::basic_ostream >::_ZTVSt13basic_ostreamIwSt11char_traitsIwEE) + 64u) + +VTT for std::basic_istream > +std::basic_istream >::_ZTTSi: 2u entries +0 ((& std::basic_istream >::_ZTVSi) + 24u) +8 ((& std::basic_istream >::_ZTVSi) + 64u) + +VTT for std::basic_istream > +std::basic_istream >::_ZTTSt13basic_istreamIwSt11char_traitsIwEE: 2u entries +0 ((& std::basic_istream >::_ZTVSt13basic_istreamIwSt11char_traitsIwEE) + 24u) +8 ((& std::basic_istream >::_ZTVSt13basic_istreamIwSt11char_traitsIwEE) + 64u) + +Construction vtable for std::basic_istream > (0x7f5936be0310 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSd0_Si: 10u entries +0 24u +8 (int (*)(...))0 +16 (int (*)(...))(& _ZTISi) +24 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = char, _Traits = std::char_traits] +32 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = char, _Traits = std::char_traits] +40 -24u +48 (int (*)(...))-0x00000000000000018 +56 (int (*)(...))(& _ZTISi) +64 std::basic_istream >::_ZTv0_n24_NSiD1Ev +72 std::basic_istream >::_ZTv0_n24_NSiD0Ev + +Construction vtable for std::basic_ostream > (0x7f5936be0460 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSd16_So: 10u entries +0 8u +8 (int (*)(...))0 +16 (int (*)(...))(& _ZTISo) +24 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = char, _Traits = std::char_traits] +32 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = char, _Traits = std::char_traits] +40 -8u +48 (int (*)(...))-0x00000000000000008 +56 (int (*)(...))(& _ZTISo) +64 std::basic_ostream >::_ZTv0_n24_NSoD1Ev +72 std::basic_ostream >::_ZTv0_n24_NSoD0Ev + +VTT for std::basic_iostream > +std::basic_iostream >::_ZTTSd: 7u entries +0 ((& std::basic_iostream >::_ZTVSd) + 24u) +8 ((& std::basic_iostream >::_ZTCSd0_Si) + 24u) +16 ((& std::basic_iostream >::_ZTCSd0_Si) + 64u) +24 ((& std::basic_iostream >::_ZTCSd16_So) + 24u) +32 ((& std::basic_iostream >::_ZTCSd16_So) + 64u) +40 ((& std::basic_iostream >::_ZTVSd) + 104u) +48 ((& std::basic_iostream >::_ZTVSd) + 64u) + +Construction vtable for std::basic_istream > (0x7f5936be0620 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E: 10u entries +0 24u +8 (int (*)(...))0 +16 (int (*)(...))(& _ZTISt13basic_istreamIwSt11char_traitsIwEE) +24 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = wchar_t, _Traits = std::char_traits] +32 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = wchar_t, _Traits = std::char_traits] +40 -24u +48 (int (*)(...))-0x00000000000000018 +56 (int (*)(...))(& _ZTISt13basic_istreamIwSt11char_traitsIwEE) +64 std::basic_istream >::_ZTv0_n24_NSt13basic_istreamIwSt11char_traitsIwEED1Ev +72 std::basic_istream >::_ZTv0_n24_NSt13basic_istreamIwSt11char_traitsIwEED0Ev + +Construction vtable for std::basic_ostream > (0x7f5936be0770 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE16_St13basic_ostreamIwS1_E: 10u entries +0 8u +8 (int (*)(...))0 +16 (int (*)(...))(& _ZTISt13basic_ostreamIwSt11char_traitsIwEE) +24 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = wchar_t, _Traits = std::char_traits] +32 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = wchar_t, _Traits = std::char_traits] +40 -8u +48 (int (*)(...))-0x00000000000000008 +56 (int (*)(...))(& _ZTISt13basic_ostreamIwSt11char_traitsIwEE) +64 std::basic_ostream >::_ZTv0_n24_NSt13basic_ostreamIwSt11char_traitsIwEED1Ev +72 std::basic_ostream >::_ZTv0_n24_NSt13basic_ostreamIwSt11char_traitsIwEED0Ev + +VTT for std::basic_iostream > +std::basic_iostream >::_ZTTSt14basic_iostreamIwSt11char_traitsIwEE: 7u entries +0 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 24u) +8 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E) + 24u) +16 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E) + 64u) +24 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE16_St13basic_ostreamIwS1_E) + 24u) +32 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE16_St13basic_ostreamIwS1_E) + 64u) +40 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 104u) +48 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 64u) + +Class QtConcurrent::BlockSizeManager + size=96 align=8 + base size=92 base align=8 +QtConcurrent::BlockSizeManager (0x7f5936c4b230) 0 + +Vtable for QFutureWatcherBase +QFutureWatcherBase::_ZTV18QFutureWatcherBase: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QFutureWatcherBase) +16 QFutureWatcherBase::metaObject +24 QFutureWatcherBase::qt_metacast +32 QFutureWatcherBase::qt_metacall +40 QFutureWatcherBase::~QFutureWatcherBase +48 QFutureWatcherBase::~QFutureWatcherBase +56 QFutureWatcherBase::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QFutureWatcherBase::connectNotify +104 QFutureWatcherBase::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual + +Class QFutureWatcherBase + size=16 align=8 + base size=16 base align=8 +QFutureWatcherBase (0x7f5936816bd0) 0 + vptr=((& QFutureWatcherBase::_ZTV18QFutureWatcherBase) + 16u) + QObject (0x7f5936816c40) 0 + primary-for QFutureWatcherBase (0x7f5936816bd0) + +Vtable for QFactoryInterface +QFactoryInterface::_ZTV17QFactoryInterface: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QFactoryInterface) +16 QFactoryInterface::~QFactoryInterface +24 QFactoryInterface::~QFactoryInterface +32 __cxa_pure_virtual + +Class QFactoryInterface + size=8 align=8 + base size=8 base align=8 +QFactoryInterface (0x7f593672de00) 0 nearly-empty + vptr=((& QFactoryInterface::_ZTV17QFactoryInterface) + 16u) + +Vtable for QTextCodecFactoryInterface +QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface: 6u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI26QTextCodecFactoryInterface) +16 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +24 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +32 __cxa_pure_virtual +40 __cxa_pure_virtual + +Class QTextCodecFactoryInterface + size=8 align=8 + base size=8 base align=8 +QTextCodecFactoryInterface (0x7f5936750ee0) 0 nearly-empty + vptr=((& QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface) + 16u) + QFactoryInterface (0x7f5936750f50) 0 nearly-empty + primary-for QTextCodecFactoryInterface (0x7f5936750ee0) + +Vtable for QTextCodecPlugin +QTextCodecPlugin::_ZTV16QTextCodecPlugin: 27u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI16QTextCodecPlugin) +16 QTextCodecPlugin::metaObject +24 QTextCodecPlugin::qt_metacast +32 QTextCodecPlugin::qt_metacall +40 QTextCodecPlugin::~QTextCodecPlugin +48 QTextCodecPlugin::~QTextCodecPlugin +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 __cxa_pure_virtual +152 QTextCodecPlugin::keys +160 QTextCodecPlugin::create +168 (int (*)(...))-0x00000000000000010 +176 (int (*)(...))(& _ZTI16QTextCodecPlugin) +184 QTextCodecPlugin::_ZThn16_N16QTextCodecPluginD1Ev +192 QTextCodecPlugin::_ZThn16_N16QTextCodecPluginD0Ev +200 QTextCodecPlugin::_ZThn16_NK16QTextCodecPlugin4keysEv +208 QTextCodecPlugin::_ZThn16_N16QTextCodecPlugin6createERK7QString + +Class QTextCodecPlugin + size=24 align=8 + base size=24 base align=8 +QTextCodecPlugin (0x7f5936753e00) 0 + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 16u) + QObject (0x7f593675c7e0) 0 + primary-for QTextCodecPlugin (0x7f5936753e00) + QTextCodecFactoryInterface (0x7f593675c850) 16 nearly-empty + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 184u) + QFactoryInterface (0x7f593675c8c0) 16 nearly-empty + primary-for QTextCodecFactoryInterface (0x7f593675c850) + +Class QLibraryInfo + size=1 align=1 + base size=0 base align=1 +QLibraryInfo (0x7f5936772700) 0 empty + +Vtable for QTranslator +QTranslator::_ZTV11QTranslator: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QTranslator) +16 QTranslator::metaObject +24 QTranslator::qt_metacast +32 QTranslator::qt_metacall +40 QTranslator::~QTranslator +48 QTranslator::~QTranslator +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QTranslator::translate +120 QTranslator::isEmpty + +Class QTranslator + size=16 align=8 + base size=16 base align=8 +QTranslator (0x7f59367b6000) 0 + vptr=((& QTranslator::_ZTV11QTranslator) + 16u) + QObject (0x7f59367b6070) 0 + primary-for QTranslator (0x7f59367b6000) + +Class __exception + size=40 align=8 + base size=40 base align=8 +__exception (0x7f59365c6f50) 0 + +Vtable for QMimeData +QMimeData::_ZTV9QMimeData: 17u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QMimeData) +16 QMimeData::metaObject +24 QMimeData::qt_metacast +32 QMimeData::qt_metacall +40 QMimeData::~QMimeData +48 QMimeData::~QMimeData +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QMimeData::hasFormat +120 QMimeData::formats +128 QMimeData::retrieveData + +Class QMimeData + size=16 align=8 + base size=16 base align=8 +QMimeData (0x7f5936633150) 0 + vptr=((& QMimeData::_ZTV9QMimeData) + 16u) + QObject (0x7f59366331c0) 0 + primary-for QMimeData (0x7f5936633150) + +Vtable for QEventLoop +QEventLoop::_ZTV10QEventLoop: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QEventLoop) +16 QEventLoop::metaObject +24 QEventLoop::qt_metacast +32 QEventLoop::qt_metacall +40 QEventLoop::~QEventLoop +48 QEventLoop::~QEventLoop +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QEventLoop + size=16 align=8 + base size=16 base align=8 +QEventLoop (0x7f593664b9a0) 0 + vptr=((& QEventLoop::_ZTV10QEventLoop) + 16u) + QObject (0x7f593664ba10) 0 + primary-for QEventLoop (0x7f593664b9a0) + +Vtable for QEvent +QEvent::_ZTV6QEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI6QEvent) +16 QEvent::~QEvent +24 QEvent::~QEvent + +Class QEvent + size=24 align=8 + base size=20 base align=8 +QEvent (0x7f593668d310) 0 + vptr=((& QEvent::_ZTV6QEvent) + 16u) + +Vtable for QTimerEvent +QTimerEvent::_ZTV11QTimerEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QTimerEvent) +16 QTimerEvent::~QTimerEvent +24 QTimerEvent::~QTimerEvent + +Class QTimerEvent + size=24 align=8 + base size=24 base align=8 +QTimerEvent (0x7f59366a5ee0) 0 + vptr=((& QTimerEvent::_ZTV11QTimerEvent) + 16u) + QEvent (0x7f59366a5f50) 0 + primary-for QTimerEvent (0x7f59366a5ee0) + +Vtable for QChildEvent +QChildEvent::_ZTV11QChildEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QChildEvent) +16 QChildEvent::~QChildEvent +24 QChildEvent::~QChildEvent + +Class QChildEvent + size=32 align=8 + base size=32 base align=8 +QChildEvent (0x7f59366a8380) 0 + vptr=((& QChildEvent::_ZTV11QChildEvent) + 16u) + QEvent (0x7f59366a83f0) 0 + primary-for QChildEvent (0x7f59366a8380) + +Vtable for QCustomEvent +QCustomEvent::_ZTV12QCustomEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QCustomEvent) +16 QCustomEvent::~QCustomEvent +24 QCustomEvent::~QCustomEvent + +Class QCustomEvent + size=24 align=8 + base size=20 base align=8 +QCustomEvent (0x7f59366ba620) 0 + vptr=((& QCustomEvent::_ZTV12QCustomEvent) + 16u) + QEvent (0x7f59366ba690) 0 + primary-for QCustomEvent (0x7f59366ba620) + +Vtable for QDynamicPropertyChangeEvent +QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI27QDynamicPropertyChangeEvent) +16 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent +24 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent + +Class QDynamicPropertyChangeEvent + size=32 align=8 + base size=32 base align=8 +QDynamicPropertyChangeEvent (0x7f59366bae00) 0 + vptr=((& QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent) + 16u) + QEvent (0x7f59366bae70) 0 + primary-for QDynamicPropertyChangeEvent (0x7f59366bae00) + +Vtable for QCoreApplication +QCoreApplication::_ZTV16QCoreApplication: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI16QCoreApplication) +16 QCoreApplication::metaObject +24 QCoreApplication::qt_metacast +32 QCoreApplication::qt_metacall +40 QCoreApplication::~QCoreApplication +48 QCoreApplication::~QCoreApplication +56 QCoreApplication::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QCoreApplication::notify +120 QCoreApplication::compressEvent + +Class QCoreApplication + size=16 align=8 + base size=16 base align=8 +QCoreApplication (0x7f59364ca230) 0 + vptr=((& QCoreApplication::_ZTV16QCoreApplication) + 16u) + QObject (0x7f59364ca2a0) 0 + primary-for QCoreApplication (0x7f59364ca230) + +Vtable for QSharedMemory +QSharedMemory::_ZTV13QSharedMemory: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QSharedMemory) +16 QSharedMemory::metaObject +24 QSharedMemory::qt_metacast +32 QSharedMemory::qt_metacall +40 QSharedMemory::~QSharedMemory +48 QSharedMemory::~QSharedMemory +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSharedMemory + size=16 align=8 + base size=16 base align=8 +QSharedMemory (0x7f59364f5a80) 0 + vptr=((& QSharedMemory::_ZTV13QSharedMemory) + 16u) + QObject (0x7f59364f5af0) 0 + primary-for QSharedMemory (0x7f59364f5a80) + +Class QModelIndex + size=24 align=8 + base size=24 base align=8 +QModelIndex (0x7f5936515850) 0 + +Class QPersistentModelIndex + size=8 align=8 + base size=8 base align=8 +QPersistentModelIndex (0x7f593653e310) 0 + +Vtable for QAbstractItemModel +QAbstractItemModel::_ZTV18QAbstractItemModel: 42u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QAbstractItemModel) +16 QAbstractItemModel::metaObject +24 QAbstractItemModel::qt_metacast +32 QAbstractItemModel::qt_metacall +40 QAbstractItemModel::~QAbstractItemModel +48 QAbstractItemModel::~QAbstractItemModel +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 QAbstractItemModel::hasChildren +152 __cxa_pure_virtual +160 QAbstractItemModel::setData +168 QAbstractItemModel::headerData +176 QAbstractItemModel::setHeaderData +184 QAbstractItemModel::itemData +192 QAbstractItemModel::setItemData +200 QAbstractItemModel::mimeTypes +208 QAbstractItemModel::mimeData +216 QAbstractItemModel::dropMimeData +224 QAbstractItemModel::supportedDropActions +232 QAbstractItemModel::insertRows +240 QAbstractItemModel::insertColumns +248 QAbstractItemModel::removeRows +256 QAbstractItemModel::removeColumns +264 QAbstractItemModel::fetchMore +272 QAbstractItemModel::canFetchMore +280 QAbstractItemModel::flags +288 QAbstractItemModel::sort +296 QAbstractItemModel::buddy +304 QAbstractItemModel::match +312 QAbstractItemModel::span +320 QAbstractItemModel::submit +328 QAbstractItemModel::revert + +Class QAbstractItemModel + size=16 align=8 + base size=16 base align=8 +QAbstractItemModel (0x7f593654c5b0) 0 + vptr=((& QAbstractItemModel::_ZTV18QAbstractItemModel) + 16u) + QObject (0x7f593654c620) 0 + primary-for QAbstractItemModel (0x7f593654c5b0) + +Vtable for QAbstractTableModel +QAbstractTableModel::_ZTV19QAbstractTableModel: 42u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QAbstractTableModel) +16 QAbstractTableModel::metaObject +24 QAbstractTableModel::qt_metacast +32 QAbstractTableModel::qt_metacall +40 QAbstractTableModel::~QAbstractTableModel +48 QAbstractTableModel::~QAbstractTableModel +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractTableModel::index +120 QAbstractTableModel::parent +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 QAbstractTableModel::hasChildren +152 __cxa_pure_virtual +160 QAbstractItemModel::setData +168 QAbstractItemModel::headerData +176 QAbstractItemModel::setHeaderData +184 QAbstractItemModel::itemData +192 QAbstractItemModel::setItemData +200 QAbstractItemModel::mimeTypes +208 QAbstractItemModel::mimeData +216 QAbstractTableModel::dropMimeData +224 QAbstractItemModel::supportedDropActions +232 QAbstractItemModel::insertRows +240 QAbstractItemModel::insertColumns +248 QAbstractItemModel::removeRows +256 QAbstractItemModel::removeColumns +264 QAbstractItemModel::fetchMore +272 QAbstractItemModel::canFetchMore +280 QAbstractItemModel::flags +288 QAbstractItemModel::sort +296 QAbstractItemModel::buddy +304 QAbstractItemModel::match +312 QAbstractItemModel::span +320 QAbstractItemModel::submit +328 QAbstractItemModel::revert + +Class QAbstractTableModel + size=16 align=8 + base size=16 base align=8 +QAbstractTableModel (0x7f593659c930) 0 + vptr=((& QAbstractTableModel::_ZTV19QAbstractTableModel) + 16u) + QAbstractItemModel (0x7f593659c9a0) 0 + primary-for QAbstractTableModel (0x7f593659c930) + QObject (0x7f593659ca10) 0 + primary-for QAbstractItemModel (0x7f593659c9a0) + +Vtable for QAbstractListModel +QAbstractListModel::_ZTV18QAbstractListModel: 42u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QAbstractListModel) +16 QAbstractListModel::metaObject +24 QAbstractListModel::qt_metacast +32 QAbstractListModel::qt_metacall +40 QAbstractListModel::~QAbstractListModel +48 QAbstractListModel::~QAbstractListModel +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractListModel::index +120 QAbstractListModel::parent +128 __cxa_pure_virtual +136 QAbstractListModel::columnCount +144 QAbstractListModel::hasChildren +152 __cxa_pure_virtual +160 QAbstractItemModel::setData +168 QAbstractItemModel::headerData +176 QAbstractItemModel::setHeaderData +184 QAbstractItemModel::itemData +192 QAbstractItemModel::setItemData +200 QAbstractItemModel::mimeTypes +208 QAbstractItemModel::mimeData +216 QAbstractListModel::dropMimeData +224 QAbstractItemModel::supportedDropActions +232 QAbstractItemModel::insertRows +240 QAbstractItemModel::insertColumns +248 QAbstractItemModel::removeRows +256 QAbstractItemModel::removeColumns +264 QAbstractItemModel::fetchMore +272 QAbstractItemModel::canFetchMore +280 QAbstractItemModel::flags +288 QAbstractItemModel::sort +296 QAbstractItemModel::buddy +304 QAbstractItemModel::match +312 QAbstractItemModel::span +320 QAbstractItemModel::submit +328 QAbstractItemModel::revert + +Class QAbstractListModel + size=16 align=8 + base size=16 base align=8 +QAbstractListModel (0x7f59365aaee0) 0 + vptr=((& QAbstractListModel::_ZTV18QAbstractListModel) + 16u) + QAbstractItemModel (0x7f59365aaf50) 0 + primary-for QAbstractListModel (0x7f59365aaee0) + QObject (0x7f59365aa230) 0 + primary-for QAbstractItemModel (0x7f59365aaf50) + +Vtable for QSignalMapper +QSignalMapper::_ZTV13QSignalMapper: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QSignalMapper) +16 QSignalMapper::metaObject +24 QSignalMapper::qt_metacast +32 QSignalMapper::qt_metacall +40 QSignalMapper::~QSignalMapper +48 QSignalMapper::~QSignalMapper +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSignalMapper + size=16 align=8 + base size=16 base align=8 +QSignalMapper (0x7f59363eb000) 0 + vptr=((& QSignalMapper::_ZTV13QSignalMapper) + 16u) + QObject (0x7f59363eb070) 0 + primary-for QSignalMapper (0x7f59363eb000) + +Vtable for QObjectCleanupHandler +QObjectCleanupHandler::_ZTV21QObjectCleanupHandler: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QObjectCleanupHandler) +16 QObjectCleanupHandler::metaObject +24 QObjectCleanupHandler::qt_metacast +32 QObjectCleanupHandler::qt_metacall +40 QObjectCleanupHandler::~QObjectCleanupHandler +48 QObjectCleanupHandler::~QObjectCleanupHandler +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QObjectCleanupHandler + size=24 align=8 + base size=24 base align=8 +QObjectCleanupHandler (0x7f59364033f0) 0 + vptr=((& QObjectCleanupHandler::_ZTV21QObjectCleanupHandler) + 16u) + QObject (0x7f5936403460) 0 + primary-for QObjectCleanupHandler (0x7f59364033f0) + +Class QBasicTimer + size=4 align=4 + base size=4 base align=4 +QBasicTimer (0x7f5936412540) 0 + +Vtable for QSocketNotifier +QSocketNotifier::_ZTV15QSocketNotifier: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QSocketNotifier) +16 QSocketNotifier::metaObject +24 QSocketNotifier::qt_metacast +32 QSocketNotifier::qt_metacall +40 QSocketNotifier::~QSocketNotifier +48 QSocketNotifier::~QSocketNotifier +56 QSocketNotifier::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSocketNotifier + size=32 align=8 + base size=25 base align=8 +QSocketNotifier (0x7f593641c930) 0 + vptr=((& QSocketNotifier::_ZTV15QSocketNotifier) + 16u) + QObject (0x7f593641c9a0) 0 + primary-for QSocketNotifier (0x7f593641c930) + +Vtable for QTimer +QTimer::_ZTV6QTimer: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI6QTimer) +16 QTimer::metaObject +24 QTimer::qt_metacast +32 QTimer::qt_metacall +40 QTimer::~QTimer +48 QTimer::~QTimer +56 QObject::event +64 QObject::eventFilter +72 QTimer::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QTimer + size=32 align=8 + base size=29 base align=8 +QTimer (0x7f593643acb0) 0 + vptr=((& QTimer::_ZTV6QTimer) + 16u) + QObject (0x7f593643ad20) 0 + primary-for QTimer (0x7f593643acb0) + +Vtable for QAbstractEventDispatcher +QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher: 27u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI24QAbstractEventDispatcher) +16 QAbstractEventDispatcher::metaObject +24 QAbstractEventDispatcher::qt_metacast +32 QAbstractEventDispatcher::qt_metacall +40 QAbstractEventDispatcher::~QAbstractEventDispatcher +48 QAbstractEventDispatcher::~QAbstractEventDispatcher +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 __cxa_pure_virtual +152 __cxa_pure_virtual +160 __cxa_pure_virtual +168 __cxa_pure_virtual +176 __cxa_pure_virtual +184 __cxa_pure_virtual +192 __cxa_pure_virtual +200 QAbstractEventDispatcher::startingUp +208 QAbstractEventDispatcher::closingDown + +Class QAbstractEventDispatcher + size=16 align=8 + base size=16 base align=8 +QAbstractEventDispatcher (0x7f593645e2a0) 0 + vptr=((& QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher) + 16u) + QObject (0x7f593645e310) 0 + primary-for QAbstractEventDispatcher (0x7f593645e2a0) + +Class QMetaMethod + size=16 align=8 + base size=12 base align=8 +QMetaMethod (0x7f5936479150) 0 + +Class QMetaEnum + size=16 align=8 + base size=12 base align=8 +QMetaEnum (0x7f59364955b0) 0 + +Class QMetaProperty + size=32 align=8 + base size=32 base align=8 +QMetaProperty (0x7f59364a0310) 0 + +Class QMetaClassInfo + size=16 align=8 + base size=12 base align=8 +QMetaClassInfo (0x7f59364a09a0) 0 + +Class QSystemSemaphore + size=8 align=8 + base size=8 base align=8 +QSystemSemaphore (0x7f59364b24d0) 0 + +Vtable for QLibrary +QLibrary::_ZTV8QLibrary: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI8QLibrary) +16 QLibrary::metaObject +24 QLibrary::qt_metacast +32 QLibrary::qt_metacall +40 QLibrary::~QLibrary +48 QLibrary::~QLibrary +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QLibrary + size=32 align=8 + base size=25 base align=8 +QLibrary (0x7f59364b2e00) 0 + vptr=((& QLibrary::_ZTV8QLibrary) + 16u) + QObject (0x7f59364b2e70) 0 + primary-for QLibrary (0x7f59364b2e00) + +Vtable for QPluginLoader +QPluginLoader::_ZTV13QPluginLoader: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QPluginLoader) +16 QPluginLoader::metaObject +24 QPluginLoader::qt_metacast +32 QPluginLoader::qt_metacall +40 QPluginLoader::~QPluginLoader +48 QPluginLoader::~QPluginLoader +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QPluginLoader + size=32 align=8 + base size=25 base align=8 +QPluginLoader (0x7f59362f98c0) 0 + vptr=((& QPluginLoader::_ZTV13QPluginLoader) + 16u) + QObject (0x7f59362f9930) 0 + primary-for QPluginLoader (0x7f59362f98c0) + +Class QUuid + size=16 align=4 + base size=16 base align=4 +QUuid (0x7f593631d070) 0 + +Class QSemaphore + size=8 align=8 + base size=8 base align=8 +QSemaphore (0x7f593633c9a0) 0 + +Class QThreadStorageData + size=4 align=4 + base size=4 base align=4 +QThreadStorageData (0x7f593633cee0) 0 + +Class QReadWriteLock + size=8 align=8 + base size=8 base align=8 +QReadWriteLock (0x7f593634e690) 0 + +Class QReadLocker + size=8 align=8 + base size=8 base align=8 +QReadLocker (0x7f593634ed20) 0 + +Class QWriteLocker + size=8 align=8 + base size=8 base align=8 +QWriteLocker (0x7f593637b0e0) 0 + +Class QSslCertificate + size=8 align=8 + base size=8 base align=8 +QSslCertificate (0x7f593638d460) 0 + +Class QSslError + size=8 align=8 + base size=8 base align=8 +QSslError (0x7f59363a0ee0) 0 + +Class QSslCipher + size=8 align=8 + base size=8 base align=8 +QSslCipher (0x7f59363adcb0) 0 + +Vtable for QAbstractSocket +QAbstractSocket::_ZTV15QAbstractSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QAbstractSocket) +16 QAbstractSocket::metaObject +24 QAbstractSocket::qt_metacast +32 QAbstractSocket::qt_metacall +40 QAbstractSocket::~QAbstractSocket +48 QAbstractSocket::~QAbstractSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QAbstractSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QAbstractSocket::atEnd +168 QIODevice::reset +176 QAbstractSocket::bytesAvailable +184 QAbstractSocket::bytesToWrite +192 QAbstractSocket::canReadLine +200 QAbstractSocket::waitForReadyRead +208 QAbstractSocket::waitForBytesWritten +216 QAbstractSocket::readData +224 QAbstractSocket::readLineData +232 QAbstractSocket::writeData + +Class QAbstractSocket + size=16 align=8 + base size=16 base align=8 +QAbstractSocket (0x7f59363ba620) 0 + vptr=((& QAbstractSocket::_ZTV15QAbstractSocket) + 16u) + QIODevice (0x7f59363ba690) 0 + primary-for QAbstractSocket (0x7f59363ba620) + QObject (0x7f59363ba700) 0 + primary-for QIODevice (0x7f59363ba690) + +Vtable for QTcpSocket +QTcpSocket::_ZTV10QTcpSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QTcpSocket) +16 QTcpSocket::metaObject +24 QTcpSocket::qt_metacast +32 QTcpSocket::qt_metacall +40 QTcpSocket::~QTcpSocket +48 QTcpSocket::~QTcpSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QAbstractSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QAbstractSocket::atEnd +168 QIODevice::reset +176 QAbstractSocket::bytesAvailable +184 QAbstractSocket::bytesToWrite +192 QAbstractSocket::canReadLine +200 QAbstractSocket::waitForReadyRead +208 QAbstractSocket::waitForBytesWritten +216 QAbstractSocket::readData +224 QAbstractSocket::readLineData +232 QAbstractSocket::writeData + +Class QTcpSocket + size=16 align=8 + base size=16 base align=8 +QTcpSocket (0x7f59361f3cb0) 0 + vptr=((& QTcpSocket::_ZTV10QTcpSocket) + 16u) + QAbstractSocket (0x7f59361f3d20) 0 + primary-for QTcpSocket (0x7f59361f3cb0) + QIODevice (0x7f59361f3d90) 0 + primary-for QAbstractSocket (0x7f59361f3d20) + QObject (0x7f59361f3e00) 0 + primary-for QIODevice (0x7f59361f3d90) + +Vtable for QSslSocket +QSslSocket::_ZTV10QSslSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QSslSocket) +16 QSslSocket::metaObject +24 QSslSocket::qt_metacast +32 QSslSocket::qt_metacall +40 QSslSocket::~QSslSocket +48 QSslSocket::~QSslSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QSslSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QSslSocket::atEnd +168 QIODevice::reset +176 QSslSocket::bytesAvailable +184 QSslSocket::bytesToWrite +192 QSslSocket::canReadLine +200 QSslSocket::waitForReadyRead +208 QSslSocket::waitForBytesWritten +216 QSslSocket::readData +224 QAbstractSocket::readLineData +232 QSslSocket::writeData + +Class QSslSocket + size=16 align=8 + base size=16 base align=8 +QSslSocket (0x7f593620f770) 0 + vptr=((& QSslSocket::_ZTV10QSslSocket) + 16u) + QTcpSocket (0x7f593620f7e0) 0 + primary-for QSslSocket (0x7f593620f770) + QAbstractSocket (0x7f593620f850) 0 + primary-for QTcpSocket (0x7f593620f7e0) + QIODevice (0x7f593620f8c0) 0 + primary-for QAbstractSocket (0x7f593620f850) + QObject (0x7f593620f930) 0 + primary-for QIODevice (0x7f593620f8c0) + +Class QSslConfiguration + size=8 align=8 + base size=8 base align=8 +QSslConfiguration (0x7f59362454d0) 0 + +Class QSslKey + size=8 align=8 + base size=8 base align=8 +QSslKey (0x7f59362562a0) 0 + +Vtable for QHttpHeader +QHttpHeader::_ZTV11QHttpHeader: 8u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QHttpHeader) +16 QHttpHeader::~QHttpHeader +24 QHttpHeader::~QHttpHeader +32 QHttpHeader::toString +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 QHttpHeader::parseLine + +Class QHttpHeader + size=16 align=8 + base size=16 base align=8 +QHttpHeader (0x7f5936256e00) 0 + vptr=((& QHttpHeader::_ZTV11QHttpHeader) + 16u) + +Vtable for QHttpResponseHeader +QHttpResponseHeader::_ZTV19QHttpResponseHeader: 8u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QHttpResponseHeader) +16 QHttpResponseHeader::~QHttpResponseHeader +24 QHttpResponseHeader::~QHttpResponseHeader +32 QHttpResponseHeader::toString +40 QHttpResponseHeader::majorVersion +48 QHttpResponseHeader::minorVersion +56 QHttpResponseHeader::parseLine + +Class QHttpResponseHeader + size=16 align=8 + base size=16 base align=8 +QHttpResponseHeader (0x7f5936270a80) 0 + vptr=((& QHttpResponseHeader::_ZTV19QHttpResponseHeader) + 16u) + QHttpHeader (0x7f5936270af0) 0 + primary-for QHttpResponseHeader (0x7f5936270a80) + +Vtable for QHttpRequestHeader +QHttpRequestHeader::_ZTV18QHttpRequestHeader: 8u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QHttpRequestHeader) +16 QHttpRequestHeader::~QHttpRequestHeader +24 QHttpRequestHeader::~QHttpRequestHeader +32 QHttpRequestHeader::toString +40 QHttpRequestHeader::majorVersion +48 QHttpRequestHeader::minorVersion +56 QHttpRequestHeader::parseLine + +Class QHttpRequestHeader + size=16 align=8 + base size=16 base align=8 +QHttpRequestHeader (0x7f5936281770) 0 + vptr=((& QHttpRequestHeader::_ZTV18QHttpRequestHeader) + 16u) + QHttpHeader (0x7f59362817e0) 0 + primary-for QHttpRequestHeader (0x7f5936281770) + +Vtable for QHttp +QHttp::_ZTV5QHttp: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI5QHttp) +16 QHttp::metaObject +24 QHttp::qt_metacast +32 QHttp::qt_metacall +40 QHttp::~QHttp +48 QHttp::~QHttp +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QHttp + size=16 align=8 + base size=16 base align=8 +QHttp (0x7f5936295310) 0 + vptr=((& QHttp::_ZTV5QHttp) + 16u) + QObject (0x7f5936295380) 0 + primary-for QHttp (0x7f5936295310) + +Class QNetworkRequest + size=8 align=8 + base size=8 base align=8 +QNetworkRequest (0x7f59362c2540) 0 + +Vtable for QNetworkAccessManager +QNetworkAccessManager::_ZTV21QNetworkAccessManager: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QNetworkAccessManager) +16 QNetworkAccessManager::metaObject +24 QNetworkAccessManager::qt_metacast +32 QNetworkAccessManager::qt_metacall +40 QNetworkAccessManager::~QNetworkAccessManager +48 QNetworkAccessManager::~QNetworkAccessManager +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkAccessManager::createRequest + +Class QNetworkAccessManager + size=16 align=8 + base size=16 base align=8 +QNetworkAccessManager (0x7f59360dc460) 0 + vptr=((& QNetworkAccessManager::_ZTV21QNetworkAccessManager) + 16u) + QObject (0x7f59360dc4d0) 0 + primary-for QNetworkAccessManager (0x7f59360dc460) + +Class QNetworkCookie + size=8 align=8 + base size=8 base align=8 +QNetworkCookie (0x7f59360fa9a0) 0 + +Vtable for QNetworkCookieJar +QNetworkCookieJar::_ZTV17QNetworkCookieJar: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QNetworkCookieJar) +16 QNetworkCookieJar::metaObject +24 QNetworkCookieJar::qt_metacast +32 QNetworkCookieJar::qt_metacall +40 QNetworkCookieJar::~QNetworkCookieJar +48 QNetworkCookieJar::~QNetworkCookieJar +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkCookieJar::cookiesForUrl +120 QNetworkCookieJar::setCookiesFromUrl + +Class QNetworkCookieJar + size=16 align=8 + base size=16 base align=8 +QNetworkCookieJar (0x7f59360ffaf0) 0 + vptr=((& QNetworkCookieJar::_ZTV17QNetworkCookieJar) + 16u) + QObject (0x7f59360ffb60) 0 + primary-for QNetworkCookieJar (0x7f59360ffaf0) + +Vtable for QNetworkReply +QNetworkReply::_ZTV13QNetworkReply: 33u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QNetworkReply) +16 QNetworkReply::metaObject +24 QNetworkReply::qt_metacast +32 QNetworkReply::qt_metacall +40 QNetworkReply::~QNetworkReply +48 QNetworkReply::~QNetworkReply +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkReply::isSequential +120 QIODevice::open +128 QNetworkReply::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QIODevice::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 __cxa_pure_virtual +224 QIODevice::readLineData +232 QNetworkReply::writeData +240 __cxa_pure_virtual +248 QNetworkReply::setReadBufferSize +256 QNetworkReply::ignoreSslErrors + +Class QNetworkReply + size=16 align=8 + base size=16 base align=8 +QNetworkReply (0x7f59361309a0) 0 + vptr=((& QNetworkReply::_ZTV13QNetworkReply) + 16u) + QIODevice (0x7f5936130a10) 0 + primary-for QNetworkReply (0x7f59361309a0) + QObject (0x7f5936130a80) 0 + primary-for QIODevice (0x7f5936130a10) + +Vtable for QUrlInfo +QUrlInfo::_ZTV8QUrlInfo: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI8QUrlInfo) +16 QUrlInfo::~QUrlInfo +24 QUrlInfo::~QUrlInfo +32 QUrlInfo::setName +40 QUrlInfo::setDir +48 QUrlInfo::setFile +56 QUrlInfo::setSymLink +64 QUrlInfo::setOwner +72 QUrlInfo::setGroup +80 QUrlInfo::setSize +88 QUrlInfo::setWritable +96 QUrlInfo::setReadable +104 QUrlInfo::setPermissions +112 QUrlInfo::setLastModified + +Class QUrlInfo + size=16 align=8 + base size=16 base align=8 +QUrlInfo (0x7f593615a620) 0 + vptr=((& QUrlInfo::_ZTV8QUrlInfo) + 16u) + +Vtable for QFtp +QFtp::_ZTV4QFtp: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI4QFtp) +16 QFtp::metaObject +24 QFtp::qt_metacast +32 QFtp::qt_metacall +40 QFtp::~QFtp +48 QFtp::~QFtp +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QFtp + size=16 align=8 + base size=16 base align=8 +QFtp (0x7f593616b5b0) 0 + vptr=((& QFtp::_ZTV4QFtp) + 16u) + QObject (0x7f593616b620) 0 + primary-for QFtp (0x7f593616b5b0) + +Class QNetworkCacheMetaData + size=8 align=8 + base size=8 base align=8 +QNetworkCacheMetaData (0x7f5936199bd0) 0 + +Vtable for QAbstractNetworkCache +QAbstractNetworkCache::_ZTV21QAbstractNetworkCache: 22u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QAbstractNetworkCache) +16 QAbstractNetworkCache::metaObject +24 QAbstractNetworkCache::qt_metacast +32 QAbstractNetworkCache::qt_metacall +40 QAbstractNetworkCache::~QAbstractNetworkCache +48 QAbstractNetworkCache::~QAbstractNetworkCache +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 __cxa_pure_virtual +152 __cxa_pure_virtual +160 __cxa_pure_virtual +168 __cxa_pure_virtual + +Class QAbstractNetworkCache + size=16 align=8 + base size=16 base align=8 +QAbstractNetworkCache (0x7f593619dee0) 0 + vptr=((& QAbstractNetworkCache::_ZTV21QAbstractNetworkCache) + 16u) + QObject (0x7f593619df50) 0 + primary-for QAbstractNetworkCache (0x7f593619dee0) + +Vtable for QNetworkDiskCache +QNetworkDiskCache::_ZTV17QNetworkDiskCache: 23u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QNetworkDiskCache) +16 QNetworkDiskCache::metaObject +24 QNetworkDiskCache::qt_metacast +32 QNetworkDiskCache::qt_metacall +40 QNetworkDiskCache::~QNetworkDiskCache +48 QNetworkDiskCache::~QNetworkDiskCache +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkDiskCache::metaData +120 QNetworkDiskCache::updateMetaData +128 QNetworkDiskCache::data +136 QNetworkDiskCache::remove +144 QNetworkDiskCache::cacheSize +152 QNetworkDiskCache::prepare +160 QNetworkDiskCache::insert +168 QNetworkDiskCache::clear +176 QNetworkDiskCache::expire + +Class QNetworkDiskCache + size=16 align=8 + base size=16 base align=8 +QNetworkDiskCache (0x7f5935fca850) 0 + vptr=((& QNetworkDiskCache::_ZTV17QNetworkDiskCache) + 16u) + QAbstractNetworkCache (0x7f5935fca8c0) 0 + primary-for QNetworkDiskCache (0x7f5935fca850) + QObject (0x7f5935fca930) 0 + primary-for QAbstractNetworkCache (0x7f5935fca8c0) + +Class QIPv6Address + size=16 align=1 + base size=16 base align=1 +QIPv6Address (0x7f5935fe71c0) 0 + +Class QHostAddress + size=8 align=8 + base size=8 base align=8 +QHostAddress (0x7f5935fe77e0) 0 + +Class QNetworkAddressEntry + size=8 align=8 + base size=8 base align=8 +QNetworkAddressEntry (0x7f593600f770) 0 + +Class QNetworkInterface + size=8 align=8 + base size=8 base align=8 +QNetworkInterface (0x7f5936020000) 0 + +Class QAuthenticator + size=8 align=8 + base size=8 base align=8 +QAuthenticator (0x7f593604ed20) 0 + +Class QHostInfo + size=8 align=8 + base size=8 base align=8 +QHostInfo (0x7f593605d620) 0 + +Class QNetworkProxyQuery + size=8 align=8 + base size=8 base align=8 +QNetworkProxyQuery (0x7f593605de70) 0 + +Class QNetworkProxy + size=8 align=8 + base size=8 base align=8 +QNetworkProxy (0x7f593608a150) 0 + +Vtable for QNetworkProxyFactory +QNetworkProxyFactory::_ZTV20QNetworkProxyFactory: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QNetworkProxyFactory) +16 QNetworkProxyFactory::~QNetworkProxyFactory +24 QNetworkProxyFactory::~QNetworkProxyFactory +32 __cxa_pure_virtual + +Class QNetworkProxyFactory + size=8 align=8 + base size=8 base align=8 +QNetworkProxyFactory (0x7f5935ece5b0) 0 nearly-empty + vptr=((& QNetworkProxyFactory::_ZTV20QNetworkProxyFactory) + 16u) + +Vtable for QLocalServer +QLocalServer::_ZTV12QLocalServer: 17u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QLocalServer) +16 QLocalServer::metaObject +24 QLocalServer::qt_metacast +32 QLocalServer::qt_metacall +40 QLocalServer::~QLocalServer +48 QLocalServer::~QLocalServer +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QLocalServer::hasPendingConnections +120 QLocalServer::nextPendingConnection +128 QLocalServer::incomingConnection + +Class QLocalServer + size=16 align=8 + base size=16 base align=8 +QLocalServer (0x7f5935ece8c0) 0 + vptr=((& QLocalServer::_ZTV12QLocalServer) + 16u) + QObject (0x7f5935ece930) 0 + primary-for QLocalServer (0x7f5935ece8c0) + +Vtable for QLocalSocket +QLocalSocket::_ZTV12QLocalSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QLocalSocket) +16 QLocalSocket::metaObject +24 QLocalSocket::qt_metacast +32 QLocalSocket::qt_metacall +40 QLocalSocket::~QLocalSocket +48 QLocalSocket::~QLocalSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QLocalSocket::isSequential +120 QIODevice::open +128 QLocalSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QIODevice::atEnd +168 QIODevice::reset +176 QLocalSocket::bytesAvailable +184 QLocalSocket::bytesToWrite +192 QLocalSocket::canReadLine +200 QLocalSocket::waitForReadyRead +208 QLocalSocket::waitForBytesWritten +216 QLocalSocket::readData +224 QIODevice::readLineData +232 QLocalSocket::writeData + +Class QLocalSocket + size=16 align=8 + base size=16 base align=8 +QLocalSocket (0x7f5935eef2a0) 0 + vptr=((& QLocalSocket::_ZTV12QLocalSocket) + 16u) + QIODevice (0x7f5935eef310) 0 + primary-for QLocalSocket (0x7f5935eef2a0) + QObject (0x7f5935eef380) 0 + primary-for QIODevice (0x7f5935eef310) + +Vtable for QTcpServer +QTcpServer::_ZTV10QTcpServer: 17u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QTcpServer) +16 QTcpServer::metaObject +24 QTcpServer::qt_metacast +32 QTcpServer::qt_metacall +40 QTcpServer::~QTcpServer +48 QTcpServer::~QTcpServer +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QTcpServer::hasPendingConnections +120 QTcpServer::nextPendingConnection +128 QTcpServer::incomingConnection + +Class QTcpServer + size=16 align=8 + base size=16 base align=8 +QTcpServer (0x7f5935f12460) 0 + vptr=((& QTcpServer::_ZTV10QTcpServer) + 16u) + QObject (0x7f5935f124d0) 0 + primary-for QTcpServer (0x7f5935f12460) + +Vtable for QUdpSocket +QUdpSocket::_ZTV10QUdpSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QUdpSocket) +16 QUdpSocket::metaObject +24 QUdpSocket::qt_metacast +32 QUdpSocket::qt_metacall +40 QUdpSocket::~QUdpSocket +48 QUdpSocket::~QUdpSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QAbstractSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QAbstractSocket::atEnd +168 QIODevice::reset +176 QAbstractSocket::bytesAvailable +184 QAbstractSocket::bytesToWrite +192 QAbstractSocket::canReadLine +200 QAbstractSocket::waitForReadyRead +208 QAbstractSocket::waitForBytesWritten +216 QAbstractSocket::readData +224 QAbstractSocket::readLineData +232 QAbstractSocket::writeData + +Class QUdpSocket + size=16 align=8 + base size=16 base align=8 +QUdpSocket (0x7f5935f25f50) 0 + vptr=((& QUdpSocket::_ZTV10QUdpSocket) + 16u) + QAbstractSocket (0x7f5935f2e000) 0 + primary-for QUdpSocket (0x7f5935f25f50) + QIODevice (0x7f5935f2e070) 0 + primary-for QAbstractSocket (0x7f5935f2e000) + QObject (0x7f5935f2e0e0) 0 + primary-for QIODevice (0x7f5935f2e070) + +Class QXmlName + size=8 align=8 + base size=8 base align=8 +QXmlName (0x7f5935f62cb0) 0 + +Class QPatternist::NodeIndexStorage + size=24 align=8 + base size=24 base align=8 +QPatternist::NodeIndexStorage (0x7f5935f8f0e0) 0 + +Class QXmlNodeModelIndex + size=24 align=8 + base size=24 base align=8 +QXmlNodeModelIndex (0x7f5935f8f850) 0 + +Vtable for QAbstractXmlNodeModel +QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel: 24u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QAbstractXmlNodeModel) +16 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +24 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 __cxa_pure_virtual +64 __cxa_pure_virtual +72 __cxa_pure_virtual +80 __cxa_pure_virtual +88 __cxa_pure_virtual +96 QAbstractXmlNodeModel::iterate +104 QAbstractXmlNodeModel::sequencedTypedValue +112 QAbstractXmlNodeModel::type +120 QAbstractXmlNodeModel::namespaceForPrefix +128 QAbstractXmlNodeModel::isDeepEqual +136 QAbstractXmlNodeModel::sendNamespaces +144 __cxa_pure_virtual +152 __cxa_pure_virtual +160 __cxa_pure_virtual +168 QAbstractXmlNodeModel::copyNodeTo +176 __cxa_pure_virtual +184 __cxa_pure_virtual + +Class QAbstractXmlNodeModel + size=24 align=8 + base size=24 base align=8 +QAbstractXmlNodeModel (0x7f5935df0e70) 0 + vptr=((& QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel) + 16u) + QSharedData (0x7f5935df0ee0) 8 + +Class QXmlItem + size=24 align=8 + base size=24 base align=8 +QXmlItem (0x7f5935e07a80) 0 + +Vtable for QAbstractXmlReceiver +QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QAbstractXmlReceiver) +16 QAbstractXmlReceiver::~QAbstractXmlReceiver +24 QAbstractXmlReceiver::~QAbstractXmlReceiver +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 __cxa_pure_virtual +64 __cxa_pure_virtual +72 __cxa_pure_virtual +80 __cxa_pure_virtual +88 __cxa_pure_virtual +96 __cxa_pure_virtual +104 __cxa_pure_virtual +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 QAbstractXmlReceiver::whitespaceOnly +136 QAbstractXmlReceiver::item + +Class QAbstractXmlReceiver + size=16 align=8 + base size=16 base align=8 +QAbstractXmlReceiver (0x7f5935e16a10) 0 + vptr=((& QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver) + 16u) + +Vtable for QXmlSerializer +QXmlSerializer::_ZTV14QXmlSerializer: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI14QXmlSerializer) +16 QXmlSerializer::~QXmlSerializer +24 QXmlSerializer::~QXmlSerializer +32 QXmlSerializer::startElement +40 QXmlSerializer::endElement +48 QXmlSerializer::attribute +56 QXmlSerializer::comment +64 QXmlSerializer::characters +72 QXmlSerializer::startDocument +80 QXmlSerializer::endDocument +88 QXmlSerializer::processingInstruction +96 QXmlSerializer::atomicValue +104 QXmlSerializer::namespaceBinding +112 QXmlSerializer::startOfSequence +120 QXmlSerializer::endOfSequence +128 QAbstractXmlReceiver::whitespaceOnly +136 QXmlSerializer::item + +Class QXmlSerializer + size=16 align=8 + base size=16 base align=8 +QXmlSerializer (0x7f5935e2e1c0) 0 + vptr=((& QXmlSerializer::_ZTV14QXmlSerializer) + 16u) + QAbstractXmlReceiver (0x7f5935e2e230) 0 + primary-for QXmlSerializer (0x7f5935e2e1c0) + +Class QSourceLocation + size=24 align=8 + base size=24 base align=8 +QSourceLocation (0x7f5935e2e930) 0 + +Vtable for QAbstractMessageHandler +QAbstractMessageHandler::_ZTV23QAbstractMessageHandler: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI23QAbstractMessageHandler) +16 QAbstractMessageHandler::metaObject +24 QAbstractMessageHandler::qt_metacast +32 QAbstractMessageHandler::qt_metacall +40 QAbstractMessageHandler::~QAbstractMessageHandler +48 QAbstractMessageHandler::~QAbstractMessageHandler +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual + +Class QAbstractMessageHandler + size=16 align=8 + base size=16 base align=8 +QAbstractMessageHandler (0x7f5935e49540) 0 + vptr=((& QAbstractMessageHandler::_ZTV23QAbstractMessageHandler) + 16u) + QObject (0x7f5935e495b0) 0 + primary-for QAbstractMessageHandler (0x7f5935e49540) + +Class QXmlNamePool + size=8 align=8 + base size=8 base align=8 +QXmlNamePool (0x7f5935e64ee0) 0 + +Class QXmlQuery + size=8 align=8 + base size=8 base align=8 +QXmlQuery (0x7f5935e6c540) 0 + +Vtable for QAbstractUriResolver +QAbstractUriResolver::_ZTV20QAbstractUriResolver: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QAbstractUriResolver) +16 QAbstractUriResolver::metaObject +24 QAbstractUriResolver::qt_metacast +32 QAbstractUriResolver::qt_metacall +40 QAbstractUriResolver::~QAbstractUriResolver +48 QAbstractUriResolver::~QAbstractUriResolver +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual + +Class QAbstractUriResolver + size=16 align=8 + base size=16 base align=8 +QAbstractUriResolver (0x7f5935e8d150) 0 + vptr=((& QAbstractUriResolver::_ZTV20QAbstractUriResolver) + 16u) + QObject (0x7f5935e8d1c0) 0 + primary-for QAbstractUriResolver (0x7f5935e8d150) + +Vtable for QSimpleXmlNodeModel +QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel: 24u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QSimpleXmlNodeModel) +16 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +24 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +32 QSimpleXmlNodeModel::baseUri +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 __cxa_pure_virtual +64 __cxa_pure_virtual +72 __cxa_pure_virtual +80 QSimpleXmlNodeModel::stringValue +88 __cxa_pure_virtual +96 QAbstractXmlNodeModel::iterate +104 QAbstractXmlNodeModel::sequencedTypedValue +112 QAbstractXmlNodeModel::type +120 QAbstractXmlNodeModel::namespaceForPrefix +128 QAbstractXmlNodeModel::isDeepEqual +136 QAbstractXmlNodeModel::sendNamespaces +144 QSimpleXmlNodeModel::namespaceBindings +152 QSimpleXmlNodeModel::elementById +160 QSimpleXmlNodeModel::nodesByIdref +168 QAbstractXmlNodeModel::copyNodeTo +176 __cxa_pure_virtual +184 __cxa_pure_virtual + +Class QSimpleXmlNodeModel + size=24 align=8 + base size=24 base align=8 +QSimpleXmlNodeModel (0x7f5935e9da10) 0 + vptr=((& QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel) + 16u) + QAbstractXmlNodeModel (0x7f5935e9da80) 0 + primary-for QSimpleXmlNodeModel (0x7f5935e9da10) + QSharedData (0x7f5935e9daf0) 8 + +Vtable for QXmlFormatter +QXmlFormatter::_ZTV13QXmlFormatter: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QXmlFormatter) +16 QXmlFormatter::~QXmlFormatter +24 QXmlFormatter::~QXmlFormatter +32 QXmlFormatter::startElement +40 QXmlFormatter::endElement +48 QXmlFormatter::attribute +56 QXmlFormatter::comment +64 QXmlFormatter::characters +72 QXmlFormatter::startDocument +80 QXmlFormatter::endDocument +88 QXmlFormatter::processingInstruction +96 QXmlFormatter::atomicValue +104 QXmlSerializer::namespaceBinding +112 QXmlFormatter::startOfSequence +120 QXmlFormatter::endOfSequence +128 QAbstractXmlReceiver::whitespaceOnly +136 QXmlFormatter::item + +Class QXmlFormatter + size=16 align=8 + base size=16 base align=8 +QXmlFormatter (0x7f5935eab1c0) 0 + vptr=((& QXmlFormatter::_ZTV13QXmlFormatter) + 16u) + QXmlSerializer (0x7f5935eab230) 0 + primary-for QXmlFormatter (0x7f5935eab1c0) + QAbstractXmlReceiver (0x7f5935eab2a0) 0 + primary-for QXmlSerializer (0x7f5935eab230) + +Vtable for QXmlResultItems +QXmlResultItems::_ZTV15QXmlResultItems: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QXmlResultItems) +16 QXmlResultItems::~QXmlResultItems +24 QXmlResultItems::~QXmlResultItems + +Class QXmlResultItems + size=16 align=8 + base size=16 base align=8 +QXmlResultItems (0x7f5935eab930) 0 + vptr=((& QXmlResultItems::_ZTV15QXmlResultItems) + 16u) + diff --git a/tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-ia32.txt new file mode 100644 index 0000000..7871fa3 --- /dev/null +++ b/tests/auto/bic/data/QtXmlPatterns.4.5.0.linux-gcc-ia32.txt @@ -0,0 +1,2600 @@ +Class QSysInfo + size=1 align=1 + base size=0 base align=1 +QSysInfo (0xb6ee1bb8) 0 empty + +Class QBool + size=1 align=1 + base size=1 base align=1 +QBool (0xb6ee1d5c) 0 + +Class qIsNull(double)::U + size=8 align=4 + base size=8 base align=4 +qIsNull(double)::U (0xb6e99438) 0 + +Class qIsNull(float)::U + size=4 align=4 + base size=4 base align=4 +qIsNull(float)::U (0xb6e994ec) 0 + +Class QFlag + size=4 align=4 + base size=4 base align=4 +QFlag (0xb6e99d20) 0 + +Class QIncompatibleFlag + size=4 align=4 + base size=4 base align=4 +QIncompatibleFlag (0xb6e99e4c) 0 + +Class QInternal + size=1 align=1 + base size=0 base align=1 +QInternal (0xb6527ce4) 0 empty + +Class QGenericArgument + size=8 align=4 + base size=8 base align=4 +QGenericArgument (0xb6527d20) 0 + +Class QGenericReturnArgument + size=8 align=4 + base size=8 base align=4 +QGenericReturnArgument (0xb65b6e00) 0 + QGenericArgument (0xb6527f3c) 0 + +Class QMetaObject + size=16 align=4 + base size=16 base align=4 +QMetaObject (0xb64320b4) 0 + +Class QMetaObjectExtraData + size=8 align=4 + base size=8 base align=4 +QMetaObjectExtraData (0xb64321e0) 0 + +Class QLatin1Char + size=1 align=1 + base size=1 base align=1 +QLatin1Char (0xb64323c0) 0 + +Class QChar + size=2 align=2 + base size=2 base align=2 +QChar (0xb64325a0) 0 + +Class QBasicAtomicInt + size=4 align=4 + base size=4 base align=4 +QBasicAtomicInt (0xb6479ce4) 0 + +Class QAtomicInt + size=4 align=4 + base size=4 base align=4 +QAtomicInt (0xb64ab400) 0 + QBasicAtomicInt (0xb649a3fc) 0 + +Class __locale_struct + size=116 align=4 + base size=116 base align=4 +__locale_struct (0xb649a8e8) 0 + +Class QByteArray::Data + size=20 align=4 + base size=20 base align=4 +QByteArray::Data (0xb649ad5c) 0 + +Class QByteArray + size=4 align=4 + base size=4 base align=4 +QByteArray (0xb649ad20) 0 + +Class QByteRef + size=8 align=4 + base size=8 base align=4 +QByteRef (0xb631ec30) 0 + +Class QString::Null + size=1 align=1 + base size=0 base align=1 +QString::Null (0xb63694ec) 0 empty + +Class QString::Data + size=20 align=4 + base size=20 base align=4 +QString::Data (0xb6369528) 0 + +Class QString + size=4 align=4 + base size=4 base align=4 +QString (0xb63694b0) 0 + +Class QLatin1String + size=4 align=4 + base size=4 base align=4 +QLatin1String (0xb6235078) 0 + +Class QCharRef + size=8 align=4 + base size=8 base align=4 +QCharRef (0xb6279d5c) 0 + +Class QConstString + size=4 align=4 + base size=4 base align=4 +QConstString (0xb60fdcc0) 0 + QString (0xb61394b0) 0 + +Class QStringRef + size=12 align=4 + base size=12 base align=4 +QStringRef (0xb61398e8) 0 + +Vtable for std::exception +std::exception::_ZTVSt9exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9exception) +8 std::exception::~exception +12 std::exception::~exception +16 std::exception::what + +Class std::exception + size=4 align=4 + base size=4 base align=4 +std::exception (0xb617899c) 0 nearly-empty + vptr=((& std::exception::_ZTVSt9exception) + 8u) + +Vtable for std::bad_exception +std::bad_exception::_ZTVSt13bad_exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt13bad_exception) +8 std::bad_exception::~bad_exception +12 std::bad_exception::~bad_exception +16 std::bad_exception::what + +Class std::bad_exception + size=4 align=4 + base size=4 base align=4 +std::bad_exception (0xb61b1b00) 0 nearly-empty + vptr=((& std::bad_exception::_ZTVSt13bad_exception) + 8u) + std::exception (0xb6178a8c) 0 nearly-empty + primary-for std::bad_exception (0xb61b1b00) + +Vtable for std::bad_alloc +std::bad_alloc::_ZTVSt9bad_alloc: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9bad_alloc) +8 std::bad_alloc::~bad_alloc +12 std::bad_alloc::~bad_alloc +16 std::bad_alloc::what + +Class std::bad_alloc + size=4 align=4 + base size=4 base align=4 +std::bad_alloc (0xb61b1c80) 0 nearly-empty + vptr=((& std::bad_alloc::_ZTVSt9bad_alloc) + 8u) + std::exception (0xb6178ce4) 0 nearly-empty + primary-for std::bad_alloc (0xb61b1c80) + +Class std::nothrow_t + size=1 align=1 + base size=0 base align=1 +std::nothrow_t (0xb6178f3c) 0 empty + +Class QListData::Data + size=24 align=4 + base size=24 base align=4 +QListData::Data (0xb61cd03c) 0 + +Class QListData + size=4 align=4 + base size=4 base align=4 +QListData (0xb61cd000) 0 + +Vtable for QObjectData +QObjectData::_ZTV11QObjectData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QObjectData) +8 __cxa_pure_virtual +12 __cxa_pure_virtual + +Class QObjectData + size=24 align=4 + base size=24 base align=4 +QObjectData (0xb61cd7bc) 0 + vptr=((& QObjectData::_ZTV11QObjectData) + 8u) + +Vtable for QObject +QObject::_ZTV7QObject: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QObject) +8 QObject::metaObject +12 QObject::qt_metacast +16 QObject::qt_metacall +20 QObject::~QObject +24 QObject::~QObject +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObject + size=8 align=4 + base size=8 base align=4 +QObject (0xb61cd870) 0 + vptr=((& QObject::_ZTV7QObject) + 8u) + +Vtable for QObjectUserData +QObjectUserData::_ZTV15QObjectUserData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QObjectUserData) +8 QObjectUserData::~QObjectUserData +12 QObjectUserData::~QObjectUserData + +Class QObjectUserData + size=4 align=4 + base size=4 base align=4 +QObjectUserData (0xb60a50b4) 0 nearly-empty + vptr=((& QObjectUserData::_ZTV15QObjectUserData) + 8u) + +Vtable for QIODevice +QIODevice::_ZTV9QIODevice: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QIODevice) +8 QIODevice::metaObject +12 QIODevice::qt_metacast +16 QIODevice::qt_metacall +20 QIODevice::~QIODevice +24 QIODevice::~QIODevice +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QIODevice::isSequential +60 QIODevice::open +64 QIODevice::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QIODevice::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 __cxa_pure_virtual +112 QIODevice::readLineData +116 __cxa_pure_virtual + +Class QIODevice + size=8 align=4 + base size=8 base align=4 +QIODevice (0xb60a8240) 0 + vptr=((& QIODevice::_ZTV9QIODevice) + 8u) + QObject (0xb60a51e0) 0 + primary-for QIODevice (0xb60a8240) + +Vtable for QDataStream +QDataStream::_ZTV11QDataStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QDataStream) +8 QDataStream::~QDataStream +12 QDataStream::~QDataStream + +Class QDataStream + size=28 align=4 + base size=28 base align=4 +QDataStream (0xb60a5f3c) 0 + vptr=((& QDataStream::_ZTV11QDataStream) + 8u) + +Class QHashData::Node + size=8 align=4 + base size=8 base align=4 +QHashData::Node (0xb5ef2ac8) 0 + +Class QHashData + size=32 align=4 + base size=32 base align=4 +QHashData (0xb5ef2a8c) 0 + +Class QHashDummyValue + size=1 align=1 + base size=0 base align=1 +QHashDummyValue (0xb5f2f168) 0 empty + +Class QMapData::Node + size=8 align=4 + base size=8 base align=4 +QMapData::Node (0xb5f2f8ac) 0 + +Class QMapData + size=72 align=4 + base size=72 base align=4 +QMapData (0xb5f2f870) 0 + +Vtable for QSystemLocale +QSystemLocale::_ZTV13QSystemLocale: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSystemLocale) +8 QSystemLocale::~QSystemLocale +12 QSystemLocale::~QSystemLocale +16 QSystemLocale::query +20 QSystemLocale::fallbackLocale + +Class QSystemLocale + size=4 align=4 + base size=4 base align=4 +QSystemLocale (0xb5f2fbb8) 0 nearly-empty + vptr=((& QSystemLocale::_ZTV13QSystemLocale) + 8u) + +Class QLocale::Data + size=4 align=2 + base size=4 base align=2 +QLocale::Data (0xb5f2fc30) 0 + +Class QLocale + size=4 align=4 + base size=4 base align=4 +QLocale (0xb5f2fbf4) 0 + +Class QTextCodec::ConverterState + size=28 align=4 + base size=28 base align=4 +QTextCodec::ConverterState (0xb5ea5294) 0 + +Vtable for QTextCodec +QTextCodec::_ZTV10QTextCodec: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QTextCodec) +8 __cxa_pure_virtual +12 QTextCodec::aliases +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QTextCodec::~QTextCodec +32 QTextCodec::~QTextCodec + +Class QTextCodec + size=4 align=4 + base size=4 base align=4 +QTextCodec (0xb5ea5258) 0 nearly-empty + vptr=((& QTextCodec::_ZTV10QTextCodec) + 8u) + +Class QTextEncoder + size=32 align=4 + base size=32 base align=4 +QTextEncoder (0xb5ea5e88) 0 + +Class QTextDecoder + size=32 align=4 + base size=32 base align=4 +QTextDecoder (0xb5cf20f0) 0 + +Class _IO_marker + size=12 align=4 + base size=12 base align=4 +_IO_marker (0xb5cf2474) 0 + +Class _IO_FILE + size=148 align=4 + base size=148 base align=4 +_IO_FILE (0xb5cf24b0) 0 + +Vtable for QTextStream +QTextStream::_ZTV11QTextStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTextStream) +8 QTextStream::~QTextStream +12 QTextStream::~QTextStream + +Class QTextStream + size=8 align=4 + base size=8 base align=4 +QTextStream (0xb5cf2528) 0 + vptr=((& QTextStream::_ZTV11QTextStream) + 8u) + +Class QTextStreamManipulator + size=24 align=4 + base size=22 base align=4 +QTextStreamManipulator (0xb5cf2b04) 0 + +Vtable for QTextIStream +QTextIStream::_ZTV12QTextIStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextIStream) +8 QTextIStream::~QTextIStream +12 QTextIStream::~QTextIStream + +Class QTextIStream + size=8 align=4 + base size=8 base align=4 +QTextIStream (0xb5d44780) 0 + vptr=((& QTextIStream::_ZTV12QTextIStream) + 8u) + QTextStream (0xb5d57c30) 0 + primary-for QTextIStream (0xb5d44780) + +Vtable for QTextOStream +QTextOStream::_ZTV12QTextOStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextOStream) +8 QTextOStream::~QTextOStream +12 QTextOStream::~QTextOStream + +Class QTextOStream + size=8 align=4 + base size=8 base align=4 +QTextOStream (0xb5d44a40) 0 + vptr=((& QTextOStream::_ZTV12QTextOStream) + 8u) + QTextStream (0xb5d692d0) 0 + primary-for QTextOStream (0xb5d44a40) + +Class wait + size=4 align=4 + base size=4 base align=4 +wait (0xb5d69960) 0 + +Class timespec + size=8 align=4 + base size=8 base align=4 +timespec (0xb5d69b04) 0 + +Class timeval + size=8 align=4 + base size=8 base align=4 +timeval (0xb5d69b40) 0 + +Class __pthread_internal_slist + size=4 align=4 + base size=4 base align=4 +__pthread_internal_slist (0xb5d69bf4) 0 + +Class random_data + size=28 align=4 + base size=28 base align=4 +random_data (0xb5d69f00) 0 + +Class drand48_data + size=24 align=4 + base size=24 base align=4 +drand48_data (0xb5d69f3c) 0 + +Class QVectorData + size=16 align=4 + base size=16 base align=4 +QVectorData (0xb5d69f78) 0 + +Class QDebug::Stream + size=24 align=4 + base size=22 base align=4 +QDebug::Stream (0xb5d9e2d0) 0 + +Class QDebug + size=4 align=4 + base size=4 base align=4 +QDebug (0xb5d9e294) 0 + +Class QNoDebug + size=1 align=1 + base size=0 base align=1 +QNoDebug (0xb5c7bd98) 0 empty + +Vtable for QFile +QFile::_ZTV5QFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI5QFile) +8 QFile::metaObject +12 QFile::qt_metacast +16 QFile::qt_metacall +20 QFile::~QFile +24 QFile::~QFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QFile::fileEngine + +Class QFile + size=8 align=4 + base size=8 base align=4 +QFile (0xb5cad180) 0 + vptr=((& QFile::_ZTV5QFile) + 8u) + QIODevice (0xb5cad1c0) 0 + primary-for QFile (0xb5cad180) + QObject (0xb5cb203c) 0 + primary-for QIODevice (0xb5cad1c0) + +Vtable for QTemporaryFile +QTemporaryFile::_ZTV14QTemporaryFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QTemporaryFile) +8 QTemporaryFile::metaObject +12 QTemporaryFile::qt_metacast +16 QTemporaryFile::qt_metacall +20 QTemporaryFile::~QTemporaryFile +24 QTemporaryFile::~QTemporaryFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QTemporaryFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QTemporaryFile::fileEngine + +Class QTemporaryFile + size=8 align=4 + base size=8 base align=4 +QTemporaryFile (0xb5cad780) 0 + vptr=((& QTemporaryFile::_ZTV14QTemporaryFile) + 8u) + QFile (0xb5cad7c0) 0 + primary-for QTemporaryFile (0xb5cad780) + QIODevice (0xb5cad800) 0 + primary-for QFile (0xb5cad7c0) + QObject (0xb5cb24b0) 0 + primary-for QIODevice (0xb5cad800) + +Class QFileInfo + size=4 align=4 + base size=4 base align=4 +QFileInfo (0xb5cb27bc) 0 + +Class QRegExp + size=4 align=4 + base size=4 base align=4 +QRegExp (0xb5cb2d5c) 0 + +Class QStringMatcher + size=1036 align=4 + base size=1036 base align=4 +QStringMatcher (0xb5b48708) 0 + +Class QStringList + size=4 align=4 + base size=4 base align=4 +QStringList (0xb5b11900) 0 + QList (0xb5b48870) 0 + +Class QDir + size=4 align=4 + base size=4 base align=4 +QDir (0xb5b7add4) 0 + +Class QAbstractFileEngine::ExtensionOption + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionOption (0xb5bca4b0) 0 empty + +Class QAbstractFileEngine::ExtensionReturn + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionReturn (0xb5bca4ec) 0 empty + +Class QAbstractFileEngine::MapExtensionOption + size=20 align=4 + base size=20 base align=4 +QAbstractFileEngine::MapExtensionOption (0xb59e41c0) 0 + QAbstractFileEngine::ExtensionOption (0xb5bca528) 0 empty + +Class QAbstractFileEngine::MapExtensionReturn + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::MapExtensionReturn (0xb59e4240) 0 + QAbstractFileEngine::ExtensionReturn (0xb5bca564) 0 empty + +Class QAbstractFileEngine::UnMapExtensionOption + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::UnMapExtensionOption (0xb59e42c0) 0 + QAbstractFileEngine::ExtensionOption (0xb5bca5a0) 0 empty + +Vtable for QAbstractFileEngine +QAbstractFileEngine::_ZTV19QAbstractFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractFileEngine) +8 QAbstractFileEngine::~QAbstractFileEngine +12 QAbstractFileEngine::~QAbstractFileEngine +16 QAbstractFileEngine::open +20 QAbstractFileEngine::close +24 QAbstractFileEngine::flush +28 QAbstractFileEngine::size +32 QAbstractFileEngine::pos +36 QAbstractFileEngine::seek +40 QAbstractFileEngine::isSequential +44 QAbstractFileEngine::remove +48 QAbstractFileEngine::copy +52 QAbstractFileEngine::rename +56 QAbstractFileEngine::link +60 QAbstractFileEngine::mkdir +64 QAbstractFileEngine::rmdir +68 QAbstractFileEngine::setSize +72 QAbstractFileEngine::caseSensitive +76 QAbstractFileEngine::isRelativePath +80 QAbstractFileEngine::entryList +84 QAbstractFileEngine::fileFlags +88 QAbstractFileEngine::setPermissions +92 QAbstractFileEngine::fileName +96 QAbstractFileEngine::ownerId +100 QAbstractFileEngine::owner +104 QAbstractFileEngine::fileTime +108 QAbstractFileEngine::setFileName +112 QAbstractFileEngine::handle +116 QAbstractFileEngine::beginEntryList +120 QAbstractFileEngine::endEntryList +124 QAbstractFileEngine::read +128 QAbstractFileEngine::readLine +132 QAbstractFileEngine::write +136 QAbstractFileEngine::extension +140 QAbstractFileEngine::supportsExtension + +Class QAbstractFileEngine + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngine (0xb5bca474) 0 + vptr=((& QAbstractFileEngine::_ZTV19QAbstractFileEngine) + 8u) + +Vtable for QAbstractFileEngineHandler +QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QAbstractFileEngineHandler) +8 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +12 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +16 __cxa_pure_virtual + +Class QAbstractFileEngineHandler + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngineHandler (0xb5bca744) 0 nearly-empty + vptr=((& QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler) + 8u) + +Vtable for QAbstractFileEngineIterator +QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QAbstractFileEngineIterator) +8 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +12 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QAbstractFileEngineIterator::currentFileInfo +32 QAbstractFileEngineIterator::entryInfo + +Class QAbstractFileEngineIterator + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngineIterator (0xb5bca780) 0 + vptr=((& QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator) + 8u) + +Vtable for QFSFileEngine +QFSFileEngine::_ZTV13QFSFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QFSFileEngine) +8 QFSFileEngine::~QFSFileEngine +12 QFSFileEngine::~QFSFileEngine +16 QFSFileEngine::open +20 QFSFileEngine::close +24 QFSFileEngine::flush +28 QFSFileEngine::size +32 QFSFileEngine::pos +36 QFSFileEngine::seek +40 QFSFileEngine::isSequential +44 QFSFileEngine::remove +48 QFSFileEngine::copy +52 QFSFileEngine::rename +56 QFSFileEngine::link +60 QFSFileEngine::mkdir +64 QFSFileEngine::rmdir +68 QFSFileEngine::setSize +72 QFSFileEngine::caseSensitive +76 QFSFileEngine::isRelativePath +80 QFSFileEngine::entryList +84 QFSFileEngine::fileFlags +88 QFSFileEngine::setPermissions +92 QFSFileEngine::fileName +96 QFSFileEngine::ownerId +100 QFSFileEngine::owner +104 QFSFileEngine::fileTime +108 QFSFileEngine::setFileName +112 QFSFileEngine::handle +116 QFSFileEngine::beginEntryList +120 QFSFileEngine::endEntryList +124 QFSFileEngine::read +128 QFSFileEngine::readLine +132 QFSFileEngine::write +136 QFSFileEngine::extension +140 QFSFileEngine::supportsExtension + +Class QFSFileEngine + size=8 align=4 + base size=8 base align=4 +QFSFileEngine (0xb59e45c0) 0 + vptr=((& QFSFileEngine::_ZTV13QFSFileEngine) + 8u) + QAbstractFileEngine (0xb5bca7bc) 0 + primary-for QFSFileEngine (0xb59e45c0) + +Vtable for QProcess +QProcess::_ZTV8QProcess: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QProcess) +8 QProcess::metaObject +12 QProcess::qt_metacast +16 QProcess::qt_metacall +20 QProcess::~QProcess +24 QProcess::~QProcess +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QProcess::isSequential +60 QIODevice::open +64 QProcess::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QProcess::atEnd +84 QIODevice::reset +88 QProcess::bytesAvailable +92 QProcess::bytesToWrite +96 QProcess::canReadLine +100 QProcess::waitForReadyRead +104 QProcess::waitForBytesWritten +108 QProcess::readData +112 QIODevice::readLineData +116 QProcess::writeData +120 QProcess::setupChildProcess + +Class QProcess + size=8 align=4 + base size=8 base align=4 +QProcess (0xb59e46c0) 0 + vptr=((& QProcess::_ZTV8QProcess) + 8u) + QIODevice (0xb59e4700) 0 + primary-for QProcess (0xb59e46c0) + QObject (0xb5bca8e8) 0 + primary-for QIODevice (0xb59e4700) + +Class QResource + size=4 align=4 + base size=4 base align=4 +QResource (0xb5bcab04) 0 + +Vtable for QDirIterator +QDirIterator::_ZTV12QDirIterator: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QDirIterator) +8 QDirIterator::~QDirIterator +12 QDirIterator::~QDirIterator + +Class QDirIterator + size=8 align=4 + base size=8 base align=4 +QDirIterator (0xb5bcabf4) 0 + vptr=((& QDirIterator::_ZTV12QDirIterator) + 8u) + +Vtable for QBuffer +QBuffer::_ZTV7QBuffer: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QBuffer) +8 QBuffer::metaObject +12 QBuffer::qt_metacast +16 QBuffer::qt_metacall +20 QBuffer::~QBuffer +24 QBuffer::~QBuffer +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QBuffer::connectNotify +52 QBuffer::disconnectNotify +56 QIODevice::isSequential +60 QBuffer::open +64 QBuffer::close +68 QBuffer::pos +72 QBuffer::size +76 QBuffer::seek +80 QBuffer::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QBuffer::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QBuffer::readData +112 QIODevice::readLineData +116 QBuffer::writeData + +Class QBuffer + size=8 align=4 + base size=8 base align=4 +QBuffer (0xb59e4c80) 0 + vptr=((& QBuffer::_ZTV7QBuffer) + 8u) + QIODevice (0xb59e4cc0) 0 + primary-for QBuffer (0xb59e4c80) + QObject (0xb5bcad20) 0 + primary-for QIODevice (0xb59e4cc0) + +Vtable for QFileSystemWatcher +QFileSystemWatcher::_ZTV18QFileSystemWatcher: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFileSystemWatcher) +8 QFileSystemWatcher::metaObject +12 QFileSystemWatcher::qt_metacast +16 QFileSystemWatcher::qt_metacall +20 QFileSystemWatcher::~QFileSystemWatcher +24 QFileSystemWatcher::~QFileSystemWatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QFileSystemWatcher + size=8 align=4 + base size=8 base align=4 +QFileSystemWatcher (0xb59e4fc0) 0 + vptr=((& QFileSystemWatcher::_ZTV18QFileSystemWatcher) + 8u) + QObject (0xb5bcaf3c) 0 + primary-for QFileSystemWatcher (0xb59e4fc0) + +Class QUrl + size=4 align=4 + base size=4 base align=4 +QUrl (0xb5a80168) 0 + +Class QMetaType + size=1 align=1 + base size=0 base align=1 +QMetaType (0xb5a80744) 0 empty + +Class QVariant::PrivateShared + size=8 align=4 + base size=8 base align=4 +QVariant::PrivateShared (0xb591f1a4) 0 + +Class QVariant::Private::Data + size=8 align=4 + base size=8 base align=4 +QVariant::Private::Data (0xb591f21c) 0 + +Class QVariant::Private + size=12 align=4 + base size=12 base align=4 +QVariant::Private (0xb591f1e0) 0 + +Class QVariant::Handler + size=36 align=4 + base size=36 base align=4 +QVariant::Handler (0xb591f258) 0 + +Class QVariant + size=12 align=4 + base size=12 base align=4 +QVariant (0xb591f168) 0 + +Class QVariantComparisonHelper + size=4 align=4 + base size=4 base align=4 +QVariantComparisonHelper (0xb5960834) 0 + +Vtable for QSettings +QSettings::_ZTV9QSettings: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QSettings) +8 QSettings::metaObject +12 QSettings::qt_metacast +16 QSettings::qt_metacall +20 QSettings::~QSettings +24 QSettings::~QSettings +28 QSettings::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSettings + size=8 align=4 + base size=8 base align=4 +QSettings (0xb599fac0) 0 + vptr=((& QSettings::_ZTV9QSettings) + 8u) + QObject (0xb5960ce4) 0 + primary-for QSettings (0xb599fac0) + +Class QXmlStreamStringRef + size=12 align=4 + base size=12 base align=4 +QXmlStreamStringRef (0xb57e17f8) 0 + +Class QXmlStreamAttribute + size=56 align=4 + base size=53 base align=4 +QXmlStreamAttribute (0xb58054b0) 0 + +Class QXmlStreamAttributes + size=4 align=4 + base size=4 base align=4 +QXmlStreamAttributes (0xb57e6fc0) 0 + QVector (0xb5805f00) 0 + +Class QXmlStreamNamespaceDeclaration + size=28 align=4 + base size=28 base align=4 +QXmlStreamNamespaceDeclaration (0xb5839000) 0 + +Class QXmlStreamNotationDeclaration + size=40 align=4 + base size=40 base align=4 +QXmlStreamNotationDeclaration (0xb5839474) 0 + +Class QXmlStreamEntityDeclaration + size=64 align=4 + base size=64 base align=4 +QXmlStreamEntityDeclaration (0xb5839a50) 0 + +Vtable for QXmlStreamEntityResolver +QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QXmlStreamEntityResolver) +8 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +12 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +16 QXmlStreamEntityResolver::resolveEntity +20 QXmlStreamEntityResolver::resolveUndeclaredEntity + +Class QXmlStreamEntityResolver + size=4 align=4 + base size=4 base align=4 +QXmlStreamEntityResolver (0xb586230c) 0 nearly-empty + vptr=((& QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver) + 8u) + +Class QXmlStreamReader + size=4 align=4 + base size=4 base align=4 +QXmlStreamReader (0xb5862348) 0 + +Class QXmlStreamWriter + size=4 align=4 + base size=4 base align=4 +QXmlStreamWriter (0xb58623fc) 0 + +Class QPoint + size=8 align=4 + base size=8 base align=4 +QPoint (0xb5862528) 0 + +Class QPointF + size=16 align=4 + base size=16 base align=4 +QPointF (0xb58b8ac8) 0 + +Class QLine + size=16 align=4 + base size=16 base align=4 +QLine (0xb56e31e0) 0 + +Class QLineF + size=32 align=4 + base size=32 base align=4 +QLineF (0xb56e3f00) 0 + +Class QSize + size=8 align=4 + base size=8 base align=4 +QSize (0xb5732000) 0 + +Class QSizeF + size=16 align=4 + base size=16 base align=4 +QSizeF (0xb574ba8c) 0 + +Class QRect + size=16 align=4 + base size=16 base align=4 +QRect (0xb5775690) 0 + +Class QRectF + size=32 align=4 + base size=32 base align=4 +QRectF (0xb57df2d0) 0 + +Class QSharedData + size=4 align=4 + base size=4 base align=4 +QSharedData (0xb563303c) 0 + +Vtable for QtSharedPointer::ExternalRefCountData +QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN15QtSharedPointer20ExternalRefCountDataE) +8 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +12 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +16 QtSharedPointer::ExternalRefCountData::destroy + +Class QtSharedPointer::ExternalRefCountData + size=12 align=4 + base size=12 base align=4 +QtSharedPointer::ExternalRefCountData (0xb563330c) 0 + vptr=((& QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE) + 8u) + +Class QLinkedListData + size=20 align=4 + base size=20 base align=4 +QLinkedListData (0xb5633c30) 0 + +Class QBitArray + size=4 align=4 + base size=4 base align=4 +QBitArray (0xb5633e4c) 0 + +Class QBitRef + size=8 align=4 + base size=8 base align=4 +QBitRef (0xb553f384) 0 + +Class QByteArrayMatcher + size=1032 align=4 + base size=1032 base align=4 +QByteArrayMatcher (0xb553fa50) 0 + +Class QCryptographicHash + size=4 align=4 + base size=4 base align=4 +QCryptographicHash (0xb553fc30) 0 + +Class QTextBoundaryFinder + size=28 align=4 + base size=28 base align=4 +QTextBoundaryFinder (0xb553fca8) 0 + +Class QDate + size=4 align=4 + base size=4 base align=4 +QDate (0xb553fd5c) 0 + +Class QTime + size=4 align=4 + base size=4 base align=4 +QTime (0xb5591384) 0 + +Class QDateTime + size=4 align=4 + base size=4 base align=4 +QDateTime (0xb55918e8) 0 + +Vtable for QTimeLine +QTimeLine::_ZTV9QTimeLine: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QTimeLine) +8 QTimeLine::metaObject +12 QTimeLine::qt_metacast +16 QTimeLine::qt_metacall +20 QTimeLine::~QTimeLine +24 QTimeLine::~QTimeLine +28 QObject::event +32 QObject::eventFilter +36 QTimeLine::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTimeLine::valueForTime + +Class QTimeLine + size=8 align=4 + base size=8 base align=4 +QTimeLine (0xb55c4000) 0 + vptr=((& QTimeLine::_ZTV9QTimeLine) + 8u) + QObject (0xb5591b7c) 0 + primary-for QTimeLine (0xb55c4000) + +Vtable for QRunnable +QRunnable::_ZTV9QRunnable: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QRunnable) +8 __cxa_pure_virtual +12 QRunnable::~QRunnable +16 QRunnable::~QRunnable + +Class QRunnable + size=8 align=4 + base size=8 base align=4 +QRunnable (0xb5591d98) 0 + vptr=((& QRunnable::_ZTV9QRunnable) + 8u) + +Class QMutex + size=4 align=4 + base size=4 base align=4 +QMutex (0xb55db21c) 0 + +Class QMutexLocker + size=4 align=4 + base size=4 base align=4 +QMutexLocker (0xb55db8ac) 0 + +Vtable for QtConcurrent::Exception +QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent9ExceptionE) +8 QtConcurrent::Exception::~Exception +12 QtConcurrent::Exception::~Exception +16 std::exception::what +20 QtConcurrent::Exception::raise +24 QtConcurrent::Exception::clone + +Class QtConcurrent::Exception + size=4 align=4 + base size=4 base align=4 +QtConcurrent::Exception (0xb55c4f80) 0 nearly-empty + vptr=((& QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE) + 8u) + std::exception (0xb55dbd98) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb55c4f80) + +Vtable for QtConcurrent::UnhandledException +QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent18UnhandledExceptionE) +8 QtConcurrent::UnhandledException::~UnhandledException +12 QtConcurrent::UnhandledException::~UnhandledException +16 std::exception::what +20 QtConcurrent::UnhandledException::raise +24 QtConcurrent::UnhandledException::clone + +Class QtConcurrent::UnhandledException + size=4 align=4 + base size=4 base align=4 +QtConcurrent::UnhandledException (0xb53f1080) 0 nearly-empty + vptr=((& QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE) + 8u) + QtConcurrent::Exception (0xb53f10c0) 0 nearly-empty + primary-for QtConcurrent::UnhandledException (0xb53f1080) + std::exception (0xb55dbdd4) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb53f10c0) + +Class QtConcurrent::internal::ExceptionHolder + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionHolder (0xb55dbe10) 0 + +Class QtConcurrent::internal::ExceptionStore + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionStore (0xb55dbe4c) 0 + +Class QtConcurrent::ResultItem + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultItem (0xb55dbe88) 0 + +Class QtConcurrent::ResultIteratorBase + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultIteratorBase (0xb53fb474) 0 + +Vtable for QtConcurrent::ResultStoreBase +QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent15ResultStoreBaseE) +8 QtConcurrent::ResultStoreBase::~ResultStoreBase +12 QtConcurrent::ResultStoreBase::~ResultStoreBase + +Class QtConcurrent::ResultStoreBase + size=28 align=4 + base size=28 base align=4 +QtConcurrent::ResultStoreBase (0xb53fb5a0) 0 + vptr=((& QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE) + 8u) + +Vtable for QFutureInterfaceBase +QFutureInterfaceBase::_ZTV20QFutureInterfaceBase: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QFutureInterfaceBase) +8 QFutureInterfaceBase::~QFutureInterfaceBase +12 QFutureInterfaceBase::~QFutureInterfaceBase + +Class QFutureInterfaceBase + size=8 align=4 + base size=8 base align=4 +QFutureInterfaceBase (0xb53fb9d8) 0 + vptr=((& QFutureInterfaceBase::_ZTV20QFutureInterfaceBase) + 8u) + +Vtable for QThread +QThread::_ZTV7QThread: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QThread) +8 QThread::metaObject +12 QThread::qt_metacast +16 QThread::qt_metacall +20 QThread::~QThread +24 QThread::~QThread +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QThread::run + +Class QThread + size=8 align=4 + base size=8 base align=4 +QThread (0xb54a50c0) 0 + vptr=((& QThread::_ZTV7QThread) + 8u) + QObject (0xb54946cc) 0 + primary-for QThread (0xb54a50c0) + +Vtable for QThreadPool +QThreadPool::_ZTV11QThreadPool: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QThreadPool) +8 QThreadPool::metaObject +12 QThreadPool::qt_metacast +16 QThreadPool::qt_metacall +20 QThreadPool::~QThreadPool +24 QThreadPool::~QThreadPool +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QThreadPool + size=8 align=4 + base size=8 base align=4 +QThreadPool (0xb54a5400) 0 + vptr=((& QThreadPool::_ZTV11QThreadPool) + 8u) + QObject (0xb5494960) 0 + primary-for QThreadPool (0xb54a5400) + +Class QWaitCondition + size=4 align=4 + base size=4 base align=4 +QWaitCondition (0xb5494bb8) 0 + +Class QtConcurrent::ThreadEngineSemaphore + size=12 align=4 + base size=12 base align=4 +QtConcurrent::ThreadEngineSemaphore (0xb5494bf4) 0 + +Vtable for QtConcurrent::ThreadEngineBase +QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE: 11u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent16ThreadEngineBaseE) +8 QtConcurrent::ThreadEngineBase::run +12 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +16 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +20 QtConcurrent::ThreadEngineBase::start +24 QtConcurrent::ThreadEngineBase::finish +28 QtConcurrent::ThreadEngineBase::threadFunction +32 QtConcurrent::ThreadEngineBase::shouldStartThread +36 QtConcurrent::ThreadEngineBase::shouldThrottleThread +40 __cxa_pure_virtual + +Class QtConcurrent::ThreadEngineBase + size=32 align=4 + base size=32 base align=4 +QtConcurrent::ThreadEngineBase (0xb54a5f40) 0 + vptr=((& QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE) + 8u) + QRunnable (0xb54d0474) 0 + primary-for QtConcurrent::ThreadEngineBase (0xb54a5f40) + +VTT for QtConcurrent::ThreadEngine +QtConcurrent::ThreadEngine::_ZTTN12QtConcurrent12ThreadEngineIvEE: 2u entries +0 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 12u) +4 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 68u) + +Class std::input_iterator_tag + size=1 align=1 + base size=0 base align=1 +std::input_iterator_tag (0xb52efa50) 0 empty + +Class std::output_iterator_tag + size=1 align=1 + base size=0 base align=1 +std::output_iterator_tag (0xb52efa8c) 0 empty + +Class std::forward_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::forward_iterator_tag (0xb52f1500) 0 empty + std::input_iterator_tag (0xb52efac8) 0 empty + +Class std::bidirectional_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::bidirectional_iterator_tag (0xb52f1580) 0 empty + std::forward_iterator_tag (0xb52f15c0) 0 empty + std::input_iterator_tag (0xb52efb04) 0 empty + +Class std::random_access_iterator_tag + size=1 align=1 + base size=1 base align=1 +std::random_access_iterator_tag (0xb52f1640) 0 empty + std::bidirectional_iterator_tag (0xb52f1680) 0 empty + std::forward_iterator_tag (0xb52f16c0) 0 empty + std::input_iterator_tag (0xb52efb40) 0 empty + +Class std::__true_type + size=1 align=1 + base size=0 base align=1 +std::__true_type (0xb52efc6c) 0 empty + +Class std::__false_type + size=1 align=1 + base size=0 base align=1 +std::__false_type (0xb52efca8) 0 empty + +Class lconv + size=56 align=4 + base size=56 base align=4 +lconv (0xb53aee88) 0 + +Class sched_param + size=4 align=4 + base size=4 base align=4 +sched_param (0xb520503c) 0 + +Class __sched_param + size=4 align=4 + base size=4 base align=4 +__sched_param (0xb5205078) 0 + +Class tm + size=44 align=4 + base size=44 base align=4 +tm (0xb52050f0) 0 + +Class itimerspec + size=16 align=4 + base size=16 base align=4 +itimerspec (0xb520512c) 0 + +Class _pthread_cleanup_buffer + size=16 align=4 + base size=16 base align=4 +_pthread_cleanup_buffer (0xb5205168) 0 + +Class __pthread_cleanup_frame + size=16 align=4 + base size=16 base align=4 +__pthread_cleanup_frame (0xb520521c) 0 + +Class __pthread_cleanup_class + size=16 align=4 + base size=16 base align=4 +__pthread_cleanup_class (0xb5205258) 0 + +Vtable for __cxxabiv1::__forced_unwind +__cxxabiv1::__forced_unwind::_ZTVN10__cxxabiv115__forced_unwindE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN10__cxxabiv115__forced_unwindE) +8 __cxxabiv1::__forced_unwind::~__forced_unwind +12 __cxxabiv1::__forced_unwind::~__forced_unwind +16 __cxa_pure_virtual + +Class __cxxabiv1::__forced_unwind + size=4 align=4 + base size=4 base align=4 +__cxxabiv1::__forced_unwind (0xb5285564) 0 nearly-empty + vptr=((& __cxxabiv1::__forced_unwind::_ZTVN10__cxxabiv115__forced_unwindE) + 8u) + +Class std::locale + size=4 align=4 + base size=4 base align=4 +std::locale (0xb50eb99c) 0 + +Vtable for std::locale::facet +std::locale::facet::_ZTVNSt6locale5facetE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTINSt6locale5facetE) +8 std::locale::facet::~facet +12 std::locale::facet::~facet + +Class std::locale::facet + size=8 align=4 + base size=8 base align=4 +std::locale::facet (0xb50eba14) 0 + vptr=((& std::locale::facet::_ZTVNSt6locale5facetE) + 8u) + +Class std::locale::id + size=4 align=4 + base size=4 base align=4 +std::locale::id (0xb50ebe10) 0 + +Class std::locale::_Impl + size=20 align=4 + base size=20 base align=4 +std::locale::_Impl (0xb50ebe4c) 0 + +Vtable for std::ios_base::failure +std::ios_base::failure::_ZTVNSt8ios_base7failureE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTINSt8ios_base7failureE) +8 std::ios_base::failure::~failure +12 std::ios_base::failure::~failure +16 std::ios_base::failure::what + +Class std::ios_base::failure + size=8 align=4 + base size=8 base align=4 +std::ios_base::failure (0xb50a1a00) 0 + vptr=((& std::ios_base::failure::_ZTVNSt8ios_base7failureE) + 8u) + std::exception (0xb50b61a4) 0 nearly-empty + primary-for std::ios_base::failure (0xb50a1a00) + +Class std::ios_base::_Callback_list + size=16 align=4 + base size=16 base align=4 +std::ios_base::_Callback_list (0xb50b61e0) 0 + +Class std::ios_base::_Words + size=8 align=4 + base size=8 base align=4 +std::ios_base::_Words (0xb50b621c) 0 + +Class std::ios_base::Init + size=1 align=1 + base size=0 base align=1 +std::ios_base::Init (0xb50b6258) 0 empty + +Vtable for std::ios_base +std::ios_base::_ZTVSt8ios_base: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt8ios_base) +8 std::ios_base::~ios_base +12 std::ios_base::~ios_base + +Class std::ios_base + size=112 align=4 + base size=112 base align=4 +std::ios_base (0xb50b6168) 0 + vptr=((& std::ios_base::_ZTVSt8ios_base) + 8u) + +Class std::ctype_base + size=1 align=1 + base size=0 base align=1 +std::ctype_base (0xb50d95a0) 0 empty + +Class std::__num_base + size=1 align=1 + base size=0 base align=1 +std::__num_base (0xb4f9f078) 0 empty + +VTT for std::basic_ostream > +std::basic_ostream >::_ZTTSo: 2u entries +0 ((& std::basic_ostream >::_ZTVSo) + 12u) +4 ((& std::basic_ostream >::_ZTVSo) + 32u) + +VTT for std::basic_ostream > +std::basic_ostream >::_ZTTSt13basic_ostreamIwSt11char_traitsIwEE: 2u entries +0 ((& std::basic_ostream >::_ZTVSt13basic_ostreamIwSt11char_traitsIwEE) + 12u) +4 ((& std::basic_ostream >::_ZTVSt13basic_ostreamIwSt11char_traitsIwEE) + 32u) + +VTT for std::basic_istream > +std::basic_istream >::_ZTTSi: 2u entries +0 ((& std::basic_istream >::_ZTVSi) + 12u) +4 ((& std::basic_istream >::_ZTVSi) + 32u) + +VTT for std::basic_istream > +std::basic_istream >::_ZTTSt13basic_istreamIwSt11char_traitsIwEE: 2u entries +0 ((& std::basic_istream >::_ZTVSt13basic_istreamIwSt11char_traitsIwEE) + 12u) +4 ((& std::basic_istream >::_ZTVSt13basic_istreamIwSt11char_traitsIwEE) + 32u) + +Construction vtable for std::basic_istream > (0xb4d58440 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSd0_Si: 10u entries +0 12u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISi) +12 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = char, _Traits = std::char_traits] +16 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = char, _Traits = std::char_traits] +20 -12u +24 (int (*)(...))-0x00000000c +28 (int (*)(...))(& _ZTISi) +32 std::basic_istream >::_ZTv0_n12_NSiD1Ev +36 std::basic_istream >::_ZTv0_n12_NSiD0Ev + +Construction vtable for std::basic_ostream > (0xb4d584c0 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSd8_So: 10u entries +0 4u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISo) +12 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = char, _Traits = std::char_traits] +16 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = char, _Traits = std::char_traits] +20 -4u +24 (int (*)(...))-0x000000004 +28 (int (*)(...))(& _ZTISo) +32 std::basic_ostream >::_ZTv0_n12_NSoD1Ev +36 std::basic_ostream >::_ZTv0_n12_NSoD0Ev + +VTT for std::basic_iostream > +std::basic_iostream >::_ZTTSd: 7u entries +0 ((& std::basic_iostream >::_ZTVSd) + 12u) +4 ((& std::basic_iostream >::_ZTCSd0_Si) + 12u) +8 ((& std::basic_iostream >::_ZTCSd0_Si) + 32u) +12 ((& std::basic_iostream >::_ZTCSd8_So) + 12u) +16 ((& std::basic_iostream >::_ZTCSd8_So) + 32u) +20 ((& std::basic_iostream >::_ZTVSd) + 52u) +24 ((& std::basic_iostream >::_ZTVSd) + 32u) + +Construction vtable for std::basic_istream > (0xb4d587c0 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E: 10u entries +0 12u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt13basic_istreamIwSt11char_traitsIwEE) +12 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = wchar_t, _Traits = std::char_traits] +16 std::basic_istream<_CharT, _Traits>::~basic_istream [with _CharT = wchar_t, _Traits = std::char_traits] +20 -12u +24 (int (*)(...))-0x00000000c +28 (int (*)(...))(& _ZTISt13basic_istreamIwSt11char_traitsIwEE) +32 std::basic_istream >::_ZTv0_n12_NSt13basic_istreamIwSt11char_traitsIwEED1Ev +36 std::basic_istream >::_ZTv0_n12_NSt13basic_istreamIwSt11char_traitsIwEED0Ev + +Construction vtable for std::basic_ostream > (0xb4d58840 instance) in std::basic_iostream > +std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE8_St13basic_ostreamIwS1_E: 10u entries +0 4u +4 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt13basic_ostreamIwSt11char_traitsIwEE) +12 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = wchar_t, _Traits = std::char_traits] +16 std::basic_ostream<_CharT, _Traits>::~basic_ostream [with _CharT = wchar_t, _Traits = std::char_traits] +20 -4u +24 (int (*)(...))-0x000000004 +28 (int (*)(...))(& _ZTISt13basic_ostreamIwSt11char_traitsIwEE) +32 std::basic_ostream >::_ZTv0_n12_NSt13basic_ostreamIwSt11char_traitsIwEED1Ev +36 std::basic_ostream >::_ZTv0_n12_NSt13basic_ostreamIwSt11char_traitsIwEED0Ev + +VTT for std::basic_iostream > +std::basic_iostream >::_ZTTSt14basic_iostreamIwSt11char_traitsIwEE: 7u entries +0 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 12u) +4 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E) + 12u) +8 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE0_St13basic_istreamIwS1_E) + 32u) +12 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE8_St13basic_ostreamIwS1_E) + 12u) +16 ((& std::basic_iostream >::_ZTCSt14basic_iostreamIwSt11char_traitsIwEE8_St13basic_ostreamIwS1_E) + 32u) +20 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 52u) +24 ((& std::basic_iostream >::_ZTVSt14basic_iostreamIwSt11char_traitsIwEE) + 32u) + +Class QtConcurrent::BlockSizeManager + size=72 align=4 + base size=72 base align=4 +QtConcurrent::BlockSizeManager (0xb4d6912c) 0 + +Vtable for QFutureWatcherBase +QFutureWatcherBase::_ZTV18QFutureWatcherBase: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFutureWatcherBase) +8 QFutureWatcherBase::metaObject +12 QFutureWatcherBase::qt_metacast +16 QFutureWatcherBase::qt_metacall +20 QFutureWatcherBase::~QFutureWatcherBase +24 QFutureWatcherBase::~QFutureWatcherBase +28 QFutureWatcherBase::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QFutureWatcherBase::connectNotify +52 QFutureWatcherBase::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QFutureWatcherBase + size=8 align=4 + base size=8 base align=4 +QFutureWatcherBase (0xb4b78a00) 0 + vptr=((& QFutureWatcherBase::_ZTV18QFutureWatcherBase) + 8u) + QObject (0xb4b26924) 0 + primary-for QFutureWatcherBase (0xb4b78a00) + +Vtable for QFactoryInterface +QFactoryInterface::_ZTV17QFactoryInterface: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QFactoryInterface) +8 QFactoryInterface::~QFactoryInterface +12 QFactoryInterface::~QFactoryInterface +16 __cxa_pure_virtual + +Class QFactoryInterface + size=4 align=4 + base size=4 base align=4 +QFactoryInterface (0xb49ea744) 0 nearly-empty + vptr=((& QFactoryInterface::_ZTV17QFactoryInterface) + 8u) + +Vtable for QTextCodecFactoryInterface +QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QTextCodecFactoryInterface) +8 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +12 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +16 __cxa_pure_virtual +20 __cxa_pure_virtual + +Class QTextCodecFactoryInterface + size=4 align=4 + base size=4 base align=4 +QTextCodecFactoryInterface (0xb4a17c00) 0 nearly-empty + vptr=((& QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface) + 8u) + QFactoryInterface (0xb49eac30) 0 nearly-empty + primary-for QTextCodecFactoryInterface (0xb4a17c00) + +Vtable for QTextCodecPlugin +QTextCodecPlugin::_ZTV16QTextCodecPlugin: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QTextCodecPlugin) +8 QTextCodecPlugin::metaObject +12 QTextCodecPlugin::qt_metacast +16 QTextCodecPlugin::qt_metacall +20 QTextCodecPlugin::~QTextCodecPlugin +24 QTextCodecPlugin::~QTextCodecPlugin +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 QTextCodecPlugin::keys +80 QTextCodecPlugin::create +84 (int (*)(...))-0x000000008 +88 (int (*)(...))(& _ZTI16QTextCodecPlugin) +92 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD1Ev +96 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD0Ev +100 QTextCodecPlugin::_ZThn8_NK16QTextCodecPlugin4keysEv +104 QTextCodecPlugin::_ZThn8_N16QTextCodecPlugin6createERK7QString + +Class QTextCodecPlugin + size=12 align=4 + base size=12 base align=4 +QTextCodecPlugin (0xb4a249b0) 0 + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 8u) + QObject (0xb49eaec4) 0 + primary-for QTextCodecPlugin (0xb4a249b0) + QTextCodecFactoryInterface (0xb4a17e00) 8 nearly-empty + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 92u) + QFactoryInterface (0xb49eaf00) 8 nearly-empty + primary-for QTextCodecFactoryInterface (0xb4a17e00) + +Class QLibraryInfo + size=1 align=1 + base size=0 base align=1 +QLibraryInfo (0xb4a3503c) 0 empty + +Vtable for QTranslator +QTranslator::_ZTV11QTranslator: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTranslator) +8 QTranslator::metaObject +12 QTranslator::qt_metacast +16 QTranslator::qt_metacall +20 QTranslator::~QTranslator +24 QTranslator::~QTranslator +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTranslator::translate +60 QTranslator::isEmpty + +Class QTranslator + size=8 align=4 + base size=8 base align=4 +QTranslator (0xb4a4e9c0) 0 + vptr=((& QTranslator::_ZTV11QTranslator) + 8u) + QObject (0xb4a483fc) 0 + primary-for QTranslator (0xb4a4e9c0) + +Class __exception + size=32 align=4 + base size=32 base align=4 +__exception (0xb4a486cc) 0 + +Vtable for QMimeData +QMimeData::_ZTV9QMimeData: 17u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QMimeData) +8 QMimeData::metaObject +12 QMimeData::qt_metacast +16 QMimeData::qt_metacall +20 QMimeData::~QMimeData +24 QMimeData::~QMimeData +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QMimeData::hasFormat +60 QMimeData::formats +64 QMimeData::retrieveData + +Class QMimeData + size=8 align=4 + base size=8 base align=4 +QMimeData (0xb4a97340) 0 + vptr=((& QMimeData::_ZTV9QMimeData) + 8u) + QObject (0xb4a48c6c) 0 + primary-for QMimeData (0xb4a97340) + +Vtable for QEventLoop +QEventLoop::_ZTV10QEventLoop: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QEventLoop) +8 QEventLoop::metaObject +12 QEventLoop::qt_metacast +16 QEventLoop::qt_metacall +20 QEventLoop::~QEventLoop +24 QEventLoop::~QEventLoop +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QEventLoop + size=8 align=4 + base size=8 base align=4 +QEventLoop (0xb4a97600) 0 + vptr=((& QEventLoop::_ZTV10QEventLoop) + 8u) + QObject (0xb4a48e88) 0 + primary-for QEventLoop (0xb4a97600) + +Vtable for QEvent +QEvent::_ZTV6QEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QEvent) +8 QEvent::~QEvent +12 QEvent::~QEvent + +Class QEvent + size=12 align=4 + base size=12 base align=4 +QEvent (0xb48ba1a4) 0 + vptr=((& QEvent::_ZTV6QEvent) + 8u) + +Vtable for QTimerEvent +QTimerEvent::_ZTV11QTimerEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTimerEvent) +8 QTimerEvent::~QTimerEvent +12 QTimerEvent::~QTimerEvent + +Class QTimerEvent + size=16 align=4 + base size=16 base align=4 +QTimerEvent (0xb4a97cc0) 0 + vptr=((& QTimerEvent::_ZTV11QTimerEvent) + 8u) + QEvent (0xb48ba384) 0 + primary-for QTimerEvent (0xb4a97cc0) + +Vtable for QChildEvent +QChildEvent::_ZTV11QChildEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QChildEvent) +8 QChildEvent::~QChildEvent +12 QChildEvent::~QChildEvent + +Class QChildEvent + size=16 align=4 + base size=16 base align=4 +QChildEvent (0xb4a97d80) 0 + vptr=((& QChildEvent::_ZTV11QChildEvent) + 8u) + QEvent (0xb48ba3fc) 0 + primary-for QChildEvent (0xb4a97d80) + +Vtable for QCustomEvent +QCustomEvent::_ZTV12QCustomEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QCustomEvent) +8 QCustomEvent::~QCustomEvent +12 QCustomEvent::~QCustomEvent + +Class QCustomEvent + size=12 align=4 + base size=12 base align=4 +QCustomEvent (0xb48e8040) 0 + vptr=((& QCustomEvent::_ZTV12QCustomEvent) + 8u) + QEvent (0xb48ba564) 0 + primary-for QCustomEvent (0xb48e8040) + +Vtable for QDynamicPropertyChangeEvent +QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QDynamicPropertyChangeEvent) +8 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent +12 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent + +Class QDynamicPropertyChangeEvent + size=16 align=4 + base size=16 base align=4 +QDynamicPropertyChangeEvent (0xb48e8140) 0 + vptr=((& QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent) + 8u) + QEvent (0xb48ba654) 0 + primary-for QDynamicPropertyChangeEvent (0xb48e8140) + +Vtable for QCoreApplication +QCoreApplication::_ZTV16QCoreApplication: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QCoreApplication) +8 QCoreApplication::metaObject +12 QCoreApplication::qt_metacast +16 QCoreApplication::qt_metacall +20 QCoreApplication::~QCoreApplication +24 QCoreApplication::~QCoreApplication +28 QCoreApplication::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QCoreApplication::notify +60 QCoreApplication::compressEvent + +Class QCoreApplication + size=8 align=4 + base size=8 base align=4 +QCoreApplication (0xb48e8200) 0 + vptr=((& QCoreApplication::_ZTV16QCoreApplication) + 8u) + QObject (0xb48ba708) 0 + primary-for QCoreApplication (0xb48e8200) + +Vtable for QSharedMemory +QSharedMemory::_ZTV13QSharedMemory: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSharedMemory) +8 QSharedMemory::metaObject +12 QSharedMemory::qt_metacast +16 QSharedMemory::qt_metacall +20 QSharedMemory::~QSharedMemory +24 QSharedMemory::~QSharedMemory +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSharedMemory + size=8 align=4 + base size=8 base align=4 +QSharedMemory (0xb48e8800) 0 + vptr=((& QSharedMemory::_ZTV13QSharedMemory) + 8u) + QObject (0xb48baca8) 0 + primary-for QSharedMemory (0xb48e8800) + +Class QModelIndex + size=16 align=4 + base size=16 base align=4 +QModelIndex (0xb48baec4) 0 + +Class QPersistentModelIndex + size=4 align=4 + base size=4 base align=4 +QPersistentModelIndex (0xb4929384) 0 + +Vtable for QAbstractItemModel +QAbstractItemModel::_ZTV18QAbstractItemModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractItemModel) +8 QAbstractItemModel::metaObject +12 QAbstractItemModel::qt_metacast +16 QAbstractItemModel::qt_metacall +20 QAbstractItemModel::~QAbstractItemModel +24 QAbstractItemModel::~QAbstractItemModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractItemModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractItemModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractItemModel + size=8 align=4 + base size=8 base align=4 +QAbstractItemModel (0xb4927440) 0 + vptr=((& QAbstractItemModel::_ZTV18QAbstractItemModel) + 8u) + QObject (0xb49294ec) 0 + primary-for QAbstractItemModel (0xb4927440) + +Vtable for QAbstractTableModel +QAbstractTableModel::_ZTV19QAbstractTableModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractTableModel) +8 QAbstractTableModel::metaObject +12 QAbstractTableModel::qt_metacast +16 QAbstractTableModel::qt_metacall +20 QAbstractTableModel::~QAbstractTableModel +24 QAbstractTableModel::~QAbstractTableModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractTableModel::index +60 QAbstractTableModel::parent +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractTableModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractTableModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractTableModel + size=8 align=4 + base size=8 base align=4 +QAbstractTableModel (0xb4927a80) 0 + vptr=((& QAbstractTableModel::_ZTV19QAbstractTableModel) + 8u) + QAbstractItemModel (0xb4927ac0) 0 + primary-for QAbstractTableModel (0xb4927a80) + QObject (0xb4929e4c) 0 + primary-for QAbstractItemModel (0xb4927ac0) + +Vtable for QAbstractListModel +QAbstractListModel::_ZTV18QAbstractListModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractListModel) +8 QAbstractListModel::metaObject +12 QAbstractListModel::qt_metacast +16 QAbstractListModel::qt_metacall +20 QAbstractListModel::~QAbstractListModel +24 QAbstractListModel::~QAbstractListModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractListModel::index +60 QAbstractListModel::parent +64 __cxa_pure_virtual +68 QAbstractListModel::columnCount +72 QAbstractListModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractListModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractListModel + size=8 align=4 + base size=8 base align=4 +QAbstractListModel (0xb4927d00) 0 + vptr=((& QAbstractListModel::_ZTV18QAbstractListModel) + 8u) + QAbstractItemModel (0xb4927d40) 0 + primary-for QAbstractListModel (0xb4927d00) + QObject (0xb4929f78) 0 + primary-for QAbstractItemModel (0xb4927d40) + +Vtable for QSignalMapper +QSignalMapper::_ZTV13QSignalMapper: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSignalMapper) +8 QSignalMapper::metaObject +12 QSignalMapper::qt_metacast +16 QSignalMapper::qt_metacall +20 QSignalMapper::~QSignalMapper +24 QSignalMapper::~QSignalMapper +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSignalMapper + size=8 align=4 + base size=8 base align=4 +QSignalMapper (0xb4979440) 0 + vptr=((& QSignalMapper::_ZTV13QSignalMapper) + 8u) + QObject (0xb4974e4c) 0 + primary-for QSignalMapper (0xb4979440) + +Vtable for QObjectCleanupHandler +QObjectCleanupHandler::_ZTV21QObjectCleanupHandler: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QObjectCleanupHandler) +8 QObjectCleanupHandler::metaObject +12 QObjectCleanupHandler::qt_metacast +16 QObjectCleanupHandler::qt_metacall +20 QObjectCleanupHandler::~QObjectCleanupHandler +24 QObjectCleanupHandler::~QObjectCleanupHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObjectCleanupHandler + size=12 align=4 + base size=12 base align=4 +QObjectCleanupHandler (0xb4979700) 0 + vptr=((& QObjectCleanupHandler::_ZTV21QObjectCleanupHandler) + 8u) + QObject (0xb4995078) 0 + primary-for QObjectCleanupHandler (0xb4979700) + +Class QBasicTimer + size=4 align=4 + base size=4 base align=4 +QBasicTimer (0xb49951a4) 0 + +Vtable for QSocketNotifier +QSocketNotifier::_ZTV15QSocketNotifier: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QSocketNotifier) +8 QSocketNotifier::metaObject +12 QSocketNotifier::qt_metacast +16 QSocketNotifier::qt_metacall +20 QSocketNotifier::~QSocketNotifier +24 QSocketNotifier::~QSocketNotifier +28 QSocketNotifier::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSocketNotifier + size=20 align=4 + base size=17 base align=4 +QSocketNotifier (0xb4979d00) 0 + vptr=((& QSocketNotifier::_ZTV15QSocketNotifier) + 8u) + QObject (0xb4995438) 0 + primary-for QSocketNotifier (0xb4979d00) + +Vtable for QTimer +QTimer::_ZTV6QTimer: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QTimer) +8 QTimer::metaObject +12 QTimer::qt_metacast +16 QTimer::qt_metacall +20 QTimer::~QTimer +24 QTimer::~QTimer +28 QObject::event +32 QObject::eventFilter +36 QTimer::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QTimer + size=24 align=4 + base size=21 base align=4 +QTimer (0xb49b3080) 0 + vptr=((& QTimer::_ZTV6QTimer) + 8u) + QObject (0xb4995708) 0 + primary-for QTimer (0xb49b3080) + +Vtable for QAbstractEventDispatcher +QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QAbstractEventDispatcher) +8 QAbstractEventDispatcher::metaObject +12 QAbstractEventDispatcher::qt_metacast +16 QAbstractEventDispatcher::qt_metacall +20 QAbstractEventDispatcher::~QAbstractEventDispatcher +24 QAbstractEventDispatcher::~QAbstractEventDispatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 __cxa_pure_virtual +88 __cxa_pure_virtual +92 __cxa_pure_virtual +96 __cxa_pure_virtual +100 QAbstractEventDispatcher::startingUp +104 QAbstractEventDispatcher::closingDown + +Class QAbstractEventDispatcher + size=8 align=4 + base size=8 base align=4 +QAbstractEventDispatcher (0xb49b3580) 0 + vptr=((& QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher) + 8u) + QObject (0xb499599c) 0 + primary-for QAbstractEventDispatcher (0xb49b3580) + +Class QMetaMethod + size=8 align=4 + base size=8 base align=4 +QMetaMethod (0xb4995bb8) 0 + +Class QMetaEnum + size=8 align=4 + base size=8 base align=4 +QMetaEnum (0xb4995ec4) 0 + +Class QMetaProperty + size=20 align=4 + base size=20 base align=4 +QMetaProperty (0xb47e712c) 0 + +Class QMetaClassInfo + size=8 align=4 + base size=8 base align=4 +QMetaClassInfo (0xb47e71e0) 0 + +Class QSystemSemaphore + size=4 align=4 + base size=4 base align=4 +QSystemSemaphore (0xb47e7438) 0 + +Vtable for QLibrary +QLibrary::_ZTV8QLibrary: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QLibrary) +8 QLibrary::metaObject +12 QLibrary::qt_metacast +16 QLibrary::qt_metacall +20 QLibrary::~QLibrary +24 QLibrary::~QLibrary +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QLibrary + size=16 align=4 + base size=13 base align=4 +QLibrary (0xb47f4080) 0 + vptr=((& QLibrary::_ZTV8QLibrary) + 8u) + QObject (0xb47e74b0) 0 + primary-for QLibrary (0xb47f4080) + +Vtable for QPluginLoader +QPluginLoader::_ZTV13QPluginLoader: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QPluginLoader) +8 QPluginLoader::metaObject +12 QPluginLoader::qt_metacast +16 QPluginLoader::qt_metacall +20 QPluginLoader::~QPluginLoader +24 QPluginLoader::~QPluginLoader +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QPluginLoader + size=16 align=4 + base size=13 base align=4 +QPluginLoader (0xb47f4480) 0 + vptr=((& QPluginLoader::_ZTV13QPluginLoader) + 8u) + QObject (0xb47e7708) 0 + primary-for QPluginLoader (0xb47f4480) + +Class QUuid + size=16 align=4 + base size=16 base align=4 +QUuid (0xb47e7834) 0 + +Class QSemaphore + size=4 align=4 + base size=4 base align=4 +QSemaphore (0xb4836834) 0 + +Class QThreadStorageData + size=4 align=4 + base size=4 base align=4 +QThreadStorageData (0xb4836870) 0 + +Class QReadWriteLock + size=4 align=4 + base size=4 base align=4 +QReadWriteLock (0xb48368e8) 0 + +Class QReadLocker + size=4 align=4 + base size=4 base align=4 +QReadLocker (0xb4836924) 0 + +Class QWriteLocker + size=4 align=4 + base size=4 base align=4 +QWriteLocker (0xb4836e10) 0 + +Class QXmlName + size=8 align=4 + base size=8 base align=4 +QXmlName (0xb45f5d5c) 0 + +Class QPatternist::NodeIndexStorage + size=20 align=4 + base size=20 base align=4 +QPatternist::NodeIndexStorage (0xb469003c) 0 + +Class QXmlNodeModelIndex + size=20 align=4 + base size=20 base align=4 +QXmlNodeModelIndex (0xb4690168) 0 + +Vtable for QAbstractXmlNodeModel +QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QAbstractXmlNodeModel) +8 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +12 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QAbstractXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QAbstractXmlNodeModel (0xb44be300) 0 + vptr=((& QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel) + 8u) + QSharedData (0xb46908ac) 4 + +Class QXmlItem + size=20 align=4 + base size=20 base align=4 +QXmlItem (0xb4690a8c) 0 + +Vtable for QAbstractXmlReceiver +QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractXmlReceiver) +8 QAbstractXmlReceiver::~QAbstractXmlReceiver +12 QAbstractXmlReceiver::~QAbstractXmlReceiver +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 __cxa_pure_virtual +52 __cxa_pure_virtual +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractXmlReceiver::whitespaceOnly +68 QAbstractXmlReceiver::item + +Class QAbstractXmlReceiver + size=8 align=4 + base size=8 base align=4 +QAbstractXmlReceiver (0xb4690c6c) 0 + vptr=((& QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver) + 8u) + +Vtable for QXmlSerializer +QXmlSerializer::_ZTV14QXmlSerializer: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QXmlSerializer) +8 QXmlSerializer::~QXmlSerializer +12 QXmlSerializer::~QXmlSerializer +16 QXmlSerializer::startElement +20 QXmlSerializer::endElement +24 QXmlSerializer::attribute +28 QXmlSerializer::comment +32 QXmlSerializer::characters +36 QXmlSerializer::startDocument +40 QXmlSerializer::endDocument +44 QXmlSerializer::processingInstruction +48 QXmlSerializer::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlSerializer::startOfSequence +60 QXmlSerializer::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlSerializer::item + +Class QXmlSerializer + size=8 align=4 + base size=8 base align=4 +QXmlSerializer (0xb44be840) 0 + vptr=((& QXmlSerializer::_ZTV14QXmlSerializer) + 8u) + QAbstractXmlReceiver (0xb4690ca8) 0 + primary-for QXmlSerializer (0xb44be840) + +Class QSourceLocation + size=20 align=4 + base size=20 base align=4 +QSourceLocation (0xb4690dd4) 0 + +Vtable for QAbstractMessageHandler +QAbstractMessageHandler::_ZTV23QAbstractMessageHandler: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI23QAbstractMessageHandler) +8 QAbstractMessageHandler::metaObject +12 QAbstractMessageHandler::qt_metacast +16 QAbstractMessageHandler::qt_metacall +20 QAbstractMessageHandler::~QAbstractMessageHandler +24 QAbstractMessageHandler::~QAbstractMessageHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractMessageHandler + size=8 align=4 + base size=8 base align=4 +QAbstractMessageHandler (0xb44bebc0) 0 + vptr=((& QAbstractMessageHandler::_ZTV23QAbstractMessageHandler) + 8u) + QObject (0xb4690f78) 0 + primary-for QAbstractMessageHandler (0xb44bebc0) + +Class QXmlNamePool + size=4 align=4 + base size=4 base align=4 +QXmlNamePool (0xb45041a4) 0 + +Class QXmlQuery + size=4 align=4 + base size=4 base align=4 +QXmlQuery (0xb450421c) 0 + +Vtable for QAbstractUriResolver +QAbstractUriResolver::_ZTV20QAbstractUriResolver: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractUriResolver) +8 QAbstractUriResolver::metaObject +12 QAbstractUriResolver::qt_metacast +16 QAbstractUriResolver::qt_metacall +20 QAbstractUriResolver::~QAbstractUriResolver +24 QAbstractUriResolver::~QAbstractUriResolver +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractUriResolver + size=8 align=4 + base size=8 base align=4 +QAbstractUriResolver (0xb44befc0) 0 + vptr=((& QAbstractUriResolver::_ZTV20QAbstractUriResolver) + 8u) + QObject (0xb4504258) 0 + primary-for QAbstractUriResolver (0xb44befc0) + +Vtable for QSimpleXmlNodeModel +QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QSimpleXmlNodeModel) +8 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +12 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +16 QSimpleXmlNodeModel::baseUri +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 QSimpleXmlNodeModel::stringValue +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 QSimpleXmlNodeModel::namespaceBindings +76 QSimpleXmlNodeModel::elementById +80 QSimpleXmlNodeModel::nodesByIdref +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QSimpleXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QSimpleXmlNodeModel (0xb4518280) 0 + vptr=((& QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel) + 8u) + QAbstractXmlNodeModel (0xb45182c0) 0 + primary-for QSimpleXmlNodeModel (0xb4518280) + QSharedData (0xb4504474) 4 + +Vtable for QXmlFormatter +QXmlFormatter::_ZTV13QXmlFormatter: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QXmlFormatter) +8 QXmlFormatter::~QXmlFormatter +12 QXmlFormatter::~QXmlFormatter +16 QXmlFormatter::startElement +20 QXmlFormatter::endElement +24 QXmlFormatter::attribute +28 QXmlFormatter::comment +32 QXmlFormatter::characters +36 QXmlFormatter::startDocument +40 QXmlFormatter::endDocument +44 QXmlFormatter::processingInstruction +48 QXmlFormatter::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlFormatter::startOfSequence +60 QXmlFormatter::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlFormatter::item + +Class QXmlFormatter + size=8 align=4 + base size=8 base align=4 +QXmlFormatter (0xb45183c0) 0 + vptr=((& QXmlFormatter::_ZTV13QXmlFormatter) + 8u) + QXmlSerializer (0xb4518400) 0 + primary-for QXmlFormatter (0xb45183c0) + QAbstractXmlReceiver (0xb45045a0) 0 + primary-for QXmlSerializer (0xb4518400) + +Vtable for QXmlResultItems +QXmlResultItems::_ZTV15QXmlResultItems: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QXmlResultItems) +8 QXmlResultItems::~QXmlResultItems +12 QXmlResultItems::~QXmlResultItems + +Class QXmlResultItems + size=8 align=4 + base size=8 base align=4 +QXmlResultItems (0xb45046cc) 0 + vptr=((& QXmlResultItems::_ZTV15QXmlResultItems) + 8u) + diff --git a/tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-amd64.txt new file mode 100644 index 0000000..a08062d --- /dev/null +++ b/tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-amd64.txt @@ -0,0 +1,3561 @@ +Class QSysInfo + size=1 align=1 + base size=0 base align=1 +QSysInfo (0x7f7ae7deb230) 0 empty + +Class QBool + size=1 align=1 + base size=1 base align=1 +QBool (0x7f7ae7debe70) 0 + +Class qIsNull(double)::U + size=8 align=8 + base size=8 base align=8 +qIsNull(double)::U (0x7f7ae7e19540) 0 + +Class qIsNull(float)::U + size=4 align=4 + base size=4 base align=4 +qIsNull(float)::U (0x7f7ae7e197e0) 0 + +Class QFlag + size=4 align=4 + base size=4 base align=4 +QFlag (0x7f7ae7e53690) 0 + +Class QIncompatibleFlag + size=4 align=4 + base size=4 base align=4 +QIncompatibleFlag (0x7f7ae7e53e70) 0 + +Class QLatin1Char + size=1 align=1 + base size=1 base align=1 +QLatin1Char (0x7f7ae7e815b0) 0 + +Class QChar + size=2 align=2 + base size=2 base align=2 +QChar (0x7f7ae7ea9150) 0 + +Class QBasicAtomicInt + size=4 align=4 + base size=4 base align=4 +QBasicAtomicInt (0x7f7ae7d0b310) 0 + +Class QAtomicInt + size=4 align=4 + base size=4 base align=4 +QAtomicInt (0x7f7ae7d49cb0) 0 + QBasicAtomicInt (0x7f7ae7d49d20) 0 + +Class QInternal + size=1 align=1 + base size=0 base align=1 +QInternal (0x7f7ae7b9c4d0) 0 empty + +Class __locale_struct + size=232 align=8 + base size=232 base align=8 +__locale_struct (0x7f7ae7b9c700) 0 + +Class QByteArray::Data + size=32 align=8 + base size=32 base align=8 +QByteArray::Data (0x7f7ae7bd8af0) 0 + +Class QByteArray + size=8 align=8 + base size=8 base align=8 +QByteArray (0x7f7ae7bd8a80) 0 + +Class QByteRef + size=16 align=8 + base size=12 base align=8 +QByteRef (0x7f7ae7a7c380) 0 + +Class QString::Null + size=1 align=1 + base size=0 base align=1 +QString::Null (0x7f7ae797bd20) 0 empty + +Class QString::Data + size=32 align=8 + base size=32 base align=8 +QString::Data (0x7f7ae79935b0) 0 + +Class QString + size=8 align=8 + base size=8 base align=8 +QString (0x7f7ae78f5bd0) 0 + +Class QLatin1String + size=8 align=8 + base size=8 base align=8 +QLatin1String (0x7f7ae786c9a0) 0 + +Class QCharRef + size=16 align=8 + base size=12 base align=8 +QCharRef (0x7f7ae770b000) 0 + +Class QConstString + size=8 align=8 + base size=8 base align=8 +QConstString (0x7f7ae76548c0) 0 + QString (0x7f7ae7654930) 0 + +Class QStringRef + size=16 align=8 + base size=16 base align=8 +QStringRef (0x7f7ae767b310) 0 + +Class QGenericArgument + size=16 align=8 + base size=16 base align=8 +QGenericArgument (0x7f7ae74f4700) 0 + +Class QGenericReturnArgument + size=16 align=8 + base size=16 base align=8 +QGenericReturnArgument (0x7f7ae74fd2a0) 0 + QGenericArgument (0x7f7ae74fd310) 0 + +Class QMetaObject + size=32 align=8 + base size=32 base align=8 +QMetaObject (0x7f7ae74fdb60) 0 + +Class QMetaObjectExtraData + size=16 align=8 + base size=16 base align=8 +QMetaObjectExtraData (0x7f7ae7526bd0) 0 + +Vtable for std::exception +std::exception::_ZTVSt9exception: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt9exception) +16 std::exception::~exception +24 std::exception::~exception +32 std::exception::what + +Class std::exception + size=8 align=8 + base size=8 base align=8 +std::exception (0x7f7ae757a1c0) 0 nearly-empty + vptr=((& std::exception::_ZTVSt9exception) + 16u) + +Vtable for std::bad_exception +std::bad_exception::_ZTVSt13bad_exception: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt13bad_exception) +16 std::bad_exception::~bad_exception +24 std::bad_exception::~bad_exception +32 std::bad_exception::what + +Class std::bad_exception + size=8 align=8 + base size=8 base align=8 +std::bad_exception (0x7f7ae757a770) 0 nearly-empty + vptr=((& std::bad_exception::_ZTVSt13bad_exception) + 16u) + std::exception (0x7f7ae757a7e0) 0 nearly-empty + primary-for std::bad_exception (0x7f7ae757a770) + +Vtable for std::bad_alloc +std::bad_alloc::_ZTVSt9bad_alloc: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTISt9bad_alloc) +16 std::bad_alloc::~bad_alloc +24 std::bad_alloc::~bad_alloc +32 std::bad_alloc::what + +Class std::bad_alloc + size=8 align=8 + base size=8 base align=8 +std::bad_alloc (0x7f7ae757a930) 0 nearly-empty + vptr=((& std::bad_alloc::_ZTVSt9bad_alloc) + 16u) + std::exception (0x7f7ae7590000) 0 nearly-empty + primary-for std::bad_alloc (0x7f7ae757a930) + +Class std::nothrow_t + size=1 align=1 + base size=0 base align=1 +std::nothrow_t (0x7f7ae7590850) 0 empty + +Class QListData::Data + size=32 align=8 + base size=32 base align=8 +QListData::Data (0x7f7ae7590d90) 0 + +Class QListData + size=8 align=8 + base size=8 base align=8 +QListData (0x7f7ae7590d20) 0 + +Class QScopedPointerPodDeleter + size=1 align=1 + base size=0 base align=1 +QScopedPointerPodDeleter (0x7f7ae74ba850) 0 empty + +Vtable for QObjectData +QObjectData::_ZTV11QObjectData: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QObjectData) +16 __cxa_pure_virtual +24 __cxa_pure_virtual + +Class QObjectData + size=48 align=8 + base size=48 base align=8 +QObjectData (0x7f7ae74db2a0) 0 + vptr=((& QObjectData::_ZTV11QObjectData) + 16u) + +Vtable for QObject +QObject::_ZTV7QObject: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI7QObject) +16 QObject::metaObject +24 QObject::qt_metacast +32 QObject::qt_metacall +40 QObject::~QObject +48 QObject::~QObject +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QObject + size=16 align=8 + base size=16 base align=8 +QObject (0x7f7ae74db5b0) 0 + vptr=((& QObject::_ZTV7QObject) + 16u) + +Vtable for QObjectUserData +QObjectUserData::_ZTV15QObjectUserData: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QObjectUserData) +16 QObjectUserData::~QObjectUserData +24 QObjectUserData::~QObjectUserData + +Class QObjectUserData + size=8 align=8 + base size=8 base align=8 +QObjectUserData (0x7f7ae735fb60) 0 nearly-empty + vptr=((& QObjectUserData::_ZTV15QObjectUserData) + 16u) + +Vtable for QIODevice +QIODevice::_ZTV9QIODevice: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QIODevice) +16 QIODevice::metaObject +24 QIODevice::qt_metacast +32 QIODevice::qt_metacall +40 QIODevice::~QIODevice +48 QIODevice::~QIODevice +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QIODevice::isSequential +120 QIODevice::open +128 QIODevice::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QIODevice::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 __cxa_pure_virtual +224 QIODevice::readLineData +232 __cxa_pure_virtual + +Class QIODevice + size=16 align=8 + base size=16 base align=8 +QIODevice (0x7f7ae736f150) 0 + vptr=((& QIODevice::_ZTV9QIODevice) + 16u) + QObject (0x7f7ae736f1c0) 0 + primary-for QIODevice (0x7f7ae736f150) + +Class _IO_marker + size=24 align=8 + base size=24 base align=8 +_IO_marker (0x7f7ae73d3cb0) 0 + +Class _IO_FILE + size=216 align=8 + base size=216 base align=8 +_IO_FILE (0x7f7ae73d3d20) 0 + +Vtable for QFile +QFile::_ZTV5QFile: 31u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI5QFile) +16 QFile::metaObject +24 QFile::qt_metacast +32 QFile::qt_metacall +40 QFile::~QFile +48 QFile::~QFile +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QFile::isSequential +120 QFile::open +128 QFile::close +136 QFile::pos +144 QFile::size +152 QFile::seek +160 QFile::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 QFile::readData +224 QFile::readLineData +232 QFile::writeData +240 QFile::fileEngine + +Class QFile + size=16 align=8 + base size=16 base align=8 +QFile (0x7f7ae73d3e00) 0 + vptr=((& QFile::_ZTV5QFile) + 16u) + QIODevice (0x7f7ae73d3e70) 0 + primary-for QFile (0x7f7ae73d3e00) + QObject (0x7f7ae73d3ee0) 0 + primary-for QIODevice (0x7f7ae73d3e70) + +Class QFileInfo + size=8 align=8 + base size=8 base align=8 +QFileInfo (0x7f7ae7275070) 0 + +Vtable for QDataStream +QDataStream::_ZTV11QDataStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QDataStream) +16 QDataStream::~QDataStream +24 QDataStream::~QDataStream + +Class QDataStream + size=40 align=8 + base size=40 base align=8 +QDataStream (0x7f7ae72c8a10) 0 + vptr=((& QDataStream::_ZTV11QDataStream) + 16u) + +Class QRegExp + size=8 align=8 + base size=8 base align=8 +QRegExp (0x7f7ae7132e70) 0 + +Class QStringMatcher::Data + size=272 align=8 + base size=272 base align=8 +QStringMatcher::Data (0x7f7ae719b2a0) 0 + +Class QStringMatcher + size=1048 align=8 + base size=1048 base align=8 +QStringMatcher (0x7f7ae718dc40) 0 + +Class QStringList + size=8 align=8 + base size=8 base align=8 +QStringList (0x7f7ae719b850) 0 + QList (0x7f7ae719b8c0) 0 + +Class QDir + size=8 align=8 + base size=8 base align=8 +QDir (0x7f7ae70384d0) 0 + +Class QAbstractFileEngine::ExtensionOption + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionOption (0x7f7ae6ee18c0) 0 empty + +Class QAbstractFileEngine::ExtensionReturn + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionReturn (0x7f7ae6ee1930) 0 empty + +Class QAbstractFileEngine::MapExtensionOption + size=24 align=8 + base size=20 base align=8 +QAbstractFileEngine::MapExtensionOption (0x7f7ae6ee19a0) 0 + QAbstractFileEngine::ExtensionOption (0x7f7ae6ee1a10) 0 empty + +Class QAbstractFileEngine::MapExtensionReturn + size=8 align=8 + base size=8 base align=8 +QAbstractFileEngine::MapExtensionReturn (0x7f7ae6ee1bd0) 0 + QAbstractFileEngine::ExtensionReturn (0x7f7ae6ee1c40) 0 empty + +Class QAbstractFileEngine::UnMapExtensionOption + size=8 align=8 + base size=8 base align=8 +QAbstractFileEngine::UnMapExtensionOption (0x7f7ae6ee1cb0) 0 + QAbstractFileEngine::ExtensionOption (0x7f7ae6ee1d20) 0 empty + +Vtable for QAbstractFileEngine +QAbstractFileEngine::_ZTV19QAbstractFileEngine: 36u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QAbstractFileEngine) +16 QAbstractFileEngine::~QAbstractFileEngine +24 QAbstractFileEngine::~QAbstractFileEngine +32 QAbstractFileEngine::open +40 QAbstractFileEngine::close +48 QAbstractFileEngine::flush +56 QAbstractFileEngine::size +64 QAbstractFileEngine::pos +72 QAbstractFileEngine::seek +80 QAbstractFileEngine::isSequential +88 QAbstractFileEngine::remove +96 QAbstractFileEngine::copy +104 QAbstractFileEngine::rename +112 QAbstractFileEngine::link +120 QAbstractFileEngine::mkdir +128 QAbstractFileEngine::rmdir +136 QAbstractFileEngine::setSize +144 QAbstractFileEngine::caseSensitive +152 QAbstractFileEngine::isRelativePath +160 QAbstractFileEngine::entryList +168 QAbstractFileEngine::fileFlags +176 QAbstractFileEngine::setPermissions +184 QAbstractFileEngine::fileName +192 QAbstractFileEngine::ownerId +200 QAbstractFileEngine::owner +208 QAbstractFileEngine::fileTime +216 QAbstractFileEngine::setFileName +224 QAbstractFileEngine::handle +232 QAbstractFileEngine::beginEntryList +240 QAbstractFileEngine::endEntryList +248 QAbstractFileEngine::read +256 QAbstractFileEngine::readLine +264 QAbstractFileEngine::write +272 QAbstractFileEngine::extension +280 QAbstractFileEngine::supportsExtension + +Class QAbstractFileEngine + size=16 align=8 + base size=16 base align=8 +QAbstractFileEngine (0x7f7ae70c5850) 0 + vptr=((& QAbstractFileEngine::_ZTV19QAbstractFileEngine) + 16u) + +Vtable for QAbstractFileEngineHandler +QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI26QAbstractFileEngineHandler) +16 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +24 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +32 __cxa_pure_virtual + +Class QAbstractFileEngineHandler + size=8 align=8 + base size=8 base align=8 +QAbstractFileEngineHandler (0x7f7ae6f17bd0) 0 nearly-empty + vptr=((& QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler) + 16u) + +Vtable for QAbstractFileEngineIterator +QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator: 9u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI27QAbstractFileEngineIterator) +16 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +24 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 QAbstractFileEngineIterator::currentFileInfo +64 QAbstractFileEngineIterator::entryInfo + +Class QAbstractFileEngineIterator + size=16 align=8 + base size=16 base align=8 +QAbstractFileEngineIterator (0x7f7ae6f17d90) 0 + vptr=((& QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator) + 16u) + +Vtable for QBuffer +QBuffer::_ZTV7QBuffer: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI7QBuffer) +16 QBuffer::metaObject +24 QBuffer::qt_metacast +32 QBuffer::qt_metacall +40 QBuffer::~QBuffer +48 QBuffer::~QBuffer +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QBuffer::connectNotify +104 QBuffer::disconnectNotify +112 QIODevice::isSequential +120 QBuffer::open +128 QBuffer::close +136 QBuffer::pos +144 QBuffer::size +152 QBuffer::seek +160 QBuffer::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QBuffer::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 QBuffer::readData +224 QIODevice::readLineData +232 QBuffer::writeData + +Class QBuffer + size=16 align=8 + base size=16 base align=8 +QBuffer (0x7f7ae6f2a690) 0 + vptr=((& QBuffer::_ZTV7QBuffer) + 16u) + QIODevice (0x7f7ae6f2a700) 0 + primary-for QBuffer (0x7f7ae6f2a690) + QObject (0x7f7ae6f2a770) 0 + primary-for QIODevice (0x7f7ae6f2a700) + +Class QHashData::Node + size=16 align=8 + base size=16 base align=8 +QHashData::Node (0x7f7ae6f6ce00) 0 + +Class QHashData + size=40 align=8 + base size=40 base align=8 +QHashData (0x7f7ae6f6cd90) 0 + +Class QHashDummyValue + size=1 align=1 + base size=0 base align=1 +QHashDummyValue (0x7f7ae6f8e150) 0 empty + +Class QMapData::Node + size=16 align=8 + base size=16 base align=8 +QMapData::Node (0x7f7ae6e8da80) 0 + +Class QMapData + size=128 align=8 + base size=128 base align=8 +QMapData (0x7f7ae6e8da10) 0 + +Vtable for QSystemLocale +QSystemLocale::_ZTV13QSystemLocale: 6u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QSystemLocale) +16 QSystemLocale::~QSystemLocale +24 QSystemLocale::~QSystemLocale +32 QSystemLocale::query +40 QSystemLocale::fallbackLocale + +Class QSystemLocale + size=8 align=8 + base size=8 base align=8 +QSystemLocale (0x7f7ae6dcb690) 0 nearly-empty + vptr=((& QSystemLocale::_ZTV13QSystemLocale) + 16u) + +Class QLocale::Data + size=4 align=2 + base size=4 base align=2 +QLocale::Data (0x7f7ae6c17d90) 0 + +Class QLocale + size=8 align=8 + base size=8 base align=8 +QLocale (0x7f7ae6dcbaf0) 0 + +Class QTextCodec::ConverterState + size=32 align=8 + base size=32 base align=8 +QTextCodec::ConverterState (0x7f7ae6c6fbd0) 0 + +Vtable for QTextCodec +QTextCodec::_ZTV10QTextCodec: 9u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QTextCodec) +16 __cxa_pure_virtual +24 QTextCodec::aliases +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 QTextCodec::~QTextCodec +64 QTextCodec::~QTextCodec + +Class QTextCodec + size=8 align=8 + base size=8 base align=8 +QTextCodec (0x7f7ae6c61460) 0 nearly-empty + vptr=((& QTextCodec::_ZTV10QTextCodec) + 16u) + +Class QTextEncoder + size=40 align=8 + base size=40 base align=8 +QTextEncoder (0x7f7ae6add150) 0 + +Class QTextDecoder + size=40 align=8 + base size=40 base align=8 +QTextDecoder (0x7f7ae6addf50) 0 + +Vtable for QTextStream +QTextStream::_ZTV11QTextStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QTextStream) +16 QTextStream::~QTextStream +24 QTextStream::~QTextStream + +Class QTextStream + size=16 align=8 + base size=16 base align=8 +QTextStream (0x7f7ae6ae6d90) 0 + vptr=((& QTextStream::_ZTV11QTextStream) + 16u) + +Class QTextStreamManipulator + size=40 align=8 + base size=38 base align=8 +QTextStreamManipulator (0x7f7ae6b5fa80) 0 + +Vtable for QTextIStream +QTextIStream::_ZTV12QTextIStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QTextIStream) +16 QTextIStream::~QTextIStream +24 QTextIStream::~QTextIStream + +Class QTextIStream + size=16 align=8 + base size=16 base align=8 +QTextIStream (0x7f7ae6b90070) 0 + vptr=((& QTextIStream::_ZTV12QTextIStream) + 16u) + QTextStream (0x7f7ae6b900e0) 0 + primary-for QTextIStream (0x7f7ae6b90070) + +Vtable for QTextOStream +QTextOStream::_ZTV12QTextOStream: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QTextOStream) +16 QTextOStream::~QTextOStream +24 QTextOStream::~QTextOStream + +Class QTextOStream + size=16 align=8 + base size=16 base align=8 +QTextOStream (0x7f7ae6b9cee0) 0 + vptr=((& QTextOStream::_ZTV12QTextOStream) + 16u) + QTextStream (0x7f7ae6b9cf50) 0 + primary-for QTextOStream (0x7f7ae6b9cee0) + +Class wait + size=4 align=4 + base size=4 base align=4 +wait (0x7f7ae6bb0d90) 0 + +Class timespec + size=16 align=8 + base size=16 base align=8 +timespec (0x7f7ae6bbd0e0) 0 + +Class timeval + size=16 align=8 + base size=16 base align=8 +timeval (0x7f7ae6bbd150) 0 + +Class __pthread_internal_list + size=16 align=8 + base size=16 base align=8 +__pthread_internal_list (0x7f7ae6bbd2a0) 0 + +Class random_data + size=48 align=8 + base size=48 base align=8 +random_data (0x7f7ae6bbd850) 0 + +Class drand48_data + size=24 align=8 + base size=24 base align=8 +drand48_data (0x7f7ae6bbd8c0) 0 + +Class QVectorData + size=16 align=4 + base size=16 base align=4 +QVectorData (0x7f7ae6bbd930) 0 + +Class QContiguousCacheData + size=24 align=4 + base size=24 base align=4 +QContiguousCacheData (0x7f7ae697d620) 0 + +Class QDebug::Stream + size=40 align=8 + base size=34 base align=8 +QDebug::Stream (0x7f7ae67dd150) 0 + +Class QDebug + size=8 align=8 + base size=8 base align=8 +QDebug (0x7f7ae67dd0e0) 0 + +Class QNoDebug + size=1 align=1 + base size=0 base align=1 +QNoDebug (0x7f7ae688c0e0) 0 empty + +Vtable for QDirIterator +QDirIterator::_ZTV12QDirIterator: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QDirIterator) +16 QDirIterator::~QDirIterator +24 QDirIterator::~QDirIterator + +Class QDirIterator + size=16 align=8 + base size=16 base align=8 +QDirIterator (0x7f7ae689c700) 0 + vptr=((& QDirIterator::_ZTV12QDirIterator) + 16u) + +Vtable for QFileSystemWatcher +QFileSystemWatcher::_ZTV18QFileSystemWatcher: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QFileSystemWatcher) +16 QFileSystemWatcher::metaObject +24 QFileSystemWatcher::qt_metacast +32 QFileSystemWatcher::qt_metacall +40 QFileSystemWatcher::~QFileSystemWatcher +48 QFileSystemWatcher::~QFileSystemWatcher +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QFileSystemWatcher + size=16 align=8 + base size=16 base align=8 +QFileSystemWatcher (0x7f7ae66f7540) 0 + vptr=((& QFileSystemWatcher::_ZTV18QFileSystemWatcher) + 16u) + QObject (0x7f7ae66f75b0) 0 + primary-for QFileSystemWatcher (0x7f7ae66f7540) + +Vtable for QFSFileEngine +QFSFileEngine::_ZTV13QFSFileEngine: 36u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QFSFileEngine) +16 QFSFileEngine::~QFSFileEngine +24 QFSFileEngine::~QFSFileEngine +32 QFSFileEngine::open +40 QFSFileEngine::close +48 QFSFileEngine::flush +56 QFSFileEngine::size +64 QFSFileEngine::pos +72 QFSFileEngine::seek +80 QFSFileEngine::isSequential +88 QFSFileEngine::remove +96 QFSFileEngine::copy +104 QFSFileEngine::rename +112 QFSFileEngine::link +120 QFSFileEngine::mkdir +128 QFSFileEngine::rmdir +136 QFSFileEngine::setSize +144 QFSFileEngine::caseSensitive +152 QFSFileEngine::isRelativePath +160 QFSFileEngine::entryList +168 QFSFileEngine::fileFlags +176 QFSFileEngine::setPermissions +184 QFSFileEngine::fileName +192 QFSFileEngine::ownerId +200 QFSFileEngine::owner +208 QFSFileEngine::fileTime +216 QFSFileEngine::setFileName +224 QFSFileEngine::handle +232 QFSFileEngine::beginEntryList +240 QFSFileEngine::endEntryList +248 QFSFileEngine::read +256 QFSFileEngine::readLine +264 QFSFileEngine::write +272 QFSFileEngine::extension +280 QFSFileEngine::supportsExtension + +Class QFSFileEngine + size=16 align=8 + base size=16 base align=8 +QFSFileEngine (0x7f7ae6709a80) 0 + vptr=((& QFSFileEngine::_ZTV13QFSFileEngine) + 16u) + QAbstractFileEngine (0x7f7ae6709af0) 0 + primary-for QFSFileEngine (0x7f7ae6709a80) + +Class QSharedData + size=4 align=4 + base size=4 base align=4 +QSharedData (0x7f7ae6719e70) 0 + +Class QProcessEnvironment + size=8 align=8 + base size=8 base align=8 +QProcessEnvironment (0x7f7ae67641c0) 0 + +Vtable for QProcess +QProcess::_ZTV8QProcess: 31u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI8QProcess) +16 QProcess::metaObject +24 QProcess::qt_metacast +32 QProcess::qt_metacall +40 QProcess::~QProcess +48 QProcess::~QProcess +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QProcess::isSequential +120 QIODevice::open +128 QProcess::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QProcess::atEnd +168 QIODevice::reset +176 QProcess::bytesAvailable +184 QProcess::bytesToWrite +192 QProcess::canReadLine +200 QProcess::waitForReadyRead +208 QProcess::waitForBytesWritten +216 QProcess::readData +224 QIODevice::readLineData +232 QProcess::writeData +240 QProcess::setupChildProcess + +Class QProcess + size=16 align=8 + base size=16 base align=8 +QProcess (0x7f7ae6764cb0) 0 + vptr=((& QProcess::_ZTV8QProcess) + 16u) + QIODevice (0x7f7ae6764d20) 0 + primary-for QProcess (0x7f7ae6764cb0) + QObject (0x7f7ae6764d90) 0 + primary-for QIODevice (0x7f7ae6764d20) + +Class QResource + size=8 align=8 + base size=8 base align=8 +QResource (0x7f7ae67a81c0) 0 + +Class QMetaType + size=1 align=1 + base size=0 base align=1 +QMetaType (0x7f7ae67a8e70) 0 empty + +Class QVariant::PrivateShared + size=16 align=8 + base size=12 base align=8 +QVariant::PrivateShared (0x7f7ae66a7700) 0 + +Class QVariant::Private::Data + size=8 align=8 + base size=8 base align=8 +QVariant::Private::Data (0x7f7ae66a7a10) 0 + +Class QVariant::Private + size=16 align=8 + base size=12 base align=8 +QVariant::Private (0x7f7ae66a77e0) 0 + +Class QVariant::Handler + size=72 align=8 + base size=72 base align=8 +QVariant::Handler (0x7f7ae64b7700) 0 + +Class QVariant + size=16 align=8 + base size=16 base align=8 +QVariant (0x7f7ae66777e0) 0 + +Class QVariantComparisonHelper + size=8 align=8 + base size=8 base align=8 +QVariantComparisonHelper (0x7f7ae656e9a0) 0 + +Vtable for QSettings +QSettings::_ZTV9QSettings: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QSettings) +16 QSettings::metaObject +24 QSettings::qt_metacast +32 QSettings::qt_metacall +40 QSettings::~QSettings +48 QSettings::~QSettings +56 QSettings::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSettings + size=16 align=8 + base size=16 base align=8 +QSettings (0x7f7ae6594ee0) 0 + vptr=((& QSettings::_ZTV9QSettings) + 16u) + QObject (0x7f7ae6594f50) 0 + primary-for QSettings (0x7f7ae6594ee0) + +Vtable for QTemporaryFile +QTemporaryFile::_ZTV14QTemporaryFile: 31u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI14QTemporaryFile) +16 QTemporaryFile::metaObject +24 QTemporaryFile::qt_metacast +32 QTemporaryFile::qt_metacall +40 QTemporaryFile::~QTemporaryFile +48 QTemporaryFile::~QTemporaryFile +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QFile::isSequential +120 QTemporaryFile::open +128 QFile::close +136 QFile::pos +144 QFile::size +152 QFile::seek +160 QFile::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 QFile::readData +224 QFile::readLineData +232 QFile::writeData +240 QTemporaryFile::fileEngine + +Class QTemporaryFile + size=16 align=8 + base size=16 base align=8 +QTemporaryFile (0x7f7ae64122a0) 0 + vptr=((& QTemporaryFile::_ZTV14QTemporaryFile) + 16u) + QFile (0x7f7ae6412310) 0 + primary-for QTemporaryFile (0x7f7ae64122a0) + QIODevice (0x7f7ae6412380) 0 + primary-for QFile (0x7f7ae6412310) + QObject (0x7f7ae64123f0) 0 + primary-for QIODevice (0x7f7ae6412380) + +Class QUrl + size=8 align=8 + base size=8 base align=8 +QUrl (0x7f7ae642b9a0) 0 + +Class QXmlStreamStringRef + size=16 align=8 + base size=16 base align=8 +QXmlStreamStringRef (0x7f7ae62b5070) 0 + +Class QXmlStreamAttribute + size=80 align=8 + base size=73 base align=8 +QXmlStreamAttribute (0x7f7ae62d4850) 0 + +Class QXmlStreamAttributes + size=8 align=8 + base size=8 base align=8 +QXmlStreamAttributes (0x7f7ae62fd310) 0 + QVector (0x7f7ae62fd380) 0 + +Class QXmlStreamNamespaceDeclaration + size=40 align=8 + base size=40 base align=8 +QXmlStreamNamespaceDeclaration (0x7f7ae62fd7e0) 0 + +Class QXmlStreamNotationDeclaration + size=56 align=8 + base size=56 base align=8 +QXmlStreamNotationDeclaration (0x7f7ae633e1c0) 0 + +Class QXmlStreamEntityDeclaration + size=88 align=8 + base size=88 base align=8 +QXmlStreamEntityDeclaration (0x7f7ae635d070) 0 + +Vtable for QXmlStreamEntityResolver +QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver: 6u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI24QXmlStreamEntityResolver) +16 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +24 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +32 QXmlStreamEntityResolver::resolveEntity +40 QXmlStreamEntityResolver::resolveUndeclaredEntity + +Class QXmlStreamEntityResolver + size=8 align=8 + base size=8 base align=8 +QXmlStreamEntityResolver (0x7f7ae63799a0) 0 nearly-empty + vptr=((& QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver) + 16u) + +Class QXmlStreamReader + size=8 align=8 + base size=8 base align=8 +QXmlStreamReader (0x7f7ae6379b60) 0 + +Class QXmlStreamWriter + size=8 align=8 + base size=8 base align=8 +QXmlStreamWriter (0x7f7ae61c1c40) 0 + +Vtable for QAbstractState +QAbstractState::_ZTV14QAbstractState: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI14QAbstractState) +16 QAbstractState::metaObject +24 QAbstractState::qt_metacast +32 QAbstractState::qt_metacall +40 QAbstractState::~QAbstractState +48 QAbstractState::~QAbstractState +56 QAbstractState::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual + +Class QAbstractState + size=16 align=8 + base size=16 base align=8 +QAbstractState (0x7f7ae61d6a80) 0 + vptr=((& QAbstractState::_ZTV14QAbstractState) + 16u) + QObject (0x7f7ae61d6af0) 0 + primary-for QAbstractState (0x7f7ae61d6a80) + +Vtable for QAbstractTransition +QAbstractTransition::_ZTV19QAbstractTransition: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QAbstractTransition) +16 QAbstractTransition::metaObject +24 QAbstractTransition::qt_metacast +32 QAbstractTransition::qt_metacall +40 QAbstractTransition::~QAbstractTransition +48 QAbstractTransition::~QAbstractTransition +56 QAbstractTransition::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual + +Class QAbstractTransition + size=16 align=8 + base size=16 base align=8 +QAbstractTransition (0x7f7ae61fc2a0) 0 + vptr=((& QAbstractTransition::_ZTV19QAbstractTransition) + 16u) + QObject (0x7f7ae61fc310) 0 + primary-for QAbstractTransition (0x7f7ae61fc2a0) + +Vtable for QEvent +QEvent::_ZTV6QEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI6QEvent) +16 QEvent::~QEvent +24 QEvent::~QEvent + +Class QEvent + size=24 align=8 + base size=20 base align=8 +QEvent (0x7f7ae6211af0) 0 + vptr=((& QEvent::_ZTV6QEvent) + 16u) + +Vtable for QTimerEvent +QTimerEvent::_ZTV11QTimerEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QTimerEvent) +16 QTimerEvent::~QTimerEvent +24 QTimerEvent::~QTimerEvent + +Class QTimerEvent + size=24 align=8 + base size=24 base align=8 +QTimerEvent (0x7f7ae6233700) 0 + vptr=((& QTimerEvent::_ZTV11QTimerEvent) + 16u) + QEvent (0x7f7ae6233770) 0 + primary-for QTimerEvent (0x7f7ae6233700) + +Vtable for QChildEvent +QChildEvent::_ZTV11QChildEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QChildEvent) +16 QChildEvent::~QChildEvent +24 QChildEvent::~QChildEvent + +Class QChildEvent + size=32 align=8 + base size=32 base align=8 +QChildEvent (0x7f7ae6233b60) 0 + vptr=((& QChildEvent::_ZTV11QChildEvent) + 16u) + QEvent (0x7f7ae6233bd0) 0 + primary-for QChildEvent (0x7f7ae6233b60) + +Vtable for QCustomEvent +QCustomEvent::_ZTV12QCustomEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QCustomEvent) +16 QCustomEvent::~QCustomEvent +24 QCustomEvent::~QCustomEvent + +Class QCustomEvent + size=24 align=8 + base size=20 base align=8 +QCustomEvent (0x7f7ae623de00) 0 + vptr=((& QCustomEvent::_ZTV12QCustomEvent) + 16u) + QEvent (0x7f7ae623de70) 0 + primary-for QCustomEvent (0x7f7ae623de00) + +Vtable for QDynamicPropertyChangeEvent +QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI27QDynamicPropertyChangeEvent) +16 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent +24 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent + +Class QDynamicPropertyChangeEvent + size=32 align=8 + base size=32 base align=8 +QDynamicPropertyChangeEvent (0x7f7ae624f620) 0 + vptr=((& QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent) + 16u) + QEvent (0x7f7ae624f690) 0 + primary-for QDynamicPropertyChangeEvent (0x7f7ae624f620) + +Vtable for QEventTransition +QEventTransition::_ZTV16QEventTransition: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI16QEventTransition) +16 QEventTransition::metaObject +24 QEventTransition::qt_metacast +32 QEventTransition::qt_metacall +40 QEventTransition::~QEventTransition +48 QEventTransition::~QEventTransition +56 QEventTransition::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QEventTransition::eventTest +120 QEventTransition::onTransition + +Class QEventTransition + size=16 align=8 + base size=16 base align=8 +QEventTransition (0x7f7ae624faf0) 0 + vptr=((& QEventTransition::_ZTV16QEventTransition) + 16u) + QAbstractTransition (0x7f7ae624fb60) 0 + primary-for QEventTransition (0x7f7ae624faf0) + QObject (0x7f7ae624fbd0) 0 + primary-for QAbstractTransition (0x7f7ae624fb60) + +Vtable for QFinalState +QFinalState::_ZTV11QFinalState: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QFinalState) +16 QFinalState::metaObject +24 QFinalState::qt_metacast +32 QFinalState::qt_metacall +40 QFinalState::~QFinalState +48 QFinalState::~QFinalState +56 QFinalState::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QFinalState::onEntry +120 QFinalState::onExit + +Class QFinalState + size=16 align=8 + base size=16 base align=8 +QFinalState (0x7f7ae62699a0) 0 + vptr=((& QFinalState::_ZTV11QFinalState) + 16u) + QAbstractState (0x7f7ae6269a10) 0 + primary-for QFinalState (0x7f7ae62699a0) + QObject (0x7f7ae6269a80) 0 + primary-for QAbstractState (0x7f7ae6269a10) + +Vtable for QHistoryState +QHistoryState::_ZTV13QHistoryState: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QHistoryState) +16 QHistoryState::metaObject +24 QHistoryState::qt_metacast +32 QHistoryState::qt_metacall +40 QHistoryState::~QHistoryState +48 QHistoryState::~QHistoryState +56 QHistoryState::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QHistoryState::onEntry +120 QHistoryState::onExit + +Class QHistoryState + size=16 align=8 + base size=16 base align=8 +QHistoryState (0x7f7ae6282230) 0 + vptr=((& QHistoryState::_ZTV13QHistoryState) + 16u) + QAbstractState (0x7f7ae62822a0) 0 + primary-for QHistoryState (0x7f7ae6282230) + QObject (0x7f7ae6282310) 0 + primary-for QAbstractState (0x7f7ae62822a0) + +Vtable for QSignalTransition +QSignalTransition::_ZTV17QSignalTransition: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QSignalTransition) +16 QSignalTransition::metaObject +24 QSignalTransition::qt_metacast +32 QSignalTransition::qt_metacall +40 QSignalTransition::~QSignalTransition +48 QSignalTransition::~QSignalTransition +56 QSignalTransition::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QSignalTransition::eventTest +120 QSignalTransition::onTransition + +Class QSignalTransition + size=16 align=8 + base size=16 base align=8 +QSignalTransition (0x7f7ae6293f50) 0 + vptr=((& QSignalTransition::_ZTV17QSignalTransition) + 16u) + QAbstractTransition (0x7f7ae629c000) 0 + primary-for QSignalTransition (0x7f7ae6293f50) + QObject (0x7f7ae629c070) 0 + primary-for QAbstractTransition (0x7f7ae629c000) + +Vtable for QState +QState::_ZTV6QState: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI6QState) +16 QState::metaObject +24 QState::qt_metacast +32 QState::qt_metacall +40 QState::~QState +48 QState::~QState +56 QState::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QState::onEntry +120 QState::onExit + +Class QState + size=16 align=8 + base size=16 base align=8 +QState (0x7f7ae60aeaf0) 0 + vptr=((& QState::_ZTV6QState) + 16u) + QAbstractState (0x7f7ae60aeb60) 0 + primary-for QState (0x7f7ae60aeaf0) + QObject (0x7f7ae60aebd0) 0 + primary-for QAbstractState (0x7f7ae60aeb60) + +Vtable for QStateMachine::SignalEvent +QStateMachine::SignalEvent::_ZTVN13QStateMachine11SignalEventE: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN13QStateMachine11SignalEventE) +16 QStateMachine::SignalEvent::~SignalEvent +24 QStateMachine::SignalEvent::~SignalEvent + +Class QStateMachine::SignalEvent + size=48 align=8 + base size=48 base align=8 +QStateMachine::SignalEvent (0x7f7ae60d4150) 0 + vptr=((& QStateMachine::SignalEvent::_ZTVN13QStateMachine11SignalEventE) + 16u) + QEvent (0x7f7ae60d41c0) 0 + primary-for QStateMachine::SignalEvent (0x7f7ae60d4150) + +Vtable for QStateMachine::WrappedEvent +QStateMachine::WrappedEvent::_ZTVN13QStateMachine12WrappedEventE: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN13QStateMachine12WrappedEventE) +16 QStateMachine::WrappedEvent::~WrappedEvent +24 QStateMachine::WrappedEvent::~WrappedEvent + +Class QStateMachine::WrappedEvent + size=40 align=8 + base size=40 base align=8 +QStateMachine::WrappedEvent (0x7f7ae60d4700) 0 + vptr=((& QStateMachine::WrappedEvent::_ZTVN13QStateMachine12WrappedEventE) + 16u) + QEvent (0x7f7ae60d4770) 0 + primary-for QStateMachine::WrappedEvent (0x7f7ae60d4700) + +Vtable for QStateMachine +QStateMachine::_ZTV13QStateMachine: 20u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QStateMachine) +16 QStateMachine::metaObject +24 QStateMachine::qt_metacast +32 QStateMachine::qt_metacall +40 QStateMachine::~QStateMachine +48 QStateMachine::~QStateMachine +56 QStateMachine::event +64 QStateMachine::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QStateMachine::onEntry +120 QStateMachine::onExit +128 QStateMachine::beginSelectTransitions +136 QStateMachine::endSelectTransitions +144 QStateMachine::beginMicrostep +152 QStateMachine::endMicrostep + +Class QStateMachine + size=16 align=8 + base size=16 base align=8 +QStateMachine (0x7f7ae60cbee0) 0 + vptr=((& QStateMachine::_ZTV13QStateMachine) + 16u) + QState (0x7f7ae60cbf50) 0 + primary-for QStateMachine (0x7f7ae60cbee0) + QAbstractState (0x7f7ae60d4000) 0 + primary-for QState (0x7f7ae60cbf50) + QObject (0x7f7ae60d4070) 0 + primary-for QAbstractState (0x7f7ae60d4000) + +Class QBitArray + size=8 align=8 + base size=8 base align=8 +QBitArray (0x7f7ae6103150) 0 + +Class QBitRef + size=16 align=8 + base size=12 base align=8 +QBitRef (0x7f7ae615ae00) 0 + +Class QByteArrayMatcher::Data + size=272 align=8 + base size=272 base align=8 +QByteArrayMatcher::Data (0x7f7ae616daf0) 0 + +Class QByteArrayMatcher + size=1040 align=8 + base size=1040 base align=8 +QByteArrayMatcher (0x7f7ae616d4d0) 0 + +Class QCryptographicHash + size=8 align=8 + base size=8 base align=8 +QCryptographicHash (0x7f7ae61a3150) 0 + +Vtable for QtSharedPointer::ExternalRefCountData +QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN15QtSharedPointer20ExternalRefCountDataE) +16 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +24 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +32 QtSharedPointer::ExternalRefCountData::destroy + +Class QtSharedPointer::ExternalRefCountData + size=16 align=8 + base size=16 base align=8 +QtSharedPointer::ExternalRefCountData (0x7f7ae5fcf070) 0 + vptr=((& QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE) + 16u) + +Vtable for QtSharedPointer::ExternalRefCountWithDestroyFn +QtSharedPointer::ExternalRefCountWithDestroyFn::_ZTVN15QtSharedPointer29ExternalRefCountWithDestroyFnE: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN15QtSharedPointer29ExternalRefCountWithDestroyFnE) +16 QtSharedPointer::ExternalRefCountWithDestroyFn::~ExternalRefCountWithDestroyFn +24 QtSharedPointer::ExternalRefCountWithDestroyFn::~ExternalRefCountWithDestroyFn +32 QtSharedPointer::ExternalRefCountWithDestroyFn::destroy + +Class QtSharedPointer::ExternalRefCountWithDestroyFn + size=24 align=8 + base size=24 base align=8 +QtSharedPointer::ExternalRefCountWithDestroyFn (0x7f7ae5fe7930) 0 + vptr=((& QtSharedPointer::ExternalRefCountWithDestroyFn::_ZTVN15QtSharedPointer29ExternalRefCountWithDestroyFnE) + 16u) + QtSharedPointer::ExternalRefCountData (0x7f7ae5fe79a0) 0 + primary-for QtSharedPointer::ExternalRefCountWithDestroyFn (0x7f7ae5fe7930) + +Class QDate + size=4 align=4 + base size=4 base align=4 +QDate (0x7f7ae606c5b0) 0 + +Class QTime + size=4 align=4 + base size=4 base align=4 +QTime (0x7f7ae609e540) 0 + +Class QDateTime + size=8 align=8 + base size=8 base align=8 +QDateTime (0x7f7ae5eb9af0) 0 + +Class QEasingCurve + size=8 align=8 + base size=8 base align=8 +QEasingCurve (0x7f7ae5f00000) 0 + +Class QPoint + size=8 align=4 + base size=8 base align=4 +QPoint (0x7f7ae5f00ee0) 0 + +Class QPointF + size=16 align=8 + base size=16 base align=8 +QPointF (0x7f7ae5f43af0) 0 + +Class QLine + size=16 align=4 + base size=16 base align=4 +QLine (0x7f7ae5f82af0) 0 + +Class QLineF + size=32 align=8 + base size=32 base align=8 +QLineF (0x7f7ae5db39a0) 0 + +Class QLinkedListData + size=32 align=8 + base size=32 base align=8 +QLinkedListData (0x7f7ae5e10460) 0 + +Class QMargins + size=16 align=4 + base size=16 base align=4 +QMargins (0x7f7ae5ccf380) 0 + +Class QSize + size=8 align=4 + base size=8 base align=4 +QSize (0x7f7ae5cfe150) 0 + +Class QSizeF + size=16 align=8 + base size=16 base align=8 +QSizeF (0x7f7ae5d3ee00) 0 + +Class QRect + size=16 align=4 + base size=16 base align=4 +QRect (0x7f7ae5d92380) 0 + +Class QRectF + size=32 align=8 + base size=32 base align=8 +QRectF (0x7f7ae5c3ed20) 0 + +Class QLatin1Literal + size=16 align=8 + base size=16 base align=8 +QLatin1Literal (0x7f7ae5aeeee0) 0 + +Class QAbstractConcatenable + size=1 align=1 + base size=0 base align=1 +QAbstractConcatenable (0x7f7ae5aff3f0) 0 empty + +Class QTextBoundaryFinder + size=48 align=8 + base size=48 base align=8 +QTextBoundaryFinder (0x7f7ae5b36380) 0 + +Vtable for QTimeLine +QTimeLine::_ZTV9QTimeLine: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QTimeLine) +16 QTimeLine::metaObject +24 QTimeLine::qt_metacast +32 QTimeLine::qt_metacall +40 QTimeLine::~QTimeLine +48 QTimeLine::~QTimeLine +56 QObject::event +64 QObject::eventFilter +72 QTimeLine::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QTimeLine::valueForTime + +Class QTimeLine + size=16 align=8 + base size=16 base align=8 +QTimeLine (0x7f7ae5b47700) 0 + vptr=((& QTimeLine::_ZTV9QTimeLine) + 16u) + QObject (0x7f7ae5b47770) 0 + primary-for QTimeLine (0x7f7ae5b47700) + +Vtable for QRunnable +QRunnable::_ZTV9QRunnable: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QRunnable) +16 __cxa_pure_virtual +24 QRunnable::~QRunnable +32 QRunnable::~QRunnable + +Class QRunnable + size=16 align=8 + base size=12 base align=8 +QRunnable (0x7f7ae5b6ef50) 0 + vptr=((& QRunnable::_ZTV9QRunnable) + 16u) + +Class QMutex + size=8 align=8 + base size=8 base align=8 +QMutex (0x7f7ae59a5620) 0 + +Class QMutexLocker + size=8 align=8 + base size=8 base align=8 +QMutexLocker (0x7f7ae59b31c0) 0 + +Vtable for QtConcurrent::Exception +QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE: 7u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent9ExceptionE) +16 QtConcurrent::Exception::~Exception +24 QtConcurrent::Exception::~Exception +32 std::exception::what +40 QtConcurrent::Exception::raise +48 QtConcurrent::Exception::clone + +Class QtConcurrent::Exception + size=8 align=8 + base size=8 base align=8 +QtConcurrent::Exception (0x7f7ae59ca4d0) 0 nearly-empty + vptr=((& QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE) + 16u) + std::exception (0x7f7ae59ca540) 0 nearly-empty + primary-for QtConcurrent::Exception (0x7f7ae59ca4d0) + +Vtable for QtConcurrent::UnhandledException +QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE: 7u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent18UnhandledExceptionE) +16 QtConcurrent::UnhandledException::~UnhandledException +24 QtConcurrent::UnhandledException::~UnhandledException +32 std::exception::what +40 QtConcurrent::UnhandledException::raise +48 QtConcurrent::UnhandledException::clone + +Class QtConcurrent::UnhandledException + size=8 align=8 + base size=8 base align=8 +QtConcurrent::UnhandledException (0x7f7ae59ca770) 0 nearly-empty + vptr=((& QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE) + 16u) + QtConcurrent::Exception (0x7f7ae59ca7e0) 0 nearly-empty + primary-for QtConcurrent::UnhandledException (0x7f7ae59ca770) + std::exception (0x7f7ae59ca850) 0 nearly-empty + primary-for QtConcurrent::Exception (0x7f7ae59ca7e0) + +Class QtConcurrent::internal::ExceptionHolder + size=8 align=8 + base size=8 base align=8 +QtConcurrent::internal::ExceptionHolder (0x7f7ae59caa80) 0 + +Class QtConcurrent::internal::ExceptionStore + size=8 align=8 + base size=8 base align=8 +QtConcurrent::internal::ExceptionStore (0x7f7ae59cae00) 0 + +Class QtConcurrent::ResultItem + size=16 align=8 + base size=16 base align=8 +QtConcurrent::ResultItem (0x7f7ae59cae70) 0 + +Class QtConcurrent::ResultIteratorBase + size=16 align=8 + base size=12 base align=8 +QtConcurrent::ResultIteratorBase (0x7f7ae59e3d90) 0 + +Vtable for QtConcurrent::ResultStoreBase +QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent15ResultStoreBaseE) +16 QtConcurrent::ResultStoreBase::~ResultStoreBase +24 QtConcurrent::ResultStoreBase::~ResultStoreBase + +Class QtConcurrent::ResultStoreBase + size=48 align=8 + base size=44 base align=8 +QtConcurrent::ResultStoreBase (0x7f7ae59e7930) 0 + vptr=((& QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE) + 16u) + +Vtable for QFutureInterfaceBase +QFutureInterfaceBase::_ZTV20QFutureInterfaceBase: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QFutureInterfaceBase) +16 QFutureInterfaceBase::~QFutureInterfaceBase +24 QFutureInterfaceBase::~QFutureInterfaceBase + +Class QFutureInterfaceBase + size=16 align=8 + base size=16 base align=8 +QFutureInterfaceBase (0x7f7ae5a24d90) 0 + vptr=((& QFutureInterfaceBase::_ZTV20QFutureInterfaceBase) + 16u) + +Vtable for QFutureWatcherBase +QFutureWatcherBase::_ZTV18QFutureWatcherBase: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QFutureWatcherBase) +16 QFutureWatcherBase::metaObject +24 QFutureWatcherBase::qt_metacast +32 QFutureWatcherBase::qt_metacall +40 QFutureWatcherBase::~QFutureWatcherBase +48 QFutureWatcherBase::~QFutureWatcherBase +56 QFutureWatcherBase::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QFutureWatcherBase::connectNotify +104 QFutureWatcherBase::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual + +Class QFutureWatcherBase + size=16 align=8 + base size=16 base align=8 +QFutureWatcherBase (0x7f7ae590b690) 0 + vptr=((& QFutureWatcherBase::_ZTV18QFutureWatcherBase) + 16u) + QObject (0x7f7ae590b700) 0 + primary-for QFutureWatcherBase (0x7f7ae590b690) + +Vtable for QThread +QThread::_ZTV7QThread: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI7QThread) +16 QThread::metaObject +24 QThread::qt_metacast +32 QThread::qt_metacall +40 QThread::~QThread +48 QThread::~QThread +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QThread::run + +Class QThread + size=16 align=8 + base size=16 base align=8 +QThread (0x7f7ae595ea80) 0 + vptr=((& QThread::_ZTV7QThread) + 16u) + QObject (0x7f7ae595eaf0) 0 + primary-for QThread (0x7f7ae595ea80) + +Vtable for QThreadPool +QThreadPool::_ZTV11QThreadPool: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QThreadPool) +16 QThreadPool::metaObject +24 QThreadPool::qt_metacast +32 QThreadPool::qt_metacall +40 QThreadPool::~QThreadPool +48 QThreadPool::~QThreadPool +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QThreadPool + size=16 align=8 + base size=16 base align=8 +QThreadPool (0x7f7ae5983930) 0 + vptr=((& QThreadPool::_ZTV11QThreadPool) + 16u) + QObject (0x7f7ae59839a0) 0 + primary-for QThreadPool (0x7f7ae5983930) + +Class QWaitCondition + size=8 align=8 + base size=8 base align=8 +QWaitCondition (0x7f7ae5995ee0) 0 + +Class QSemaphore + size=8 align=8 + base size=8 base align=8 +QSemaphore (0x7f7ae599e460) 0 + +Class QtConcurrent::ThreadEngineBarrier + size=24 align=8 + base size=24 base align=8 +QtConcurrent::ThreadEngineBarrier (0x7f7ae599e9a0) 0 + +Vtable for QtConcurrent::ThreadEngineBase +QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE: 11u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTIN12QtConcurrent16ThreadEngineBaseE) +16 QtConcurrent::ThreadEngineBase::run +24 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +32 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +40 QtConcurrent::ThreadEngineBase::start +48 QtConcurrent::ThreadEngineBase::finish +56 QtConcurrent::ThreadEngineBase::threadFunction +64 QtConcurrent::ThreadEngineBase::shouldStartThread +72 QtConcurrent::ThreadEngineBase::shouldThrottleThread +80 __cxa_pure_virtual + +Class QtConcurrent::ThreadEngineBase + size=64 align=8 + base size=64 base align=8 +QtConcurrent::ThreadEngineBase (0x7f7ae599ea80) 0 + vptr=((& QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE) + 16u) + QRunnable (0x7f7ae599eaf0) 0 + primary-for QtConcurrent::ThreadEngineBase (0x7f7ae599ea80) + +VTT for QtConcurrent::ThreadEngine +QtConcurrent::ThreadEngine::_ZTTN12QtConcurrent12ThreadEngineIvEE: 2u entries +0 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 24u) +8 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 136u) + +Class QtConcurrent::BlockSizeManager + size=96 align=8 + base size=92 base align=8 +QtConcurrent::BlockSizeManager (0x7f7ae57eaee0) 0 + +Vtable for QFactoryInterface +QFactoryInterface::_ZTV17QFactoryInterface: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QFactoryInterface) +16 QFactoryInterface::~QFactoryInterface +24 QFactoryInterface::~QFactoryInterface +32 __cxa_pure_virtual + +Class QFactoryInterface + size=8 align=8 + base size=8 base align=8 +QFactoryInterface (0x7f7ae548dd20) 0 nearly-empty + vptr=((& QFactoryInterface::_ZTV17QFactoryInterface) + 16u) + +Vtable for QTextCodecFactoryInterface +QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface: 6u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI26QTextCodecFactoryInterface) +16 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +24 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +32 __cxa_pure_virtual +40 __cxa_pure_virtual + +Class QTextCodecFactoryInterface + size=8 align=8 + base size=8 base align=8 +QTextCodecFactoryInterface (0x7f7ae52c1000) 0 nearly-empty + vptr=((& QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface) + 16u) + QFactoryInterface (0x7f7ae52c1070) 0 nearly-empty + primary-for QTextCodecFactoryInterface (0x7f7ae52c1000) + +Vtable for QTextCodecPlugin +QTextCodecPlugin::_ZTV16QTextCodecPlugin: 27u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI16QTextCodecPlugin) +16 QTextCodecPlugin::metaObject +24 QTextCodecPlugin::qt_metacast +32 QTextCodecPlugin::qt_metacall +40 QTextCodecPlugin::~QTextCodecPlugin +48 QTextCodecPlugin::~QTextCodecPlugin +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 __cxa_pure_virtual +152 QTextCodecPlugin::keys +160 QTextCodecPlugin::create +168 (int (*)(...))-0x00000000000000010 +176 (int (*)(...))(& _ZTI16QTextCodecPlugin) +184 QTextCodecPlugin::_ZThn16_N16QTextCodecPluginD1Ev +192 QTextCodecPlugin::_ZThn16_N16QTextCodecPluginD0Ev +200 QTextCodecPlugin::_ZThn16_NK16QTextCodecPlugin4keysEv +208 QTextCodecPlugin::_ZThn16_N16QTextCodecPlugin6createERK7QString + +Class QTextCodecPlugin + size=24 align=8 + base size=24 base align=8 +QTextCodecPlugin (0x7f7ae52c9580) 0 + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 16u) + QObject (0x7f7ae52c1a80) 0 + primary-for QTextCodecPlugin (0x7f7ae52c9580) + QTextCodecFactoryInterface (0x7f7ae52c1af0) 16 nearly-empty + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 184u) + QFactoryInterface (0x7f7ae52c1b60) 16 nearly-empty + primary-for QTextCodecFactoryInterface (0x7f7ae52c1af0) + +Class QLibraryInfo + size=1 align=1 + base size=0 base align=1 +QLibraryInfo (0x7f7ae5315150) 0 empty + +Vtable for QEventLoop +QEventLoop::_ZTV10QEventLoop: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QEventLoop) +16 QEventLoop::metaObject +24 QEventLoop::qt_metacast +32 QEventLoop::qt_metacall +40 QEventLoop::~QEventLoop +48 QEventLoop::~QEventLoop +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QEventLoop + size=16 align=8 + base size=16 base align=8 +QEventLoop (0x7f7ae53152a0) 0 + vptr=((& QEventLoop::_ZTV10QEventLoop) + 16u) + QObject (0x7f7ae5315310) 0 + primary-for QEventLoop (0x7f7ae53152a0) + +Vtable for QAbstractEventDispatcher +QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher: 27u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI24QAbstractEventDispatcher) +16 QAbstractEventDispatcher::metaObject +24 QAbstractEventDispatcher::qt_metacast +32 QAbstractEventDispatcher::qt_metacall +40 QAbstractEventDispatcher::~QAbstractEventDispatcher +48 QAbstractEventDispatcher::~QAbstractEventDispatcher +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 __cxa_pure_virtual +152 __cxa_pure_virtual +160 __cxa_pure_virtual +168 __cxa_pure_virtual +176 __cxa_pure_virtual +184 __cxa_pure_virtual +192 __cxa_pure_virtual +200 QAbstractEventDispatcher::startingUp +208 QAbstractEventDispatcher::closingDown + +Class QAbstractEventDispatcher + size=16 align=8 + base size=16 base align=8 +QAbstractEventDispatcher (0x7f7ae5351bd0) 0 + vptr=((& QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher) + 16u) + QObject (0x7f7ae5351c40) 0 + primary-for QAbstractEventDispatcher (0x7f7ae5351bd0) + +Class QModelIndex + size=24 align=8 + base size=24 base align=8 +QModelIndex (0x7f7ae5378a80) 0 + +Class QPersistentModelIndex + size=8 align=8 + base size=8 base align=8 +QPersistentModelIndex (0x7f7ae51a1540) 0 + +Vtable for QAbstractItemModel +QAbstractItemModel::_ZTV18QAbstractItemModel: 42u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QAbstractItemModel) +16 QAbstractItemModel::metaObject +24 QAbstractItemModel::qt_metacast +32 QAbstractItemModel::qt_metacall +40 QAbstractItemModel::~QAbstractItemModel +48 QAbstractItemModel::~QAbstractItemModel +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 QAbstractItemModel::hasChildren +152 __cxa_pure_virtual +160 QAbstractItemModel::setData +168 QAbstractItemModel::headerData +176 QAbstractItemModel::setHeaderData +184 QAbstractItemModel::itemData +192 QAbstractItemModel::setItemData +200 QAbstractItemModel::mimeTypes +208 QAbstractItemModel::mimeData +216 QAbstractItemModel::dropMimeData +224 QAbstractItemModel::supportedDropActions +232 QAbstractItemModel::insertRows +240 QAbstractItemModel::insertColumns +248 QAbstractItemModel::removeRows +256 QAbstractItemModel::removeColumns +264 QAbstractItemModel::fetchMore +272 QAbstractItemModel::canFetchMore +280 QAbstractItemModel::flags +288 QAbstractItemModel::sort +296 QAbstractItemModel::buddy +304 QAbstractItemModel::match +312 QAbstractItemModel::span +320 QAbstractItemModel::submit +328 QAbstractItemModel::revert + +Class QAbstractItemModel + size=16 align=8 + base size=16 base align=8 +QAbstractItemModel (0x7f7ae51aa850) 0 + vptr=((& QAbstractItemModel::_ZTV18QAbstractItemModel) + 16u) + QObject (0x7f7ae51aa8c0) 0 + primary-for QAbstractItemModel (0x7f7ae51aa850) + +Vtable for QAbstractTableModel +QAbstractTableModel::_ZTV19QAbstractTableModel: 42u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QAbstractTableModel) +16 QAbstractTableModel::metaObject +24 QAbstractTableModel::qt_metacast +32 QAbstractTableModel::qt_metacall +40 QAbstractTableModel::~QAbstractTableModel +48 QAbstractTableModel::~QAbstractTableModel +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractTableModel::index +120 QAbstractTableModel::parent +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 QAbstractTableModel::hasChildren +152 __cxa_pure_virtual +160 QAbstractItemModel::setData +168 QAbstractItemModel::headerData +176 QAbstractItemModel::setHeaderData +184 QAbstractItemModel::itemData +192 QAbstractItemModel::setItemData +200 QAbstractItemModel::mimeTypes +208 QAbstractItemModel::mimeData +216 QAbstractTableModel::dropMimeData +224 QAbstractItemModel::supportedDropActions +232 QAbstractItemModel::insertRows +240 QAbstractItemModel::insertColumns +248 QAbstractItemModel::removeRows +256 QAbstractItemModel::removeColumns +264 QAbstractItemModel::fetchMore +272 QAbstractItemModel::canFetchMore +280 QAbstractItemModel::flags +288 QAbstractItemModel::sort +296 QAbstractItemModel::buddy +304 QAbstractItemModel::match +312 QAbstractItemModel::span +320 QAbstractItemModel::submit +328 QAbstractItemModel::revert + +Class QAbstractTableModel + size=16 align=8 + base size=16 base align=8 +QAbstractTableModel (0x7f7ae5206b60) 0 + vptr=((& QAbstractTableModel::_ZTV19QAbstractTableModel) + 16u) + QAbstractItemModel (0x7f7ae5206bd0) 0 + primary-for QAbstractTableModel (0x7f7ae5206b60) + QObject (0x7f7ae5206c40) 0 + primary-for QAbstractItemModel (0x7f7ae5206bd0) + +Vtable for QAbstractListModel +QAbstractListModel::_ZTV18QAbstractListModel: 42u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QAbstractListModel) +16 QAbstractListModel::metaObject +24 QAbstractListModel::qt_metacast +32 QAbstractListModel::qt_metacall +40 QAbstractListModel::~QAbstractListModel +48 QAbstractListModel::~QAbstractListModel +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractListModel::index +120 QAbstractListModel::parent +128 __cxa_pure_virtual +136 QAbstractListModel::columnCount +144 QAbstractListModel::hasChildren +152 __cxa_pure_virtual +160 QAbstractItemModel::setData +168 QAbstractItemModel::headerData +176 QAbstractItemModel::setHeaderData +184 QAbstractItemModel::itemData +192 QAbstractItemModel::setItemData +200 QAbstractItemModel::mimeTypes +208 QAbstractItemModel::mimeData +216 QAbstractListModel::dropMimeData +224 QAbstractItemModel::supportedDropActions +232 QAbstractItemModel::insertRows +240 QAbstractItemModel::insertColumns +248 QAbstractItemModel::removeRows +256 QAbstractItemModel::removeColumns +264 QAbstractItemModel::fetchMore +272 QAbstractItemModel::canFetchMore +280 QAbstractItemModel::flags +288 QAbstractItemModel::sort +296 QAbstractItemModel::buddy +304 QAbstractItemModel::match +312 QAbstractItemModel::span +320 QAbstractItemModel::submit +328 QAbstractItemModel::revert + +Class QAbstractListModel + size=16 align=8 + base size=16 base align=8 +QAbstractListModel (0x7f7ae52230e0) 0 + vptr=((& QAbstractListModel::_ZTV18QAbstractListModel) + 16u) + QAbstractItemModel (0x7f7ae5223150) 0 + primary-for QAbstractListModel (0x7f7ae52230e0) + QObject (0x7f7ae52231c0) 0 + primary-for QAbstractItemModel (0x7f7ae5223150) + +Class QBasicTimer + size=4 align=4 + base size=4 base align=4 +QBasicTimer (0x7f7ae5253230) 0 + +Vtable for QCoreApplication +QCoreApplication::_ZTV16QCoreApplication: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI16QCoreApplication) +16 QCoreApplication::metaObject +24 QCoreApplication::qt_metacast +32 QCoreApplication::qt_metacall +40 QCoreApplication::~QCoreApplication +48 QCoreApplication::~QCoreApplication +56 QCoreApplication::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QCoreApplication::notify +120 QCoreApplication::compressEvent + +Class QCoreApplication + size=16 align=8 + base size=16 base align=8 +QCoreApplication (0x7f7ae5260620) 0 + vptr=((& QCoreApplication::_ZTV16QCoreApplication) + 16u) + QObject (0x7f7ae5260690) 0 + primary-for QCoreApplication (0x7f7ae5260620) + +Class __exception + size=40 align=8 + base size=40 base align=8 +__exception (0x7f7ae5293310) 0 + +Class QMetaMethod + size=16 align=8 + base size=12 base align=8 +QMetaMethod (0x7f7ae5100770) 0 + +Class QMetaEnum + size=16 align=8 + base size=12 base align=8 +QMetaEnum (0x7f7ae511cbd0) 0 + +Class QMetaProperty + size=32 align=8 + base size=32 base align=8 +QMetaProperty (0x7f7ae512a930) 0 + +Class QMetaClassInfo + size=16 align=8 + base size=12 base align=8 +QMetaClassInfo (0x7f7ae513c000) 0 + +Vtable for QMimeData +QMimeData::_ZTV9QMimeData: 17u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI9QMimeData) +16 QMimeData::metaObject +24 QMimeData::qt_metacast +32 QMimeData::qt_metacall +40 QMimeData::~QMimeData +48 QMimeData::~QMimeData +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QMimeData::hasFormat +120 QMimeData::formats +128 QMimeData::retrieveData + +Class QMimeData + size=16 align=8 + base size=16 base align=8 +QMimeData (0x7f7ae513caf0) 0 + vptr=((& QMimeData::_ZTV9QMimeData) + 16u) + QObject (0x7f7ae513cb60) 0 + primary-for QMimeData (0x7f7ae513caf0) + +Vtable for QObjectCleanupHandler +QObjectCleanupHandler::_ZTV21QObjectCleanupHandler: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QObjectCleanupHandler) +16 QObjectCleanupHandler::metaObject +24 QObjectCleanupHandler::qt_metacast +32 QObjectCleanupHandler::qt_metacall +40 QObjectCleanupHandler::~QObjectCleanupHandler +48 QObjectCleanupHandler::~QObjectCleanupHandler +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QObjectCleanupHandler + size=24 align=8 + base size=24 base align=8 +QObjectCleanupHandler (0x7f7ae515d380) 0 + vptr=((& QObjectCleanupHandler::_ZTV21QObjectCleanupHandler) + 16u) + QObject (0x7f7ae515d3f0) 0 + primary-for QObjectCleanupHandler (0x7f7ae515d380) + +Vtable for QSharedMemory +QSharedMemory::_ZTV13QSharedMemory: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QSharedMemory) +16 QSharedMemory::metaObject +24 QSharedMemory::qt_metacast +32 QSharedMemory::qt_metacall +40 QSharedMemory::~QSharedMemory +48 QSharedMemory::~QSharedMemory +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSharedMemory + size=16 align=8 + base size=16 base align=8 +QSharedMemory (0x7f7ae516e4d0) 0 + vptr=((& QSharedMemory::_ZTV13QSharedMemory) + 16u) + QObject (0x7f7ae516e540) 0 + primary-for QSharedMemory (0x7f7ae516e4d0) + +Vtable for QSignalMapper +QSignalMapper::_ZTV13QSignalMapper: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QSignalMapper) +16 QSignalMapper::metaObject +24 QSignalMapper::qt_metacast +32 QSignalMapper::qt_metacall +40 QSignalMapper::~QSignalMapper +48 QSignalMapper::~QSignalMapper +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSignalMapper + size=16 align=8 + base size=16 base align=8 +QSignalMapper (0x7f7ae518b2a0) 0 + vptr=((& QSignalMapper::_ZTV13QSignalMapper) + 16u) + QObject (0x7f7ae518b310) 0 + primary-for QSignalMapper (0x7f7ae518b2a0) + +Vtable for QSocketNotifier +QSocketNotifier::_ZTV15QSocketNotifier: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QSocketNotifier) +16 QSocketNotifier::metaObject +24 QSocketNotifier::qt_metacast +32 QSocketNotifier::qt_metacall +40 QSocketNotifier::~QSocketNotifier +48 QSocketNotifier::~QSocketNotifier +56 QSocketNotifier::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QSocketNotifier + size=32 align=8 + base size=25 base align=8 +QSocketNotifier (0x7f7ae4fa6690) 0 + vptr=((& QSocketNotifier::_ZTV15QSocketNotifier) + 16u) + QObject (0x7f7ae4fa6700) 0 + primary-for QSocketNotifier (0x7f7ae4fa6690) + +Class QSystemSemaphore + size=8 align=8 + base size=8 base align=8 +QSystemSemaphore (0x7f7ae4fbfa10) 0 + +Vtable for QTimer +QTimer::_ZTV6QTimer: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI6QTimer) +16 QTimer::metaObject +24 QTimer::qt_metacast +32 QTimer::qt_metacall +40 QTimer::~QTimer +48 QTimer::~QTimer +56 QObject::event +64 QObject::eventFilter +72 QTimer::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QTimer + size=32 align=8 + base size=29 base align=8 +QTimer (0x7f7ae4fcb460) 0 + vptr=((& QTimer::_ZTV6QTimer) + 16u) + QObject (0x7f7ae4fcb4d0) 0 + primary-for QTimer (0x7f7ae4fcb460) + +Vtable for QTranslator +QTranslator::_ZTV11QTranslator: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QTranslator) +16 QTranslator::metaObject +24 QTranslator::qt_metacast +32 QTranslator::qt_metacall +40 QTranslator::~QTranslator +48 QTranslator::~QTranslator +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QTranslator::translate +120 QTranslator::isEmpty + +Class QTranslator + size=16 align=8 + base size=16 base align=8 +QTranslator (0x7f7ae4fef9a0) 0 + vptr=((& QTranslator::_ZTV11QTranslator) + 16u) + QObject (0x7f7ae4fefa10) 0 + primary-for QTranslator (0x7f7ae4fef9a0) + +Vtable for QLibrary +QLibrary::_ZTV8QLibrary: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI8QLibrary) +16 QLibrary::metaObject +24 QLibrary::qt_metacast +32 QLibrary::qt_metacall +40 QLibrary::~QLibrary +48 QLibrary::~QLibrary +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QLibrary + size=32 align=8 + base size=25 base align=8 +QLibrary (0x7f7ae5009930) 0 + vptr=((& QLibrary::_ZTV8QLibrary) + 16u) + QObject (0x7f7ae50099a0) 0 + primary-for QLibrary (0x7f7ae5009930) + +Vtable for QPluginLoader +QPluginLoader::_ZTV13QPluginLoader: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QPluginLoader) +16 QPluginLoader::metaObject +24 QPluginLoader::qt_metacast +32 QPluginLoader::qt_metacall +40 QPluginLoader::~QPluginLoader +48 QPluginLoader::~QPluginLoader +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QPluginLoader + size=32 align=8 + base size=25 base align=8 +QPluginLoader (0x7f7ae50573f0) 0 + vptr=((& QPluginLoader::_ZTV13QPluginLoader) + 16u) + QObject (0x7f7ae5057460) 0 + primary-for QPluginLoader (0x7f7ae50573f0) + +Class QUuid + size=16 align=4 + base size=16 base align=4 +QUuid (0x7f7ae5066b60) 0 + +Class QReadWriteLock + size=8 align=8 + base size=8 base align=8 +QReadWriteLock (0x7f7ae508c4d0) 0 + +Class QReadLocker + size=8 align=8 + base size=8 base align=8 +QReadLocker (0x7f7ae508cb60) 0 + +Class QWriteLocker + size=8 align=8 + base size=8 base align=8 +QWriteLocker (0x7f7ae4eaaee0) 0 + +Class QThreadStorageData + size=4 align=4 + base size=4 base align=4 +QThreadStorageData (0x7f7ae4ec52a0) 0 + +Vtable for QAbstractAnimation +QAbstractAnimation::_ZTV18QAbstractAnimation: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QAbstractAnimation) +16 QAbstractAnimation::metaObject +24 QAbstractAnimation::qt_metacast +32 QAbstractAnimation::qt_metacall +40 QAbstractAnimation::~QAbstractAnimation +48 QAbstractAnimation::~QAbstractAnimation +56 QAbstractAnimation::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 QAbstractAnimation::updateState +136 QAbstractAnimation::updateDirection + +Class QAbstractAnimation + size=16 align=8 + base size=16 base align=8 +QAbstractAnimation (0x7f7ae4ec5a10) 0 + vptr=((& QAbstractAnimation::_ZTV18QAbstractAnimation) + 16u) + QObject (0x7f7ae4ec5a80) 0 + primary-for QAbstractAnimation (0x7f7ae4ec5a10) + +Vtable for QAnimationGroup +QAnimationGroup::_ZTV15QAnimationGroup: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QAnimationGroup) +16 QAnimationGroup::metaObject +24 QAnimationGroup::qt_metacast +32 QAnimationGroup::qt_metacall +40 QAnimationGroup::~QAnimationGroup +48 QAnimationGroup::~QAnimationGroup +56 QAnimationGroup::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 QAbstractAnimation::updateState +136 QAbstractAnimation::updateDirection + +Class QAnimationGroup + size=16 align=8 + base size=16 base align=8 +QAnimationGroup (0x7f7ae4efc150) 0 + vptr=((& QAnimationGroup::_ZTV15QAnimationGroup) + 16u) + QAbstractAnimation (0x7f7ae4efc1c0) 0 + primary-for QAnimationGroup (0x7f7ae4efc150) + QObject (0x7f7ae4efc230) 0 + primary-for QAbstractAnimation (0x7f7ae4efc1c0) + +Vtable for QParallelAnimationGroup +QParallelAnimationGroup::_ZTV23QParallelAnimationGroup: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI23QParallelAnimationGroup) +16 QParallelAnimationGroup::metaObject +24 QParallelAnimationGroup::qt_metacast +32 QParallelAnimationGroup::qt_metacall +40 QParallelAnimationGroup::~QParallelAnimationGroup +48 QParallelAnimationGroup::~QParallelAnimationGroup +56 QParallelAnimationGroup::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QParallelAnimationGroup::duration +120 QParallelAnimationGroup::updateCurrentTime +128 QParallelAnimationGroup::updateState +136 QParallelAnimationGroup::updateDirection + +Class QParallelAnimationGroup + size=16 align=8 + base size=16 base align=8 +QParallelAnimationGroup (0x7f7ae4f17000) 0 + vptr=((& QParallelAnimationGroup::_ZTV23QParallelAnimationGroup) + 16u) + QAnimationGroup (0x7f7ae4f17070) 0 + primary-for QParallelAnimationGroup (0x7f7ae4f17000) + QAbstractAnimation (0x7f7ae4f170e0) 0 + primary-for QAnimationGroup (0x7f7ae4f17070) + QObject (0x7f7ae4f17150) 0 + primary-for QAbstractAnimation (0x7f7ae4f170e0) + +Vtable for QPauseAnimation +QPauseAnimation::_ZTV15QPauseAnimation: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QPauseAnimation) +16 QPauseAnimation::metaObject +24 QPauseAnimation::qt_metacast +32 QPauseAnimation::qt_metacall +40 QPauseAnimation::~QPauseAnimation +48 QPauseAnimation::~QPauseAnimation +56 QPauseAnimation::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QPauseAnimation::duration +120 QPauseAnimation::updateCurrentTime +128 QAbstractAnimation::updateState +136 QAbstractAnimation::updateDirection + +Class QPauseAnimation + size=16 align=8 + base size=16 base align=8 +QPauseAnimation (0x7f7ae4f26e70) 0 + vptr=((& QPauseAnimation::_ZTV15QPauseAnimation) + 16u) + QAbstractAnimation (0x7f7ae4f26ee0) 0 + primary-for QPauseAnimation (0x7f7ae4f26e70) + QObject (0x7f7ae4f26f50) 0 + primary-for QAbstractAnimation (0x7f7ae4f26ee0) + +Vtable for QVariantAnimation +QVariantAnimation::_ZTV17QVariantAnimation: 20u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QVariantAnimation) +16 QVariantAnimation::metaObject +24 QVariantAnimation::qt_metacast +32 QVariantAnimation::qt_metacall +40 QVariantAnimation::~QVariantAnimation +48 QVariantAnimation::~QVariantAnimation +56 QVariantAnimation::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QVariantAnimation::duration +120 QVariantAnimation::updateCurrentTime +128 QVariantAnimation::updateState +136 QAbstractAnimation::updateDirection +144 __cxa_pure_virtual +152 QVariantAnimation::interpolated + +Class QVariantAnimation + size=16 align=8 + base size=16 base align=8 +QVariantAnimation (0x7f7ae4f428c0) 0 + vptr=((& QVariantAnimation::_ZTV17QVariantAnimation) + 16u) + QAbstractAnimation (0x7f7ae4f42930) 0 + primary-for QVariantAnimation (0x7f7ae4f428c0) + QObject (0x7f7ae4f429a0) 0 + primary-for QAbstractAnimation (0x7f7ae4f42930) + +Vtable for QPropertyAnimation +QPropertyAnimation::_ZTV18QPropertyAnimation: 20u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QPropertyAnimation) +16 QPropertyAnimation::metaObject +24 QPropertyAnimation::qt_metacast +32 QPropertyAnimation::qt_metacall +40 QPropertyAnimation::~QPropertyAnimation +48 QPropertyAnimation::~QPropertyAnimation +56 QPropertyAnimation::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QVariantAnimation::duration +120 QVariantAnimation::updateCurrentTime +128 QPropertyAnimation::updateState +136 QAbstractAnimation::updateDirection +144 QPropertyAnimation::updateCurrentValue +152 QVariantAnimation::interpolated + +Class QPropertyAnimation + size=16 align=8 + base size=16 base align=8 +QPropertyAnimation (0x7f7ae4f5eb60) 0 + vptr=((& QPropertyAnimation::_ZTV18QPropertyAnimation) + 16u) + QVariantAnimation (0x7f7ae4f5ebd0) 0 + primary-for QPropertyAnimation (0x7f7ae4f5eb60) + QAbstractAnimation (0x7f7ae4f5ec40) 0 + primary-for QVariantAnimation (0x7f7ae4f5ebd0) + QObject (0x7f7ae4f5ecb0) 0 + primary-for QAbstractAnimation (0x7f7ae4f5ec40) + +Vtable for QSequentialAnimationGroup +QSequentialAnimationGroup::_ZTV25QSequentialAnimationGroup: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI25QSequentialAnimationGroup) +16 QSequentialAnimationGroup::metaObject +24 QSequentialAnimationGroup::qt_metacast +32 QSequentialAnimationGroup::qt_metacall +40 QSequentialAnimationGroup::~QSequentialAnimationGroup +48 QSequentialAnimationGroup::~QSequentialAnimationGroup +56 QSequentialAnimationGroup::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QSequentialAnimationGroup::duration +120 QSequentialAnimationGroup::updateCurrentTime +128 QSequentialAnimationGroup::updateState +136 QSequentialAnimationGroup::updateDirection + +Class QSequentialAnimationGroup + size=16 align=8 + base size=16 base align=8 +QSequentialAnimationGroup (0x7f7ae4f79b60) 0 + vptr=((& QSequentialAnimationGroup::_ZTV25QSequentialAnimationGroup) + 16u) + QAnimationGroup (0x7f7ae4f79bd0) 0 + primary-for QSequentialAnimationGroup (0x7f7ae4f79b60) + QAbstractAnimation (0x7f7ae4f79c40) 0 + primary-for QAnimationGroup (0x7f7ae4f79bd0) + QObject (0x7f7ae4f79cb0) 0 + primary-for QAbstractAnimation (0x7f7ae4f79c40) + +Class QSslCertificate + size=8 align=8 + base size=8 base align=8 +QSslCertificate (0x7f7ae4f92bd0) 0 + +Class QSslCipher + size=8 align=8 + base size=8 base align=8 +QSslCipher (0x7f7ae4dad770) 0 + +Vtable for QAbstractSocket +QAbstractSocket::_ZTV15QAbstractSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QAbstractSocket) +16 QAbstractSocket::metaObject +24 QAbstractSocket::qt_metacast +32 QAbstractSocket::qt_metacall +40 QAbstractSocket::~QAbstractSocket +48 QAbstractSocket::~QAbstractSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QAbstractSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QAbstractSocket::atEnd +168 QIODevice::reset +176 QAbstractSocket::bytesAvailable +184 QAbstractSocket::bytesToWrite +192 QAbstractSocket::canReadLine +200 QAbstractSocket::waitForReadyRead +208 QAbstractSocket::waitForBytesWritten +216 QAbstractSocket::readData +224 QAbstractSocket::readLineData +232 QAbstractSocket::writeData + +Class QAbstractSocket + size=16 align=8 + base size=16 base align=8 +QAbstractSocket (0x7f7ae4dcc0e0) 0 + vptr=((& QAbstractSocket::_ZTV15QAbstractSocket) + 16u) + QIODevice (0x7f7ae4dcc150) 0 + primary-for QAbstractSocket (0x7f7ae4dcc0e0) + QObject (0x7f7ae4dcc1c0) 0 + primary-for QIODevice (0x7f7ae4dcc150) + +Vtable for QTcpSocket +QTcpSocket::_ZTV10QTcpSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QTcpSocket) +16 QTcpSocket::metaObject +24 QTcpSocket::qt_metacast +32 QTcpSocket::qt_metacall +40 QTcpSocket::~QTcpSocket +48 QTcpSocket::~QTcpSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QAbstractSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QAbstractSocket::atEnd +168 QIODevice::reset +176 QAbstractSocket::bytesAvailable +184 QAbstractSocket::bytesToWrite +192 QAbstractSocket::canReadLine +200 QAbstractSocket::waitForReadyRead +208 QAbstractSocket::waitForBytesWritten +216 QAbstractSocket::readData +224 QAbstractSocket::readLineData +232 QAbstractSocket::writeData + +Class QTcpSocket + size=16 align=8 + base size=16 base align=8 +QTcpSocket (0x7f7ae4e05a10) 0 + vptr=((& QTcpSocket::_ZTV10QTcpSocket) + 16u) + QAbstractSocket (0x7f7ae4e05a80) 0 + primary-for QTcpSocket (0x7f7ae4e05a10) + QIODevice (0x7f7ae4e05af0) 0 + primary-for QAbstractSocket (0x7f7ae4e05a80) + QObject (0x7f7ae4e05b60) 0 + primary-for QIODevice (0x7f7ae4e05af0) + +Class QSslError + size=8 align=8 + base size=8 base align=8 +QSslError (0x7f7ae4e234d0) 0 + +Vtable for QSslSocket +QSslSocket::_ZTV10QSslSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QSslSocket) +16 QSslSocket::metaObject +24 QSslSocket::qt_metacast +32 QSslSocket::qt_metacall +40 QSslSocket::~QSslSocket +48 QSslSocket::~QSslSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QSslSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QSslSocket::atEnd +168 QIODevice::reset +176 QSslSocket::bytesAvailable +184 QSslSocket::bytesToWrite +192 QSslSocket::canReadLine +200 QSslSocket::waitForReadyRead +208 QSslSocket::waitForBytesWritten +216 QSslSocket::readData +224 QAbstractSocket::readLineData +232 QSslSocket::writeData + +Class QSslSocket + size=16 align=8 + base size=16 base align=8 +QSslSocket (0x7f7ae4e2f3f0) 0 + vptr=((& QSslSocket::_ZTV10QSslSocket) + 16u) + QTcpSocket (0x7f7ae4e2f460) 0 + primary-for QSslSocket (0x7f7ae4e2f3f0) + QAbstractSocket (0x7f7ae4e2f4d0) 0 + primary-for QTcpSocket (0x7f7ae4e2f460) + QIODevice (0x7f7ae4e2f540) 0 + primary-for QAbstractSocket (0x7f7ae4e2f4d0) + QObject (0x7f7ae4e2f5b0) 0 + primary-for QIODevice (0x7f7ae4e2f540) + +Class QSslConfiguration + size=8 align=8 + base size=8 base align=8 +QSslConfiguration (0x7f7ae4e6d4d0) 0 + +Class QSslKey + size=8 align=8 + base size=8 base align=8 +QSslKey (0x7f7ae4e7d2a0) 0 + +Class QNetworkRequest + size=8 align=8 + base size=8 base align=8 +QNetworkRequest (0x7f7ae4e7dee0) 0 + +Class QNetworkCacheMetaData + size=8 align=8 + base size=8 base align=8 +QNetworkCacheMetaData (0x7f7ae4cabd90) 0 + +Vtable for QAbstractNetworkCache +QAbstractNetworkCache::_ZTV21QAbstractNetworkCache: 22u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QAbstractNetworkCache) +16 QAbstractNetworkCache::metaObject +24 QAbstractNetworkCache::qt_metacast +32 QAbstractNetworkCache::qt_metacall +40 QAbstractNetworkCache::~QAbstractNetworkCache +48 QAbstractNetworkCache::~QAbstractNetworkCache +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 __cxa_pure_virtual +136 __cxa_pure_virtual +144 __cxa_pure_virtual +152 __cxa_pure_virtual +160 __cxa_pure_virtual +168 __cxa_pure_virtual + +Class QAbstractNetworkCache + size=16 align=8 + base size=16 base align=8 +QAbstractNetworkCache (0x7f7ae4cda000) 0 + vptr=((& QAbstractNetworkCache::_ZTV21QAbstractNetworkCache) + 16u) + QObject (0x7f7ae4cda070) 0 + primary-for QAbstractNetworkCache (0x7f7ae4cda000) + +Vtable for QUrlInfo +QUrlInfo::_ZTV8QUrlInfo: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI8QUrlInfo) +16 QUrlInfo::~QUrlInfo +24 QUrlInfo::~QUrlInfo +32 QUrlInfo::setName +40 QUrlInfo::setDir +48 QUrlInfo::setFile +56 QUrlInfo::setSymLink +64 QUrlInfo::setOwner +72 QUrlInfo::setGroup +80 QUrlInfo::setSize +88 QUrlInfo::setWritable +96 QUrlInfo::setReadable +104 QUrlInfo::setPermissions +112 QUrlInfo::setLastModified + +Class QUrlInfo + size=16 align=8 + base size=16 base align=8 +QUrlInfo (0x7f7ae4cef9a0) 0 + vptr=((& QUrlInfo::_ZTV8QUrlInfo) + 16u) + +Vtable for QFtp +QFtp::_ZTV4QFtp: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI4QFtp) +16 QFtp::metaObject +24 QFtp::qt_metacast +32 QFtp::qt_metacall +40 QFtp::~QFtp +48 QFtp::~QFtp +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QFtp + size=16 align=8 + base size=16 base align=8 +QFtp (0x7f7ae4d01930) 0 + vptr=((& QFtp::_ZTV4QFtp) + 16u) + QObject (0x7f7ae4d019a0) 0 + primary-for QFtp (0x7f7ae4d01930) + +Vtable for QHttpHeader +QHttpHeader::_ZTV11QHttpHeader: 8u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI11QHttpHeader) +16 QHttpHeader::~QHttpHeader +24 QHttpHeader::~QHttpHeader +32 QHttpHeader::toString +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 QHttpHeader::parseLine + +Class QHttpHeader + size=16 align=8 + base size=16 base align=8 +QHttpHeader (0x7f7ae4d30f50) 0 + vptr=((& QHttpHeader::_ZTV11QHttpHeader) + 16u) + +Vtable for QHttpResponseHeader +QHttpResponseHeader::_ZTV19QHttpResponseHeader: 8u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QHttpResponseHeader) +16 QHttpResponseHeader::~QHttpResponseHeader +24 QHttpResponseHeader::~QHttpResponseHeader +32 QHttpResponseHeader::toString +40 QHttpResponseHeader::majorVersion +48 QHttpResponseHeader::minorVersion +56 QHttpResponseHeader::parseLine + +Class QHttpResponseHeader + size=16 align=8 + base size=16 base align=8 +QHttpResponseHeader (0x7f7ae4d36e70) 0 + vptr=((& QHttpResponseHeader::_ZTV19QHttpResponseHeader) + 16u) + QHttpHeader (0x7f7ae4d36ee0) 0 + primary-for QHttpResponseHeader (0x7f7ae4d36e70) + +Vtable for QHttpRequestHeader +QHttpRequestHeader::_ZTV18QHttpRequestHeader: 8u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI18QHttpRequestHeader) +16 QHttpRequestHeader::~QHttpRequestHeader +24 QHttpRequestHeader::~QHttpRequestHeader +32 QHttpRequestHeader::toString +40 QHttpRequestHeader::majorVersion +48 QHttpRequestHeader::minorVersion +56 QHttpRequestHeader::parseLine + +Class QHttpRequestHeader + size=16 align=8 + base size=16 base align=8 +QHttpRequestHeader (0x7f7ae4d4faf0) 0 + vptr=((& QHttpRequestHeader::_ZTV18QHttpRequestHeader) + 16u) + QHttpHeader (0x7f7ae4d4fb60) 0 + primary-for QHttpRequestHeader (0x7f7ae4d4faf0) + +Vtable for QHttp +QHttp::_ZTV5QHttp: 14u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI5QHttp) +16 QHttp::metaObject +24 QHttp::qt_metacast +32 QHttp::qt_metacall +40 QHttp::~QHttp +48 QHttp::~QHttp +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify + +Class QHttp + size=16 align=8 + base size=16 base align=8 +QHttp (0x7f7ae4d5f700) 0 + vptr=((& QHttp::_ZTV5QHttp) + 16u) + QObject (0x7f7ae4d5f770) 0 + primary-for QHttp (0x7f7ae4d5f700) + +Vtable for QNetworkAccessManager +QNetworkAccessManager::_ZTV21QNetworkAccessManager: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QNetworkAccessManager) +16 QNetworkAccessManager::metaObject +24 QNetworkAccessManager::qt_metacast +32 QNetworkAccessManager::qt_metacall +40 QNetworkAccessManager::~QNetworkAccessManager +48 QNetworkAccessManager::~QNetworkAccessManager +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkAccessManager::createRequest + +Class QNetworkAccessManager + size=16 align=8 + base size=16 base align=8 +QNetworkAccessManager (0x7f7ae4d968c0) 0 + vptr=((& QNetworkAccessManager::_ZTV21QNetworkAccessManager) + 16u) + QObject (0x7f7ae4d96930) 0 + primary-for QNetworkAccessManager (0x7f7ae4d968c0) + +Class QNetworkCookie + size=8 align=8 + base size=8 base align=8 +QNetworkCookie (0x7f7ae4babe00) 0 + +Vtable for QNetworkCookieJar +QNetworkCookieJar::_ZTV17QNetworkCookieJar: 16u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QNetworkCookieJar) +16 QNetworkCookieJar::metaObject +24 QNetworkCookieJar::qt_metacast +32 QNetworkCookieJar::qt_metacall +40 QNetworkCookieJar::~QNetworkCookieJar +48 QNetworkCookieJar::~QNetworkCookieJar +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkCookieJar::cookiesForUrl +120 QNetworkCookieJar::setCookiesFromUrl + +Class QNetworkCookieJar + size=16 align=8 + base size=16 base align=8 +QNetworkCookieJar (0x7f7ae4bb8f50) 0 + vptr=((& QNetworkCookieJar::_ZTV17QNetworkCookieJar) + 16u) + QObject (0x7f7ae4bb89a0) 0 + primary-for QNetworkCookieJar (0x7f7ae4bb8f50) + +Vtable for QNetworkDiskCache +QNetworkDiskCache::_ZTV17QNetworkDiskCache: 23u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI17QNetworkDiskCache) +16 QNetworkDiskCache::metaObject +24 QNetworkDiskCache::qt_metacast +32 QNetworkDiskCache::qt_metacall +40 QNetworkDiskCache::~QNetworkDiskCache +48 QNetworkDiskCache::~QNetworkDiskCache +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkDiskCache::metaData +120 QNetworkDiskCache::updateMetaData +128 QNetworkDiskCache::data +136 QNetworkDiskCache::remove +144 QNetworkDiskCache::cacheSize +152 QNetworkDiskCache::prepare +160 QNetworkDiskCache::insert +168 QNetworkDiskCache::clear +176 QNetworkDiskCache::expire + +Class QNetworkDiskCache + size=16 align=8 + base size=16 base align=8 +QNetworkDiskCache (0x7f7ae4be4e00) 0 + vptr=((& QNetworkDiskCache::_ZTV17QNetworkDiskCache) + 16u) + QAbstractNetworkCache (0x7f7ae4be4e70) 0 + primary-for QNetworkDiskCache (0x7f7ae4be4e00) + QObject (0x7f7ae4be4ee0) 0 + primary-for QAbstractNetworkCache (0x7f7ae4be4e70) + +Vtable for QNetworkReply +QNetworkReply::_ZTV13QNetworkReply: 33u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QNetworkReply) +16 QNetworkReply::metaObject +24 QNetworkReply::qt_metacast +32 QNetworkReply::qt_metacall +40 QNetworkReply::~QNetworkReply +48 QNetworkReply::~QNetworkReply +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QNetworkReply::isSequential +120 QIODevice::open +128 QNetworkReply::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QIODevice::atEnd +168 QIODevice::reset +176 QIODevice::bytesAvailable +184 QIODevice::bytesToWrite +192 QIODevice::canReadLine +200 QIODevice::waitForReadyRead +208 QIODevice::waitForBytesWritten +216 __cxa_pure_virtual +224 QIODevice::readLineData +232 QNetworkReply::writeData +240 __cxa_pure_virtual +248 QNetworkReply::setReadBufferSize +256 QNetworkReply::ignoreSslErrors + +Class QNetworkReply + size=16 align=8 + base size=16 base align=8 +QNetworkReply (0x7f7ae4c09770) 0 + vptr=((& QNetworkReply::_ZTV13QNetworkReply) + 16u) + QIODevice (0x7f7ae4c097e0) 0 + primary-for QNetworkReply (0x7f7ae4c09770) + QObject (0x7f7ae4c09850) 0 + primary-for QIODevice (0x7f7ae4c097e0) + +Class QAuthenticator + size=8 align=8 + base size=8 base align=8 +QAuthenticator (0x7f7ae4c2f3f0) 0 + +Class QIPv6Address + size=16 align=1 + base size=16 base align=1 +QIPv6Address (0x7f7ae4c2fcb0) 0 + +Class QHostAddress + size=8 align=8 + base size=8 base align=8 +QHostAddress (0x7f7ae4c3c310) 0 + +Class QHostInfo + size=8 align=8 + base size=8 base align=8 +QHostInfo (0x7f7ae4c6d310) 0 + +Class QNetworkAddressEntry + size=8 align=8 + base size=8 base align=8 +QNetworkAddressEntry (0x7f7ae4c6dc40) 0 + +Class QNetworkInterface + size=8 align=8 + base size=8 base align=8 +QNetworkInterface (0x7f7ae4c84540) 0 + +Class QNetworkProxyQuery + size=8 align=8 + base size=8 base align=8 +QNetworkProxyQuery (0x7f7ae4ad3230) 0 + +Class QNetworkProxy + size=8 align=8 + base size=8 base align=8 +QNetworkProxy (0x7f7ae4aea4d0) 0 + +Vtable for QNetworkProxyFactory +QNetworkProxyFactory::_ZTV20QNetworkProxyFactory: 5u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QNetworkProxyFactory) +16 QNetworkProxyFactory::~QNetworkProxyFactory +24 QNetworkProxyFactory::~QNetworkProxyFactory +32 __cxa_pure_virtual + +Class QNetworkProxyFactory + size=8 align=8 + base size=8 base align=8 +QNetworkProxyFactory (0x7f7ae4b2d930) 0 nearly-empty + vptr=((& QNetworkProxyFactory::_ZTV20QNetworkProxyFactory) + 16u) + +Vtable for QLocalServer +QLocalServer::_ZTV12QLocalServer: 17u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QLocalServer) +16 QLocalServer::metaObject +24 QLocalServer::qt_metacast +32 QLocalServer::qt_metacall +40 QLocalServer::~QLocalServer +48 QLocalServer::~QLocalServer +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QLocalServer::hasPendingConnections +120 QLocalServer::nextPendingConnection +128 QLocalServer::incomingConnection + +Class QLocalServer + size=16 align=8 + base size=16 base align=8 +QLocalServer (0x7f7ae4b2dc40) 0 + vptr=((& QLocalServer::_ZTV12QLocalServer) + 16u) + QObject (0x7f7ae4b2dcb0) 0 + primary-for QLocalServer (0x7f7ae4b2dc40) + +Vtable for QLocalSocket +QLocalSocket::_ZTV12QLocalSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI12QLocalSocket) +16 QLocalSocket::metaObject +24 QLocalSocket::qt_metacast +32 QLocalSocket::qt_metacall +40 QLocalSocket::~QLocalSocket +48 QLocalSocket::~QLocalSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QLocalSocket::isSequential +120 QIODevice::open +128 QLocalSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QIODevice::atEnd +168 QIODevice::reset +176 QLocalSocket::bytesAvailable +184 QLocalSocket::bytesToWrite +192 QLocalSocket::canReadLine +200 QLocalSocket::waitForReadyRead +208 QLocalSocket::waitForBytesWritten +216 QLocalSocket::readData +224 QIODevice::readLineData +232 QLocalSocket::writeData + +Class QLocalSocket + size=16 align=8 + base size=16 base align=8 +QLocalSocket (0x7f7ae4b58620) 0 + vptr=((& QLocalSocket::_ZTV12QLocalSocket) + 16u) + QIODevice (0x7f7ae4b58690) 0 + primary-for QLocalSocket (0x7f7ae4b58620) + QObject (0x7f7ae4b58700) 0 + primary-for QIODevice (0x7f7ae4b58690) + +Vtable for QTcpServer +QTcpServer::_ZTV10QTcpServer: 17u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QTcpServer) +16 QTcpServer::metaObject +24 QTcpServer::qt_metacast +32 QTcpServer::qt_metacall +40 QTcpServer::~QTcpServer +48 QTcpServer::~QTcpServer +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QTcpServer::hasPendingConnections +120 QTcpServer::nextPendingConnection +128 QTcpServer::incomingConnection + +Class QTcpServer + size=16 align=8 + base size=16 base align=8 +QTcpServer (0x7f7ae4b7d7e0) 0 + vptr=((& QTcpServer::_ZTV10QTcpServer) + 16u) + QObject (0x7f7ae4b7d850) 0 + primary-for QTcpServer (0x7f7ae4b7d7e0) + +Vtable for QUdpSocket +QUdpSocket::_ZTV10QUdpSocket: 30u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI10QUdpSocket) +16 QUdpSocket::metaObject +24 QUdpSocket::qt_metacast +32 QUdpSocket::qt_metacall +40 QUdpSocket::~QUdpSocket +48 QUdpSocket::~QUdpSocket +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 QAbstractSocket::isSequential +120 QIODevice::open +128 QAbstractSocket::close +136 QIODevice::pos +144 QIODevice::size +152 QIODevice::seek +160 QAbstractSocket::atEnd +168 QIODevice::reset +176 QAbstractSocket::bytesAvailable +184 QAbstractSocket::bytesToWrite +192 QAbstractSocket::canReadLine +200 QAbstractSocket::waitForReadyRead +208 QAbstractSocket::waitForBytesWritten +216 QAbstractSocket::readData +224 QAbstractSocket::readLineData +232 QAbstractSocket::writeData + +Class QUdpSocket + size=16 align=8 + base size=16 base align=8 +QUdpSocket (0x7f7ae499a310) 0 + vptr=((& QUdpSocket::_ZTV10QUdpSocket) + 16u) + QAbstractSocket (0x7f7ae499a380) 0 + primary-for QUdpSocket (0x7f7ae499a310) + QIODevice (0x7f7ae499a3f0) 0 + primary-for QAbstractSocket (0x7f7ae499a380) + QObject (0x7f7ae499a460) 0 + primary-for QIODevice (0x7f7ae499a3f0) + +Class QSourceLocation + size=24 align=8 + base size=24 base align=8 +QSourceLocation (0x7f7ae49e6070) 0 + +Vtable for QAbstractMessageHandler +QAbstractMessageHandler::_ZTV23QAbstractMessageHandler: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI23QAbstractMessageHandler) +16 QAbstractMessageHandler::metaObject +24 QAbstractMessageHandler::qt_metacast +32 QAbstractMessageHandler::qt_metacall +40 QAbstractMessageHandler::~QAbstractMessageHandler +48 QAbstractMessageHandler::~QAbstractMessageHandler +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual + +Class QAbstractMessageHandler + size=16 align=8 + base size=16 base align=8 +QAbstractMessageHandler (0x7f7ae49e6d20) 0 + vptr=((& QAbstractMessageHandler::_ZTV23QAbstractMessageHandler) + 16u) + QObject (0x7f7ae49e6d90) 0 + primary-for QAbstractMessageHandler (0x7f7ae49e6d20) + +Vtable for QAbstractUriResolver +QAbstractUriResolver::_ZTV20QAbstractUriResolver: 15u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QAbstractUriResolver) +16 QAbstractUriResolver::metaObject +24 QAbstractUriResolver::qt_metacast +32 QAbstractUriResolver::qt_metacall +40 QAbstractUriResolver::~QAbstractUriResolver +48 QAbstractUriResolver::~QAbstractUriResolver +56 QObject::event +64 QObject::eventFilter +72 QObject::timerEvent +80 QObject::childEvent +88 QObject::customEvent +96 QObject::connectNotify +104 QObject::disconnectNotify +112 __cxa_pure_virtual + +Class QAbstractUriResolver + size=16 align=8 + base size=16 base align=8 +QAbstractUriResolver (0x7f7ae4a0b700) 0 + vptr=((& QAbstractUriResolver::_ZTV20QAbstractUriResolver) + 16u) + QObject (0x7f7ae4a0b770) 0 + primary-for QAbstractUriResolver (0x7f7ae4a0b700) + +Class QXmlName + size=8 align=8 + base size=8 base align=8 +QXmlName (0x7f7ae4a26000) 0 + +Class QPatternist::NodeIndexStorage + size=24 align=8 + base size=24 base align=8 +QPatternist::NodeIndexStorage (0x7f7ae4a3e3f0) 0 + +Class QXmlNodeModelIndex + size=24 align=8 + base size=24 base align=8 +QXmlNodeModelIndex (0x7f7ae4a3eb60) 0 + +Vtable for QAbstractXmlNodeModel +QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel: 24u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI21QAbstractXmlNodeModel) +16 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +24 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 __cxa_pure_virtual +64 __cxa_pure_virtual +72 __cxa_pure_virtual +80 __cxa_pure_virtual +88 __cxa_pure_virtual +96 QAbstractXmlNodeModel::iterate +104 QAbstractXmlNodeModel::sequencedTypedValue +112 QAbstractXmlNodeModel::type +120 QAbstractXmlNodeModel::namespaceForPrefix +128 QAbstractXmlNodeModel::isDeepEqual +136 QAbstractXmlNodeModel::sendNamespaces +144 __cxa_pure_virtual +152 __cxa_pure_virtual +160 __cxa_pure_virtual +168 QAbstractXmlNodeModel::copyNodeTo +176 __cxa_pure_virtual +184 __cxa_pure_virtual + +Class QAbstractXmlNodeModel + size=24 align=8 + base size=24 base align=8 +QAbstractXmlNodeModel (0x7f7ae48ab1c0) 0 + vptr=((& QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel) + 16u) + QSharedData (0x7f7ae48ab230) 8 + +Class QXmlItem + size=24 align=8 + base size=24 base align=8 +QXmlItem (0x7f7ae48b8e70) 0 + +Vtable for QAbstractXmlReceiver +QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI20QAbstractXmlReceiver) +16 QAbstractXmlReceiver::~QAbstractXmlReceiver +24 QAbstractXmlReceiver::~QAbstractXmlReceiver +32 __cxa_pure_virtual +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 __cxa_pure_virtual +64 __cxa_pure_virtual +72 __cxa_pure_virtual +80 __cxa_pure_virtual +88 __cxa_pure_virtual +96 __cxa_pure_virtual +104 __cxa_pure_virtual +112 __cxa_pure_virtual +120 __cxa_pure_virtual +128 QAbstractXmlReceiver::whitespaceOnly +136 QAbstractXmlReceiver::item + +Class QAbstractXmlReceiver + size=16 align=8 + base size=16 base align=8 +QAbstractXmlReceiver (0x7f7ae48d3d90) 0 + vptr=((& QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver) + 16u) + +Class QXmlNamePool + size=8 align=8 + base size=8 base align=8 +QXmlNamePool (0x7f7ae48f65b0) 0 + +Class QXmlQuery + size=8 align=8 + base size=8 base align=8 +QXmlQuery (0x7f7ae48f6c40) 0 + +Vtable for QSimpleXmlNodeModel +QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel: 24u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI19QSimpleXmlNodeModel) +16 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +24 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +32 QSimpleXmlNodeModel::baseUri +40 __cxa_pure_virtual +48 __cxa_pure_virtual +56 __cxa_pure_virtual +64 __cxa_pure_virtual +72 __cxa_pure_virtual +80 QSimpleXmlNodeModel::stringValue +88 __cxa_pure_virtual +96 QAbstractXmlNodeModel::iterate +104 QAbstractXmlNodeModel::sequencedTypedValue +112 QAbstractXmlNodeModel::type +120 QAbstractXmlNodeModel::namespaceForPrefix +128 QAbstractXmlNodeModel::isDeepEqual +136 QAbstractXmlNodeModel::sendNamespaces +144 QSimpleXmlNodeModel::namespaceBindings +152 QSimpleXmlNodeModel::elementById +160 QSimpleXmlNodeModel::nodesByIdref +168 QAbstractXmlNodeModel::copyNodeTo +176 __cxa_pure_virtual +184 __cxa_pure_virtual + +Class QSimpleXmlNodeModel + size=24 align=8 + base size=24 base align=8 +QSimpleXmlNodeModel (0x7f7ae49107e0) 0 + vptr=((& QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel) + 16u) + QAbstractXmlNodeModel (0x7f7ae4910850) 0 + primary-for QSimpleXmlNodeModel (0x7f7ae49107e0) + QSharedData (0x7f7ae49108c0) 8 + +Vtable for QXmlSerializer +QXmlSerializer::_ZTV14QXmlSerializer: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI14QXmlSerializer) +16 QXmlSerializer::~QXmlSerializer +24 QXmlSerializer::~QXmlSerializer +32 QXmlSerializer::startElement +40 QXmlSerializer::endElement +48 QXmlSerializer::attribute +56 QXmlSerializer::comment +64 QXmlSerializer::characters +72 QXmlSerializer::startDocument +80 QXmlSerializer::endDocument +88 QXmlSerializer::processingInstruction +96 QXmlSerializer::atomicValue +104 QXmlSerializer::namespaceBinding +112 QXmlSerializer::startOfSequence +120 QXmlSerializer::endOfSequence +128 QAbstractXmlReceiver::whitespaceOnly +136 QXmlSerializer::item + +Class QXmlSerializer + size=16 align=8 + base size=16 base align=8 +QXmlSerializer (0x7f7ae4928000) 0 + vptr=((& QXmlSerializer::_ZTV14QXmlSerializer) + 16u) + QAbstractXmlReceiver (0x7f7ae4928070) 0 + primary-for QXmlSerializer (0x7f7ae4928000) + +Vtable for QXmlFormatter +QXmlFormatter::_ZTV13QXmlFormatter: 18u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI13QXmlFormatter) +16 QXmlFormatter::~QXmlFormatter +24 QXmlFormatter::~QXmlFormatter +32 QXmlFormatter::startElement +40 QXmlFormatter::endElement +48 QXmlFormatter::attribute +56 QXmlFormatter::comment +64 QXmlFormatter::characters +72 QXmlFormatter::startDocument +80 QXmlFormatter::endDocument +88 QXmlFormatter::processingInstruction +96 QXmlFormatter::atomicValue +104 QXmlSerializer::namespaceBinding +112 QXmlFormatter::startOfSequence +120 QXmlFormatter::endOfSequence +128 QAbstractXmlReceiver::whitespaceOnly +136 QXmlFormatter::item + +Class QXmlFormatter + size=16 align=8 + base size=16 base align=8 +QXmlFormatter (0x7f7ae49287e0) 0 + vptr=((& QXmlFormatter::_ZTV13QXmlFormatter) + 16u) + QXmlSerializer (0x7f7ae4928850) 0 + primary-for QXmlFormatter (0x7f7ae49287e0) + QAbstractXmlReceiver (0x7f7ae49288c0) 0 + primary-for QXmlSerializer (0x7f7ae4928850) + +Vtable for QXmlResultItems +QXmlResultItems::_ZTV15QXmlResultItems: 4u entries +0 (int (*)(...))0 +8 (int (*)(...))(& _ZTI15QXmlResultItems) +16 QXmlResultItems::~QXmlResultItems +24 QXmlResultItems::~QXmlResultItems + +Class QXmlResultItems + size=16 align=8 + base size=16 base align=8 +QXmlResultItems (0x7f7ae4928f50) 0 + vptr=((& QXmlResultItems::_ZTV15QXmlResultItems) + 16u) + +Class QXmlSchema + size=8 align=8 + base size=8 base align=8 +QXmlSchema (0x7f7ae4947af0) 0 + +Class QXmlSchemaValidator + size=8 align=8 + base size=8 base align=8 +QXmlSchemaValidator (0x7f7ae4947f50) 0 + diff --git a/tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-ia32.txt new file mode 100644 index 0000000..ebd9f77 --- /dev/null +++ b/tests/auto/bic/data/QtXmlPatterns.4.6.0.linux-gcc-ia32.txt @@ -0,0 +1,2891 @@ +Class QSysInfo + size=1 align=1 + base size=0 base align=1 +QSysInfo (0xb6e93a8c) 0 empty + +Class QBool + size=1 align=1 + base size=1 base align=1 +QBool (0xb6e93c30) 0 + +Class qIsNull(double)::U + size=8 align=4 + base size=8 base align=4 +qIsNull(double)::U (0xb6e1730c) 0 + +Class qIsNull(float)::U + size=4 align=4 + base size=4 base align=4 +qIsNull(float)::U (0xb6e173c0) 0 + +Class QFlag + size=4 align=4 + base size=4 base align=4 +QFlag (0xb6e17bf4) 0 + +Class QIncompatibleFlag + size=4 align=4 + base size=4 base align=4 +QIncompatibleFlag (0xb6e17d20) 0 + +Class QLatin1Char + size=1 align=1 + base size=1 base align=1 +QLatin1Char (0xb6e17f78) 0 + +Class QChar + size=2 align=2 + base size=2 base align=2 +QChar (0xb64d0168) 0 + +Class QBasicAtomicInt + size=4 align=4 + base size=4 base align=4 +QBasicAtomicInt (0xb65018ac) 0 + +Class QAtomicInt + size=4 align=4 + base size=4 base align=4 +QAtomicInt (0xb651fb40) 0 + QBasicAtomicInt (0xb6501fb4) 0 + +Class QInternal + size=1 align=1 + base size=0 base align=1 +QInternal (0xb64303c0) 0 empty + +Class __locale_struct + size=116 align=4 + base size=116 base align=4 +__locale_struct (0xb64303fc) 0 + +Class QByteArray::Data + size=20 align=4 + base size=20 base align=4 +QByteArray::Data (0xb6430870) 0 + +Class QByteArray + size=4 align=4 + base size=4 base align=4 +QByteArray (0xb6430834) 0 + +Class QByteRef + size=8 align=4 + base size=8 base align=4 +QByteRef (0xb62de780) 0 + +Class QString::Null + size=1 align=1 + base size=0 base align=1 +QString::Null (0xb62fbf3c) 0 empty + +Class QString::Data + size=20 align=4 + base size=20 base align=4 +QString::Data (0xb62fbf78) 0 + +Class QString + size=4 align=4 + base size=4 base align=4 +QString (0xb62fbf00) 0 + +Class QLatin1String + size=4 align=4 + base size=4 base align=4 +QLatin1String (0xb61dabf4) 0 + +Class QCharRef + size=8 align=4 + base size=8 base align=4 +QCharRef (0xb623f8e8) 0 + +Class QConstString + size=4 align=4 + base size=4 base align=4 +QConstString (0xb60c3880) 0 + QString (0xb60fc03c) 0 + +Class QStringRef + size=12 align=4 + base size=12 base align=4 +QStringRef (0xb60fc384) 0 + +Class QGenericArgument + size=8 align=4 + base size=8 base align=4 +QGenericArgument (0xb61472d0) 0 + +Class QGenericReturnArgument + size=8 align=4 + base size=8 base align=4 +QGenericReturnArgument (0xb6155140) 0 + QGenericArgument (0xb61474ec) 0 + +Class QMetaObject + size=16 align=4 + base size=16 base align=4 +QMetaObject (0xb6147654) 0 + +Class QMetaObjectExtraData + size=8 align=4 + base size=8 base align=4 +QMetaObjectExtraData (0xb6147780) 0 + +Vtable for std::exception +std::exception::_ZTVSt9exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9exception) +8 std::exception::~exception +12 std::exception::~exception +16 std::exception::what + +Class std::exception + size=4 align=4 + base size=4 base align=4 +std::exception (0xb6147ac8) 0 nearly-empty + vptr=((& std::exception::_ZTVSt9exception) + 8u) + +Vtable for std::bad_exception +std::bad_exception::_ZTVSt13bad_exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt13bad_exception) +8 std::bad_exception::~bad_exception +12 std::bad_exception::~bad_exception +16 std::bad_exception::what + +Class std::bad_exception + size=4 align=4 + base size=4 base align=4 +std::bad_exception (0xb618cdc0) 0 nearly-empty + vptr=((& std::bad_exception::_ZTVSt13bad_exception) + 8u) + std::exception (0xb6147bb8) 0 nearly-empty + primary-for std::bad_exception (0xb618cdc0) + +Vtable for std::bad_alloc +std::bad_alloc::_ZTVSt9bad_alloc: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9bad_alloc) +8 std::bad_alloc::~bad_alloc +12 std::bad_alloc::~bad_alloc +16 std::bad_alloc::what + +Class std::bad_alloc + size=4 align=4 + base size=4 base align=4 +std::bad_alloc (0xb618cf40) 0 nearly-empty + vptr=((& std::bad_alloc::_ZTVSt9bad_alloc) + 8u) + std::exception (0xb6147e10) 0 nearly-empty + primary-for std::bad_alloc (0xb618cf40) + +Class std::nothrow_t + size=1 align=1 + base size=0 base align=1 +std::nothrow_t (0xb61a6078) 0 empty + +Class QListData::Data + size=24 align=4 + base size=24 base align=4 +QListData::Data (0xb61a6168) 0 + +Class QListData + size=4 align=4 + base size=4 base align=4 +QListData (0xb61a612c) 0 + +Class QScopedPointerPodDeleter + size=1 align=1 + base size=0 base align=1 +QScopedPointerPodDeleter (0xb61a699c) 0 empty + +Vtable for QObjectData +QObjectData::_ZTV11QObjectData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QObjectData) +8 __cxa_pure_virtual +12 __cxa_pure_virtual + +Class QObjectData + size=28 align=4 + base size=28 base align=4 +QObjectData (0xb61a6a50) 0 + vptr=((& QObjectData::_ZTV11QObjectData) + 8u) + +Vtable for QObject +QObject::_ZTV7QObject: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QObject) +8 QObject::metaObject +12 QObject::qt_metacast +16 QObject::qt_metacall +20 QObject::~QObject +24 QObject::~QObject +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObject + size=8 align=4 + base size=8 base align=4 +QObject (0xb61a6b04) 0 + vptr=((& QObject::_ZTV7QObject) + 8u) + +Vtable for QObjectUserData +QObjectUserData::_ZTV15QObjectUserData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QObjectUserData) +8 QObjectUserData::~QObjectUserData +12 QObjectUserData::~QObjectUserData + +Class QObjectUserData + size=4 align=4 + base size=4 base align=4 +QObjectUserData (0xb6098384) 0 nearly-empty + vptr=((& QObjectUserData::_ZTV15QObjectUserData) + 8u) + +Vtable for QIODevice +QIODevice::_ZTV9QIODevice: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QIODevice) +8 QIODevice::metaObject +12 QIODevice::qt_metacast +16 QIODevice::qt_metacall +20 QIODevice::~QIODevice +24 QIODevice::~QIODevice +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QIODevice::isSequential +60 QIODevice::open +64 QIODevice::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QIODevice::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 __cxa_pure_virtual +112 QIODevice::readLineData +116 __cxa_pure_virtual + +Class QIODevice + size=8 align=4 + base size=8 base align=4 +QIODevice (0xb6099600) 0 + vptr=((& QIODevice::_ZTV9QIODevice) + 8u) + QObject (0xb60984b0) 0 + primary-for QIODevice (0xb6099600) + +Class _IO_marker + size=12 align=4 + base size=12 base align=4 +_IO_marker (0xb5ecc348) 0 + +Class _IO_FILE + size=148 align=4 + base size=148 base align=4 +_IO_FILE (0xb5ecc384) 0 + +Vtable for QFile +QFile::_ZTV5QFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI5QFile) +8 QFile::metaObject +12 QFile::qt_metacast +16 QFile::qt_metacall +20 QFile::~QFile +24 QFile::~QFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QFile::fileEngine + +Class QFile + size=8 align=4 + base size=8 base align=4 +QFile (0xb5eda280) 0 + vptr=((& QFile::_ZTV5QFile) + 8u) + QIODevice (0xb5eda2c0) 0 + primary-for QFile (0xb5eda280) + QObject (0xb5ecc3fc) 0 + primary-for QIODevice (0xb5eda2c0) + +Class QFileInfo + size=4 align=4 + base size=4 base align=4 +QFileInfo (0xb5ecc870) 0 + +Vtable for QDataStream +QDataStream::_ZTV11QDataStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QDataStream) +8 QDataStream::~QDataStream +12 QDataStream::~QDataStream + +Class QDataStream + size=28 align=4 + base size=28 base align=4 +QDataStream (0xb5eccec4) 0 + vptr=((& QDataStream::_ZTV11QDataStream) + 8u) + +Class QRegExp + size=4 align=4 + base size=4 base align=4 +QRegExp (0xb5f8c5dc) 0 + +Class QStringMatcher::Data + size=264 align=4 + base size=264 base align=4 +QStringMatcher::Data (0xb5dcb000) 0 + +Class QStringMatcher + size=1036 align=4 + base size=1036 base align=4 +QStringMatcher (0xb5f8cfb4) 0 + +Class QStringList + size=4 align=4 + base size=4 base align=4 +QStringList (0xb5fa6980) 0 + QList (0xb5dcb12c) 0 + +Class QDir + size=4 align=4 + base size=4 base align=4 +QDir (0xb5e11690) 0 + +Class QAbstractFileEngine::ExtensionOption + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionOption (0xb5e11e10) 0 empty + +Class QAbstractFileEngine::ExtensionReturn + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionReturn (0xb5e11e4c) 0 empty + +Class QAbstractFileEngine::MapExtensionOption + size=20 align=4 + base size=20 base align=4 +QAbstractFileEngine::MapExtensionOption (0xb5e5c280) 0 + QAbstractFileEngine::ExtensionOption (0xb5e11e88) 0 empty + +Class QAbstractFileEngine::MapExtensionReturn + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::MapExtensionReturn (0xb5e5c300) 0 + QAbstractFileEngine::ExtensionReturn (0xb5e11ec4) 0 empty + +Class QAbstractFileEngine::UnMapExtensionOption + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::UnMapExtensionOption (0xb5e5c380) 0 + QAbstractFileEngine::ExtensionOption (0xb5e11f00) 0 empty + +Vtable for QAbstractFileEngine +QAbstractFileEngine::_ZTV19QAbstractFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractFileEngine) +8 QAbstractFileEngine::~QAbstractFileEngine +12 QAbstractFileEngine::~QAbstractFileEngine +16 QAbstractFileEngine::open +20 QAbstractFileEngine::close +24 QAbstractFileEngine::flush +28 QAbstractFileEngine::size +32 QAbstractFileEngine::pos +36 QAbstractFileEngine::seek +40 QAbstractFileEngine::isSequential +44 QAbstractFileEngine::remove +48 QAbstractFileEngine::copy +52 QAbstractFileEngine::rename +56 QAbstractFileEngine::link +60 QAbstractFileEngine::mkdir +64 QAbstractFileEngine::rmdir +68 QAbstractFileEngine::setSize +72 QAbstractFileEngine::caseSensitive +76 QAbstractFileEngine::isRelativePath +80 QAbstractFileEngine::entryList +84 QAbstractFileEngine::fileFlags +88 QAbstractFileEngine::setPermissions +92 QAbstractFileEngine::fileName +96 QAbstractFileEngine::ownerId +100 QAbstractFileEngine::owner +104 QAbstractFileEngine::fileTime +108 QAbstractFileEngine::setFileName +112 QAbstractFileEngine::handle +116 QAbstractFileEngine::beginEntryList +120 QAbstractFileEngine::endEntryList +124 QAbstractFileEngine::read +128 QAbstractFileEngine::readLine +132 QAbstractFileEngine::write +136 QAbstractFileEngine::extension +140 QAbstractFileEngine::supportsExtension + +Class QAbstractFileEngine + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngine (0xb5e11dd4) 0 + vptr=((& QAbstractFileEngine::_ZTV19QAbstractFileEngine) + 8u) + +Vtable for QAbstractFileEngineHandler +QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QAbstractFileEngineHandler) +8 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +12 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +16 __cxa_pure_virtual + +Class QAbstractFileEngineHandler + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngineHandler (0xb5e8f168) 0 nearly-empty + vptr=((& QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler) + 8u) + +Vtable for QAbstractFileEngineIterator +QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QAbstractFileEngineIterator) +8 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +12 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QAbstractFileEngineIterator::currentFileInfo +32 QAbstractFileEngineIterator::entryInfo + +Class QAbstractFileEngineIterator + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngineIterator (0xb5e8f1a4) 0 + vptr=((& QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator) + 8u) + +Vtable for QBuffer +QBuffer::_ZTV7QBuffer: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QBuffer) +8 QBuffer::metaObject +12 QBuffer::qt_metacast +16 QBuffer::qt_metacall +20 QBuffer::~QBuffer +24 QBuffer::~QBuffer +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QBuffer::connectNotify +52 QBuffer::disconnectNotify +56 QIODevice::isSequential +60 QBuffer::open +64 QBuffer::close +68 QBuffer::pos +72 QBuffer::size +76 QBuffer::seek +80 QBuffer::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QBuffer::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QBuffer::readData +112 QIODevice::readLineData +116 QBuffer::writeData + +Class QBuffer + size=8 align=4 + base size=8 base align=4 +QBuffer (0xb5e5c6c0) 0 + vptr=((& QBuffer::_ZTV7QBuffer) + 8u) + QIODevice (0xb5e5c700) 0 + primary-for QBuffer (0xb5e5c6c0) + QObject (0xb5e8f21c) 0 + primary-for QIODevice (0xb5e5c700) + +Class QHashData::Node + size=8 align=4 + base size=8 base align=4 +QHashData::Node (0xb5e8f8e8) 0 + +Class QHashData + size=32 align=4 + base size=32 base align=4 +QHashData (0xb5e8f8ac) 0 + +Class QHashDummyValue + size=1 align=1 + base size=0 base align=1 +QHashDummyValue (0xb5cd7000) 0 empty + +Class QMapData::Node + size=8 align=4 + base size=8 base align=4 +QMapData::Node (0xb5cd7744) 0 + +Class QMapData + size=72 align=4 + base size=72 base align=4 +QMapData (0xb5cd7708) 0 + +Vtable for QSystemLocale +QSystemLocale::_ZTV13QSystemLocale: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSystemLocale) +8 QSystemLocale::~QSystemLocale +12 QSystemLocale::~QSystemLocale +16 QSystemLocale::query +20 QSystemLocale::fallbackLocale + +Class QSystemLocale + size=4 align=4 + base size=4 base align=4 +QSystemLocale (0xb5cd7a50) 0 nearly-empty + vptr=((& QSystemLocale::_ZTV13QSystemLocale) + 8u) + +Class QLocale::Data + size=4 align=2 + base size=4 base align=2 +QLocale::Data (0xb5cd7ac8) 0 + +Class QLocale + size=4 align=4 + base size=4 base align=4 +QLocale (0xb5cd7a8c) 0 + +Class QTextCodec::ConverterState + size=28 align=4 + base size=28 base align=4 +QTextCodec::ConverterState (0xb5c5912c) 0 + +Vtable for QTextCodec +QTextCodec::_ZTV10QTextCodec: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QTextCodec) +8 __cxa_pure_virtual +12 QTextCodec::aliases +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QTextCodec::~QTextCodec +32 QTextCodec::~QTextCodec + +Class QTextCodec + size=4 align=4 + base size=4 base align=4 +QTextCodec (0xb5c590f0) 0 nearly-empty + vptr=((& QTextCodec::_ZTV10QTextCodec) + 8u) + +Class QTextEncoder + size=32 align=4 + base size=32 base align=4 +QTextEncoder (0xb5c59e10) 0 + +Class QTextDecoder + size=32 align=4 + base size=32 base align=4 +QTextDecoder (0xb5ca7078) 0 + +Vtable for QTextStream +QTextStream::_ZTV11QTextStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTextStream) +8 QTextStream::~QTextStream +12 QTextStream::~QTextStream + +Class QTextStream + size=8 align=4 + base size=8 base align=4 +QTextStream (0xb5ca72d0) 0 + vptr=((& QTextStream::_ZTV11QTextStream) + 8u) + +Class QTextStreamManipulator + size=24 align=4 + base size=22 base align=4 +QTextStreamManipulator (0xb5ca7960) 0 + +Vtable for QTextIStream +QTextIStream::_ZTV12QTextIStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextIStream) +8 QTextIStream::~QTextIStream +12 QTextIStream::~QTextIStream + +Class QTextIStream + size=8 align=4 + base size=8 base align=4 +QTextIStream (0xb5af6400) 0 + vptr=((& QTextIStream::_ZTV12QTextIStream) + 8u) + QTextStream (0xb5af3b40) 0 + primary-for QTextIStream (0xb5af6400) + +Vtable for QTextOStream +QTextOStream::_ZTV12QTextOStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextOStream) +8 QTextOStream::~QTextOStream +12 QTextOStream::~QTextOStream + +Class QTextOStream + size=8 align=4 + base size=8 base align=4 +QTextOStream (0xb5af66c0) 0 + vptr=((& QTextOStream::_ZTV12QTextOStream) + 8u) + QTextStream (0xb5b0a1e0) 0 + primary-for QTextOStream (0xb5af66c0) + +Class wait + size=4 align=4 + base size=4 base align=4 +wait (0xb5b0a870) 0 + +Class timespec + size=8 align=4 + base size=8 base align=4 +timespec (0xb5b0aa14) 0 + +Class timeval + size=8 align=4 + base size=8 base align=4 +timeval (0xb5b0aa50) 0 + +Class __pthread_internal_slist + size=4 align=4 + base size=4 base align=4 +__pthread_internal_slist (0xb5b0ab04) 0 + +Class random_data + size=28 align=4 + base size=28 base align=4 +random_data (0xb5b0ae10) 0 + +Class drand48_data + size=24 align=4 + base size=24 base align=4 +drand48_data (0xb5b0ae4c) 0 + +Class QVectorData + size=16 align=4 + base size=16 base align=4 +QVectorData (0xb5b0ae88) 0 + +Class QContiguousCacheData + size=24 align=4 + base size=24 base align=4 +QContiguousCacheData (0xb59b81a4) 0 + +Class QDebug::Stream + size=24 align=4 + base size=22 base align=4 +QDebug::Stream (0xb59b8384) 0 + +Class QDebug + size=4 align=4 + base size=4 base align=4 +QDebug (0xb59b8348) 0 + +Class QNoDebug + size=1 align=1 + base size=0 base align=1 +QNoDebug (0xb5a84fb4) 0 empty + +Vtable for QDirIterator +QDirIterator::_ZTV12QDirIterator: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QDirIterator) +8 QDirIterator::~QDirIterator +12 QDirIterator::~QDirIterator + +Class QDirIterator + size=8 align=4 + base size=8 base align=4 +QDirIterator (0xb5aaf258) 0 + vptr=((& QDirIterator::_ZTV12QDirIterator) + 8u) + +Vtable for QFileSystemWatcher +QFileSystemWatcher::_ZTV18QFileSystemWatcher: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFileSystemWatcher) +8 QFileSystemWatcher::metaObject +12 QFileSystemWatcher::qt_metacast +16 QFileSystemWatcher::qt_metacall +20 QFileSystemWatcher::~QFileSystemWatcher +24 QFileSystemWatcher::~QFileSystemWatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QFileSystemWatcher + size=8 align=4 + base size=8 base align=4 +QFileSystemWatcher (0xb5ab0bc0) 0 + vptr=((& QFileSystemWatcher::_ZTV18QFileSystemWatcher) + 8u) + QObject (0xb5aaf3c0) 0 + primary-for QFileSystemWatcher (0xb5ab0bc0) + +Vtable for QFSFileEngine +QFSFileEngine::_ZTV13QFSFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QFSFileEngine) +8 QFSFileEngine::~QFSFileEngine +12 QFSFileEngine::~QFSFileEngine +16 QFSFileEngine::open +20 QFSFileEngine::close +24 QFSFileEngine::flush +28 QFSFileEngine::size +32 QFSFileEngine::pos +36 QFSFileEngine::seek +40 QFSFileEngine::isSequential +44 QFSFileEngine::remove +48 QFSFileEngine::copy +52 QFSFileEngine::rename +56 QFSFileEngine::link +60 QFSFileEngine::mkdir +64 QFSFileEngine::rmdir +68 QFSFileEngine::setSize +72 QFSFileEngine::caseSensitive +76 QFSFileEngine::isRelativePath +80 QFSFileEngine::entryList +84 QFSFileEngine::fileFlags +88 QFSFileEngine::setPermissions +92 QFSFileEngine::fileName +96 QFSFileEngine::ownerId +100 QFSFileEngine::owner +104 QFSFileEngine::fileTime +108 QFSFileEngine::setFileName +112 QFSFileEngine::handle +116 QFSFileEngine::beginEntryList +120 QFSFileEngine::endEntryList +124 QFSFileEngine::read +128 QFSFileEngine::readLine +132 QFSFileEngine::write +136 QFSFileEngine::extension +140 QFSFileEngine::supportsExtension + +Class QFSFileEngine + size=8 align=4 + base size=8 base align=4 +QFSFileEngine (0xb5ab0e80) 0 + vptr=((& QFSFileEngine::_ZTV13QFSFileEngine) + 8u) + QAbstractFileEngine (0xb5aaf5dc) 0 + primary-for QFSFileEngine (0xb5ab0e80) + +Class QSharedData + size=4 align=4 + base size=4 base align=4 +QSharedData (0xb5aaf708) 0 + +Class QProcessEnvironment + size=4 align=4 + base size=4 base align=4 +QProcessEnvironment (0xb5aaf924) 0 + +Vtable for QProcess +QProcess::_ZTV8QProcess: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QProcess) +8 QProcess::metaObject +12 QProcess::qt_metacast +16 QProcess::qt_metacall +20 QProcess::~QProcess +24 QProcess::~QProcess +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QProcess::isSequential +60 QIODevice::open +64 QProcess::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QProcess::atEnd +84 QIODevice::reset +88 QProcess::bytesAvailable +92 QProcess::bytesToWrite +96 QProcess::canReadLine +100 QProcess::waitForReadyRead +104 QProcess::waitForBytesWritten +108 QProcess::readData +112 QIODevice::readLineData +116 QProcess::writeData +120 QProcess::setupChildProcess + +Class QProcess + size=8 align=4 + base size=8 base align=4 +QProcess (0xb5905f00) 0 + vptr=((& QProcess::_ZTV8QProcess) + 8u) + QIODevice (0xb5905f40) 0 + primary-for QProcess (0xb5905f00) + QObject (0xb5aaf9d8) 0 + primary-for QIODevice (0xb5905f40) + +Class QResource + size=4 align=4 + base size=4 base align=4 +QResource (0xb5aafbf4) 0 + +Class QMetaType + size=1 align=1 + base size=0 base align=1 +QMetaType (0xb5aafd98) 0 empty + +Class QVariant::PrivateShared + size=8 align=4 + base size=8 base align=4 +QVariant::PrivateShared (0xb5986a50) 0 + +Class QVariant::Private::Data + size=8 align=4 + base size=8 base align=4 +QVariant::Private::Data (0xb5986ac8) 0 + +Class QVariant::Private + size=12 align=4 + base size=12 base align=4 +QVariant::Private (0xb5986a8c) 0 + +Class QVariant::Handler + size=36 align=4 + base size=36 base align=4 +QVariant::Handler (0xb5986b40) 0 + +Class QVariant + size=12 align=4 + base size=12 base align=4 +QVariant (0xb5986a14) 0 + +Class QVariantComparisonHelper + size=4 align=4 + base size=4 base align=4 +QVariantComparisonHelper (0xb58243fc) 0 + +Vtable for QSettings +QSettings::_ZTV9QSettings: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QSettings) +8 QSettings::metaObject +12 QSettings::qt_metacast +16 QSettings::qt_metacall +20 QSettings::~QSettings +24 QSettings::~QSettings +28 QSettings::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSettings + size=8 align=4 + base size=8 base align=4 +QSettings (0xb582fa00) 0 + vptr=((& QSettings::_ZTV9QSettings) + 8u) + QObject (0xb5824a14) 0 + primary-for QSettings (0xb582fa00) + +Vtable for QTemporaryFile +QTemporaryFile::_ZTV14QTemporaryFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QTemporaryFile) +8 QTemporaryFile::metaObject +12 QTemporaryFile::qt_metacast +16 QTemporaryFile::qt_metacall +20 QTemporaryFile::~QTemporaryFile +24 QTemporaryFile::~QTemporaryFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QTemporaryFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QTemporaryFile::fileEngine + +Class QTemporaryFile + size=8 align=4 + base size=8 base align=4 +QTemporaryFile (0xb5872600) 0 + vptr=((& QTemporaryFile::_ZTV14QTemporaryFile) + 8u) + QFile (0xb5872640) 0 + primary-for QTemporaryFile (0xb5872600) + QIODevice (0xb5872680) 0 + primary-for QFile (0xb5872640) + QObject (0xb587a528) 0 + primary-for QIODevice (0xb5872680) + +Class QUrl + size=4 align=4 + base size=4 base align=4 +QUrl (0xb587a834) 0 + +Class QXmlStreamStringRef + size=12 align=4 + base size=12 base align=4 +QXmlStreamStringRef (0xb587ad20) 0 + +Class QXmlStreamAttribute + size=56 align=4 + base size=53 base align=4 +QXmlStreamAttribute (0xb56e29d8) 0 + +Class QXmlStreamAttributes + size=4 align=4 + base size=4 base align=4 +QXmlStreamAttributes (0xb56c8c40) 0 + QVector (0xb5703438) 0 + +Class QXmlStreamNamespaceDeclaration + size=28 align=4 + base size=28 base align=4 +QXmlStreamNamespaceDeclaration (0xb5703528) 0 + +Class QXmlStreamNotationDeclaration + size=40 align=4 + base size=40 base align=4 +QXmlStreamNotationDeclaration (0xb570399c) 0 + +Class QXmlStreamEntityDeclaration + size=64 align=4 + base size=64 base align=4 +QXmlStreamEntityDeclaration (0xb5703f78) 0 + +Vtable for QXmlStreamEntityResolver +QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QXmlStreamEntityResolver) +8 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +12 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +16 QXmlStreamEntityResolver::resolveEntity +20 QXmlStreamEntityResolver::resolveUndeclaredEntity + +Class QXmlStreamEntityResolver + size=4 align=4 + base size=4 base align=4 +QXmlStreamEntityResolver (0xb573d834) 0 nearly-empty + vptr=((& QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver) + 8u) + +Class QXmlStreamReader + size=4 align=4 + base size=4 base align=4 +QXmlStreamReader (0xb573d870) 0 + +Class QXmlStreamWriter + size=4 align=4 + base size=4 base align=4 +QXmlStreamWriter (0xb573d9d8) 0 + +Vtable for QAbstractState +QAbstractState::_ZTV14QAbstractState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QAbstractState) +8 QAbstractState::metaObject +12 QAbstractState::qt_metacast +16 QAbstractState::qt_metacall +20 QAbstractState::~QAbstractState +24 QAbstractState::~QAbstractState +28 QAbstractState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QAbstractState + size=8 align=4 + base size=8 base align=4 +QAbstractState (0xb572dc00) 0 + vptr=((& QAbstractState::_ZTV14QAbstractState) + 8u) + QObject (0xb573db40) 0 + primary-for QAbstractState (0xb572dc00) + +Vtable for QAbstractTransition +QAbstractTransition::_ZTV19QAbstractTransition: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractTransition) +8 QAbstractTransition::metaObject +12 QAbstractTransition::qt_metacast +16 QAbstractTransition::qt_metacall +20 QAbstractTransition::~QAbstractTransition +24 QAbstractTransition::~QAbstractTransition +28 QAbstractTransition::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QAbstractTransition + size=8 align=4 + base size=8 base align=4 +QAbstractTransition (0xb572dec0) 0 + vptr=((& QAbstractTransition::_ZTV19QAbstractTransition) + 8u) + QObject (0xb573dd5c) 0 + primary-for QAbstractTransition (0xb572dec0) + +Vtable for QEvent +QEvent::_ZTV6QEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QEvent) +8 QEvent::~QEvent +12 QEvent::~QEvent + +Class QEvent + size=12 align=4 + base size=12 base align=4 +QEvent (0xb573df78) 0 + vptr=((& QEvent::_ZTV6QEvent) + 8u) + +Vtable for QTimerEvent +QTimerEvent::_ZTV11QTimerEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTimerEvent) +8 QTimerEvent::~QTimerEvent +12 QTimerEvent::~QTimerEvent + +Class QTimerEvent + size=16 align=4 + base size=16 base align=4 +QTimerEvent (0xb5796440) 0 + vptr=((& QTimerEvent::_ZTV11QTimerEvent) + 8u) + QEvent (0xb5588168) 0 + primary-for QTimerEvent (0xb5796440) + +Vtable for QChildEvent +QChildEvent::_ZTV11QChildEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QChildEvent) +8 QChildEvent::~QChildEvent +12 QChildEvent::~QChildEvent + +Class QChildEvent + size=16 align=4 + base size=16 base align=4 +QChildEvent (0xb5796500) 0 + vptr=((& QChildEvent::_ZTV11QChildEvent) + 8u) + QEvent (0xb55881e0) 0 + primary-for QChildEvent (0xb5796500) + +Vtable for QCustomEvent +QCustomEvent::_ZTV12QCustomEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QCustomEvent) +8 QCustomEvent::~QCustomEvent +12 QCustomEvent::~QCustomEvent + +Class QCustomEvent + size=12 align=4 + base size=12 base align=4 +QCustomEvent (0xb57967c0) 0 + vptr=((& QCustomEvent::_ZTV12QCustomEvent) + 8u) + QEvent (0xb5588348) 0 + primary-for QCustomEvent (0xb57967c0) + +Vtable for QDynamicPropertyChangeEvent +QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QDynamicPropertyChangeEvent) +8 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent +12 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent + +Class QDynamicPropertyChangeEvent + size=16 align=4 + base size=16 base align=4 +QDynamicPropertyChangeEvent (0xb57968c0) 0 + vptr=((& QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent) + 8u) + QEvent (0xb5588438) 0 + primary-for QDynamicPropertyChangeEvent (0xb57968c0) + +Vtable for QEventTransition +QEventTransition::_ZTV16QEventTransition: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QEventTransition) +8 QEventTransition::metaObject +12 QEventTransition::qt_metacast +16 QEventTransition::qt_metacall +20 QEventTransition::~QEventTransition +24 QEventTransition::~QEventTransition +28 QEventTransition::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QEventTransition::eventTest +60 QEventTransition::onTransition + +Class QEventTransition + size=8 align=4 + base size=8 base align=4 +QEventTransition (0xb5796980) 0 + vptr=((& QEventTransition::_ZTV16QEventTransition) + 8u) + QAbstractTransition (0xb57969c0) 0 + primary-for QEventTransition (0xb5796980) + QObject (0xb55884ec) 0 + primary-for QAbstractTransition (0xb57969c0) + +Vtable for QFinalState +QFinalState::_ZTV11QFinalState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QFinalState) +8 QFinalState::metaObject +12 QFinalState::qt_metacast +16 QFinalState::qt_metacall +20 QFinalState::~QFinalState +24 QFinalState::~QFinalState +28 QFinalState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFinalState::onEntry +60 QFinalState::onExit + +Class QFinalState + size=8 align=4 + base size=8 base align=4 +QFinalState (0xb5796c80) 0 + vptr=((& QFinalState::_ZTV11QFinalState) + 8u) + QAbstractState (0xb5796cc0) 0 + primary-for QFinalState (0xb5796c80) + QObject (0xb5588708) 0 + primary-for QAbstractState (0xb5796cc0) + +Vtable for QHistoryState +QHistoryState::_ZTV13QHistoryState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QHistoryState) +8 QHistoryState::metaObject +12 QHistoryState::qt_metacast +16 QHistoryState::qt_metacall +20 QHistoryState::~QHistoryState +24 QHistoryState::~QHistoryState +28 QHistoryState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QHistoryState::onEntry +60 QHistoryState::onExit + +Class QHistoryState + size=8 align=4 + base size=8 base align=4 +QHistoryState (0xb5796f80) 0 + vptr=((& QHistoryState::_ZTV13QHistoryState) + 8u) + QAbstractState (0xb5796fc0) 0 + primary-for QHistoryState (0xb5796f80) + QObject (0xb5588924) 0 + primary-for QAbstractState (0xb5796fc0) + +Vtable for QSignalTransition +QSignalTransition::_ZTV17QSignalTransition: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QSignalTransition) +8 QSignalTransition::metaObject +12 QSignalTransition::qt_metacast +16 QSignalTransition::qt_metacall +20 QSignalTransition::~QSignalTransition +24 QSignalTransition::~QSignalTransition +28 QSignalTransition::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QSignalTransition::eventTest +60 QSignalTransition::onTransition + +Class QSignalTransition + size=8 align=4 + base size=8 base align=4 +QSignalTransition (0xb55b0280) 0 + vptr=((& QSignalTransition::_ZTV17QSignalTransition) + 8u) + QAbstractTransition (0xb55b02c0) 0 + primary-for QSignalTransition (0xb55b0280) + QObject (0xb5588b40) 0 + primary-for QAbstractTransition (0xb55b02c0) + +Vtable for QState +QState::_ZTV6QState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QState) +8 QState::metaObject +12 QState::qt_metacast +16 QState::qt_metacall +20 QState::~QState +24 QState::~QState +28 QState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QState::onEntry +60 QState::onExit + +Class QState + size=8 align=4 + base size=8 base align=4 +QState (0xb55b0580) 0 + vptr=((& QState::_ZTV6QState) + 8u) + QAbstractState (0xb55b05c0) 0 + primary-for QState (0xb55b0580) + QObject (0xb5588d5c) 0 + primary-for QAbstractState (0xb55b05c0) + +Vtable for QStateMachine::SignalEvent +QStateMachine::SignalEvent::_ZTVN13QStateMachine11SignalEventE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN13QStateMachine11SignalEventE) +8 QStateMachine::SignalEvent::~SignalEvent +12 QStateMachine::SignalEvent::~SignalEvent + +Class QStateMachine::SignalEvent + size=24 align=4 + base size=24 base align=4 +QStateMachine::SignalEvent (0xb55b09c0) 0 + vptr=((& QStateMachine::SignalEvent::_ZTVN13QStateMachine11SignalEventE) + 8u) + QEvent (0xb5588fb4) 0 + primary-for QStateMachine::SignalEvent (0xb55b09c0) + +Vtable for QStateMachine::WrappedEvent +QStateMachine::WrappedEvent::_ZTVN13QStateMachine12WrappedEventE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN13QStateMachine12WrappedEventE) +8 QStateMachine::WrappedEvent::~WrappedEvent +12 QStateMachine::WrappedEvent::~WrappedEvent + +Class QStateMachine::WrappedEvent + size=20 align=4 + base size=20 base align=4 +QStateMachine::WrappedEvent (0xb55b0a40) 0 + vptr=((& QStateMachine::WrappedEvent::_ZTVN13QStateMachine12WrappedEventE) + 8u) + QEvent (0xb55e2000) 0 + primary-for QStateMachine::WrappedEvent (0xb55b0a40) + +Vtable for QStateMachine +QStateMachine::_ZTV13QStateMachine: 20u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QStateMachine) +8 QStateMachine::metaObject +12 QStateMachine::qt_metacast +16 QStateMachine::qt_metacall +20 QStateMachine::~QStateMachine +24 QStateMachine::~QStateMachine +28 QStateMachine::event +32 QStateMachine::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QStateMachine::onEntry +60 QStateMachine::onExit +64 QStateMachine::beginSelectTransitions +68 QStateMachine::endSelectTransitions +72 QStateMachine::beginMicrostep +76 QStateMachine::endMicrostep + +Class QStateMachine + size=8 align=4 + base size=8 base align=4 +QStateMachine (0xb55b0880) 0 + vptr=((& QStateMachine::_ZTV13QStateMachine) + 8u) + QState (0xb55b08c0) 0 + primary-for QStateMachine (0xb55b0880) + QAbstractState (0xb55b0900) 0 + primary-for QState (0xb55b08c0) + QObject (0xb5588f78) 0 + primary-for QAbstractState (0xb55b0900) + +Class QBitArray + size=4 align=4 + base size=4 base align=4 +QBitArray (0xb55e2384) 0 + +Class QBitRef + size=8 align=4 + base size=8 base align=4 +QBitRef (0xb561c834) 0 + +Class QByteArrayMatcher::Data + size=264 align=4 + base size=264 base align=4 +QByteArrayMatcher::Data (0xb561ce4c) 0 + +Class QByteArrayMatcher + size=1032 align=4 + base size=1032 base align=4 +QByteArrayMatcher (0xb561ce10) 0 + +Class QCryptographicHash + size=4 align=4 + base size=4 base align=4 +QCryptographicHash (0xb563812c) 0 + +Vtable for QtSharedPointer::ExternalRefCountData +QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN15QtSharedPointer20ExternalRefCountDataE) +8 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +12 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +16 QtSharedPointer::ExternalRefCountData::destroy + +Class QtSharedPointer::ExternalRefCountData + size=12 align=4 + base size=12 base align=4 +QtSharedPointer::ExternalRefCountData (0xb56382d0) 0 + vptr=((& QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE) + 8u) + +Vtable for QtSharedPointer::ExternalRefCountWithDestroyFn +QtSharedPointer::ExternalRefCountWithDestroyFn::_ZTVN15QtSharedPointer29ExternalRefCountWithDestroyFnE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN15QtSharedPointer29ExternalRefCountWithDestroyFnE) +8 QtSharedPointer::ExternalRefCountWithDestroyFn::~ExternalRefCountWithDestroyFn +12 QtSharedPointer::ExternalRefCountWithDestroyFn::~ExternalRefCountWithDestroyFn +16 QtSharedPointer::ExternalRefCountWithDestroyFn::destroy + +Class QtSharedPointer::ExternalRefCountWithDestroyFn + size=16 align=4 + base size=16 base align=4 +QtSharedPointer::ExternalRefCountWithDestroyFn (0xb5664800) 0 + vptr=((& QtSharedPointer::ExternalRefCountWithDestroyFn::_ZTVN15QtSharedPointer29ExternalRefCountWithDestroyFnE) + 8u) + QtSharedPointer::ExternalRefCountData (0xb5638ac8) 0 + primary-for QtSharedPointer::ExternalRefCountWithDestroyFn (0xb5664800) + +Class QDate + size=4 align=4 + base size=4 base align=4 +QDate (0xb54c3000) 0 + +Class QTime + size=4 align=4 + base size=4 base align=4 +QTime (0xb54c3618) 0 + +Class QDateTime + size=4 align=4 + base size=4 base align=4 +QDateTime (0xb54c3b7c) 0 + +Class QEasingCurve + size=4 align=4 + base size=4 base align=4 +QEasingCurve (0xb54c3e4c) 0 + +Class QPoint + size=8 align=4 + base size=8 base align=4 +QPoint (0xb54c3ec4) 0 + +Class QPointF + size=16 align=4 + base size=16 base align=4 +QPointF (0xb5529474) 0 + +Class QLine + size=16 align=4 + base size=16 base align=4 +QLine (0xb5542b7c) 0 + +Class QLineF + size=32 align=4 + base size=32 base align=4 +QLineF (0xb555a8ac) 0 + +Class QLinkedListData + size=20 align=4 + base size=20 base align=4 +QLinkedListData (0xb538099c) 0 + +Class QMargins + size=16 align=4 + base size=16 base align=4 +QMargins (0xb5380bb8) 0 + +Class QSize + size=8 align=4 + base size=8 base align=4 +QSize (0xb540ad20) 0 + +Class QSizeF + size=16 align=4 + base size=16 base align=4 +QSizeF (0xb54307bc) 0 + +Class QRect + size=16 align=4 + base size=16 base align=4 +QRect (0xb545e3c0) 0 + +Class QRectF + size=32 align=4 + base size=32 base align=4 +QRectF (0xb52be000) 0 + +Class QLatin1Literal + size=8 align=4 + base size=8 base align=4 +QLatin1Literal (0xb530ad98) 0 + +Class QAbstractConcatenable + size=1 align=1 + base size=0 base align=1 +QAbstractConcatenable (0xb530ae4c) 0 empty + +Class QTextBoundaryFinder + size=28 align=4 + base size=28 base align=4 +QTextBoundaryFinder (0xb533e0f0) 0 + +Vtable for QTimeLine +QTimeLine::_ZTV9QTimeLine: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QTimeLine) +8 QTimeLine::metaObject +12 QTimeLine::qt_metacast +16 QTimeLine::qt_metacall +20 QTimeLine::~QTimeLine +24 QTimeLine::~QTimeLine +28 QObject::event +32 QObject::eventFilter +36 QTimeLine::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTimeLine::valueForTime + +Class QTimeLine + size=8 align=4 + base size=8 base align=4 +QTimeLine (0xb532ef00) 0 + vptr=((& QTimeLine::_ZTV9QTimeLine) + 8u) + QObject (0xb533e1a4) 0 + primary-for QTimeLine (0xb532ef00) + +Vtable for QRunnable +QRunnable::_ZTV9QRunnable: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QRunnable) +8 __cxa_pure_virtual +12 QRunnable::~QRunnable +16 QRunnable::~QRunnable + +Class QRunnable + size=8 align=4 + base size=8 base align=4 +QRunnable (0xb533e438) 0 + vptr=((& QRunnable::_ZTV9QRunnable) + 8u) + +Class QMutex + size=4 align=4 + base size=4 base align=4 +QMutex (0xb533e8ac) 0 + +Class QMutexLocker + size=4 align=4 + base size=4 base align=4 +QMutexLocker (0xb533ef3c) 0 + +Vtable for QtConcurrent::Exception +QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent9ExceptionE) +8 QtConcurrent::Exception::~Exception +12 QtConcurrent::Exception::~Exception +16 std::exception::what +20 QtConcurrent::Exception::raise +24 QtConcurrent::Exception::clone + +Class QtConcurrent::Exception + size=4 align=4 + base size=4 base align=4 +QtConcurrent::Exception (0xb518d080) 0 nearly-empty + vptr=((& QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE) + 8u) + std::exception (0xb5187438) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb518d080) + +Vtable for QtConcurrent::UnhandledException +QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent18UnhandledExceptionE) +8 QtConcurrent::UnhandledException::~UnhandledException +12 QtConcurrent::UnhandledException::~UnhandledException +16 std::exception::what +20 QtConcurrent::UnhandledException::raise +24 QtConcurrent::UnhandledException::clone + +Class QtConcurrent::UnhandledException + size=4 align=4 + base size=4 base align=4 +QtConcurrent::UnhandledException (0xb518d180) 0 nearly-empty + vptr=((& QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE) + 8u) + QtConcurrent::Exception (0xb518d1c0) 0 nearly-empty + primary-for QtConcurrent::UnhandledException (0xb518d180) + std::exception (0xb5187474) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb518d1c0) + +Class QtConcurrent::internal::ExceptionHolder + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionHolder (0xb51874b0) 0 + +Class QtConcurrent::internal::ExceptionStore + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionStore (0xb51874ec) 0 + +Class QtConcurrent::ResultItem + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultItem (0xb5187528) 0 + +Class QtConcurrent::ResultIteratorBase + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultIteratorBase (0xb5187b04) 0 + +Vtable for QtConcurrent::ResultStoreBase +QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent15ResultStoreBaseE) +8 QtConcurrent::ResultStoreBase::~ResultStoreBase +12 QtConcurrent::ResultStoreBase::~ResultStoreBase + +Class QtConcurrent::ResultStoreBase + size=28 align=4 + base size=28 base align=4 +QtConcurrent::ResultStoreBase (0xb5187c30) 0 + vptr=((& QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE) + 8u) + +Vtable for QFutureInterfaceBase +QFutureInterfaceBase::_ZTV20QFutureInterfaceBase: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QFutureInterfaceBase) +8 QFutureInterfaceBase::~QFutureInterfaceBase +12 QFutureInterfaceBase::~QFutureInterfaceBase + +Class QFutureInterfaceBase + size=8 align=4 + base size=8 base align=4 +QFutureInterfaceBase (0xb51bf078) 0 + vptr=((& QFutureInterfaceBase::_ZTV20QFutureInterfaceBase) + 8u) + +Vtable for QFutureWatcherBase +QFutureWatcherBase::_ZTV18QFutureWatcherBase: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFutureWatcherBase) +8 QFutureWatcherBase::metaObject +12 QFutureWatcherBase::qt_metacast +16 QFutureWatcherBase::qt_metacall +20 QFutureWatcherBase::~QFutureWatcherBase +24 QFutureWatcherBase::~QFutureWatcherBase +28 QFutureWatcherBase::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QFutureWatcherBase::connectNotify +52 QFutureWatcherBase::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QFutureWatcherBase + size=8 align=4 + base size=8 base align=4 +QFutureWatcherBase (0xb5222fc0) 0 + vptr=((& QFutureWatcherBase::_ZTV18QFutureWatcherBase) + 8u) + QObject (0xb5227a50) 0 + primary-for QFutureWatcherBase (0xb5222fc0) + +Vtable for QThread +QThread::_ZTV7QThread: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QThread) +8 QThread::metaObject +12 QThread::qt_metacast +16 QThread::qt_metacall +20 QThread::~QThread +24 QThread::~QThread +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QThread::run + +Class QThread + size=8 align=4 + base size=8 base align=4 +QThread (0xb5268180) 0 + vptr=((& QThread::_ZTV7QThread) + 8u) + QObject (0xb525ca50) 0 + primary-for QThread (0xb5268180) + +Vtable for QThreadPool +QThreadPool::_ZTV11QThreadPool: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QThreadPool) +8 QThreadPool::metaObject +12 QThreadPool::qt_metacast +16 QThreadPool::qt_metacall +20 QThreadPool::~QThreadPool +24 QThreadPool::~QThreadPool +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QThreadPool + size=8 align=4 + base size=8 base align=4 +QThreadPool (0xb52684c0) 0 + vptr=((& QThreadPool::_ZTV11QThreadPool) + 8u) + QObject (0xb525cce4) 0 + primary-for QThreadPool (0xb52684c0) + +Class QWaitCondition + size=4 align=4 + base size=4 base align=4 +QWaitCondition (0xb525cf00) 0 + +Class QSemaphore + size=4 align=4 + base size=4 base align=4 +QSemaphore (0xb525cf3c) 0 + +Class QtConcurrent::ThreadEngineBarrier + size=12 align=4 + base size=12 base align=4 +QtConcurrent::ThreadEngineBarrier (0xb525cf78) 0 + +Vtable for QtConcurrent::ThreadEngineBase +QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE: 11u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent16ThreadEngineBaseE) +8 QtConcurrent::ThreadEngineBase::run +12 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +16 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +20 QtConcurrent::ThreadEngineBase::start +24 QtConcurrent::ThreadEngineBase::finish +28 QtConcurrent::ThreadEngineBase::threadFunction +32 QtConcurrent::ThreadEngineBase::shouldStartThread +36 QtConcurrent::ThreadEngineBase::shouldThrottleThread +40 __cxa_pure_virtual + +Class QtConcurrent::ThreadEngineBase + size=32 align=4 + base size=32 base align=4 +QtConcurrent::ThreadEngineBase (0xb5268840) 0 + vptr=((& QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE) + 8u) + QRunnable (0xb525cfb4) 0 + primary-for QtConcurrent::ThreadEngineBase (0xb5268840) + +VTT for QtConcurrent::ThreadEngine +QtConcurrent::ThreadEngine::_ZTTN12QtConcurrent12ThreadEngineIvEE: 2u entries +0 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 12u) +4 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 68u) + +Class QtConcurrent::BlockSizeManager + size=72 align=4 + base size=72 base align=4 +QtConcurrent::BlockSizeManager (0xb50ac5a0) 0 + +Vtable for QFactoryInterface +QFactoryInterface::_ZTV17QFactoryInterface: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QFactoryInterface) +8 QFactoryInterface::~QFactoryInterface +12 QFactoryInterface::~QFactoryInterface +16 __cxa_pure_virtual + +Class QFactoryInterface + size=4 align=4 + base size=4 base align=4 +QFactoryInterface (0xb4ec3e88) 0 nearly-empty + vptr=((& QFactoryInterface::_ZTV17QFactoryInterface) + 8u) + +Vtable for QTextCodecFactoryInterface +QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QTextCodecFactoryInterface) +8 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +12 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +16 __cxa_pure_virtual +20 __cxa_pure_virtual + +Class QTextCodecFactoryInterface + size=4 align=4 + base size=4 base align=4 +QTextCodecFactoryInterface (0xb4f45c40) 0 nearly-empty + vptr=((& QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface) + 8u) + QFactoryInterface (0xb4f4f438) 0 nearly-empty + primary-for QTextCodecFactoryInterface (0xb4f45c40) + +Vtable for QTextCodecPlugin +QTextCodecPlugin::_ZTV16QTextCodecPlugin: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QTextCodecPlugin) +8 QTextCodecPlugin::metaObject +12 QTextCodecPlugin::qt_metacast +16 QTextCodecPlugin::qt_metacall +20 QTextCodecPlugin::~QTextCodecPlugin +24 QTextCodecPlugin::~QTextCodecPlugin +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 QTextCodecPlugin::keys +80 QTextCodecPlugin::create +84 (int (*)(...))-0x000000008 +88 (int (*)(...))(& _ZTI16QTextCodecPlugin) +92 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD1Ev +96 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD0Ev +100 QTextCodecPlugin::_ZThn8_NK16QTextCodecPlugin4keysEv +104 QTextCodecPlugin::_ZThn8_N16QTextCodecPlugin6createERK7QString + +Class QTextCodecPlugin + size=12 align=4 + base size=12 base align=4 +QTextCodecPlugin (0xb4f56910) 0 + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 8u) + QObject (0xb4f4f744) 0 + primary-for QTextCodecPlugin (0xb4f56910) + QTextCodecFactoryInterface (0xb4f45f00) 8 nearly-empty + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 92u) + QFactoryInterface (0xb4f4f780) 8 nearly-empty + primary-for QTextCodecFactoryInterface (0xb4f45f00) + +Class QLibraryInfo + size=1 align=1 + base size=0 base align=1 +QLibraryInfo (0xb4f6fbf4) 0 empty + +Vtable for QEventLoop +QEventLoop::_ZTV10QEventLoop: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QEventLoop) +8 QEventLoop::metaObject +12 QEventLoop::qt_metacast +16 QEventLoop::qt_metacall +20 QEventLoop::~QEventLoop +24 QEventLoop::~QEventLoop +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QEventLoop + size=8 align=4 + base size=8 base align=4 +QEventLoop (0xb4d78ac0) 0 + vptr=((& QEventLoop::_ZTV10QEventLoop) + 8u) + QObject (0xb4f6fc6c) 0 + primary-for QEventLoop (0xb4d78ac0) + +Vtable for QAbstractEventDispatcher +QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QAbstractEventDispatcher) +8 QAbstractEventDispatcher::metaObject +12 QAbstractEventDispatcher::qt_metacast +16 QAbstractEventDispatcher::qt_metacall +20 QAbstractEventDispatcher::~QAbstractEventDispatcher +24 QAbstractEventDispatcher::~QAbstractEventDispatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 __cxa_pure_virtual +88 __cxa_pure_virtual +92 __cxa_pure_virtual +96 __cxa_pure_virtual +100 QAbstractEventDispatcher::startingUp +104 QAbstractEventDispatcher::closingDown + +Class QAbstractEventDispatcher + size=8 align=4 + base size=8 base align=4 +QAbstractEventDispatcher (0xb4d78ec0) 0 + vptr=((& QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher) + 8u) + QObject (0xb4f6ff78) 0 + primary-for QAbstractEventDispatcher (0xb4d78ec0) + +Class QModelIndex + size=16 align=4 + base size=16 base align=4 +QModelIndex (0xb4db31a4) 0 + +Class QPersistentModelIndex + size=4 align=4 + base size=4 base align=4 +QPersistentModelIndex (0xb4dc3654) 0 + +Vtable for QAbstractItemModel +QAbstractItemModel::_ZTV18QAbstractItemModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractItemModel) +8 QAbstractItemModel::metaObject +12 QAbstractItemModel::qt_metacast +16 QAbstractItemModel::qt_metacall +20 QAbstractItemModel::~QAbstractItemModel +24 QAbstractItemModel::~QAbstractItemModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractItemModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractItemModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractItemModel + size=8 align=4 + base size=8 base align=4 +QAbstractItemModel (0xb4dafb00) 0 + vptr=((& QAbstractItemModel::_ZTV18QAbstractItemModel) + 8u) + QObject (0xb4dc37bc) 0 + primary-for QAbstractItemModel (0xb4dafb00) + +Vtable for QAbstractTableModel +QAbstractTableModel::_ZTV19QAbstractTableModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractTableModel) +8 QAbstractTableModel::metaObject +12 QAbstractTableModel::qt_metacast +16 QAbstractTableModel::qt_metacall +20 QAbstractTableModel::~QAbstractTableModel +24 QAbstractTableModel::~QAbstractTableModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractTableModel::index +60 QAbstractTableModel::parent +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractTableModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractTableModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractTableModel + size=8 align=4 + base size=8 base align=4 +QAbstractTableModel (0xb4e01140) 0 + vptr=((& QAbstractTableModel::_ZTV19QAbstractTableModel) + 8u) + QAbstractItemModel (0xb4e01180) 0 + primary-for QAbstractTableModel (0xb4e01140) + QObject (0xb4e0312c) 0 + primary-for QAbstractItemModel (0xb4e01180) + +Vtable for QAbstractListModel +QAbstractListModel::_ZTV18QAbstractListModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractListModel) +8 QAbstractListModel::metaObject +12 QAbstractListModel::qt_metacast +16 QAbstractListModel::qt_metacall +20 QAbstractListModel::~QAbstractListModel +24 QAbstractListModel::~QAbstractListModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractListModel::index +60 QAbstractListModel::parent +64 __cxa_pure_virtual +68 QAbstractListModel::columnCount +72 QAbstractListModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractListModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractListModel + size=8 align=4 + base size=8 base align=4 +QAbstractListModel (0xb4e013c0) 0 + vptr=((& QAbstractListModel::_ZTV18QAbstractListModel) + 8u) + QAbstractItemModel (0xb4e01400) 0 + primary-for QAbstractListModel (0xb4e013c0) + QObject (0xb4e03258) 0 + primary-for QAbstractItemModel (0xb4e01400) + +Class QBasicTimer + size=4 align=4 + base size=4 base align=4 +QBasicTimer (0xb4e2912c) 0 + +Vtable for QCoreApplication +QCoreApplication::_ZTV16QCoreApplication: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QCoreApplication) +8 QCoreApplication::metaObject +12 QCoreApplication::qt_metacast +16 QCoreApplication::qt_metacall +20 QCoreApplication::~QCoreApplication +24 QCoreApplication::~QCoreApplication +28 QCoreApplication::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QCoreApplication::notify +60 QCoreApplication::compressEvent + +Class QCoreApplication + size=8 align=4 + base size=8 base align=4 +QCoreApplication (0xb4e01ec0) 0 + vptr=((& QCoreApplication::_ZTV16QCoreApplication) + 8u) + QObject (0xb4e293c0) 0 + primary-for QCoreApplication (0xb4e01ec0) + +Class __exception + size=32 align=4 + base size=32 base align=4 +__exception (0xb4e29960) 0 + +Class QMetaMethod + size=8 align=4 + base size=8 base align=4 +QMetaMethod (0xb4c81690) 0 + +Class QMetaEnum + size=8 align=4 + base size=8 base align=4 +QMetaEnum (0xb4c8199c) 0 + +Class QMetaProperty + size=20 align=4 + base size=20 base align=4 +QMetaProperty (0xb4c81bf4) 0 + +Class QMetaClassInfo + size=8 align=4 + base size=8 base align=4 +QMetaClassInfo (0xb4c81ca8) 0 + +Vtable for QMimeData +QMimeData::_ZTV9QMimeData: 17u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QMimeData) +8 QMimeData::metaObject +12 QMimeData::qt_metacast +16 QMimeData::qt_metacall +20 QMimeData::~QMimeData +24 QMimeData::~QMimeData +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QMimeData::hasFormat +60 QMimeData::formats +64 QMimeData::retrieveData + +Class QMimeData + size=8 align=4 + base size=8 base align=4 +QMimeData (0xb4c89d00) 0 + vptr=((& QMimeData::_ZTV9QMimeData) + 8u) + QObject (0xb4c81f00) 0 + primary-for QMimeData (0xb4c89d00) + +Vtable for QObjectCleanupHandler +QObjectCleanupHandler::_ZTV21QObjectCleanupHandler: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QObjectCleanupHandler) +8 QObjectCleanupHandler::metaObject +12 QObjectCleanupHandler::qt_metacast +16 QObjectCleanupHandler::qt_metacall +20 QObjectCleanupHandler::~QObjectCleanupHandler +24 QObjectCleanupHandler::~QObjectCleanupHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObjectCleanupHandler + size=12 align=4 + base size=12 base align=4 +QObjectCleanupHandler (0xb4c89fc0) 0 + vptr=((& QObjectCleanupHandler::_ZTV21QObjectCleanupHandler) + 8u) + QObject (0xb4cbb12c) 0 + primary-for QObjectCleanupHandler (0xb4c89fc0) + +Vtable for QSharedMemory +QSharedMemory::_ZTV13QSharedMemory: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSharedMemory) +8 QSharedMemory::metaObject +12 QSharedMemory::qt_metacast +16 QSharedMemory::qt_metacall +20 QSharedMemory::~QSharedMemory +24 QSharedMemory::~QSharedMemory +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSharedMemory + size=8 align=4 + base size=8 base align=4 +QSharedMemory (0xb4cbd200) 0 + vptr=((& QSharedMemory::_ZTV13QSharedMemory) + 8u) + QObject (0xb4cbb258) 0 + primary-for QSharedMemory (0xb4cbd200) + +Vtable for QSignalMapper +QSignalMapper::_ZTV13QSignalMapper: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSignalMapper) +8 QSignalMapper::metaObject +12 QSignalMapper::qt_metacast +16 QSignalMapper::qt_metacall +20 QSignalMapper::~QSignalMapper +24 QSignalMapper::~QSignalMapper +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSignalMapper + size=8 align=4 + base size=8 base align=4 +QSignalMapper (0xb4cbd4c0) 0 + vptr=((& QSignalMapper::_ZTV13QSignalMapper) + 8u) + QObject (0xb4cbb474) 0 + primary-for QSignalMapper (0xb4cbd4c0) + +Vtable for QSocketNotifier +QSocketNotifier::_ZTV15QSocketNotifier: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QSocketNotifier) +8 QSocketNotifier::metaObject +12 QSocketNotifier::qt_metacast +16 QSocketNotifier::qt_metacall +20 QSocketNotifier::~QSocketNotifier +24 QSocketNotifier::~QSocketNotifier +28 QSocketNotifier::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSocketNotifier + size=20 align=4 + base size=17 base align=4 +QSocketNotifier (0xb4cbd780) 0 + vptr=((& QSocketNotifier::_ZTV15QSocketNotifier) + 8u) + QObject (0xb4cbb690) 0 + primary-for QSocketNotifier (0xb4cbd780) + +Class QSystemSemaphore + size=4 align=4 + base size=4 base align=4 +QSystemSemaphore (0xb4cbb960) 0 + +Vtable for QTimer +QTimer::_ZTV6QTimer: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QTimer) +8 QTimer::metaObject +12 QTimer::qt_metacast +16 QTimer::qt_metacall +20 QTimer::~QTimer +24 QTimer::~QTimer +28 QObject::event +32 QObject::eventFilter +36 QTimer::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QTimer + size=24 align=4 + base size=21 base align=4 +QTimer (0xb4cbdb40) 0 + vptr=((& QTimer::_ZTV6QTimer) + 8u) + QObject (0xb4cbba14) 0 + primary-for QTimer (0xb4cbdb40) + +Vtable for QTranslator +QTranslator::_ZTV11QTranslator: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTranslator) +8 QTranslator::metaObject +12 QTranslator::qt_metacast +16 QTranslator::qt_metacall +20 QTranslator::~QTranslator +24 QTranslator::~QTranslator +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTranslator::translate +60 QTranslator::isEmpty + +Class QTranslator + size=8 align=4 + base size=8 base align=4 +QTranslator (0xb4d0d080) 0 + vptr=((& QTranslator::_ZTV11QTranslator) + 8u) + QObject (0xb4cbbca8) 0 + primary-for QTranslator (0xb4d0d080) + +Vtable for QLibrary +QLibrary::_ZTV8QLibrary: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QLibrary) +8 QLibrary::metaObject +12 QLibrary::qt_metacast +16 QLibrary::qt_metacall +20 QLibrary::~QLibrary +24 QLibrary::~QLibrary +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QLibrary + size=16 align=4 + base size=13 base align=4 +QLibrary (0xb4d0d3c0) 0 + vptr=((& QLibrary::_ZTV8QLibrary) + 8u) + QObject (0xb4cbbf78) 0 + primary-for QLibrary (0xb4d0d3c0) + +Vtable for QPluginLoader +QPluginLoader::_ZTV13QPluginLoader: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QPluginLoader) +8 QPluginLoader::metaObject +12 QPluginLoader::qt_metacast +16 QPluginLoader::qt_metacall +20 QPluginLoader::~QPluginLoader +24 QPluginLoader::~QPluginLoader +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QPluginLoader + size=16 align=4 + base size=13 base align=4 +QPluginLoader (0xb4d0d7c0) 0 + vptr=((& QPluginLoader::_ZTV13QPluginLoader) + 8u) + QObject (0xb4d271e0) 0 + primary-for QPluginLoader (0xb4d0d7c0) + +Class QUuid + size=16 align=4 + base size=16 base align=4 +QUuid (0xb4d2730c) 0 + +Class QReadWriteLock + size=4 align=4 + base size=4 base align=4 +QReadWriteLock (0xb4d5d30c) 0 + +Class QReadLocker + size=4 align=4 + base size=4 base align=4 +QReadLocker (0xb4d5d348) 0 + +Class QWriteLocker + size=4 align=4 + base size=4 base align=4 +QWriteLocker (0xb4d5d834) 0 + +Class QThreadStorageData + size=4 align=4 + base size=4 base align=4 +QThreadStorageData (0xb4d5dd20) 0 + +Vtable for QAbstractAnimation +QAbstractAnimation::_ZTV18QAbstractAnimation: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractAnimation) +8 QAbstractAnimation::metaObject +12 QAbstractAnimation::qt_metacast +16 QAbstractAnimation::qt_metacall +20 QAbstractAnimation::~QAbstractAnimation +24 QAbstractAnimation::~QAbstractAnimation +28 QAbstractAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractAnimation::updateState +68 QAbstractAnimation::updateDirection + +Class QAbstractAnimation + size=8 align=4 + base size=8 base align=4 +QAbstractAnimation (0xb4b7f6c0) 0 + vptr=((& QAbstractAnimation::_ZTV18QAbstractAnimation) + 8u) + QObject (0xb4d5dd98) 0 + primary-for QAbstractAnimation (0xb4b7f6c0) + +Vtable for QAnimationGroup +QAnimationGroup::_ZTV15QAnimationGroup: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QAnimationGroup) +8 QAnimationGroup::metaObject +12 QAnimationGroup::qt_metacast +16 QAnimationGroup::qt_metacall +20 QAnimationGroup::~QAnimationGroup +24 QAnimationGroup::~QAnimationGroup +28 QAnimationGroup::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractAnimation::updateState +68 QAbstractAnimation::updateDirection + +Class QAnimationGroup + size=8 align=4 + base size=8 base align=4 +QAnimationGroup (0xb4b7f980) 0 + vptr=((& QAnimationGroup::_ZTV15QAnimationGroup) + 8u) + QAbstractAnimation (0xb4b7f9c0) 0 + primary-for QAnimationGroup (0xb4b7f980) + QObject (0xb4b9b000) 0 + primary-for QAbstractAnimation (0xb4b7f9c0) + +Vtable for QParallelAnimationGroup +QParallelAnimationGroup::_ZTV23QParallelAnimationGroup: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI23QParallelAnimationGroup) +8 QParallelAnimationGroup::metaObject +12 QParallelAnimationGroup::qt_metacast +16 QParallelAnimationGroup::qt_metacall +20 QParallelAnimationGroup::~QParallelAnimationGroup +24 QParallelAnimationGroup::~QParallelAnimationGroup +28 QParallelAnimationGroup::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QParallelAnimationGroup::duration +60 QParallelAnimationGroup::updateCurrentTime +64 QParallelAnimationGroup::updateState +68 QParallelAnimationGroup::updateDirection + +Class QParallelAnimationGroup + size=8 align=4 + base size=8 base align=4 +QParallelAnimationGroup (0xb4b7fc80) 0 + vptr=((& QParallelAnimationGroup::_ZTV23QParallelAnimationGroup) + 8u) + QAnimationGroup (0xb4b7fcc0) 0 + primary-for QParallelAnimationGroup (0xb4b7fc80) + QAbstractAnimation (0xb4b7fd00) 0 + primary-for QAnimationGroup (0xb4b7fcc0) + QObject (0xb4b9b21c) 0 + primary-for QAbstractAnimation (0xb4b7fd00) + +Vtable for QPauseAnimation +QPauseAnimation::_ZTV15QPauseAnimation: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QPauseAnimation) +8 QPauseAnimation::metaObject +12 QPauseAnimation::qt_metacast +16 QPauseAnimation::qt_metacall +20 QPauseAnimation::~QPauseAnimation +24 QPauseAnimation::~QPauseAnimation +28 QPauseAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QPauseAnimation::duration +60 QPauseAnimation::updateCurrentTime +64 QAbstractAnimation::updateState +68 QAbstractAnimation::updateDirection + +Class QPauseAnimation + size=8 align=4 + base size=8 base align=4 +QPauseAnimation (0xb4b7ffc0) 0 + vptr=((& QPauseAnimation::_ZTV15QPauseAnimation) + 8u) + QAbstractAnimation (0xb4bb4000) 0 + primary-for QPauseAnimation (0xb4b7ffc0) + QObject (0xb4b9b438) 0 + primary-for QAbstractAnimation (0xb4bb4000) + +Vtable for QVariantAnimation +QVariantAnimation::_ZTV17QVariantAnimation: 20u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QVariantAnimation) +8 QVariantAnimation::metaObject +12 QVariantAnimation::qt_metacast +16 QVariantAnimation::qt_metacall +20 QVariantAnimation::~QVariantAnimation +24 QVariantAnimation::~QVariantAnimation +28 QVariantAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QVariantAnimation::duration +60 QVariantAnimation::updateCurrentTime +64 QVariantAnimation::updateState +68 QAbstractAnimation::updateDirection +72 __cxa_pure_virtual +76 QVariantAnimation::interpolated + +Class QVariantAnimation + size=8 align=4 + base size=8 base align=4 +QVariantAnimation (0xb4bb42c0) 0 + vptr=((& QVariantAnimation::_ZTV17QVariantAnimation) + 8u) + QAbstractAnimation (0xb4bb4300) 0 + primary-for QVariantAnimation (0xb4bb42c0) + QObject (0xb4b9b654) 0 + primary-for QAbstractAnimation (0xb4bb4300) + +Vtable for QPropertyAnimation +QPropertyAnimation::_ZTV18QPropertyAnimation: 20u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QPropertyAnimation) +8 QPropertyAnimation::metaObject +12 QPropertyAnimation::qt_metacast +16 QPropertyAnimation::qt_metacall +20 QPropertyAnimation::~QPropertyAnimation +24 QPropertyAnimation::~QPropertyAnimation +28 QPropertyAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QVariantAnimation::duration +60 QVariantAnimation::updateCurrentTime +64 QPropertyAnimation::updateState +68 QAbstractAnimation::updateDirection +72 QPropertyAnimation::updateCurrentValue +76 QVariantAnimation::interpolated + +Class QPropertyAnimation + size=8 align=4 + base size=8 base align=4 +QPropertyAnimation (0xb4bb4700) 0 + vptr=((& QPropertyAnimation::_ZTV18QPropertyAnimation) + 8u) + QVariantAnimation (0xb4bb4740) 0 + primary-for QPropertyAnimation (0xb4bb4700) + QAbstractAnimation (0xb4bb4780) 0 + primary-for QVariantAnimation (0xb4bb4740) + QObject (0xb4b9b870) 0 + primary-for QAbstractAnimation (0xb4bb4780) + +Vtable for QSequentialAnimationGroup +QSequentialAnimationGroup::_ZTV25QSequentialAnimationGroup: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI25QSequentialAnimationGroup) +8 QSequentialAnimationGroup::metaObject +12 QSequentialAnimationGroup::qt_metacast +16 QSequentialAnimationGroup::qt_metacall +20 QSequentialAnimationGroup::~QSequentialAnimationGroup +24 QSequentialAnimationGroup::~QSequentialAnimationGroup +28 QSequentialAnimationGroup::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QSequentialAnimationGroup::duration +60 QSequentialAnimationGroup::updateCurrentTime +64 QSequentialAnimationGroup::updateState +68 QSequentialAnimationGroup::updateDirection + +Class QSequentialAnimationGroup + size=8 align=4 + base size=8 base align=4 +QSequentialAnimationGroup (0xb4bb4a40) 0 + vptr=((& QSequentialAnimationGroup::_ZTV25QSequentialAnimationGroup) + 8u) + QAnimationGroup (0xb4bb4a80) 0 + primary-for QSequentialAnimationGroup (0xb4bb4a40) + QAbstractAnimation (0xb4bb4ac0) 0 + primary-for QAnimationGroup (0xb4bb4a80) + QObject (0xb4b9ba8c) 0 + primary-for QAbstractAnimation (0xb4bb4ac0) + +Class QSourceLocation + size=20 align=4 + base size=20 base align=4 +QSourceLocation (0xb4b9bca8) 0 + +Vtable for QAbstractMessageHandler +QAbstractMessageHandler::_ZTV23QAbstractMessageHandler: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI23QAbstractMessageHandler) +8 QAbstractMessageHandler::metaObject +12 QAbstractMessageHandler::qt_metacast +16 QAbstractMessageHandler::qt_metacall +20 QAbstractMessageHandler::~QAbstractMessageHandler +24 QAbstractMessageHandler::~QAbstractMessageHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractMessageHandler + size=8 align=4 + base size=8 base align=4 +QAbstractMessageHandler (0xb4bf7000) 0 + vptr=((& QAbstractMessageHandler::_ZTV23QAbstractMessageHandler) + 8u) + QObject (0xb4b9be4c) 0 + primary-for QAbstractMessageHandler (0xb4bf7000) + +Vtable for QAbstractUriResolver +QAbstractUriResolver::_ZTV20QAbstractUriResolver: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractUriResolver) +8 QAbstractUriResolver::metaObject +12 QAbstractUriResolver::qt_metacast +16 QAbstractUriResolver::qt_metacall +20 QAbstractUriResolver::~QAbstractUriResolver +24 QAbstractUriResolver::~QAbstractUriResolver +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractUriResolver + size=8 align=4 + base size=8 base align=4 +QAbstractUriResolver (0xb4bf72c0) 0 + vptr=((& QAbstractUriResolver::_ZTV20QAbstractUriResolver) + 8u) + QObject (0xb4c04078) 0 + primary-for QAbstractUriResolver (0xb4bf72c0) + +Class QXmlName + size=8 align=4 + base size=8 base align=4 +QXmlName (0xb4c04294) 0 + +Class QPatternist::NodeIndexStorage + size=20 align=4 + base size=20 base align=4 +QPatternist::NodeIndexStorage (0xb4c04564) 0 + +Class QXmlNodeModelIndex + size=20 align=4 + base size=20 base align=4 +QXmlNodeModelIndex (0xb4c04690) 0 + +Vtable for QAbstractXmlNodeModel +QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QAbstractXmlNodeModel) +8 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +12 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QAbstractXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QAbstractXmlNodeModel (0xb4bf7e80) 0 + vptr=((& QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel) + 8u) + QSharedData (0xb4c04dd4) 4 + +Class QXmlItem + size=20 align=4 + base size=20 base align=4 +QXmlItem (0xb4c6c000) 0 + +Vtable for QAbstractXmlReceiver +QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractXmlReceiver) +8 QAbstractXmlReceiver::~QAbstractXmlReceiver +12 QAbstractXmlReceiver::~QAbstractXmlReceiver +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 __cxa_pure_virtual +52 __cxa_pure_virtual +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractXmlReceiver::whitespaceOnly +68 QAbstractXmlReceiver::item + +Class QAbstractXmlReceiver + size=8 align=4 + base size=8 base align=4 +QAbstractXmlReceiver (0xb4c6c1e0) 0 + vptr=((& QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver) + 8u) + +Class QXmlNamePool + size=4 align=4 + base size=4 base align=4 +QXmlNamePool (0xb4c6c258) 0 + +Class QXmlQuery + size=4 align=4 + base size=4 base align=4 +QXmlQuery (0xb4c6c2d0) 0 + +Vtable for QSimpleXmlNodeModel +QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QSimpleXmlNodeModel) +8 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +12 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +16 QSimpleXmlNodeModel::baseUri +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 QSimpleXmlNodeModel::stringValue +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 QSimpleXmlNodeModel::namespaceBindings +76 QSimpleXmlNodeModel::elementById +80 QSimpleXmlNodeModel::nodesByIdref +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QSimpleXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QSimpleXmlNodeModel (0xb4c67580) 0 + vptr=((& QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel) + 8u) + QAbstractXmlNodeModel (0xb4c675c0) 0 + primary-for QSimpleXmlNodeModel (0xb4c67580) + QSharedData (0xb4c6c30c) 4 + +Vtable for QXmlSerializer +QXmlSerializer::_ZTV14QXmlSerializer: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QXmlSerializer) +8 QXmlSerializer::~QXmlSerializer +12 QXmlSerializer::~QXmlSerializer +16 QXmlSerializer::startElement +20 QXmlSerializer::endElement +24 QXmlSerializer::attribute +28 QXmlSerializer::comment +32 QXmlSerializer::characters +36 QXmlSerializer::startDocument +40 QXmlSerializer::endDocument +44 QXmlSerializer::processingInstruction +48 QXmlSerializer::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlSerializer::startOfSequence +60 QXmlSerializer::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlSerializer::item + +Class QXmlSerializer + size=8 align=4 + base size=8 base align=4 +QXmlSerializer (0xb4c676c0) 0 + vptr=((& QXmlSerializer::_ZTV14QXmlSerializer) + 8u) + QAbstractXmlReceiver (0xb4c6c438) 0 + primary-for QXmlSerializer (0xb4c676c0) + +Vtable for QXmlFormatter +QXmlFormatter::_ZTV13QXmlFormatter: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QXmlFormatter) +8 QXmlFormatter::~QXmlFormatter +12 QXmlFormatter::~QXmlFormatter +16 QXmlFormatter::startElement +20 QXmlFormatter::endElement +24 QXmlFormatter::attribute +28 QXmlFormatter::comment +32 QXmlFormatter::characters +36 QXmlFormatter::startDocument +40 QXmlFormatter::endDocument +44 QXmlFormatter::processingInstruction +48 QXmlFormatter::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlFormatter::startOfSequence +60 QXmlFormatter::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlFormatter::item + +Class QXmlFormatter + size=8 align=4 + base size=8 base align=4 +QXmlFormatter (0xb4c677c0) 0 + vptr=((& QXmlFormatter::_ZTV13QXmlFormatter) + 8u) + QXmlSerializer (0xb4c67800) 0 + primary-for QXmlFormatter (0xb4c677c0) + QAbstractXmlReceiver (0xb4c6c564) 0 + primary-for QXmlSerializer (0xb4c67800) + +Vtable for QXmlResultItems +QXmlResultItems::_ZTV15QXmlResultItems: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QXmlResultItems) +8 QXmlResultItems::~QXmlResultItems +12 QXmlResultItems::~QXmlResultItems + +Class QXmlResultItems + size=8 align=4 + base size=8 base align=4 +QXmlResultItems (0xb4c6c690) 0 + vptr=((& QXmlResultItems::_ZTV15QXmlResultItems) + 8u) + +Class QXmlSchema + size=4 align=4 + base size=4 base align=4 +QXmlSchema (0xb4c6c7f8) 0 + +Class QXmlSchemaValidator + size=4 align=4 + base size=4 base align=4 +QXmlSchemaValidator (0xb4c6c870) 0 + diff --git a/tests/auto/bic/data/QtXmlPatterns.4.7.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtXmlPatterns.4.7.0.linux-gcc-ia32.txt new file mode 100644 index 0000000..3ec1c83 --- /dev/null +++ b/tests/auto/bic/data/QtXmlPatterns.4.7.0.linux-gcc-ia32.txt @@ -0,0 +1,2896 @@ +Class QSysInfo + size=1 align=1 + base size=0 base align=1 +QSysInfo (0xb6dbfa8c) 0 empty + +Class QBool + size=1 align=1 + base size=1 base align=1 +QBool (0xb6dbfc30) 0 + +Class qIsNull(double)::U + size=8 align=4 + base size=8 base align=4 +qIsNull(double)::U (0xb6d3730c) 0 + +Class qIsNull(float)::U + size=4 align=4 + base size=4 base align=4 +qIsNull(float)::U (0xb6d373c0) 0 + +Class QFlag + size=4 align=4 + base size=4 base align=4 +QFlag (0xb6d37bf4) 0 + +Class QIncompatibleFlag + size=4 align=4 + base size=4 base align=4 +QIncompatibleFlag (0xb6d37d20) 0 + +Class QInternal + size=1 align=1 + base size=0 base align=1 +QInternal (0xb644fe88) 0 empty + +Class QGenericArgument + size=8 align=4 + base size=8 base align=4 +QGenericArgument (0xb644fec4) 0 + +Class QGenericReturnArgument + size=8 align=4 + base size=8 base align=4 +QGenericReturnArgument (0xb630b400) 0 + QGenericArgument (0xb63200f0) 0 + +Class QMetaObject + size=16 align=4 + base size=16 base align=4 +QMetaObject (0xb6320294) 0 + +Class QMetaObjectExtraData + size=8 align=4 + base size=8 base align=4 +QMetaObjectExtraData (0xb63203c0) 0 + +Class QLatin1Char + size=1 align=1 + base size=1 base align=1 +QLatin1Char (0xb63205a0) 0 + +Class QChar + size=2 align=2 + base size=2 base align=2 +QChar (0xb6320780) 0 + +Class QBasicAtomicInt + size=4 align=4 + base size=4 base align=4 +QBasicAtomicInt (0xb636cec4) 0 + +Class QAtomicInt + size=4 align=4 + base size=4 base align=4 +QAtomicInt (0xb638cd40) 0 + QBasicAtomicInt (0xb63805dc) 0 + +Class __locale_struct + size=116 align=4 + base size=116 base align=4 +__locale_struct (0xb6380ac8) 0 + +Class QByteArray::Data + size=20 align=4 + base size=20 base align=4 +QByteArray::Data (0xb6380f3c) 0 + +Class QByteArray + size=4 align=4 + base size=4 base align=4 +QByteArray (0xb6380f00) 0 + +Class QByteRef + size=8 align=4 + base size=8 base align=4 +QByteRef (0xb6211e4c) 0 + +Class QString::Null + size=1 align=1 + base size=0 base align=1 +QString::Null (0xb625b618) 0 empty + +Class QString::Data + size=20 align=4 + base size=20 base align=4 +QString::Data (0xb625b654) 0 + +Class QString + size=4 align=4 + base size=4 base align=4 +QString (0xb625b5dc) 0 + +Class QLatin1String + size=4 align=4 + base size=4 base align=4 +QLatin1String (0xb6128258) 0 + +Class QCharRef + size=8 align=4 + base size=8 base align=4 +QCharRef (0xb616cf3c) 0 + +Class QConstString + size=4 align=4 + base size=4 base align=4 +QConstString (0xb6018500) 0 + QString (0xb6029690) 0 + +Class QStringRef + size=12 align=4 + base size=12 base align=4 +QStringRef (0xb60299d8) 0 + +Vtable for std::exception +std::exception::_ZTVSt9exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9exception) +8 std::exception::~exception +12 std::exception::~exception +16 std::exception::what + +Class std::exception + size=4 align=4 + base size=4 base align=4 +std::exception (0xb606da8c) 0 nearly-empty + vptr=((& std::exception::_ZTVSt9exception) + 8u) + +Vtable for std::bad_exception +std::bad_exception::_ZTVSt13bad_exception: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt13bad_exception) +8 std::bad_exception::~bad_exception +12 std::bad_exception::~bad_exception +16 std::bad_exception::what + +Class std::bad_exception + size=4 align=4 + base size=4 base align=4 +std::bad_exception (0xb60b2100) 0 nearly-empty + vptr=((& std::bad_exception::_ZTVSt13bad_exception) + 8u) + std::exception (0xb606db7c) 0 nearly-empty + primary-for std::bad_exception (0xb60b2100) + +Vtable for std::bad_alloc +std::bad_alloc::_ZTVSt9bad_alloc: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTISt9bad_alloc) +8 std::bad_alloc::~bad_alloc +12 std::bad_alloc::~bad_alloc +16 std::bad_alloc::what + +Class std::bad_alloc + size=4 align=4 + base size=4 base align=4 +std::bad_alloc (0xb60b2280) 0 nearly-empty + vptr=((& std::bad_alloc::_ZTVSt9bad_alloc) + 8u) + std::exception (0xb606ddd4) 0 nearly-empty + primary-for std::bad_alloc (0xb60b2280) + +Class std::nothrow_t + size=1 align=1 + base size=0 base align=1 +std::nothrow_t (0xb60c003c) 0 empty + +Class QListData::Data + size=24 align=4 + base size=24 base align=4 +QListData::Data (0xb60c012c) 0 + +Class QListData + size=4 align=4 + base size=4 base align=4 +QListData (0xb60c00f0) 0 + +Class QScopedPointerPodDeleter + size=1 align=1 + base size=0 base align=1 +QScopedPointerPodDeleter (0xb60c0960) 0 empty + +Vtable for QObjectData +QObjectData::_ZTV11QObjectData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QObjectData) +8 __cxa_pure_virtual +12 __cxa_pure_virtual + +Class QObjectData + size=28 align=4 + base size=28 base align=4 +QObjectData (0xb60c0a14) 0 + vptr=((& QObjectData::_ZTV11QObjectData) + 8u) + +Vtable for QObject +QObject::_ZTV7QObject: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QObject) +8 QObject::metaObject +12 QObject::qt_metacast +16 QObject::qt_metacall +20 QObject::~QObject +24 QObject::~QObject +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObject + size=8 align=4 + base size=8 base align=4 +QObject (0xb60c0ac8) 0 + vptr=((& QObject::_ZTV7QObject) + 8u) + +Vtable for QObjectUserData +QObjectUserData::_ZTV15QObjectUserData: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QObjectUserData) +8 QObjectUserData::~QObjectUserData +12 QObjectUserData::~QObjectUserData + +Class QObjectUserData + size=4 align=4 + base size=4 base align=4 +QObjectUserData (0xb5fc9348) 0 nearly-empty + vptr=((& QObjectUserData::_ZTV15QObjectUserData) + 8u) + +Vtable for QIODevice +QIODevice::_ZTV9QIODevice: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QIODevice) +8 QIODevice::metaObject +12 QIODevice::qt_metacast +16 QIODevice::qt_metacall +20 QIODevice::~QIODevice +24 QIODevice::~QIODevice +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QIODevice::isSequential +60 QIODevice::open +64 QIODevice::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QIODevice::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 __cxa_pure_virtual +112 QIODevice::readLineData +116 __cxa_pure_virtual + +Class QIODevice + size=8 align=4 + base size=8 base align=4 +QIODevice (0xb5dcf000) 0 + vptr=((& QIODevice::_ZTV9QIODevice) + 8u) + QObject (0xb5fc9474) 0 + primary-for QIODevice (0xb5dcf000) + +Class wait + size=4 align=4 + base size=4 base align=4 +wait (0xb5dfe1e0) 0 + +Class timespec + size=8 align=4 + base size=8 base align=4 +timespec (0xb5dfe3c0) 0 + +Class timeval + size=8 align=4 + base size=8 base align=4 +timeval (0xb5dfe3fc) 0 + +Class __pthread_internal_slist + size=4 align=4 + base size=4 base align=4 +__pthread_internal_slist (0xb5dfe4b0) 0 + +Class random_data + size=28 align=4 + base size=28 base align=4 +random_data (0xb5dfe7bc) 0 + +Class drand48_data + size=24 align=4 + base size=24 base align=4 +drand48_data (0xb5dfe7f8) 0 + +Class QVectorData + size=16 align=4 + base size=16 base align=4 +QVectorData (0xb5dfe834) 0 + +Class QXmlStreamStringRef + size=12 align=4 + base size=12 base align=4 +QXmlStreamStringRef (0xb5dfea14) 0 + +Class QXmlStreamAttribute + size=56 align=4 + base size=53 base align=4 +QXmlStreamAttribute (0xb5ccd6cc) 0 + +Class QXmlStreamAttributes + size=4 align=4 + base size=4 base align=4 +QXmlStreamAttributes (0xb5ccf700) 0 + QVector (0xb5ce912c) 0 + +Class QXmlStreamNamespaceDeclaration + size=28 align=4 + base size=28 base align=4 +QXmlStreamNamespaceDeclaration (0xb5ce921c) 0 + +Class QXmlStreamNotationDeclaration + size=40 align=4 + base size=40 base align=4 +QXmlStreamNotationDeclaration (0xb5ce9690) 0 + +Class QXmlStreamEntityDeclaration + size=64 align=4 + base size=64 base align=4 +QXmlStreamEntityDeclaration (0xb5ce9c6c) 0 + +Vtable for QXmlStreamEntityResolver +QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QXmlStreamEntityResolver) +8 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +12 QXmlStreamEntityResolver::~QXmlStreamEntityResolver +16 QXmlStreamEntityResolver::resolveEntity +20 QXmlStreamEntityResolver::resolveUndeclaredEntity + +Class QXmlStreamEntityResolver + size=4 align=4 + base size=4 base align=4 +QXmlStreamEntityResolver (0xb5d28528) 0 nearly-empty + vptr=((& QXmlStreamEntityResolver::_ZTV24QXmlStreamEntityResolver) + 8u) + +Class QXmlStreamReader + size=4 align=4 + base size=4 base align=4 +QXmlStreamReader (0xb5d28564) 0 + +Class QXmlStreamWriter + size=4 align=4 + base size=4 base align=4 +QXmlStreamWriter (0xb5d286cc) 0 + +Class QBitArray + size=4 align=4 + base size=4 base align=4 +QBitArray (0xb5d28834) 0 + +Class QBitRef + size=8 align=4 + base size=8 base align=4 +QBitRef (0xb5d71ce4) 0 + +Class QByteArrayMatcher::Data + size=264 align=4 + base size=264 base align=4 +QByteArrayMatcher::Data (0xb5d9730c) 0 + +Class QByteArrayMatcher + size=1032 align=4 + base size=1032 base align=4 +QByteArrayMatcher (0xb5d972d0) 0 + +Vtable for QDataStream +QDataStream::_ZTV11QDataStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QDataStream) +8 QDataStream::~QDataStream +12 QDataStream::~QDataStream + +Class QDataStream + size=28 align=4 + base size=28 base align=4 +QDataStream (0xb5d97564) 0 + vptr=((& QDataStream::_ZTV11QDataStream) + 8u) + +Class QHashData::Node + size=8 align=4 + base size=8 base align=4 +QHashData::Node (0xb5bf012c) 0 + +Class QHashData + size=32 align=4 + base size=32 base align=4 +QHashData (0xb5bf00f0) 0 + +Class QHashDummyValue + size=1 align=1 + base size=0 base align=1 +QHashDummyValue (0xb5bf0834) 0 empty + +Class QContiguousCacheData + size=24 align=4 + base size=24 base align=4 +QContiguousCacheData (0xb5bf0fb4) 0 + +Class QCryptographicHash + size=4 align=4 + base size=4 base align=4 +QCryptographicHash (0xb5cb2168) 0 + +Class QSharedData + size=4 align=4 + base size=4 base align=4 +QSharedData (0xb5cb21a4) 0 + +Vtable for QtSharedPointer::ExternalRefCountData +QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN15QtSharedPointer20ExternalRefCountDataE) +8 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +12 QtSharedPointer::ExternalRefCountData::~ExternalRefCountData +16 QtSharedPointer::ExternalRefCountData::destroy + +Class QtSharedPointer::ExternalRefCountData + size=12 align=4 + base size=12 base align=4 +QtSharedPointer::ExternalRefCountData (0xb5cb2528) 0 + vptr=((& QtSharedPointer::ExternalRefCountData::_ZTVN15QtSharedPointer20ExternalRefCountDataE) + 8u) + +Vtable for QtSharedPointer::ExternalRefCountWithDestroyFn +QtSharedPointer::ExternalRefCountWithDestroyFn::_ZTVN15QtSharedPointer29ExternalRefCountWithDestroyFnE: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN15QtSharedPointer29ExternalRefCountWithDestroyFnE) +8 QtSharedPointer::ExternalRefCountWithDestroyFn::~ExternalRefCountWithDestroyFn +12 QtSharedPointer::ExternalRefCountWithDestroyFn::~ExternalRefCountWithDestroyFn +16 QtSharedPointer::ExternalRefCountWithDestroyFn::destroy + +Class QtSharedPointer::ExternalRefCountWithDestroyFn + size=16 align=4 + base size=16 base align=4 +QtSharedPointer::ExternalRefCountWithDestroyFn (0xb5b31280) 0 + vptr=((& QtSharedPointer::ExternalRefCountWithDestroyFn::_ZTVN15QtSharedPointer29ExternalRefCountWithDestroyFnE) + 8u) + QtSharedPointer::ExternalRefCountData (0xb5cb2d20) 0 + primary-for QtSharedPointer::ExternalRefCountWithDestroyFn (0xb5b31280) + +Class QDate + size=4 align=4 + base size=4 base align=4 +QDate (0xb5b35258) 0 + +Class QTime + size=4 align=4 + base size=4 base align=4 +QTime (0xb5b35870) 0 + +Class QDateTime + size=4 align=4 + base size=4 base align=4 +QDateTime (0xb5b35dd4) 0 + +Class QEasingCurve + size=4 align=4 + base size=4 base align=4 +QEasingCurve (0xb5bc50b4) 0 + +Class QElapsedTimer + size=16 align=4 + base size=16 base align=4 +QElapsedTimer (0xb5bc512c) 0 + +Class QPoint + size=8 align=4 + base size=8 base align=4 +QPoint (0xb5bc5348) 0 + +Class QPointF + size=16 align=4 + base size=16 base align=4 +QPointF (0xb59f18e8) 0 + +Class QLine + size=16 align=4 + base size=16 base align=4 +QLine (0xb5a1b000) 0 + +Class QLineF + size=32 align=4 + base size=32 base align=4 +QLineF (0xb5a1bd20) 0 + +Class QLinkedListData + size=20 align=4 + base size=20 base align=4 +QLinkedListData (0xb5a4ae10) 0 + +Vtable for QSystemLocale +QSystemLocale::_ZTV13QSystemLocale: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSystemLocale) +8 QSystemLocale::~QSystemLocale +12 QSystemLocale::~QSystemLocale +16 QSystemLocale::query +20 QSystemLocale::fallbackLocale + +Class QSystemLocale + size=4 align=4 + base size=4 base align=4 +QSystemLocale (0xb5ac603c) 0 nearly-empty + vptr=((& QSystemLocale::_ZTV13QSystemLocale) + 8u) + +Class QLocale::Data + size=4 align=2 + base size=4 base align=2 +QLocale::Data (0xb5ac60b4) 0 + +Class QLocale + size=4 align=4 + base size=4 base align=4 +QLocale (0xb5ac6078) 0 + +Class QMapData::Node + size=8 align=4 + base size=8 base align=4 +QMapData::Node (0xb5ac6708) 0 + +Class QMapData + size=72 align=4 + base size=72 base align=4 +QMapData (0xb5ac66cc) 0 + +Class QMargins + size=16 align=4 + base size=16 base align=4 +QMargins (0xb5ac6a14) 0 + +Class QSize + size=8 align=4 + base size=8 base align=4 +QSize (0xb57b0b7c) 0 + +Class QSizeF + size=16 align=4 + base size=16 base align=4 +QSizeF (0xb57d9618) 0 + +Class QRect + size=16 align=4 + base size=16 base align=4 +QRect (0xb580121c) 0 + +Class QRectF + size=32 align=4 + base size=32 base align=4 +QRectF (0xb5850e4c) 0 + +Class QRegExp + size=4 align=4 + base size=4 base align=4 +QRegExp (0xb569fbb8) 0 + +Class QLatin1Literal + size=8 align=4 + base size=8 base align=4 +QLatin1Literal (0xb56c1708) 0 + +Class QAbstractConcatenable + size=1 align=1 + base size=0 base align=1 +QAbstractConcatenable (0xb56c17bc) 0 empty + +Class QStringMatcher::Data + size=264 align=4 + base size=264 base align=4 +QStringMatcher::Data (0xb5724d98) 0 + +Class QStringMatcher + size=1036 align=4 + base size=1036 base align=4 +QStringMatcher (0xb5724d5c) 0 + +Class QStringList + size=4 align=4 + base size=4 base align=4 +QStringList (0xb57401c0) 0 + QList (0xb5724ec4) 0 + +Class QTextBoundaryFinder + size=28 align=4 + base size=28 base align=4 +QTextBoundaryFinder (0xb5797438) 0 + +Vtable for QTimeLine +QTimeLine::_ZTV9QTimeLine: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QTimeLine) +8 QTimeLine::metaObject +12 QTimeLine::qt_metacast +16 QTimeLine::qt_metacall +20 QTimeLine::~QTimeLine +24 QTimeLine::~QTimeLine +28 QObject::event +32 QObject::eventFilter +36 QTimeLine::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTimeLine::valueForTime + +Class QTimeLine + size=8 align=4 + base size=8 base align=4 +QTimeLine (0xb559c140) 0 + vptr=((& QTimeLine::_ZTV9QTimeLine) + 8u) + QObject (0xb57974ec) 0 + primary-for QTimeLine (0xb559c140) + +Class QMutex + size=4 align=4 + base size=4 base align=4 +QMutex (0xb5797780) 0 + +Class QMutexLocker + size=4 align=4 + base size=4 base align=4 +QMutexLocker (0xb5797e10) 0 + +Class QReadWriteLock + size=4 align=4 + base size=4 base align=4 +QReadWriteLock (0xb55dd384) 0 + +Class QReadLocker + size=4 align=4 + base size=4 base align=4 +QReadLocker (0xb55dd3c0) 0 + +Class QWriteLocker + size=4 align=4 + base size=4 base align=4 +QWriteLocker (0xb55dd8ac) 0 + +Class QSemaphore + size=4 align=4 + base size=4 base align=4 +QSemaphore (0xb55ddd98) 0 + +Vtable for QThread +QThread::_ZTV7QThread: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QThread) +8 QThread::metaObject +12 QThread::qt_metacast +16 QThread::qt_metacall +20 QThread::~QThread +24 QThread::~QThread +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QThread::run + +Class QThread + size=8 align=4 + base size=8 base align=4 +QThread (0xb55fd100) 0 + vptr=((& QThread::_ZTV7QThread) + 8u) + QObject (0xb55dddd4) 0 + primary-for QThread (0xb55fd100) + +Class QThreadStorageData + size=4 align=4 + base size=4 base align=4 +QThreadStorageData (0xb5612078) 0 + +Class QWaitCondition + size=4 align=4 + base size=4 base align=4 +QWaitCondition (0xb56120f0) 0 + +Vtable for QAbstractState +QAbstractState::_ZTV14QAbstractState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QAbstractState) +8 QAbstractState::metaObject +12 QAbstractState::qt_metacast +16 QAbstractState::qt_metacall +20 QAbstractState::~QAbstractState +24 QAbstractState::~QAbstractState +28 QAbstractState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QAbstractState + size=8 align=4 + base size=8 base align=4 +QAbstractState (0xb55fdbc0) 0 + vptr=((& QAbstractState::_ZTV14QAbstractState) + 8u) + QObject (0xb561212c) 0 + primary-for QAbstractState (0xb55fdbc0) + +Vtable for QAbstractTransition +QAbstractTransition::_ZTV19QAbstractTransition: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractTransition) +8 QAbstractTransition::metaObject +12 QAbstractTransition::qt_metacast +16 QAbstractTransition::qt_metacall +20 QAbstractTransition::~QAbstractTransition +24 QAbstractTransition::~QAbstractTransition +28 QAbstractTransition::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QAbstractTransition + size=8 align=4 + base size=8 base align=4 +QAbstractTransition (0xb55fde80) 0 + vptr=((& QAbstractTransition::_ZTV19QAbstractTransition) + 8u) + QObject (0xb5612348) 0 + primary-for QAbstractTransition (0xb55fde80) + +Vtable for QEvent +QEvent::_ZTV6QEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QEvent) +8 QEvent::~QEvent +12 QEvent::~QEvent + +Class QEvent + size=12 align=4 + base size=12 base align=4 +QEvent (0xb5612564) 0 + vptr=((& QEvent::_ZTV6QEvent) + 8u) + +Vtable for QTimerEvent +QTimerEvent::_ZTV11QTimerEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTimerEvent) +8 QTimerEvent::~QTimerEvent +12 QTimerEvent::~QTimerEvent + +Class QTimerEvent + size=16 align=4 + base size=16 base align=4 +QTimerEvent (0xb5636400) 0 + vptr=((& QTimerEvent::_ZTV11QTimerEvent) + 8u) + QEvent (0xb5612744) 0 + primary-for QTimerEvent (0xb5636400) + +Vtable for QChildEvent +QChildEvent::_ZTV11QChildEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QChildEvent) +8 QChildEvent::~QChildEvent +12 QChildEvent::~QChildEvent + +Class QChildEvent + size=16 align=4 + base size=16 base align=4 +QChildEvent (0xb56364c0) 0 + vptr=((& QChildEvent::_ZTV11QChildEvent) + 8u) + QEvent (0xb56127bc) 0 + primary-for QChildEvent (0xb56364c0) + +Vtable for QCustomEvent +QCustomEvent::_ZTV12QCustomEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QCustomEvent) +8 QCustomEvent::~QCustomEvent +12 QCustomEvent::~QCustomEvent + +Class QCustomEvent + size=12 align=4 + base size=12 base align=4 +QCustomEvent (0xb5636780) 0 + vptr=((& QCustomEvent::_ZTV12QCustomEvent) + 8u) + QEvent (0xb5612924) 0 + primary-for QCustomEvent (0xb5636780) + +Vtable for QDynamicPropertyChangeEvent +QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QDynamicPropertyChangeEvent) +8 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent +12 QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent + +Class QDynamicPropertyChangeEvent + size=16 align=4 + base size=16 base align=4 +QDynamicPropertyChangeEvent (0xb5636880) 0 + vptr=((& QDynamicPropertyChangeEvent::_ZTV27QDynamicPropertyChangeEvent) + 8u) + QEvent (0xb5612a14) 0 + primary-for QDynamicPropertyChangeEvent (0xb5636880) + +Vtable for QEventTransition +QEventTransition::_ZTV16QEventTransition: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QEventTransition) +8 QEventTransition::metaObject +12 QEventTransition::qt_metacast +16 QEventTransition::qt_metacall +20 QEventTransition::~QEventTransition +24 QEventTransition::~QEventTransition +28 QEventTransition::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QEventTransition::eventTest +60 QEventTransition::onTransition + +Class QEventTransition + size=8 align=4 + base size=8 base align=4 +QEventTransition (0xb5636940) 0 + vptr=((& QEventTransition::_ZTV16QEventTransition) + 8u) + QAbstractTransition (0xb5636980) 0 + primary-for QEventTransition (0xb5636940) + QObject (0xb5612ac8) 0 + primary-for QAbstractTransition (0xb5636980) + +Vtable for QFinalState +QFinalState::_ZTV11QFinalState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QFinalState) +8 QFinalState::metaObject +12 QFinalState::qt_metacast +16 QFinalState::qt_metacall +20 QFinalState::~QFinalState +24 QFinalState::~QFinalState +28 QFinalState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFinalState::onEntry +60 QFinalState::onExit + +Class QFinalState + size=8 align=4 + base size=8 base align=4 +QFinalState (0xb5636c40) 0 + vptr=((& QFinalState::_ZTV11QFinalState) + 8u) + QAbstractState (0xb5636c80) 0 + primary-for QFinalState (0xb5636c40) + QObject (0xb5612ce4) 0 + primary-for QAbstractState (0xb5636c80) + +Vtable for QHistoryState +QHistoryState::_ZTV13QHistoryState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QHistoryState) +8 QHistoryState::metaObject +12 QHistoryState::qt_metacast +16 QHistoryState::qt_metacall +20 QHistoryState::~QHistoryState +24 QHistoryState::~QHistoryState +28 QHistoryState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QHistoryState::onEntry +60 QHistoryState::onExit + +Class QHistoryState + size=8 align=4 + base size=8 base align=4 +QHistoryState (0xb5636f40) 0 + vptr=((& QHistoryState::_ZTV13QHistoryState) + 8u) + QAbstractState (0xb5636f80) 0 + primary-for QHistoryState (0xb5636f40) + QObject (0xb5612f00) 0 + primary-for QAbstractState (0xb5636f80) + +Vtable for QSignalTransition +QSignalTransition::_ZTV17QSignalTransition: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QSignalTransition) +8 QSignalTransition::metaObject +12 QSignalTransition::qt_metacast +16 QSignalTransition::qt_metacall +20 QSignalTransition::~QSignalTransition +24 QSignalTransition::~QSignalTransition +28 QSignalTransition::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QSignalTransition::eventTest +60 QSignalTransition::onTransition + +Class QSignalTransition + size=8 align=4 + base size=8 base align=4 +QSignalTransition (0xb5674240) 0 + vptr=((& QSignalTransition::_ZTV17QSignalTransition) + 8u) + QAbstractTransition (0xb5674280) 0 + primary-for QSignalTransition (0xb5674240) + QObject (0xb568112c) 0 + primary-for QAbstractTransition (0xb5674280) + +Vtable for QState +QState::_ZTV6QState: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QState) +8 QState::metaObject +12 QState::qt_metacast +16 QState::qt_metacall +20 QState::~QState +24 QState::~QState +28 QState::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QState::onEntry +60 QState::onExit + +Class QState + size=8 align=4 + base size=8 base align=4 +QState (0xb5674540) 0 + vptr=((& QState::_ZTV6QState) + 8u) + QAbstractState (0xb5674580) 0 + primary-for QState (0xb5674540) + QObject (0xb5681348) 0 + primary-for QAbstractState (0xb5674580) + +Class QMetaType + size=1 align=1 + base size=0 base align=1 +QMetaType (0xb5681564) 0 empty + +Class QVariant::PrivateShared + size=8 align=4 + base size=8 base align=4 +QVariant::PrivateShared (0xb54ff384) 0 + +Class QVariant::Private::Data + size=8 align=4 + base size=8 base align=4 +QVariant::Private::Data (0xb54ff3fc) 0 + +Class QVariant::Private + size=12 align=4 + base size=12 base align=4 +QVariant::Private (0xb54ff3c0) 0 + +Class QVariant::Handler + size=36 align=4 + base size=36 base align=4 +QVariant::Handler (0xb54ff474) 0 + +Class QVariant + size=12 align=4 + base size=12 base align=4 +QVariant (0xb54ff348) 0 + +Class QVariantComparisonHelper + size=4 align=4 + base size=4 base align=4 +QVariantComparisonHelper (0xb5546d20) 0 + +Vtable for QStateMachine::SignalEvent +QStateMachine::SignalEvent::_ZTVN13QStateMachine11SignalEventE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN13QStateMachine11SignalEventE) +8 QStateMachine::SignalEvent::~SignalEvent +12 QStateMachine::SignalEvent::~SignalEvent + +Class QStateMachine::SignalEvent + size=24 align=4 + base size=24 base align=4 +QStateMachine::SignalEvent (0xb53a5380) 0 + vptr=((& QStateMachine::SignalEvent::_ZTVN13QStateMachine11SignalEventE) + 8u) + QEvent (0xb53a31e0) 0 + primary-for QStateMachine::SignalEvent (0xb53a5380) + +Vtable for QStateMachine::WrappedEvent +QStateMachine::WrappedEvent::_ZTVN13QStateMachine12WrappedEventE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN13QStateMachine12WrappedEventE) +8 QStateMachine::WrappedEvent::~WrappedEvent +12 QStateMachine::WrappedEvent::~WrappedEvent + +Class QStateMachine::WrappedEvent + size=20 align=4 + base size=20 base align=4 +QStateMachine::WrappedEvent (0xb53a5400) 0 + vptr=((& QStateMachine::WrappedEvent::_ZTVN13QStateMachine12WrappedEventE) + 8u) + QEvent (0xb53a321c) 0 + primary-for QStateMachine::WrappedEvent (0xb53a5400) + +Vtable for QStateMachine +QStateMachine::_ZTV13QStateMachine: 20u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QStateMachine) +8 QStateMachine::metaObject +12 QStateMachine::qt_metacast +16 QStateMachine::qt_metacall +20 QStateMachine::~QStateMachine +24 QStateMachine::~QStateMachine +28 QStateMachine::event +32 QStateMachine::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QStateMachine::onEntry +60 QStateMachine::onExit +64 QStateMachine::beginSelectTransitions +68 QStateMachine::endSelectTransitions +72 QStateMachine::beginMicrostep +76 QStateMachine::endMicrostep + +Class QStateMachine + size=8 align=4 + base size=8 base align=4 +QStateMachine (0xb53a5240) 0 + vptr=((& QStateMachine::_ZTV13QStateMachine) + 8u) + QState (0xb53a5280) 0 + primary-for QStateMachine (0xb53a5240) + QAbstractState (0xb53a52c0) 0 + primary-for QState (0xb53a5280) + QObject (0xb53a31a4) 0 + primary-for QAbstractState (0xb53a52c0) + +Vtable for QFactoryInterface +QFactoryInterface::_ZTV17QFactoryInterface: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QFactoryInterface) +8 QFactoryInterface::~QFactoryInterface +12 QFactoryInterface::~QFactoryInterface +16 __cxa_pure_virtual + +Class QFactoryInterface + size=4 align=4 + base size=4 base align=4 +QFactoryInterface (0xb53a35a0) 0 nearly-empty + vptr=((& QFactoryInterface::_ZTV17QFactoryInterface) + 8u) + +Vtable for QLibrary +QLibrary::_ZTV8QLibrary: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QLibrary) +8 QLibrary::metaObject +12 QLibrary::qt_metacast +16 QLibrary::qt_metacall +20 QLibrary::~QLibrary +24 QLibrary::~QLibrary +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QLibrary + size=16 align=4 + base size=13 base align=4 +QLibrary (0xb53a5d80) 0 + vptr=((& QLibrary::_ZTV8QLibrary) + 8u) + QObject (0xb53a3b40) 0 + primary-for QLibrary (0xb53a5d80) + +Vtable for QPluginLoader +QPluginLoader::_ZTV13QPluginLoader: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QPluginLoader) +8 QPluginLoader::metaObject +12 QPluginLoader::qt_metacast +16 QPluginLoader::qt_metacall +20 QPluginLoader::~QPluginLoader +24 QPluginLoader::~QPluginLoader +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QPluginLoader + size=16 align=4 + base size=13 base align=4 +QPluginLoader (0xb53dabc0) 0 + vptr=((& QPluginLoader::_ZTV13QPluginLoader) + 8u) + QObject (0xb53a3dd4) 0 + primary-for QPluginLoader (0xb53dabc0) + +Class QUuid + size=16 align=4 + base size=16 base align=4 +QUuid (0xb53a3f00) 0 + +Vtable for QEventLoop +QEventLoop::_ZTV10QEventLoop: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QEventLoop) +8 QEventLoop::metaObject +12 QEventLoop::qt_metacast +16 QEventLoop::qt_metacall +20 QEventLoop::~QEventLoop +24 QEventLoop::~QEventLoop +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QEventLoop + size=8 align=4 + base size=8 base align=4 +QEventLoop (0xb5412440) 0 + vptr=((& QEventLoop::_ZTV10QEventLoop) + 8u) + QObject (0xb540ff00) 0 + primary-for QEventLoop (0xb5412440) + +Vtable for QAbstractEventDispatcher +QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI24QAbstractEventDispatcher) +8 QAbstractEventDispatcher::metaObject +12 QAbstractEventDispatcher::qt_metacast +16 QAbstractEventDispatcher::qt_metacall +20 QAbstractEventDispatcher::~QAbstractEventDispatcher +24 QAbstractEventDispatcher::~QAbstractEventDispatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 __cxa_pure_virtual +88 __cxa_pure_virtual +92 __cxa_pure_virtual +96 __cxa_pure_virtual +100 QAbstractEventDispatcher::startingUp +104 QAbstractEventDispatcher::closingDown + +Class QAbstractEventDispatcher + size=8 align=4 + base size=8 base align=4 +QAbstractEventDispatcher (0xb5412840) 0 + vptr=((& QAbstractEventDispatcher::_ZTV24QAbstractEventDispatcher) + 8u) + QObject (0xb542d21c) 0 + primary-for QAbstractEventDispatcher (0xb5412840) + +Class QModelIndex + size=16 align=4 + base size=16 base align=4 +QModelIndex (0xb542d438) 0 + +Class QPersistentModelIndex + size=4 align=4 + base size=4 base align=4 +QPersistentModelIndex (0xb54588e8) 0 + +Vtable for QAbstractItemModel +QAbstractItemModel::_ZTV18QAbstractItemModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractItemModel) +8 QAbstractItemModel::metaObject +12 QAbstractItemModel::qt_metacast +16 QAbstractItemModel::qt_metacall +20 QAbstractItemModel::~QAbstractItemModel +24 QAbstractItemModel::~QAbstractItemModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractItemModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractItemModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractItemModel + size=8 align=4 + base size=8 base align=4 +QAbstractItemModel (0xb545e480) 0 + vptr=((& QAbstractItemModel::_ZTV18QAbstractItemModel) + 8u) + QObject (0xb5458a50) 0 + primary-for QAbstractItemModel (0xb545e480) + +Vtable for QAbstractTableModel +QAbstractTableModel::_ZTV19QAbstractTableModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractTableModel) +8 QAbstractTableModel::metaObject +12 QAbstractTableModel::qt_metacast +16 QAbstractTableModel::qt_metacall +20 QAbstractTableModel::~QAbstractTableModel +24 QAbstractTableModel::~QAbstractTableModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractTableModel::index +60 QAbstractTableModel::parent +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 QAbstractTableModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractTableModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractTableModel + size=8 align=4 + base size=8 base align=4 +QAbstractTableModel (0xb545eac0) 0 + vptr=((& QAbstractTableModel::_ZTV19QAbstractTableModel) + 8u) + QAbstractItemModel (0xb545eb00) 0 + primary-for QAbstractTableModel (0xb545eac0) + QObject (0xb52953c0) 0 + primary-for QAbstractItemModel (0xb545eb00) + +Vtable for QAbstractListModel +QAbstractListModel::_ZTV18QAbstractListModel: 42u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractListModel) +8 QAbstractListModel::metaObject +12 QAbstractListModel::qt_metacast +16 QAbstractListModel::qt_metacall +20 QAbstractListModel::~QAbstractListModel +24 QAbstractListModel::~QAbstractListModel +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QAbstractListModel::index +60 QAbstractListModel::parent +64 __cxa_pure_virtual +68 QAbstractListModel::columnCount +72 QAbstractListModel::hasChildren +76 __cxa_pure_virtual +80 QAbstractItemModel::setData +84 QAbstractItemModel::headerData +88 QAbstractItemModel::setHeaderData +92 QAbstractItemModel::itemData +96 QAbstractItemModel::setItemData +100 QAbstractItemModel::mimeTypes +104 QAbstractItemModel::mimeData +108 QAbstractListModel::dropMimeData +112 QAbstractItemModel::supportedDropActions +116 QAbstractItemModel::insertRows +120 QAbstractItemModel::insertColumns +124 QAbstractItemModel::removeRows +128 QAbstractItemModel::removeColumns +132 QAbstractItemModel::fetchMore +136 QAbstractItemModel::canFetchMore +140 QAbstractItemModel::flags +144 QAbstractItemModel::sort +148 QAbstractItemModel::buddy +152 QAbstractItemModel::match +156 QAbstractItemModel::span +160 QAbstractItemModel::submit +164 QAbstractItemModel::revert + +Class QAbstractListModel + size=8 align=4 + base size=8 base align=4 +QAbstractListModel (0xb545ed40) 0 + vptr=((& QAbstractListModel::_ZTV18QAbstractListModel) + 8u) + QAbstractItemModel (0xb545ed80) 0 + primary-for QAbstractListModel (0xb545ed40) + QObject (0xb52954ec) 0 + primary-for QAbstractItemModel (0xb545ed80) + +Class QBasicTimer + size=4 align=4 + base size=4 base align=4 +QBasicTimer (0xb52bd3c0) 0 + +Vtable for QCoreApplication +QCoreApplication::_ZTV16QCoreApplication: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QCoreApplication) +8 QCoreApplication::metaObject +12 QCoreApplication::qt_metacast +16 QCoreApplication::qt_metacall +20 QCoreApplication::~QCoreApplication +24 QCoreApplication::~QCoreApplication +28 QCoreApplication::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QCoreApplication::notify +60 QCoreApplication::compressEvent + +Class QCoreApplication + size=8 align=4 + base size=8 base align=4 +QCoreApplication (0xb52b1840) 0 + vptr=((& QCoreApplication::_ZTV16QCoreApplication) + 8u) + QObject (0xb52bd654) 0 + primary-for QCoreApplication (0xb52b1840) + +Class __exception + size=32 align=4 + base size=32 base align=4 +__exception (0xb52bdbf4) 0 + +Class QMetaMethod + size=8 align=4 + base size=8 base align=4 +QMetaMethod (0xb5315924) 0 + +Class QMetaEnum + size=8 align=4 + base size=8 base align=4 +QMetaEnum (0xb5315c30) 0 + +Class QMetaProperty + size=20 align=4 + base size=20 base align=4 +QMetaProperty (0xb5315e88) 0 + +Class QMetaClassInfo + size=8 align=4 + base size=8 base align=4 +QMetaClassInfo (0xb5315f3c) 0 + +Vtable for QMimeData +QMimeData::_ZTV9QMimeData: 17u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QMimeData) +8 QMimeData::metaObject +12 QMimeData::qt_metacast +16 QMimeData::qt_metacall +20 QMimeData::~QMimeData +24 QMimeData::~QMimeData +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QMimeData::hasFormat +60 QMimeData::formats +64 QMimeData::retrieveData + +Class QMimeData + size=8 align=4 + base size=8 base align=4 +QMimeData (0xb532f680) 0 + vptr=((& QMimeData::_ZTV9QMimeData) + 8u) + QObject (0xb53401a4) 0 + primary-for QMimeData (0xb532f680) + +Vtable for QObjectCleanupHandler +QObjectCleanupHandler::_ZTV21QObjectCleanupHandler: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QObjectCleanupHandler) +8 QObjectCleanupHandler::metaObject +12 QObjectCleanupHandler::qt_metacast +16 QObjectCleanupHandler::qt_metacall +20 QObjectCleanupHandler::~QObjectCleanupHandler +24 QObjectCleanupHandler::~QObjectCleanupHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QObjectCleanupHandler + size=12 align=4 + base size=12 base align=4 +QObjectCleanupHandler (0xb532f940) 0 + vptr=((& QObjectCleanupHandler::_ZTV21QObjectCleanupHandler) + 8u) + QObject (0xb53403c0) 0 + primary-for QObjectCleanupHandler (0xb532f940) + +Vtable for QSharedMemory +QSharedMemory::_ZTV13QSharedMemory: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSharedMemory) +8 QSharedMemory::metaObject +12 QSharedMemory::qt_metacast +16 QSharedMemory::qt_metacall +20 QSharedMemory::~QSharedMemory +24 QSharedMemory::~QSharedMemory +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSharedMemory + size=8 align=4 + base size=8 base align=4 +QSharedMemory (0xb532fb80) 0 + vptr=((& QSharedMemory::_ZTV13QSharedMemory) + 8u) + QObject (0xb53404ec) 0 + primary-for QSharedMemory (0xb532fb80) + +Vtable for QSignalMapper +QSignalMapper::_ZTV13QSignalMapper: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QSignalMapper) +8 QSignalMapper::metaObject +12 QSignalMapper::qt_metacast +16 QSignalMapper::qt_metacall +20 QSignalMapper::~QSignalMapper +24 QSignalMapper::~QSignalMapper +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSignalMapper + size=8 align=4 + base size=8 base align=4 +QSignalMapper (0xb532fe40) 0 + vptr=((& QSignalMapper::_ZTV13QSignalMapper) + 8u) + QObject (0xb5340708) 0 + primary-for QSignalMapper (0xb532fe40) + +Vtable for QSocketNotifier +QSocketNotifier::_ZTV15QSocketNotifier: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QSocketNotifier) +8 QSocketNotifier::metaObject +12 QSocketNotifier::qt_metacast +16 QSocketNotifier::qt_metacall +20 QSocketNotifier::~QSocketNotifier +24 QSocketNotifier::~QSocketNotifier +28 QSocketNotifier::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSocketNotifier + size=20 align=4 + base size=17 base align=4 +QSocketNotifier (0xb5376100) 0 + vptr=((& QSocketNotifier::_ZTV15QSocketNotifier) + 8u) + QObject (0xb5340924) 0 + primary-for QSocketNotifier (0xb5376100) + +Class QSystemSemaphore + size=4 align=4 + base size=4 base align=4 +QSystemSemaphore (0xb5340bf4) 0 + +Vtable for QTimer +QTimer::_ZTV6QTimer: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI6QTimer) +8 QTimer::metaObject +12 QTimer::qt_metacast +16 QTimer::qt_metacall +20 QTimer::~QTimer +24 QTimer::~QTimer +28 QObject::event +32 QObject::eventFilter +36 QTimer::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QTimer + size=24 align=4 + base size=21 base align=4 +QTimer (0xb53764c0) 0 + vptr=((& QTimer::_ZTV6QTimer) + 8u) + QObject (0xb5340ca8) 0 + primary-for QTimer (0xb53764c0) + +Vtable for QTranslator +QTranslator::_ZTV11QTranslator: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTranslator) +8 QTranslator::metaObject +12 QTranslator::qt_metacast +16 QTranslator::qt_metacall +20 QTranslator::~QTranslator +24 QTranslator::~QTranslator +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QTranslator::translate +60 QTranslator::isEmpty + +Class QTranslator + size=8 align=4 + base size=8 base align=4 +QTranslator (0xb5376a00) 0 + vptr=((& QTranslator::_ZTV11QTranslator) + 8u) + QObject (0xb5340f3c) 0 + primary-for QTranslator (0xb5376a00) + +Class _IO_marker + size=12 align=4 + base size=12 base align=4 +_IO_marker (0xb51af30c) 0 + +Class _IO_FILE + size=148 align=4 + base size=148 base align=4 +_IO_FILE (0xb51af348) 0 + +Vtable for QFile +QFile::_ZTV5QFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI5QFile) +8 QFile::metaObject +12 QFile::qt_metacast +16 QFile::qt_metacall +20 QFile::~QFile +24 QFile::~QFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QFile::fileEngine + +Class QFile + size=8 align=4 + base size=8 base align=4 +QFile (0xb5376f00) 0 + vptr=((& QFile::_ZTV5QFile) + 8u) + QIODevice (0xb5376f40) 0 + primary-for QFile (0xb5376f00) + QObject (0xb51af3c0) 0 + primary-for QIODevice (0xb5376f40) + +Class QFileInfo + size=4 align=4 + base size=4 base align=4 +QFileInfo (0xb51af834) 0 + +Class QDir + size=4 align=4 + base size=4 base align=4 +QDir (0xb51afe88) 0 + +Class QAbstractFileEngine::ExtensionOption + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionOption (0xb5270618) 0 empty + +Class QAbstractFileEngine::ExtensionReturn + size=1 align=1 + base size=0 base align=1 +QAbstractFileEngine::ExtensionReturn (0xb5270654) 0 empty + +Class QAbstractFileEngine::MapExtensionOption + size=20 align=4 + base size=20 base align=4 +QAbstractFileEngine::MapExtensionOption (0xb5275740) 0 + QAbstractFileEngine::ExtensionOption (0xb5270690) 0 empty + +Class QAbstractFileEngine::MapExtensionReturn + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::MapExtensionReturn (0xb52757c0) 0 + QAbstractFileEngine::ExtensionReturn (0xb52706cc) 0 empty + +Class QAbstractFileEngine::UnMapExtensionOption + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngine::UnMapExtensionOption (0xb5275840) 0 + QAbstractFileEngine::ExtensionOption (0xb5270708) 0 empty + +Vtable for QAbstractFileEngine +QAbstractFileEngine::_ZTV19QAbstractFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QAbstractFileEngine) +8 QAbstractFileEngine::~QAbstractFileEngine +12 QAbstractFileEngine::~QAbstractFileEngine +16 QAbstractFileEngine::open +20 QAbstractFileEngine::close +24 QAbstractFileEngine::flush +28 QAbstractFileEngine::size +32 QAbstractFileEngine::pos +36 QAbstractFileEngine::seek +40 QAbstractFileEngine::isSequential +44 QAbstractFileEngine::remove +48 QAbstractFileEngine::copy +52 QAbstractFileEngine::rename +56 QAbstractFileEngine::link +60 QAbstractFileEngine::mkdir +64 QAbstractFileEngine::rmdir +68 QAbstractFileEngine::setSize +72 QAbstractFileEngine::caseSensitive +76 QAbstractFileEngine::isRelativePath +80 QAbstractFileEngine::entryList +84 QAbstractFileEngine::fileFlags +88 QAbstractFileEngine::setPermissions +92 QAbstractFileEngine::fileName +96 QAbstractFileEngine::ownerId +100 QAbstractFileEngine::owner +104 QAbstractFileEngine::fileTime +108 QAbstractFileEngine::setFileName +112 QAbstractFileEngine::handle +116 QAbstractFileEngine::beginEntryList +120 QAbstractFileEngine::endEntryList +124 QAbstractFileEngine::read +128 QAbstractFileEngine::readLine +132 QAbstractFileEngine::write +136 QAbstractFileEngine::extension +140 QAbstractFileEngine::supportsExtension + +Class QAbstractFileEngine + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngine (0xb52705dc) 0 + vptr=((& QAbstractFileEngine::_ZTV19QAbstractFileEngine) + 8u) + +Vtable for QAbstractFileEngineHandler +QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QAbstractFileEngineHandler) +8 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +12 QAbstractFileEngineHandler::~QAbstractFileEngineHandler +16 __cxa_pure_virtual + +Class QAbstractFileEngineHandler + size=4 align=4 + base size=4 base align=4 +QAbstractFileEngineHandler (0xb5270960) 0 nearly-empty + vptr=((& QAbstractFileEngineHandler::_ZTV26QAbstractFileEngineHandler) + 8u) + +Vtable for QAbstractFileEngineIterator +QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI27QAbstractFileEngineIterator) +8 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +12 QAbstractFileEngineIterator::~QAbstractFileEngineIterator +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QAbstractFileEngineIterator::currentFileInfo +32 QAbstractFileEngineIterator::entryInfo + +Class QAbstractFileEngineIterator + size=8 align=4 + base size=8 base align=4 +QAbstractFileEngineIterator (0xb527099c) 0 + vptr=((& QAbstractFileEngineIterator::_ZTV27QAbstractFileEngineIterator) + 8u) + +Vtable for QBuffer +QBuffer::_ZTV7QBuffer: 30u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI7QBuffer) +8 QBuffer::metaObject +12 QBuffer::qt_metacast +16 QBuffer::qt_metacall +20 QBuffer::~QBuffer +24 QBuffer::~QBuffer +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QBuffer::connectNotify +52 QBuffer::disconnectNotify +56 QIODevice::isSequential +60 QBuffer::open +64 QBuffer::close +68 QBuffer::pos +72 QBuffer::size +76 QBuffer::seek +80 QBuffer::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QBuffer::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QBuffer::readData +112 QIODevice::readLineData +116 QBuffer::writeData + +Class QBuffer + size=8 align=4 + base size=8 base align=4 +QBuffer (0xb5275b80) 0 + vptr=((& QBuffer::_ZTV7QBuffer) + 8u) + QIODevice (0xb5275bc0) 0 + primary-for QBuffer (0xb5275b80) + QObject (0xb5270a14) 0 + primary-for QIODevice (0xb5275bc0) + +Class QTextCodec::ConverterState + size=28 align=4 + base size=28 base align=4 +QTextCodec::ConverterState (0xb5270c6c) 0 + +Vtable for QTextCodec +QTextCodec::_ZTV10QTextCodec: 9u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI10QTextCodec) +8 __cxa_pure_virtual +12 QTextCodec::aliases +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 QTextCodec::~QTextCodec +32 QTextCodec::~QTextCodec + +Class QTextCodec + size=4 align=4 + base size=4 base align=4 +QTextCodec (0xb5270c30) 0 nearly-empty + vptr=((& QTextCodec::_ZTV10QTextCodec) + 8u) + +Class QTextEncoder + size=32 align=4 + base size=32 base align=4 +QTextEncoder (0xb50fa960) 0 + +Class QTextDecoder + size=32 align=4 + base size=32 base align=4 +QTextDecoder (0xb50fabb8) 0 + +Vtable for QTextStream +QTextStream::_ZTV11QTextStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QTextStream) +8 QTextStream::~QTextStream +12 QTextStream::~QTextStream + +Class QTextStream + size=8 align=4 + base size=8 base align=4 +QTextStream (0xb50fae10) 0 + vptr=((& QTextStream::_ZTV11QTextStream) + 8u) + +Class QTextStreamManipulator + size=24 align=4 + base size=22 base align=4 +QTextStreamManipulator (0xb515a4b0) 0 + +Vtable for QTextIStream +QTextIStream::_ZTV12QTextIStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextIStream) +8 QTextIStream::~QTextIStream +12 QTextIStream::~QTextIStream + +Class QTextIStream + size=8 align=4 + base size=8 base align=4 +QTextIStream (0xb517b5c0) 0 + vptr=((& QTextIStream::_ZTV12QTextIStream) + 8u) + QTextStream (0xb5181690) 0 + primary-for QTextIStream (0xb517b5c0) + +Vtable for QTextOStream +QTextOStream::_ZTV12QTextOStream: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QTextOStream) +8 QTextOStream::~QTextOStream +12 QTextOStream::~QTextOStream + +Class QTextOStream + size=8 align=4 + base size=8 base align=4 +QTextOStream (0xb517b880) 0 + vptr=((& QTextOStream::_ZTV12QTextOStream) + 8u) + QTextStream (0xb5181d20) 0 + primary-for QTextOStream (0xb517b880) + +Class QDebug::Stream + size=24 align=4 + base size=22 base align=4 +QDebug::Stream (0xb4f9c3fc) 0 + +Class QDebug + size=4 align=4 + base size=4 base align=4 +QDebug (0xb4f9c3c0) 0 + +Class QNoDebug + size=1 align=1 + base size=0 base align=1 +QNoDebug (0xb501603c) 0 empty + +Vtable for QDirIterator +QDirIterator::_ZTV12QDirIterator: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI12QDirIterator) +8 QDirIterator::~QDirIterator +12 QDirIterator::~QDirIterator + +Class QDirIterator + size=8 align=4 + base size=8 base align=4 +QDirIterator (0xb50162d0) 0 + vptr=((& QDirIterator::_ZTV12QDirIterator) + 8u) + +Vtable for QFileSystemWatcher +QFileSystemWatcher::_ZTV18QFileSystemWatcher: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFileSystemWatcher) +8 QFileSystemWatcher::metaObject +12 QFileSystemWatcher::qt_metacast +16 QFileSystemWatcher::qt_metacall +20 QFileSystemWatcher::~QFileSystemWatcher +24 QFileSystemWatcher::~QFileSystemWatcher +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QFileSystemWatcher + size=8 align=4 + base size=8 base align=4 +QFileSystemWatcher (0xb5048240) 0 + vptr=((& QFileSystemWatcher::_ZTV18QFileSystemWatcher) + 8u) + QObject (0xb5016438) 0 + primary-for QFileSystemWatcher (0xb5048240) + +Vtable for QFSFileEngine +QFSFileEngine::_ZTV13QFSFileEngine: 36u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QFSFileEngine) +8 QFSFileEngine::~QFSFileEngine +12 QFSFileEngine::~QFSFileEngine +16 QFSFileEngine::open +20 QFSFileEngine::close +24 QFSFileEngine::flush +28 QFSFileEngine::size +32 QFSFileEngine::pos +36 QFSFileEngine::seek +40 QFSFileEngine::isSequential +44 QFSFileEngine::remove +48 QFSFileEngine::copy +52 QFSFileEngine::rename +56 QFSFileEngine::link +60 QFSFileEngine::mkdir +64 QFSFileEngine::rmdir +68 QFSFileEngine::setSize +72 QFSFileEngine::caseSensitive +76 QFSFileEngine::isRelativePath +80 QFSFileEngine::entryList +84 QFSFileEngine::fileFlags +88 QFSFileEngine::setPermissions +92 QFSFileEngine::fileName +96 QFSFileEngine::ownerId +100 QFSFileEngine::owner +104 QFSFileEngine::fileTime +108 QFSFileEngine::setFileName +112 QFSFileEngine::handle +116 QFSFileEngine::beginEntryList +120 QFSFileEngine::endEntryList +124 QFSFileEngine::read +128 QFSFileEngine::readLine +132 QFSFileEngine::write +136 QFSFileEngine::extension +140 QFSFileEngine::supportsExtension + +Class QFSFileEngine + size=8 align=4 + base size=8 base align=4 +QFSFileEngine (0xb5048500) 0 + vptr=((& QFSFileEngine::_ZTV13QFSFileEngine) + 8u) + QAbstractFileEngine (0xb5016654) 0 + primary-for QFSFileEngine (0xb5048500) + +Class QProcessEnvironment + size=4 align=4 + base size=4 base align=4 +QProcessEnvironment (0xb5016780) 0 + +Vtable for QProcess +QProcess::_ZTV8QProcess: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI8QProcess) +8 QProcess::metaObject +12 QProcess::qt_metacast +16 QProcess::qt_metacall +20 QProcess::~QProcess +24 QProcess::~QProcess +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QProcess::isSequential +60 QIODevice::open +64 QProcess::close +68 QIODevice::pos +72 QIODevice::size +76 QIODevice::seek +80 QProcess::atEnd +84 QIODevice::reset +88 QProcess::bytesAvailable +92 QProcess::bytesToWrite +96 QProcess::canReadLine +100 QProcess::waitForReadyRead +104 QProcess::waitForBytesWritten +108 QProcess::readData +112 QIODevice::readLineData +116 QProcess::writeData +120 QProcess::setupChildProcess + +Class QProcess + size=8 align=4 + base size=8 base align=4 +QProcess (0xb50486c0) 0 + vptr=((& QProcess::_ZTV8QProcess) + 8u) + QIODevice (0xb5048700) 0 + primary-for QProcess (0xb50486c0) + QObject (0xb5016834) 0 + primary-for QIODevice (0xb5048700) + +Class QResource + size=4 align=4 + base size=4 base align=4 +QResource (0xb5016a50) 0 + +Vtable for QSettings +QSettings::_ZTV9QSettings: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QSettings) +8 QSettings::metaObject +12 QSettings::qt_metacast +16 QSettings::qt_metacall +20 QSettings::~QSettings +24 QSettings::~QSettings +28 QSettings::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QSettings + size=8 align=4 + base size=8 base align=4 +QSettings (0xb5048b40) 0 + vptr=((& QSettings::_ZTV9QSettings) + 8u) + QObject (0xb5016bf4) 0 + primary-for QSettings (0xb5048b40) + +Vtable for QTemporaryFile +QTemporaryFile::_ZTV14QTemporaryFile: 31u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QTemporaryFile) +8 QTemporaryFile::metaObject +12 QTemporaryFile::qt_metacast +16 QTemporaryFile::qt_metacall +20 QTemporaryFile::~QTemporaryFile +24 QTemporaryFile::~QTemporaryFile +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QFile::isSequential +60 QTemporaryFile::open +64 QFile::close +68 QFile::pos +72 QFile::size +76 QFile::seek +80 QFile::atEnd +84 QIODevice::reset +88 QIODevice::bytesAvailable +92 QIODevice::bytesToWrite +96 QIODevice::canReadLine +100 QIODevice::waitForReadyRead +104 QIODevice::waitForBytesWritten +108 QFile::readData +112 QFile::readLineData +116 QFile::writeData +120 QTemporaryFile::fileEngine + +Class QTemporaryFile + size=8 align=4 + base size=8 base align=4 +QTemporaryFile (0xb4ee3740) 0 + vptr=((& QTemporaryFile::_ZTV14QTemporaryFile) + 8u) + QFile (0xb4ee3780) 0 + primary-for QTemporaryFile (0xb4ee3740) + QIODevice (0xb4ee37c0) 0 + primary-for QFile (0xb4ee3780) + QObject (0xb4ee4708) 0 + primary-for QIODevice (0xb4ee37c0) + +Class QUrl + size=4 align=4 + base size=4 base align=4 +QUrl (0xb4ee4a14) 0 + +Class QLibraryInfo + size=1 align=1 + base size=0 base align=1 +QLibraryInfo (0xb4f6e5dc) 0 empty + +Vtable for QRunnable +QRunnable::_ZTV9QRunnable: 5u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI9QRunnable) +8 __cxa_pure_virtual +12 QRunnable::~QRunnable +16 QRunnable::~QRunnable + +Class QRunnable + size=8 align=4 + base size=8 base align=4 +QRunnable (0xb4f6e618) 0 + vptr=((& QRunnable::_ZTV9QRunnable) + 8u) + +Vtable for QtConcurrent::Exception +QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent9ExceptionE) +8 QtConcurrent::Exception::~Exception +12 QtConcurrent::Exception::~Exception +16 std::exception::what +20 QtConcurrent::Exception::raise +24 QtConcurrent::Exception::clone + +Class QtConcurrent::Exception + size=4 align=4 + base size=4 base align=4 +QtConcurrent::Exception (0xb4f76b00) 0 nearly-empty + vptr=((& QtConcurrent::Exception::_ZTVN12QtConcurrent9ExceptionE) + 8u) + std::exception (0xb4f6ea8c) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb4f76b00) + +Vtable for QtConcurrent::UnhandledException +QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE: 7u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent18UnhandledExceptionE) +8 QtConcurrent::UnhandledException::~UnhandledException +12 QtConcurrent::UnhandledException::~UnhandledException +16 std::exception::what +20 QtConcurrent::UnhandledException::raise +24 QtConcurrent::UnhandledException::clone + +Class QtConcurrent::UnhandledException + size=4 align=4 + base size=4 base align=4 +QtConcurrent::UnhandledException (0xb4f76c00) 0 nearly-empty + vptr=((& QtConcurrent::UnhandledException::_ZTVN12QtConcurrent18UnhandledExceptionE) + 8u) + QtConcurrent::Exception (0xb4f76c40) 0 nearly-empty + primary-for QtConcurrent::UnhandledException (0xb4f76c00) + std::exception (0xb4f6eac8) 0 nearly-empty + primary-for QtConcurrent::Exception (0xb4f76c40) + +Class QtConcurrent::internal::ExceptionHolder + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionHolder (0xb4f6eb04) 0 + +Class QtConcurrent::internal::ExceptionStore + size=4 align=4 + base size=4 base align=4 +QtConcurrent::internal::ExceptionStore (0xb4f6eb40) 0 + +Class QtConcurrent::ResultItem + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultItem (0xb4f6eb7c) 0 + +Class QtConcurrent::ResultIteratorBase + size=8 align=4 + base size=8 base align=4 +QtConcurrent::ResultIteratorBase (0xb4d93168) 0 + +Vtable for QtConcurrent::ResultStoreBase +QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent15ResultStoreBaseE) +8 QtConcurrent::ResultStoreBase::~ResultStoreBase +12 QtConcurrent::ResultStoreBase::~ResultStoreBase + +Class QtConcurrent::ResultStoreBase + size=28 align=4 + base size=28 base align=4 +QtConcurrent::ResultStoreBase (0xb4d93294) 0 + vptr=((& QtConcurrent::ResultStoreBase::_ZTVN12QtConcurrent15ResultStoreBaseE) + 8u) + +Vtable for QFutureInterfaceBase +QFutureInterfaceBase::_ZTV20QFutureInterfaceBase: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QFutureInterfaceBase) +8 QFutureInterfaceBase::~QFutureInterfaceBase +12 QFutureInterfaceBase::~QFutureInterfaceBase + +Class QFutureInterfaceBase + size=8 align=4 + base size=8 base align=4 +QFutureInterfaceBase (0xb4d936cc) 0 + vptr=((& QFutureInterfaceBase::_ZTV20QFutureInterfaceBase) + 8u) + +Vtable for QFutureWatcherBase +QFutureWatcherBase::_ZTV18QFutureWatcherBase: 16u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QFutureWatcherBase) +8 QFutureWatcherBase::metaObject +12 QFutureWatcherBase::qt_metacast +16 QFutureWatcherBase::qt_metacall +20 QFutureWatcherBase::~QFutureWatcherBase +24 QFutureWatcherBase::~QFutureWatcherBase +28 QFutureWatcherBase::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QFutureWatcherBase::connectNotify +52 QFutureWatcherBase::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual + +Class QFutureWatcherBase + size=8 align=4 + base size=8 base align=4 +QFutureWatcherBase (0xb4e28a40) 0 + vptr=((& QFutureWatcherBase::_ZTV18QFutureWatcherBase) + 8u) + QObject (0xb4e320b4) 0 + primary-for QFutureWatcherBase (0xb4e28a40) + +Vtable for QThreadPool +QThreadPool::_ZTV11QThreadPool: 14u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI11QThreadPool) +8 QThreadPool::metaObject +12 QThreadPool::qt_metacast +16 QThreadPool::qt_metacall +20 QThreadPool::~QThreadPool +24 QThreadPool::~QThreadPool +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify + +Class QThreadPool + size=8 align=4 + base size=8 base align=4 +QThreadPool (0xb4e4ac00) 0 + vptr=((& QThreadPool::_ZTV11QThreadPool) + 8u) + QObject (0xb4e5d0b4) 0 + primary-for QThreadPool (0xb4e4ac00) + +Class QtConcurrent::ThreadEngineBarrier + size=12 align=4 + base size=12 base align=4 +QtConcurrent::ThreadEngineBarrier (0xb4e5d2d0) 0 + +Vtable for QtConcurrent::ThreadEngineBase +QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE: 11u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTIN12QtConcurrent16ThreadEngineBaseE) +8 QtConcurrent::ThreadEngineBase::run +12 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +16 QtConcurrent::ThreadEngineBase::~ThreadEngineBase +20 QtConcurrent::ThreadEngineBase::start +24 QtConcurrent::ThreadEngineBase::finish +28 QtConcurrent::ThreadEngineBase::threadFunction +32 QtConcurrent::ThreadEngineBase::shouldStartThread +36 QtConcurrent::ThreadEngineBase::shouldThrottleThread +40 __cxa_pure_virtual + +Class QtConcurrent::ThreadEngineBase + size=32 align=4 + base size=32 base align=4 +QtConcurrent::ThreadEngineBase (0xb4e4af00) 0 + vptr=((& QtConcurrent::ThreadEngineBase::_ZTVN12QtConcurrent16ThreadEngineBaseE) + 8u) + QRunnable (0xb4e5d30c) 0 + primary-for QtConcurrent::ThreadEngineBase (0xb4e4af00) + +VTT for QtConcurrent::ThreadEngine +QtConcurrent::ThreadEngine::_ZTTN12QtConcurrent12ThreadEngineIvEE: 2u entries +0 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 12u) +4 ((& QtConcurrent::ThreadEngine::_ZTVN12QtConcurrent12ThreadEngineIvEE) + 68u) + +Class QtConcurrent::BlockSizeManager + size=72 align=4 + base size=72 base align=4 +QtConcurrent::BlockSizeManager (0xb4e8f8e8) 0 + +Vtable for QTextCodecFactoryInterface +QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface: 6u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI26QTextCodecFactoryInterface) +8 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +12 QTextCodecFactoryInterface::~QTextCodecFactoryInterface +16 __cxa_pure_virtual +20 __cxa_pure_virtual + +Class QTextCodecFactoryInterface + size=4 align=4 + base size=4 base align=4 +QTextCodecFactoryInterface (0xb4b19480) 0 nearly-empty + vptr=((& QTextCodecFactoryInterface::_ZTV26QTextCodecFactoryInterface) + 8u) + QFactoryInterface (0xb4b171a4) 0 nearly-empty + primary-for QTextCodecFactoryInterface (0xb4b19480) + +Vtable for QTextCodecPlugin +QTextCodecPlugin::_ZTV16QTextCodecPlugin: 27u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI16QTextCodecPlugin) +8 QTextCodecPlugin::metaObject +12 QTextCodecPlugin::qt_metacast +16 QTextCodecPlugin::qt_metacall +20 QTextCodecPlugin::~QTextCodecPlugin +24 QTextCodecPlugin::~QTextCodecPlugin +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 __cxa_pure_virtual +68 __cxa_pure_virtual +72 __cxa_pure_virtual +76 QTextCodecPlugin::keys +80 QTextCodecPlugin::create +84 (int (*)(...))-0x000000008 +88 (int (*)(...))(& _ZTI16QTextCodecPlugin) +92 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD1Ev +96 QTextCodecPlugin::_ZThn8_N16QTextCodecPluginD0Ev +100 QTextCodecPlugin::_ZThn8_NK16QTextCodecPlugin4keysEv +104 QTextCodecPlugin::_ZThn8_N16QTextCodecPlugin6createERK7QString + +Class QTextCodecPlugin + size=12 align=4 + base size=12 base align=4 +QTextCodecPlugin (0xb4b25960) 0 + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 8u) + QObject (0xb4b174b0) 0 + primary-for QTextCodecPlugin (0xb4b25960) + QTextCodecFactoryInterface (0xb4b19740) 8 nearly-empty + vptr=((& QTextCodecPlugin::_ZTV16QTextCodecPlugin) + 92u) + QFactoryInterface (0xb4b174ec) 8 nearly-empty + primary-for QTextCodecFactoryInterface (0xb4b19740) + +Vtable for QAbstractAnimation +QAbstractAnimation::_ZTV18QAbstractAnimation: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QAbstractAnimation) +8 QAbstractAnimation::metaObject +12 QAbstractAnimation::qt_metacast +16 QAbstractAnimation::qt_metacall +20 QAbstractAnimation::~QAbstractAnimation +24 QAbstractAnimation::~QAbstractAnimation +28 QAbstractAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractAnimation::updateState +68 QAbstractAnimation::updateDirection + +Class QAbstractAnimation + size=8 align=4 + base size=8 base align=4 +QAbstractAnimation (0xb4b19980) 0 + vptr=((& QAbstractAnimation::_ZTV18QAbstractAnimation) + 8u) + QObject (0xb4b17618) 0 + primary-for QAbstractAnimation (0xb4b19980) + +Vtable for QAnimationGroup +QAnimationGroup::_ZTV15QAnimationGroup: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QAnimationGroup) +8 QAnimationGroup::metaObject +12 QAnimationGroup::qt_metacast +16 QAnimationGroup::qt_metacall +20 QAnimationGroup::~QAnimationGroup +24 QAnimationGroup::~QAnimationGroup +28 QAnimationGroup::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractAnimation::updateState +68 QAbstractAnimation::updateDirection + +Class QAnimationGroup + size=8 align=4 + base size=8 base align=4 +QAnimationGroup (0xb4b19c40) 0 + vptr=((& QAnimationGroup::_ZTV15QAnimationGroup) + 8u) + QAbstractAnimation (0xb4b19c80) 0 + primary-for QAnimationGroup (0xb4b19c40) + QObject (0xb4b17870) 0 + primary-for QAbstractAnimation (0xb4b19c80) + +Vtable for QParallelAnimationGroup +QParallelAnimationGroup::_ZTV23QParallelAnimationGroup: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI23QParallelAnimationGroup) +8 QParallelAnimationGroup::metaObject +12 QParallelAnimationGroup::qt_metacast +16 QParallelAnimationGroup::qt_metacall +20 QParallelAnimationGroup::~QParallelAnimationGroup +24 QParallelAnimationGroup::~QParallelAnimationGroup +28 QParallelAnimationGroup::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QParallelAnimationGroup::duration +60 QParallelAnimationGroup::updateCurrentTime +64 QParallelAnimationGroup::updateState +68 QParallelAnimationGroup::updateDirection + +Class QParallelAnimationGroup + size=8 align=4 + base size=8 base align=4 +QParallelAnimationGroup (0xb4b19f40) 0 + vptr=((& QParallelAnimationGroup::_ZTV23QParallelAnimationGroup) + 8u) + QAnimationGroup (0xb4b19f80) 0 + primary-for QParallelAnimationGroup (0xb4b19f40) + QAbstractAnimation (0xb4b19fc0) 0 + primary-for QAnimationGroup (0xb4b19f80) + QObject (0xb4b17a8c) 0 + primary-for QAbstractAnimation (0xb4b19fc0) + +Vtable for QPauseAnimation +QPauseAnimation::_ZTV15QPauseAnimation: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QPauseAnimation) +8 QPauseAnimation::metaObject +12 QPauseAnimation::qt_metacast +16 QPauseAnimation::qt_metacall +20 QPauseAnimation::~QPauseAnimation +24 QPauseAnimation::~QPauseAnimation +28 QPauseAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QPauseAnimation::duration +60 QPauseAnimation::updateCurrentTime +64 QAbstractAnimation::updateState +68 QAbstractAnimation::updateDirection + +Class QPauseAnimation + size=8 align=4 + base size=8 base align=4 +QPauseAnimation (0xb4b53280) 0 + vptr=((& QPauseAnimation::_ZTV15QPauseAnimation) + 8u) + QAbstractAnimation (0xb4b532c0) 0 + primary-for QPauseAnimation (0xb4b53280) + QObject (0xb4b17ca8) 0 + primary-for QAbstractAnimation (0xb4b532c0) + +Vtable for QVariantAnimation +QVariantAnimation::_ZTV17QVariantAnimation: 20u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI17QVariantAnimation) +8 QVariantAnimation::metaObject +12 QVariantAnimation::qt_metacast +16 QVariantAnimation::qt_metacall +20 QVariantAnimation::~QVariantAnimation +24 QVariantAnimation::~QVariantAnimation +28 QVariantAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QVariantAnimation::duration +60 QVariantAnimation::updateCurrentTime +64 QVariantAnimation::updateState +68 QAbstractAnimation::updateDirection +72 __cxa_pure_virtual +76 QVariantAnimation::interpolated + +Class QVariantAnimation + size=8 align=4 + base size=8 base align=4 +QVariantAnimation (0xb4b53580) 0 + vptr=((& QVariantAnimation::_ZTV17QVariantAnimation) + 8u) + QAbstractAnimation (0xb4b535c0) 0 + primary-for QVariantAnimation (0xb4b53580) + QObject (0xb4b17ec4) 0 + primary-for QAbstractAnimation (0xb4b535c0) + +Vtable for QPropertyAnimation +QPropertyAnimation::_ZTV18QPropertyAnimation: 20u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI18QPropertyAnimation) +8 QPropertyAnimation::metaObject +12 QPropertyAnimation::qt_metacast +16 QPropertyAnimation::qt_metacall +20 QPropertyAnimation::~QPropertyAnimation +24 QPropertyAnimation::~QPropertyAnimation +28 QPropertyAnimation::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QVariantAnimation::duration +60 QVariantAnimation::updateCurrentTime +64 QPropertyAnimation::updateState +68 QAbstractAnimation::updateDirection +72 QPropertyAnimation::updateCurrentValue +76 QVariantAnimation::interpolated + +Class QPropertyAnimation + size=8 align=4 + base size=8 base align=4 +QPropertyAnimation (0xb4b539c0) 0 + vptr=((& QPropertyAnimation::_ZTV18QPropertyAnimation) + 8u) + QVariantAnimation (0xb4b53a00) 0 + primary-for QPropertyAnimation (0xb4b539c0) + QAbstractAnimation (0xb4b53a40) 0 + primary-for QVariantAnimation (0xb4b53a00) + QObject (0xb4b790f0) 0 + primary-for QAbstractAnimation (0xb4b53a40) + +Vtable for QSequentialAnimationGroup +QSequentialAnimationGroup::_ZTV25QSequentialAnimationGroup: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI25QSequentialAnimationGroup) +8 QSequentialAnimationGroup::metaObject +12 QSequentialAnimationGroup::qt_metacast +16 QSequentialAnimationGroup::qt_metacall +20 QSequentialAnimationGroup::~QSequentialAnimationGroup +24 QSequentialAnimationGroup::~QSequentialAnimationGroup +28 QSequentialAnimationGroup::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 QSequentialAnimationGroup::duration +60 QSequentialAnimationGroup::updateCurrentTime +64 QSequentialAnimationGroup::updateState +68 QSequentialAnimationGroup::updateDirection + +Class QSequentialAnimationGroup + size=8 align=4 + base size=8 base align=4 +QSequentialAnimationGroup (0xb4b53d00) 0 + vptr=((& QSequentialAnimationGroup::_ZTV25QSequentialAnimationGroup) + 8u) + QAnimationGroup (0xb4b53d40) 0 + primary-for QSequentialAnimationGroup (0xb4b53d00) + QAbstractAnimation (0xb4b53d80) 0 + primary-for QAnimationGroup (0xb4b53d40) + QObject (0xb4b7930c) 0 + primary-for QAbstractAnimation (0xb4b53d80) + +Class QSourceLocation + size=20 align=4 + base size=20 base align=4 +QSourceLocation (0xb4b79528) 0 + +Vtable for QAbstractMessageHandler +QAbstractMessageHandler::_ZTV23QAbstractMessageHandler: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI23QAbstractMessageHandler) +8 QAbstractMessageHandler::metaObject +12 QAbstractMessageHandler::qt_metacast +16 QAbstractMessageHandler::qt_metacall +20 QAbstractMessageHandler::~QAbstractMessageHandler +24 QAbstractMessageHandler::~QAbstractMessageHandler +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractMessageHandler + size=8 align=4 + base size=8 base align=4 +QAbstractMessageHandler (0xb49792c0) 0 + vptr=((& QAbstractMessageHandler::_ZTV23QAbstractMessageHandler) + 8u) + QObject (0xb4b796cc) 0 + primary-for QAbstractMessageHandler (0xb49792c0) + +Vtable for QAbstractUriResolver +QAbstractUriResolver::_ZTV20QAbstractUriResolver: 15u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractUriResolver) +8 QAbstractUriResolver::metaObject +12 QAbstractUriResolver::qt_metacast +16 QAbstractUriResolver::qt_metacall +20 QAbstractUriResolver::~QAbstractUriResolver +24 QAbstractUriResolver::~QAbstractUriResolver +28 QObject::event +32 QObject::eventFilter +36 QObject::timerEvent +40 QObject::childEvent +44 QObject::customEvent +48 QObject::connectNotify +52 QObject::disconnectNotify +56 __cxa_pure_virtual + +Class QAbstractUriResolver + size=8 align=4 + base size=8 base align=4 +QAbstractUriResolver (0xb4979580) 0 + vptr=((& QAbstractUriResolver::_ZTV20QAbstractUriResolver) + 8u) + QObject (0xb4b798e8) 0 + primary-for QAbstractUriResolver (0xb4979580) + +Class QXmlName + size=8 align=4 + base size=8 base align=4 +QXmlName (0xb4b79b04) 0 + +Class QPatternist::NodeIndexStorage + size=20 align=4 + base size=20 base align=4 +QPatternist::NodeIndexStorage (0xb4b79dd4) 0 + +Class QXmlNodeModelIndex + size=20 align=4 + base size=20 base align=4 +QXmlNodeModelIndex (0xb4b79f00) 0 + +Vtable for QAbstractXmlNodeModel +QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI21QAbstractXmlNodeModel) +8 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +12 QAbstractXmlNodeModel::~QAbstractXmlNodeModel +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 __cxa_pure_virtual +76 __cxa_pure_virtual +80 __cxa_pure_virtual +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QAbstractXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QAbstractXmlNodeModel (0xb49e0140) 0 + vptr=((& QAbstractXmlNodeModel::_ZTV21QAbstractXmlNodeModel) + 8u) + QSharedData (0xb49dc654) 4 + +Class QXmlItem + size=20 align=4 + base size=20 base align=4 +QXmlItem (0xb49dc870) 0 + +Vtable for QAbstractXmlReceiver +QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI20QAbstractXmlReceiver) +8 QAbstractXmlReceiver::~QAbstractXmlReceiver +12 QAbstractXmlReceiver::~QAbstractXmlReceiver +16 __cxa_pure_virtual +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 __cxa_pure_virtual +44 __cxa_pure_virtual +48 __cxa_pure_virtual +52 __cxa_pure_virtual +56 __cxa_pure_virtual +60 __cxa_pure_virtual +64 QAbstractXmlReceiver::whitespaceOnly +68 QAbstractXmlReceiver::item + +Class QAbstractXmlReceiver + size=8 align=4 + base size=8 base align=4 +QAbstractXmlReceiver (0xb49dca50) 0 + vptr=((& QAbstractXmlReceiver::_ZTV20QAbstractXmlReceiver) + 8u) + +Class QXmlNamePool + size=4 align=4 + base size=4 base align=4 +QXmlNamePool (0xb49dcac8) 0 + +Class QXmlQuery + size=4 align=4 + base size=4 base align=4 +QXmlQuery (0xb49dcb40) 0 + +Vtable for QSimpleXmlNodeModel +QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel: 24u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI19QSimpleXmlNodeModel) +8 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +12 QSimpleXmlNodeModel::~QSimpleXmlNodeModel +16 QSimpleXmlNodeModel::baseUri +20 __cxa_pure_virtual +24 __cxa_pure_virtual +28 __cxa_pure_virtual +32 __cxa_pure_virtual +36 __cxa_pure_virtual +40 QSimpleXmlNodeModel::stringValue +44 __cxa_pure_virtual +48 QAbstractXmlNodeModel::iterate +52 QAbstractXmlNodeModel::sequencedTypedValue +56 QAbstractXmlNodeModel::type +60 QAbstractXmlNodeModel::namespaceForPrefix +64 QAbstractXmlNodeModel::isDeepEqual +68 QAbstractXmlNodeModel::sendNamespaces +72 QSimpleXmlNodeModel::namespaceBindings +76 QSimpleXmlNodeModel::elementById +80 QSimpleXmlNodeModel::nodesByIdref +84 QAbstractXmlNodeModel::copyNodeTo +88 __cxa_pure_virtual +92 __cxa_pure_virtual + +Class QSimpleXmlNodeModel + size=12 align=4 + base size=12 base align=4 +QSimpleXmlNodeModel (0xb49e0840) 0 + vptr=((& QSimpleXmlNodeModel::_ZTV19QSimpleXmlNodeModel) + 8u) + QAbstractXmlNodeModel (0xb49e0880) 0 + primary-for QSimpleXmlNodeModel (0xb49e0840) + QSharedData (0xb49dcb7c) 4 + +Vtable for QXmlSerializer +QXmlSerializer::_ZTV14QXmlSerializer: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI14QXmlSerializer) +8 QXmlSerializer::~QXmlSerializer +12 QXmlSerializer::~QXmlSerializer +16 QXmlSerializer::startElement +20 QXmlSerializer::endElement +24 QXmlSerializer::attribute +28 QXmlSerializer::comment +32 QXmlSerializer::characters +36 QXmlSerializer::startDocument +40 QXmlSerializer::endDocument +44 QXmlSerializer::processingInstruction +48 QXmlSerializer::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlSerializer::startOfSequence +60 QXmlSerializer::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlSerializer::item + +Class QXmlSerializer + size=8 align=4 + base size=8 base align=4 +QXmlSerializer (0xb49e0980) 0 + vptr=((& QXmlSerializer::_ZTV14QXmlSerializer) + 8u) + QAbstractXmlReceiver (0xb49dcca8) 0 + primary-for QXmlSerializer (0xb49e0980) + +Vtable for QXmlFormatter +QXmlFormatter::_ZTV13QXmlFormatter: 18u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI13QXmlFormatter) +8 QXmlFormatter::~QXmlFormatter +12 QXmlFormatter::~QXmlFormatter +16 QXmlFormatter::startElement +20 QXmlFormatter::endElement +24 QXmlFormatter::attribute +28 QXmlFormatter::comment +32 QXmlFormatter::characters +36 QXmlFormatter::startDocument +40 QXmlFormatter::endDocument +44 QXmlFormatter::processingInstruction +48 QXmlFormatter::atomicValue +52 QXmlSerializer::namespaceBinding +56 QXmlFormatter::startOfSequence +60 QXmlFormatter::endOfSequence +64 QAbstractXmlReceiver::whitespaceOnly +68 QXmlFormatter::item + +Class QXmlFormatter + size=8 align=4 + base size=8 base align=4 +QXmlFormatter (0xb49e0a80) 0 + vptr=((& QXmlFormatter::_ZTV13QXmlFormatter) + 8u) + QXmlSerializer (0xb49e0ac0) 0 + primary-for QXmlFormatter (0xb49e0a80) + QAbstractXmlReceiver (0xb49dcdd4) 0 + primary-for QXmlSerializer (0xb49e0ac0) + +Vtable for QXmlResultItems +QXmlResultItems::_ZTV15QXmlResultItems: 4u entries +0 (int (*)(...))0 +4 (int (*)(...))(& _ZTI15QXmlResultItems) +8 QXmlResultItems::~QXmlResultItems +12 QXmlResultItems::~QXmlResultItems + +Class QXmlResultItems + size=8 align=4 + base size=8 base align=4 +QXmlResultItems (0xb49dcf00) 0 + vptr=((& QXmlResultItems::_ZTV15QXmlResultItems) + 8u) + +Class QXmlSchema + size=4 align=4 + base size=4 base align=4 +QXmlSchema (0xb4a39078) 0 + +Class QXmlSchemaValidator + size=4 align=4 + base size=4 base align=4 +QXmlSchemaValidator (0xb4a390f0) 0 + diff --git a/tests/auto/checkxmlfiles/.gitignore b/tests/auto/checkxmlfiles/.gitignore new file mode 100644 index 0000000..5d80c23 --- /dev/null +++ b/tests/auto/checkxmlfiles/.gitignore @@ -0,0 +1 @@ +tst_checkxmlfiles diff --git a/tests/auto/checkxmlfiles/checkxmlfiles.pro b/tests/auto/checkxmlfiles/checkxmlfiles.pro new file mode 100644 index 0000000..ab932f5 --- /dev/null +++ b/tests/auto/checkxmlfiles/checkxmlfiles.pro @@ -0,0 +1,19 @@ +load(qttest_p4) +SOURCES += tst_checkxmlfiles.cpp \ + ../qxmlquery/TestFundament.cpp +CONFIG += qtestlib +QT -= gui + +include (../xmlpatterns.pri) + +wince*|symbian: { +QT += network +addFiles.files = \ + $$QT_SOURCE_TREE/examples/sql/masterdetail/albumdetails.xml \ + $$QT_SOURCE_TREE/examples/xmlpatterns/xquery/globalVariables/globals.gccxml \ + $$QT_SOURCE_TREE/doc/src/diagrams/stylesheet/treeview.svg \ + $$QT_SOURCE_TREE/doc/src/diagrams/designer-manual/designer-mainwindow-actions.ui \ + $$QT_SOURCE_TREE/demos/undo/undo.qrc +addFiles.path = xmlfiles +DEPLOYMENT += addFiles +} diff --git a/tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp b/tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp new file mode 100644 index 0000000..aa6194f --- /dev/null +++ b/tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include + +/* We use Patternist, so without it, we won't build. */ +#ifdef QTEST_XMLPATTERNS + +#include +#include +#include "../qxmlquery/TestFundament.h" + +/*! + \class tst_CheckXMLFiles + \internal + \since 4.4 + \brief Checks whether the XML files found in $QTDIR are well-formed. + */ +class tst_CheckXMLFiles : public QObject + , private TestFundament +{ + Q_OBJECT + +private Q_SLOTS: + void checkXMLFiles() const; + void checkXMLFiles_data() const; +}; + +void tst_CheckXMLFiles::checkXMLFiles() const +{ + QFETCH(QString, file); + + QXmlQuery query; + query.setQuery(QLatin1String("doc-available('") + inputFileAsURI(file).toString() + QLatin1String("')")); + QVERIFY(query.isValid()); + + /* We don't care about the result, we only want to ensure the files can be parsed. */ + QByteArray dummy; + QBuffer buffer(&dummy); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + QXmlSerializer serializer(query, &buffer); + + /* This is the important one. */ + QVERIFY(query.evaluateTo(&serializer)); +} + +void tst_CheckXMLFiles::checkXMLFiles_data() const +{ + QTest::addColumn("file"); + + QStringList patterns; + /* List possible XML files in Qt. */ + patterns.append(QLatin1String("*.xml")); + patterns.append(QLatin1String("*.gccxml")); + patterns.append(QLatin1String("*.svg")); + patterns.append(QLatin1String("*.ui")); + patterns.append(QLatin1String("*.qrc")); + patterns.append(QLatin1String("*.ts")); + /* We don't do HTML files currently because so many of them in 3rd party are broken. */ + patterns.append(QLatin1String("*.xhtml")); + +#ifndef Q_OS_WINCE + QString path = QLatin1String("../../../"); +#else + QString path = QLatin1String("xmlfiles"); +#endif + QDirIterator it(inputFile(path), patterns, QDir::AllEntries, QDirIterator::Subdirectories); + while(it.hasNext()) + { + it.next(); + + /* We got tons of broken XML files as part of auto tests. */ + if(!it.filePath().contains(QLatin1String("/tests/auto/")) && + !it.filePath().contains(QLatin1String("/tests/arthur/"))) + QTest::newRow(it.filePath().toUtf8().constData()) << it.filePath(); + } +} + +QTEST_MAIN(tst_CheckXMLFiles) + +#include "tst_checkxmlfiles.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h new file mode 100644 index 0000000..f0c2cb2 --- /dev/null +++ b/tests/auto/network-settings.h @@ -0,0 +1,420 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#ifdef QT_NETWORK_LIB +#include +#endif + + +#ifdef Q_OS_SYMBIAN +#include +#include +#include +#include +#include +#endif +#if defined(Q_OS_SYMBIAN) +#if defined(Q_CC_NOKIAX86) +// In emulator we use WINSOCK connectivity by default. Unfortunately winsock +// does not work very well with UDP sockets. This defines skips some test +// cases which have known problems. + +// NOTE: Prefer to use WINPCAP based connectivity in S60 emulator when running +// network tests. WINPCAP connectivity uses Symbian OS IP stack, +// correspondingly as HW does. When using WINPCAP disable this define +//#define SYMBIAN_WINSOCK_CONNECTIVITY +#endif // Q_CC_NOKIAX86 + +// FIXME: any reason we do this for symbian only, and not other platforms? +class QtNetworkSettingsRecord { +public: + QtNetworkSettingsRecord() { } + + QtNetworkSettingsRecord(const QString& recName, const QString& recVal) + : strRecordName(recName), strRecordValue(recVal) { } + + QtNetworkSettingsRecord(const QtNetworkSettingsRecord & other) + : strRecordName(other.strRecordName), strRecordValue(other.strRecordValue) { } + + ~QtNetworkSettingsRecord() { } + + const QString& recordName() const { return strRecordName; } + const QString& recordValue() const { return strRecordValue; } + +private: + QString strRecordName; + QString strRecordValue; +}; + +#endif // Q_OS_SYMBIAN + +class QtNetworkSettings +{ +public: + + static QString serverLocalName() + { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("server.localname")) { + QtNetworkSettingsRecord* entry = entries["server.localname"]; + return entry->recordValue(); + } +#endif + return QString("qt-test-server"); + } + static QString serverDomainName() + { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("server.domainname")) { + QtNetworkSettingsRecord* entry = entries["server.domainname"]; + return entry->recordValue(); + } +#endif + return QString("qt-test-net"); + } + static QString serverName() + { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); +#endif + return serverLocalName() + "." + serverDomainName(); + } + static QString winServerName() + { + return serverName(); + } + static QString wildcardServerName() + { + return "qt-test-server.wildcard.dev." + serverDomainName(); + } + +#ifdef QT_NETWORK_LIB + static QHostAddress serverIP() + { +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("server.ip")) { + QtNetworkSettingsRecord* entry = entries["server.ip"]; + if(serverIp.isNull()) { + serverIp = entry->recordValue().toAscii(); + } + return QHostAddress(serverIp.data()); + } +#endif // Q_OS_SYMBIAN + return QHostInfo::fromName(serverName()).addresses().first(); + } +#endif + + static bool compareReplyIMAP(QByteArray const& actual) + { + QList expected; + +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("imap.expectedreply")) { + QtNetworkSettingsRecord* entry = entries["imap.expectedreply"]; + if(imapExpectedReply.isNull()) { + imapExpectedReply = entry->recordValue().toAscii(); + imapExpectedReply.append('\r').append('\n'); + } + expected << imapExpectedReply.data(); + } +#endif + + // Mandriva; old test server + expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " ) + .append(QtNetworkSettings::serverName().toAscii()) + .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); + + // Ubuntu 10.04; new test server + expected << QByteArray( "* OK " ) + .append(QtNetworkSettings::serverLocalName().toAscii()) + .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"); + + // Feel free to add more as needed + + Q_FOREACH (QByteArray const& ba, expected) { + if (ba == actual) { + return true; + } + } + + return false; + } + + static bool compareReplyIMAPSSL(QByteArray const& actual) + { + QList expected; + +#ifdef Q_OS_SYMBIAN + loadTestSettings(); + + if(QtNetworkSettings::entries.contains("imap.expectedreplyssl")) { + QtNetworkSettingsRecord* entry = entries["imap.expectedreplyssl"]; + if(imapExpectedReplySsl.isNull()) { + imapExpectedReplySsl = entry->recordValue().toAscii(); + imapExpectedReplySsl.append('\r').append('\n'); + } + expected << imapExpectedReplySsl.data(); + } +#endif + // Mandriva; old test server + expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " ) + .append(QtNetworkSettings::serverName().toAscii()) + .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); + + // Ubuntu 10.04; new test server + expected << QByteArray( "* OK " ) + .append(QtNetworkSettings::serverLocalName().toAscii()) + .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"); + + // Feel free to add more as needed + + Q_FOREACH (QByteArray const& ba, expected) { + if (ba == actual) { + return true; + } + } + + return false; + } + + static bool compareReplyFtp(QByteArray const& actual) + { + QList expected; + + // A few different vsFTPd versions. + // Feel free to add more as needed + expected << QByteArray( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" ); + expected << QByteArray( "220 (vsFTPd 2.2.2)\r\n221 Goodbye.\r\n" ); + + Q_FOREACH (QByteArray const& ba, expected) { + if (ba == actual) { + return true; + } + } + + return false; + } + +#ifdef Q_OS_SYMBIAN + static void setDefaultIap() + { + loadDefaultIap(); + + struct ifreq ifReq; + if(entries.contains("iap.default")) { + QtNetworkSettingsRecord* entry = entries["iap.default"]; + QByteArray tmp(entry->recordValue().toAscii()); + strcpy( ifReq.ifr_name, tmp.data()); + } + else // some default value + strcpy( ifReq.ifr_name, "Lab"); + + int err = setdefaultif( &ifReq ); + if(err) + printf("Setting default IAP - '%s' failed: %d\n", ifReq.ifr_name, err); + else + printf("'%s' used as an default IAP\n", ifReq.ifr_name); + } +#endif + +private: + +#ifdef Q_OS_SYMBIAN + + static QHash entries; + static bool bDefaultIapLoaded; + static bool bTestSettingsLoaded; + static QString iapFileFullPath; + static QByteArray serverIp; + static QByteArray imapExpectedReply; + static QByteArray imapExpectedReplySsl; + + static bool loadDefaultIap() { + if(bDefaultIapLoaded) + return true; + + QFile iapCfgFile(iapFileFullPath); + + bool bFoundDefaultIapTag = false; + + if (iapCfgFile.open(QFile::ReadOnly)) { + QTextStream input(&iapCfgFile); + QString line; + do { + line = input.readLine().trimmed(); + if(line.startsWith(QString("#"))) + continue; // comment found + + if(line.contains(QString("[DEFAULT]"))) { + bFoundDefaultIapTag = true; + } else if(line.contains(QString("[")) && bFoundDefaultIapTag) { + break; + } + + if(bFoundDefaultIapTag && line.contains("name")) { + int position = line.indexOf(QString("=")); + position += QString("=").length(); + + //create record + QtNetworkSettingsRecord *entry = + new QtNetworkSettingsRecord( QString("iap.default"), line.mid(position).trimmed() ); + entries.insert(entry->recordName(), entry); + break; + } + } while (!line.isNull()); + } + + return bDefaultIapLoaded = bFoundDefaultIapTag; + } + + static bool loadTestSettings() { + if(bTestSettingsLoaded) + return true; + + QFile cfgFile(iapFileFullPath); + bool bFoundTestTag = false; + + if (cfgFile.open(QFile::ReadOnly)) { + QTextStream input(&cfgFile); + QString line; + do { + line = input.readLine().trimmed(); + + if(line.startsWith(QString("#")) || line.length() == 0) + continue; // comment or empty line found + + if(line.contains(QString("[TEST]"))) { + bFoundTestTag = true; + } else if(line.startsWith(QString("[")) && bFoundTestTag) { + bFoundTestTag = false; + break; // finished with test tag + } + + if(bFoundTestTag) { // non-empty line + int position = line.indexOf(QString("=")); + + if(position <= 0) // not found + continue; + + // found - extract + + QString recname = line.mid(0, position - QString("=").length()).trimmed(); + QString recval = line.mid(position + QString("=").length()).trimmed(); + + //create record + QtNetworkSettingsRecord *entry = new QtNetworkSettingsRecord(recname, recval); + entries.insert(entry->recordName(), entry); + } + } while (!line.isNull()); + } + + return bTestSettingsLoaded = true; + } +#endif + + +}; +#ifdef Q_OS_SYMBIAN +QHash QtNetworkSettings::entries = QHash (); +bool QtNetworkSettings::bDefaultIapLoaded = false; +bool QtNetworkSettings::bTestSettingsLoaded = false; +QString QtNetworkSettings::iapFileFullPath = QString("C:\\Data\\iap.txt"); +QByteArray QtNetworkSettings::serverIp; +QByteArray QtNetworkSettings::imapExpectedReply; +QByteArray QtNetworkSettings::imapExpectedReplySsl; +#endif + +#ifdef Q_OS_SYMBIAN +#define Q_SET_DEFAULT_IAP QtNetworkSettings::setDefaultIap(); +#else +#define Q_SET_DEFAULT_IAP +#endif + +#ifdef QT_NETWORK_LIB +class QtNetworkSettingsInitializerCode { +public: + QtNetworkSettingsInitializerCode() { +#ifdef Q_OS_SYMBIAN +#ifdef Q_CC_NOKIAX86 + // We have a non-trivial constructor in global static. + // The QtNetworkSettings::serverName() uses native API which assumes + // Cleanup-stack to exist. That's why we create it here and install + // top level TRAP harness. + CTrapCleanup *cleanupStack = q_check_ptr(CTrapCleanup::New()); + TRAPD(err, + QHostInfo testServerResult = QHostInfo::fromName(QtNetworkSettings::serverName()); + if (testServerResult.error() != QHostInfo::NoError) { + qWarning() << "Could not lookup" << QtNetworkSettings::serverName(); + qWarning() << "Please configure the test environment!"; + qWarning() << "See /etc/hosts or network-settings.h"; + qFatal("Exiting"); + } + ) + delete cleanupStack; +//#else + // In Symbian HW there is no sense to run this check since global statics are + // initialized before QTestLib initializes the output channel for QWarnigns. + // So if there is problem network setup, also all QtCore etc tests whcih have + // QtNetwork dependency will crash with panic "0 - Exiciting" +#endif + +#else + QHostInfo testServerResult = QHostInfo::fromName(QtNetworkSettings::serverName()); + if (testServerResult.error() != QHostInfo::NoError) { + qWarning() << "Could not lookup" << QtNetworkSettings::serverName(); + qWarning() << "Please configure the test environment!"; + qWarning() << "See /etc/hosts or network-settings.h"; + qFatal("Exiting"); + } +#endif + } +}; +QtNetworkSettingsInitializerCode qtNetworkSettingsInitializer; +#endif diff --git a/tests/auto/patternistexamplefiletree/.gitignore b/tests/auto/patternistexamplefiletree/.gitignore new file mode 100644 index 0000000..3f8484c --- /dev/null +++ b/tests/auto/patternistexamplefiletree/.gitignore @@ -0,0 +1 @@ +tst_patternistexamplefiletree diff --git a/tests/auto/patternistexamplefiletree/patternistexamplefiletree.pro b/tests/auto/patternistexamplefiletree/patternistexamplefiletree.pro new file mode 100644 index 0000000..772c833 --- /dev/null +++ b/tests/auto/patternistexamplefiletree/patternistexamplefiletree.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_patternistexamplefiletree.cpp +QT = core + +include (../xmlpatterns.pri) diff --git a/tests/auto/patternistexamplefiletree/tst_patternistexamplefiletree.cpp b/tests/auto/patternistexamplefiletree/tst_patternistexamplefiletree.cpp new file mode 100644 index 0000000..429e4a3 --- /dev/null +++ b/tests/auto/patternistexamplefiletree/tst_patternistexamplefiletree.cpp @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +/*! + \class tst_PatternistExampleFileTree + \internal + \since 4.4 + \brief Tests Patternist's example called filetree, in examples/xmlpatterns/filetree/. + + */ +class tst_PatternistExampleFileTree : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void run() const; +}; + +void tst_PatternistExampleFileTree::run() const +{ + // TODO +} + +QTEST_MAIN(tst_PatternistExampleFileTree) + +#include "tst_patternistexamplefiletree.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/patternistexamples/.gitignore b/tests/auto/patternistexamples/.gitignore new file mode 100644 index 0000000..f28bec6 --- /dev/null +++ b/tests/auto/patternistexamples/.gitignore @@ -0,0 +1 @@ +tst_patternistexamples diff --git a/tests/auto/patternistexamples/patternistexamples.pro b/tests/auto/patternistexamples/patternistexamples.pro new file mode 100644 index 0000000..098b0fe --- /dev/null +++ b/tests/auto/patternistexamples/patternistexamples.pro @@ -0,0 +1,22 @@ +load(qttest_p4) +SOURCES += tst_patternistexamples.cpp +CONFIG += qtestlib +wince*|symbian: { + snippets.files = $$QT_SOURCE_TREE/doc/src/snippets/patternist/* + snippets.path = patternist + widgetRen.files = $$QT_SOURCE_TREE/examples/xmlpatterns/xquery/widgetRenderer/* + widgetRen.path = widgetRenderer + globVar.files = $$QT_SOURCE_TREE/examples/xmlpatterns/xquery/globalVariables/* + globVar.path = globalVariables + filetree.files = $$QT_SOURCE_TREE/examples/xmlpatterns/filetree/* + filetree.path = filetree + recipes.files = $$QT_SOURCE_TREE/examples/xmlpatterns/recipes/* + recipes.path = recipes + files.files = $$QT_SOURCE_TREE/examples/xmlpatterns/recipes/files/* + files.path = recipes\\files + + DEPLOYMENT += snippets widgetRen globVar filetree recipes files + # take care of dependency + QT += network +} +include (../xmlpatterns.pri) diff --git a/tests/auto/patternistexamples/tst_patternistexamples.cpp b/tests/auto/patternistexamples/tst_patternistexamples.cpp new file mode 100644 index 0000000..35aa01c --- /dev/null +++ b/tests/auto/patternistexamples/tst_patternistexamples.cpp @@ -0,0 +1,373 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include +#include +#include +#include +#include + +#include "../qxmlquery/MessageSilencer.h" +#include "../qsimplexmlnodemodel/TestSimpleNodeModel.h" + +/*! + \class tst_PatternistExamples + \internal + \since 4.4 + \brief Verifies examples for Patternist. + */ +class tst_PatternistExamples : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void initTestCase(); + void checkQueries() const; + void checkQueries_data() const; + void checkXMLFiles() const; + void checkXMLFiles_data() const; + void buildSnippets() const; + +private: + QVector m_dirs; + QStringList listFiles(const QStringList &patterns) const; + enum Constants + { + XMLFileCount = 12, + XQueryFileCount = 52 + }; +}; + +void tst_PatternistExamples::initTestCase() +{ +#ifndef Q_OS_WINCE + m_dirs.append(QDir(QLatin1String("../../../doc/src/snippets/patternist/"))); + m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/xquery/globalVariables/"))); + m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/filetree/"))); + m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/recipes/"))); + m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/recipes/files/"))); +#else + m_dirs.append(QDir(QLatin1String("patternist/"))); + m_dirs.append(QDir(QLatin1String("globalVariables/"))); + m_dirs.append(QDir(QLatin1String("filetree/"))); + m_dirs.append(QDir(QLatin1String("recipes/"))); + m_dirs.append(QDir(QLatin1String("recipes/files/"))); +#endif + for(int i = 0; i < m_dirs.size(); ++i) + QVERIFY(m_dirs.at(i).exists()); +} + +/*! + Returns a QStringList containing absolute filenames that were found in the predefined locations, when + filtered through \a pattterns. + */ +QStringList tst_PatternistExamples::listFiles(const QStringList &patterns) const +{ + QStringList result; + + for(int i = 0; i < m_dirs.size(); ++i) + { + const QDir &dir = m_dirs.at(i); + + const QStringList files(dir.entryList(patterns)); + for(int s = 0; s < files.count(); ++s) + result += dir.absoluteFilePath(files.at(s)); + } + + return result; +} + +/*! + Check that the queries contains no static errors such as + syntax errors. + */ +void tst_PatternistExamples::checkQueries() const +{ + QFETCH(QString, queryFile); + + QFile file(queryFile); + QVERIFY(file.open(QIODevice::ReadOnly)); + + QXmlQuery query; + + /* Two queries relies on this binding, so provide it such that we don't get a compile error. */ + query.bindVariable(QLatin1String("fileToOpen"), QVariant(QString::fromLatin1("dummyString"))); + + /* This is needed for the recipes example. */ + query.bindVariable(QLatin1String("inputDocument"), QVariant(QString::fromLatin1("dummString"))); + + /* This is needed for literalsAndOperators.xq. */ + query.bindVariable(QLatin1String("date"), QVariant(QDate::currentDate())); + + /* These are needed for introExample2.xq. */ + query.bindVariable(QLatin1String("file"), QVariant(QLatin1String("dummy"))); + query.bindVariable(QLatin1String("publisher"), QVariant(QLatin1String("dummy"))); + query.bindVariable(QLatin1String("year"), QVariant(2000)); + + /* and filetree/ needs this. */ + TestSimpleNodeModel nodeModel(query.namePool()); + query.bindVariable(QLatin1String("exampleDirectory"), nodeModel.root()); + + query.setQuery(&file, queryFile); + + QVERIFY2(query.isValid(), QString::fromLatin1("%1 failed to compile").arg(queryFile).toLatin1().constData()); +} + +void tst_PatternistExamples::checkQueries_data() const +{ + QTest::addColumn("queryFile"); + + const QStringList queryExamples(listFiles(QStringList(QLatin1String("*.xq")))); + + QCOMPARE(queryExamples.count(), int(XQueryFileCount)); + + foreach(QString q, queryExamples) + QTest::newRow(q.toLocal8Bit().constData()) << q; +} + +void tst_PatternistExamples::checkXMLFiles() const +{ + QFETCH(QString, file); + + QXmlQuery query; + /* Wrapping in QUrl ensures it gets formatted as a URI on all platforms. */ + query.setQuery(QLatin1String("doc('") + QUrl::fromLocalFile(file).toString() + QLatin1String("')")); + QVERIFY(query.isValid()); + + /* We don't care about the result, we only want to ensure the files can be parsed. */ + QByteArray dummy; + QBuffer buffer(&dummy); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + + QXmlSerializer serializer(query, &buffer); + + /* This is the important one. */ + QVERIFY(query.evaluateTo(&serializer)); +} + +void tst_PatternistExamples::checkXMLFiles_data() const +{ + QTest::addColumn("file"); + QStringList patterns; + patterns.append(QLatin1String("*.xml")); + patterns.append(QLatin1String("*.gccxml")); + patterns.append(QLatin1String("*.svg")); + patterns.append(QLatin1String("*.ui")); + patterns.append(QLatin1String("*.html")); + + const QStringList xmlFiles(listFiles(patterns)); + + if(xmlFiles.count() != XMLFileCount) + qDebug() << "These files were encountered:" << xmlFiles; + + QCOMPARE(xmlFiles.count(), int(XMLFileCount)); + + foreach(QString q, xmlFiles) + QTest::newRow(q.toLocal8Bit().constData()) << q; +} + +/*! + Below, we include all the examples and ensure that they build, such that we rule + out syntax error and that API changes has propagated into examples. + + An improvement could be to run them, to ensure that they behave as they intend + to. + */ + +static QUrl abstractURI() +{ + QUrl baseURI; + QUrl relative; +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp" +} + +class MyValue +{ +public: + MyValue parent() const + { + return MyValue(); + } +}; + +static MyValue toMyValue(const QXmlNodeModelIndex &) +{ + return MyValue(); +} + +static QXmlNodeModelIndex toNodeIndex(const MyValue &) +{ + return QXmlNodeModelIndex(); +} + +class MyTreeModel : public QSimpleXmlNodeModel +{ +public: + MyTreeModel(const QXmlNamePool &np, const QFile &f); + + virtual QUrl documentUri(const QXmlNodeModelIndex&) const + { + return QUrl(); + } + + virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex&) const + { + return QXmlNodeModelIndex::Element; + } + + virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex&, const QXmlNodeModelIndex&) const + { + return QXmlNodeModelIndex::Is; + } + + virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex&) const + { + return QXmlNodeModelIndex(); + } + + virtual QXmlName name(const QXmlNodeModelIndex&) const + { + return QXmlName(); + } + + virtual QVariant typedValue(const QXmlNodeModelIndex&) const + { + return QVariant(); + } + + virtual QVector attributes(const QXmlNodeModelIndex&) const + { + return QVector(); + } + + QXmlNodeModelIndex nodeFor(const QString &) const + { + return QXmlNodeModelIndex(); + } + + virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &origin) const; +}; + +/* + Exists for linking with at least msvc-2005. +*/ +MyTreeModel::MyTreeModel(const QXmlNamePool &np, const QFile &) : QSimpleXmlNodeModel(np) +{ +} + +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp" + +class MyMapper +{ +public: + class InputType; + enum OutputType + { + }; +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp" +}; + +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp" + +void tst_PatternistExamples::buildSnippets() const +{ + /* We don't run this code, see comment above. */ + return; + + /* We place a call to this function, such that GCC doesn't emit a warning. */ + abstractURI(); + + { + } + + { +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp" + } + + { + } + + { + QIODevice *myOutputDevice = 0; +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp" + } + + { + QIODevice *myOutputDevice = 0; +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp" + } + + { + QXmlNodeModelIndex myInstance; + const char **argv = 0; + typedef MyTreeModel ChemistryNodeModel; +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp" + } + + { + } + + { + QIODevice *myOutputDevice = 0; +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp" + } + + { + QXmlQuery query; + QString localName; + QVariant value; +#include "../../doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp" + } +} + +QTEST_MAIN(tst_PatternistExamples) + +#include "tst_patternistexamples.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/patternistheaders/.gitignore b/tests/auto/patternistheaders/.gitignore new file mode 100644 index 0000000..d4c0e7d --- /dev/null +++ b/tests/auto/patternistheaders/.gitignore @@ -0,0 +1 @@ +tst_patternistheaders diff --git a/tests/auto/patternistheaders/patternistheaders.pro b/tests/auto/patternistheaders/patternistheaders.pro new file mode 100644 index 0000000..fe4d670 --- /dev/null +++ b/tests/auto/patternistheaders/patternistheaders.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_patternistheaders.cpp +QT = core + +include (../xmlpatterns.pri) diff --git a/tests/auto/patternistheaders/tst_patternistheaders.cpp b/tests/auto/patternistheaders/tst_patternistheaders.cpp new file mode 100644 index 0000000..a8d6747 --- /dev/null +++ b/tests/auto/patternistheaders/tst_patternistheaders.cpp @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +/*! + \class tst_PatternistHeaders + \internal + \short + \since 4.4 + \brief Tests that the expected headers are available for Patternist. + + This test is essentially a compilation test. It includes all the headers that are available for + Patternist, and ensures it compiles. + + This attempts to capture regressions in header generation. + */ +class tst_PatternistHeaders : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void run() const; +}; + +void tst_PatternistHeaders::run() const +{ + /* This is a dummy, essentially. It only exists such that QTestLib + * considers everything fine. */ +} + +/* If you've added a header, you need to add it four times. Twice in this list, + * and twice in the one below. Alphabetic order. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Same again, this time with QtXmlPatterns prepended. Alphabetic order. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QTEST_MAIN(tst_PatternistHeaders) + +#include "tst_patternistheaders.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qabstractmessagehandler/.gitignore b/tests/auto/qabstractmessagehandler/.gitignore new file mode 100644 index 0000000..6195a83 --- /dev/null +++ b/tests/auto/qabstractmessagehandler/.gitignore @@ -0,0 +1 @@ +tst_qabstractmessagehandler diff --git a/tests/auto/qabstractmessagehandler/qabstractmessagehandler.pro b/tests/auto/qabstractmessagehandler/qabstractmessagehandler.pro new file mode 100644 index 0000000..5c50103 --- /dev/null +++ b/tests/auto/qabstractmessagehandler/qabstractmessagehandler.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qabstractmessagehandler.cpp +QT = core + +include (../xmlpatterns.pri) diff --git a/tests/auto/qabstractmessagehandler/tst_qabstractmessagehandler.cpp b/tests/auto/qabstractmessagehandler/tst_qabstractmessagehandler.cpp new file mode 100644 index 0000000..4295f96 --- /dev/null +++ b/tests/auto/qabstractmessagehandler/tst_qabstractmessagehandler.cpp @@ -0,0 +1,192 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include + +#ifdef QTEST_XMLPATTERNS +#include + +/* We expect these headers to be available. */ +#include +#include +#include +#include + +/*! + \class tst_QAbstractMessageHandler + \internal + \since 4.4 + \brief Tests the QAbstractMessageHandler class. + */ +class tst_QAbstractMessageHandler : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void constructor() const; + void constCorrectness() const; + void message() const; + void messageDefaultArguments() const; + void objectSize() const; + void hasQ_OBJECTMacro() const; +}; + +class Received +{ +public: + QtMsgType type; + QString description; + QUrl identifier; + QSourceLocation sourceLocation; + + bool operator==(const Received &other) const + { + return type == other.type + && description == other.description + && identifier == other.identifier + && sourceLocation == other.sourceLocation; + } +}; + +class TestMessageHandler : public QAbstractMessageHandler +{ +public: + QList received; + +protected: + virtual void handleMessage(QtMsgType type, const QString &description, const QUrl &identifier, const QSourceLocation &sourceLocation); +}; + +void TestMessageHandler::handleMessage(QtMsgType type, const QString &description, const QUrl &identifier, const QSourceLocation &sourceLocation) +{ + Received r; + r.type = type; + r.description = description; + r.identifier = identifier; + r.sourceLocation = sourceLocation; + received.append(r); +} + +void tst_QAbstractMessageHandler::constructor() const +{ + /* Allocate instance. */ + { + TestMessageHandler instance; + } + + { + TestMessageHandler instance1; + TestMessageHandler instance2; + } + + { + TestMessageHandler instance1; + TestMessageHandler instance2; + TestMessageHandler instance3; + } +} + +void tst_QAbstractMessageHandler::constCorrectness() const +{ + /* No members are supposed to be const. */ +} + +void tst_QAbstractMessageHandler::objectSize() const +{ + /* We shouldn't be adding anything. */ + QCOMPARE(sizeof(QAbstractMessageHandler), sizeof(QObject)); +} + +void tst_QAbstractMessageHandler::message() const +{ + TestMessageHandler handler; + + /* Check that the arguments comes out as expected. */ + handler.message(QtDebugMsg, + QLatin1String("A description"), + QUrl(QLatin1String("http://example.com/ID")), + QSourceLocation(QUrl(QLatin1String("http://example.com/Location")), 4, 5)); + + Received expected; + expected.type = QtDebugMsg; + expected.description = QLatin1String("A description"); + expected.identifier = QUrl(QLatin1String("http://example.com/ID")); + expected.sourceLocation = QSourceLocation(QUrl(QLatin1String("http://example.com/Location")), 4, 5); + + QCOMPARE(expected, handler.received.first()); +} + +void tst_QAbstractMessageHandler::messageDefaultArguments() const +{ + TestMessageHandler handler; + + /* The three last arguments in message() are optional. Check that they are what we promise. */ + handler.message(QtDebugMsg, QLatin1String("A description")); + + Received expected; + expected.type = QtDebugMsg; + expected.description = QLatin1String("A description"); + expected.identifier = QUrl(); + expected.sourceLocation = QSourceLocation(); + + QCOMPARE(expected, handler.received.first()); +} + +void tst_QAbstractMessageHandler::hasQ_OBJECTMacro() const +{ + TestMessageHandler messageHandler; + /* If this code fails to compile, the Q_OBJECT macro is missing in + * the class declaration. */ + QAbstractMessageHandler *const secondPointer = qobject_cast(&messageHandler); + /* The static_cast is for compiling on broken compilers. */ + QCOMPARE(static_cast(&messageHandler), secondPointer); +} + +QTEST_MAIN(tst_QAbstractMessageHandler) + +#include "tst_qabstractmessagehandler.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qabstracturiresolver/.gitignore b/tests/auto/qabstracturiresolver/.gitignore new file mode 100644 index 0000000..de657d0 --- /dev/null +++ b/tests/auto/qabstracturiresolver/.gitignore @@ -0,0 +1 @@ +tst_qabstracturiresolver diff --git a/tests/auto/qabstracturiresolver/TestURIResolver.h b/tests/auto/qabstracturiresolver/TestURIResolver.h new file mode 100644 index 0000000..c5835fb --- /dev/null +++ b/tests/auto/qabstracturiresolver/TestURIResolver.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef TestURIResolver_h +#define TestURIResolver_h + +#include + +class TestURIResolver : public QAbstractUriResolver +{ +public: + TestURIResolver(const QUrl &result = QUrl(QLatin1String("http://example.com/"))); + + virtual QUrl resolve(const QUrl &relative, const QUrl &baseURI) const; + +private: + const QUrl m_result; +}; + +TestURIResolver::TestURIResolver(const QUrl &result) : m_result(result) +{ +} + +QUrl TestURIResolver::resolve(const QUrl &relative, const QUrl &baseURI) const +{ + Q_UNUSED(relative); + Q_UNUSED(baseURI); + return baseURI.resolved(m_result); +} + +#endif diff --git a/tests/auto/qabstracturiresolver/qabstracturiresolver.pro b/tests/auto/qabstracturiresolver/qabstracturiresolver.pro new file mode 100644 index 0000000..0d76208 --- /dev/null +++ b/tests/auto/qabstracturiresolver/qabstracturiresolver.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +SOURCES += tst_qabstracturiresolver.cpp +HEADERS += TestURIResolver.h +QT = core + +include (../xmlpatterns.pri) diff --git a/tests/auto/qabstracturiresolver/tst_qabstracturiresolver.cpp b/tests/auto/qabstracturiresolver/tst_qabstracturiresolver.cpp new file mode 100644 index 0000000..85add8e --- /dev/null +++ b/tests/auto/qabstracturiresolver/tst_qabstracturiresolver.cpp @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include + +#ifdef QTEST_XMLPATTERNS + +/* We expect these headers to be available. */ +#include +#include +#include +#include + +#include "TestURIResolver.h" + +/*! + \class tst_QAbstractUriResolver + \internal + \since 4.4 + \brief Tests the QAbstractUriResolver class. + */ +class tst_QAbstractUriResolver : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void constructor() const; + void resolve() const; + void constCorrectness() const; + void objectSize() const; + void hasQ_OBJECTMacro() const; +}; + +void tst_QAbstractUriResolver::constructor() const +{ + /* Allocate instances. */ + { + TestURIResolver instance; + } + + { + TestURIResolver instance1; + TestURIResolver instance2; + } + + { + TestURIResolver instance1; + TestURIResolver instance2; + TestURIResolver instance3; + } +} + +void tst_QAbstractUriResolver::constCorrectness() const +{ + const TestURIResolver instance; + + /* This function is supposed to be const. */ + instance.resolve(QUrl(), QUrl()); +} + +void tst_QAbstractUriResolver::resolve() const +{ + const TestURIResolver instance; + QCOMPARE(instance.resolve(QUrl(QLatin1String("foo/relative.file")), + QUrl(QLatin1String("http://example.com/NotThisOne"))), + QUrl(QLatin1String("http://example.com/"))); +} + +void tst_QAbstractUriResolver::objectSize() const +{ + /* We shouldn't have a different size. */ + QCOMPARE(sizeof(QAbstractUriResolver), sizeof(QObject)); +} + +void tst_QAbstractUriResolver::hasQ_OBJECTMacro() const +{ + TestURIResolver uriResolver; + /* If this code fails to compile, the Q_OBJECT macro is missing in + * the class declaration. */ + QAbstractUriResolver *const secondPointer = qobject_cast(&uriResolver); + /* The static_cast is for compiling on broken compilers. */ + QCOMPARE(static_cast(&uriResolver), secondPointer); +} + +QTEST_MAIN(tst_QAbstractUriResolver) + +#include "tst_qabstracturiresolver.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qabstractxmlforwarditerator/.gitignore b/tests/auto/qabstractxmlforwarditerator/.gitignore new file mode 100644 index 0000000..8e90324 --- /dev/null +++ b/tests/auto/qabstractxmlforwarditerator/.gitignore @@ -0,0 +1 @@ +tst_qabstractxmlforwarditerator diff --git a/tests/auto/qabstractxmlforwarditerator/qabstractxmlforwarditerator.pro b/tests/auto/qabstractxmlforwarditerator/qabstractxmlforwarditerator.pro new file mode 100644 index 0000000..6bc0c59 --- /dev/null +++ b/tests/auto/qabstractxmlforwarditerator/qabstractxmlforwarditerator.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qabstractxmlforwarditerator.cpp +QT = core + +include (../xmlpatterns.pri) diff --git a/tests/auto/qabstractxmlforwarditerator/tst_qabstractxmlforwarditerator.cpp b/tests/auto/qabstractxmlforwarditerator/tst_qabstractxmlforwarditerator.cpp new file mode 100644 index 0000000..90722c1 --- /dev/null +++ b/tests/auto/qabstractxmlforwarditerator/tst_qabstractxmlforwarditerator.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include "private/qabstractxmlforwarditerator_p.h" + +/*! + \class tst_QAbstractXmlForwardIterator + \internal + \since 4.4 + \brief Tests class QAbstractXmlForwardIterator. + + This test is not intended for testing the engine, but the functionality specific + to the QAbstractXmlForwardIterator class. + + In other words, if you have an engine bug; don't add it here because it won't be + tested properly. Instead add it to the test suite. + + */ +class tst_QAbstractXmlForwardIterator : public QObject +{ + Q_OBJECT +private Q_SLOTS: + void objectSize() const; +}; + +void tst_QAbstractXmlForwardIterator::objectSize() const +{ + /* We add sizeof(void *) times two. One for the + * virtual table pointer, one for the d-pointer. + * + * The reason we check also allow (+ sizeof(void *) / 2) is that on 64 bit + * the first member in QAbstractXmlForwardIterator gets padded to a pointer + * address due to QSharedData not being sizeof(qptrdiff), but sizeof(qint32). + */ + QVERIFY( sizeof(QAbstractXmlForwardIterator) == sizeof(QSharedData) + sizeof(void *) * 2 + || sizeof(QAbstractXmlForwardIterator) == sizeof(QSharedData) + sizeof(void *) * 2 + sizeof(void *) / 2); +} + +QTEST_MAIN(tst_QAbstractXmlForwardIterator) + +#include "tst_qabstractxmlforwarditerator.moc" +#else //QTEST_XMLPATTERNS +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qabstractxmlnodemodel/.gitignore b/tests/auto/qabstractxmlnodemodel/.gitignore new file mode 100644 index 0000000..6b025af --- /dev/null +++ b/tests/auto/qabstractxmlnodemodel/.gitignore @@ -0,0 +1 @@ +tst_qabstractxmlnodemodel diff --git a/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp new file mode 100644 index 0000000..fbc28d6 --- /dev/null +++ b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp @@ -0,0 +1,360 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include + +#ifdef QTEST_XMLPATTERNS +#include +#include +#include +#include + +#include "LoadingModel.h" +LoadingModel::LoadingModel(const Node::Vector &content, + const QXmlNamePool &np) : QSimpleXmlNodeModel(np) + , m_nodes(content) +{ + Q_ASSERT(!content.isEmpty()); + /* + foreach(const Node *n, content) + qDebug() << "this:" << n + << "kind:" << n->kind + << "parent: " << n->parent + << "preceding: " << n->precedingSibling + << "following: " << n->followingSibling + << "firstChild: " << n->firstChild + << "value: " << n->value; + */ +} + +LoadingModel::~LoadingModel() +{ + qDeleteAll(m_nodes); +} + +const LoadingModel::Node *LoadingModel::toInternal(const QXmlNodeModelIndex &ni) const +{ + return static_cast(ni.internalPointer()); +} + +QXmlNodeModelIndex LoadingModel::createIndex(const Node *const internal) const +{ + Q_ASSERT_X(internal, Q_FUNC_INFO, + "We shouldn't construct from null pointers."); + return QAbstractXmlNodeModel::createIndex(const_cast(internal)); +} + +QUrl LoadingModel::documentUri(const QXmlNodeModelIndex &) const +{ + Q_ASSERT(false); + return QUrl(); +} + +QXmlNodeModelIndex::NodeKind LoadingModel::kind(const QXmlNodeModelIndex &ni) const +{ + Q_ASSERT(!ni.isNull()); + return toInternal(ni)->kind; +} + +QXmlNodeModelIndex::DocumentOrder LoadingModel::compareOrder(const QXmlNodeModelIndex &n1, const QXmlNodeModelIndex &n2) const +{ + const Node *const in1 = toInternal(n1); + const Node *const in2 = toInternal(n2); + Q_ASSERT(m_nodes.indexOf(in1) != -1); + Q_ASSERT(m_nodes.indexOf(in2) != -1); + + if(in1 == in2) + return QXmlNodeModelIndex::Is; + else if(m_nodes.indexOf(in1) < m_nodes.indexOf(in2)) + return QXmlNodeModelIndex::Precedes; + else + return QXmlNodeModelIndex::Follows; +} + +QXmlNodeModelIndex LoadingModel::root(const QXmlNodeModelIndex &) const +{ + Q_ASSERT(kind(createIndex(m_nodes.first())) == QXmlNodeModelIndex::Document); + return createIndex(m_nodes.first()); +} + +QXmlName LoadingModel::name(const QXmlNodeModelIndex &ni) const +{ + return toInternal(ni)->name; +} + +QVariant LoadingModel::typedValue(const QXmlNodeModelIndex &ni) const +{ + const Node *const internal = toInternal(ni); + + Q_ASSERT(internal->kind == QXmlNodeModelIndex::Attribute + || internal->kind == QXmlNodeModelIndex::Element); + + return internal->value; +} + +QString LoadingModel::stringValue(const QXmlNodeModelIndex &ni) const +{ + const Node *const internal = toInternal(ni); + + switch(internal->kind) + { + case QXmlNodeModelIndex::Text: + /* Fallthrough. */ + case QXmlNodeModelIndex::ProcessingInstruction: + /* Fallthrough. */ + case QXmlNodeModelIndex::Comment: + /* Fallthrough. */ + case QXmlNodeModelIndex::Attribute: + return internal->value; + default: + return QString(); + } +} + +QXmlNodeModelIndex LoadingModel::nextFromSimpleAxis(QAbstractXmlNodeModel::SimpleAxis axis, + const QXmlNodeModelIndex &ni) const +{ + const Node *const internal = toInternal(ni); + + /* Note that a QXmlNodeModelIndex containing a null pointer is not a null node. */ + switch(axis) + { + case Parent: + return internal->parent ? createIndex(internal->parent) : QXmlNodeModelIndex(); + case FirstChild: + return internal->firstChild ? createIndex(internal->firstChild) : QXmlNodeModelIndex(); + case PreviousSibling: + return internal->precedingSibling ? createIndex(internal->precedingSibling) : QXmlNodeModelIndex(); + case NextSibling: + return internal->followingSibling ? createIndex(internal->followingSibling) : QXmlNodeModelIndex(); + } + + Q_ASSERT(false); + return QXmlNodeModelIndex(); +} + +QVector LoadingModel::attributes(const QXmlNodeModelIndex &ni) const +{ + QVector retval; + foreach(const Node *n, toInternal(ni)->attributes) + retval.append(createIndex(n)); + + return retval; +} + +class Loader +{ +public: + inline Loader(const QXmlNamePool &namePool) : m_namePool(namePool) + , m_currentNode(0) + { + m_parentStack.push(0); + } + +private: + inline void adjustSiblings(LoadingModel::Node *const justBorn); + friend class LoadingModel; + Q_DISABLE_COPY(Loader); + + void load(); + + QXmlNamePool m_namePool; + QXmlStreamReader m_reader; + LoadingModel::Node::Vector m_result; + LoadingModel::Node * m_currentNode; + QStack m_parentStack; +}; + +inline void Loader::adjustSiblings(LoadingModel::Node *const justBorn) +{ + if(m_currentNode) + { + if(m_currentNode->parent == justBorn->parent) + justBorn->precedingSibling = m_currentNode; + + m_currentNode->followingSibling = justBorn; + } + + m_currentNode = justBorn; + + /* Otherwise we're the first child, and our precedingSibling should remain null. */ + + if(m_parentStack.top() && !m_parentStack.top()->firstChild) + m_parentStack.top()->firstChild = justBorn; +} + +void Loader::load() +{ + QFile in(QLatin1String("tree.xml")); + + /* LoadingModel::m_result will be null, signalling failure. */ + if(!in.open(QIODevice::ReadOnly)) + return; + + QXmlStreamReader reader(&in); + while(!reader.atEnd()) + { + reader.readNext(); + + switch(reader.tokenType()) + { + case QXmlStreamReader::StartDocument: + /* Fallthrough. */ + case QXmlStreamReader::StartElement: + { + QXmlName name; + if(reader.tokenType() == QXmlStreamReader::StartElement) + { + name = QXmlName(m_namePool, + reader.name().toString(), + reader.namespaceUri().toString(), + reader.prefix().toString()); + } + /* Else, the name is null. */ + + LoadingModel::Node *const tmp = new LoadingModel::Node(reader.tokenType() == QXmlStreamReader::StartElement + ? QXmlNodeModelIndex::Element + : QXmlNodeModelIndex::Document, + m_parentStack.top(), + QString(), + name); + m_result.append(tmp); + + if(m_currentNode) + { + if(m_currentNode->parent == m_parentStack.top()) + m_currentNode->followingSibling = tmp; + } + + const QXmlStreamAttributes attributes(reader.attributes()); + const int len = attributes.count(); + + for(int i = 0; i < len; ++i) + { + const QXmlStreamAttribute &attr = attributes.at(i); + const LoadingModel::Node *const a = new LoadingModel::Node(QXmlNodeModelIndex::Attribute, + m_parentStack.top(), + attr.value().toString(), + QXmlName(m_namePool, + attr.name().toString(), + attr.namespaceUri().toString(), + attr.prefix().toString())); + /* We add it also to m_result such that compareOrder() is correct + * for attributes. m_result owns a. */ + tmp->attributes.append(a); + m_result.append(a); + } + + adjustSiblings(tmp); + m_parentStack.push(m_currentNode); + break; + } + case QXmlStreamReader::EndDocument: + /* Fallthrough. */ + case QXmlStreamReader::EndElement: + { + m_currentNode->followingSibling = 0; + m_currentNode = m_parentStack.pop(); + + if(reader.tokenType() == QXmlStreamReader::EndDocument) + const_cast(m_result.first())->followingSibling = 0; + + break; + } + case QXmlStreamReader::Characters: + { + LoadingModel::Node *const tmp = new LoadingModel::Node(QXmlNodeModelIndex::Text, m_parentStack.top(), reader.text().toString()); + m_result.append(tmp); + adjustSiblings(tmp); + break; + } + case QXmlStreamReader::ProcessingInstruction: + { + LoadingModel::Node *const tmp = new LoadingModel::Node(QXmlNodeModelIndex::ProcessingInstruction, + m_parentStack.top(), + reader.processingInstructionData().toString(), + QXmlName(m_namePool, reader.processingInstructionTarget().toString())); + m_result.append(tmp); + adjustSiblings(tmp); + break; + } + case QXmlStreamReader::Comment: + { + LoadingModel::Node *const tmp = new LoadingModel::Node(QXmlNodeModelIndex::Comment, m_parentStack.top(), reader.text().toString()); + m_result.append(tmp); + adjustSiblings(tmp); + break; + } + case QXmlStreamReader::DTD: + /* Fallthrough. */ + case QXmlStreamReader::EntityReference: + { + Q_ASSERT_X(false, Q_FUNC_INFO, + "We don't support this."); + /* Fallthrough. */ + } + case QXmlStreamReader::NoToken: + /* Fallthrough. */ + case QXmlStreamReader::Invalid: + { + qWarning(qPrintable(reader.errorString())); + m_result.clear(); + return; + } + } + } + + if(reader.hasError()) + { + qWarning(qPrintable(reader.errorString())); + m_result.clear(); + } +} + +QAbstractXmlNodeModel::Ptr LoadingModel::create(const QXmlNamePool &np) +{ + Loader loader(np); + loader.load(); + return Ptr(new LoadingModel(loader.m_result, np)); +} +#endif //QTEST_XMLPATTERNS diff --git a/tests/auto/qabstractxmlnodemodel/LoadingModel.h b/tests/auto/qabstractxmlnodemodel/LoadingModel.h new file mode 100644 index 0000000..304d2d5 --- /dev/null +++ b/tests/auto/qabstractxmlnodemodel/LoadingModel.h @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include + +class LoadingModel : public QSimpleXmlNodeModel +{ +public: + virtual ~LoadingModel(); + static QAbstractXmlNodeModel::Ptr create(const QXmlNamePool &np); + + virtual QUrl documentUri(const QXmlNodeModelIndex &) const; + virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex &) const; + virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex &, const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex &) const; + virtual QXmlName name(const QXmlNodeModelIndex &) const; + virtual QVariant typedValue(const QXmlNodeModelIndex &) const; + virtual QString stringValue(const QXmlNodeModelIndex &) const; + virtual QXmlNodeModelIndex nextFromSimpleAxis(QAbstractXmlNodeModel::SimpleAxis, const QXmlNodeModelIndex &) const; + virtual QVector attributes(const QXmlNodeModelIndex &) const; + +private: + friend class Loader; + class Node + { + public: + inline Node(const QXmlNodeModelIndex::NodeKind k, + const Node *const p, + const QString &v = QString(), + const QXmlName &n = QXmlName()) : kind(k) + , value(v) + , parent(p) + , precedingSibling(0) + , followingSibling(0) + , firstChild(0) + , name(n) + { + } + + typedef QVector Vector; + QXmlNodeModelIndex::NodeKind kind; + QString value; + const Node * parent; + const Node * precedingSibling; + const Node * followingSibling; + const Node * firstChild; + Node::Vector attributes; + QXmlName name; + }; + + inline const Node *toInternal(const QXmlNodeModelIndex &ni) const; + inline QXmlNodeModelIndex createIndex(const Node *const internal) const; + + LoadingModel(const Node::Vector &content, + const QXmlNamePool &np); + + Node::Vector m_nodes; +}; + diff --git a/tests/auto/qabstractxmlnodemodel/TestNodeModel.h b/tests/auto/qabstractxmlnodemodel/TestNodeModel.h new file mode 100644 index 0000000..f256be1 --- /dev/null +++ b/tests/auto/qabstractxmlnodemodel/TestNodeModel.h @@ -0,0 +1,139 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +/*! + \class TestNodeModel + \since 4.4 + \internal + \brief Subclass of QAbstractXmlNodeModel, used by tst_QAbstractXmlNodeModel, for testing only. + */ +class TestNodeModel : public QAbstractXmlNodeModel +{ +public: + virtual QUrl baseUri(const QXmlNodeModelIndex&) const; + virtual QUrl documentUri(const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex&, const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex&) const; + virtual QXmlName name(const QXmlNodeModelIndex&) const; + virtual QString stringValue(const QXmlNodeModelIndex&) const; + virtual QVariant typedValue(const QXmlNodeModelIndex&) const; + virtual QVector namespaceBindings(const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex elementById(const QXmlName &ncname) const; + virtual QVector nodesByIdref(const QXmlName &ncname) const; + +protected: + virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis axis, + const QXmlNodeModelIndex &origin) const; + virtual QVector attributes(const QXmlNodeModelIndex&) const; + +}; + +QUrl TestNodeModel::baseUri(const QXmlNodeModelIndex&) const +{ + return QUrl(); +} + +QUrl TestNodeModel::documentUri(const QXmlNodeModelIndex&) const +{ + return QUrl(); +} + +QXmlNodeModelIndex::NodeKind TestNodeModel::kind(const QXmlNodeModelIndex&) const +{ + return QXmlNodeModelIndex::Element; +} + +QXmlNodeModelIndex::DocumentOrder TestNodeModel::compareOrder(const QXmlNodeModelIndex&, const QXmlNodeModelIndex&) const +{ + return QXmlNodeModelIndex::Precedes; +} + +QXmlNodeModelIndex TestNodeModel::root(const QXmlNodeModelIndex&) const +{ + return QXmlNodeModelIndex(); +} + +QXmlName TestNodeModel::name(const QXmlNodeModelIndex&) const +{ + return QXmlName(); +} + +QString TestNodeModel::stringValue(const QXmlNodeModelIndex&) const +{ + return QString(); +} + +QVariant TestNodeModel::typedValue(const QXmlNodeModelIndex&) const +{ + return QVariant(); +} + +QVector TestNodeModel::namespaceBindings(const QXmlNodeModelIndex&) const +{ + return QVector(); +} + +QXmlNodeModelIndex TestNodeModel::elementById(const QXmlName &ncname) const +{ + Q_UNUSED(ncname); + return QXmlNodeModelIndex(); +} + +QVector TestNodeModel::nodesByIdref(const QXmlName &ncname) const +{ + Q_UNUSED(ncname); + return QVector(); +} + +QXmlNodeModelIndex TestNodeModel::nextFromSimpleAxis(SimpleAxis, const QXmlNodeModelIndex &) const +{ + return QXmlNodeModelIndex(); +} + +QVector TestNodeModel::attributes(const QXmlNodeModelIndex&) const +{ + return QVector(); +} + diff --git a/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro b/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro new file mode 100644 index 0000000..b8f509d --- /dev/null +++ b/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro @@ -0,0 +1,14 @@ +load(qttest_p4) +SOURCES += tst_qabstractxmlnodemodel.cpp \ + LoadingModel.cpp \ + ../qxmlquery/TestFundament.cpp +HEADERS += TestNodeModel.h LoadingModel.h + +include (../xmlpatterns.pri) + +wince*: { + addFiles.files = tree.xml + addFiles.path = . + + DEPLOYMENT += addFiles +} diff --git a/tests/auto/qabstractxmlnodemodel/tree.xml b/tests/auto/qabstractxmlnodemodel/tree.xml new file mode 100644 index 0000000..cba262a --- /dev/null +++ b/tests/auto/qabstractxmlnodemodel/tree.xml @@ -0,0 +1,15 @@ + + + text1 + + + + + + + + + + + theTextChild2 + diff --git a/tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel.cpp b/tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel.cpp new file mode 100644 index 0000000..ec191d7 --- /dev/null +++ b/tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel.cpp @@ -0,0 +1,407 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include + +#ifdef QTEST_XMLPATTERNS + +#include +#include +#include +#include +#include +#include + +#include "TestNodeModel.h" +#include "LoadingModel.h" +#include "../qxmlquery/TestFundament.h" + +/*! + \class tst_QAbstractXmlNodeModel + \internal + \since 4.4 + \brief Tests the QAbstractXmlNodeModel class. + */ +class tst_QAbstractXmlNodeModel : public QObject + , private TestFundament +{ + Q_OBJECT + +private Q_SLOTS: + // TODO lots of tests missing + void initTestCase(); + void constructor() const; + void objectSize() const; + void nextFromSimpleAxis(); + void nextFromSimpleAxis_data() const; + void constCorrectness() const; + void createData() const; + void createPointerAdditionalData() const; + void createDataAdditionalData() const; + void id() const; + void idref() const; + void typedValue() const; + void sourceLocation() const; + +private: + QAbstractXmlNodeModel::Ptr m_nodeModel; + QXmlNamePool m_namePool; + QXmlNodeModelIndex m_rootNode; +}; + +void tst_QAbstractXmlNodeModel::initTestCase() +{ + m_nodeModel = LoadingModel::create(m_namePool); + QVERIFY(m_nodeModel); + m_rootNode = m_nodeModel->root(QXmlNodeModelIndex()); + QVERIFY(!m_rootNode.isNull()); +} + +void tst_QAbstractXmlNodeModel::constructor() const +{ + /* Allocate instance. */ + { + TestNodeModel instance; + } + + { + TestNodeModel instance1; + TestNodeModel instance2; + } + + { + TestNodeModel instance1; + TestNodeModel instance2; + TestNodeModel instance3; + } +} + +void tst_QAbstractXmlNodeModel::objectSize() const +{ + /* We can't currently test this in portable way, + * so disable it. */ + return; + + const int pointerSize = sizeof(void *); + // adjust for pointer alignment + const int sharedDataSize = ((sizeof(QSharedData) + pointerSize) / pointerSize) * pointerSize; + const int modelSize = sizeof(QAbstractXmlNodeModel); + + /* A d pointer plus a vtable pointer. */ + QCOMPARE(modelSize, sharedDataSize + pointerSize * 2); +} + +/*! + Tests nextFromSimpleAxis(). More exactly that all the logic in + QAbstractXmlNodeModel::iterate() is as we expect to. Subsequently, a lot + of testing code is in LoadingModel(.cpp). + + Approach: + + 1. In initTestCase() we loaded tree.xml into LoadingModel and + stored the root node in m_rootNode. + 2. We execute a query that navigates from m_rootNode and write out + the result using QXmlFormatter. + 3. We execute the exact same query, but this time use the built in node backend, + and write out the result in the same way. This is our baseline. + 4. Compare the two. + + Hence we check QAbstractXmlNodeModel::iterate() and friends against our XQuery + code, which in turn is (mainly) checked by the XQTS. This means safer testing + since we don't create baselines manually, and it also means that we can modify + the input file, tree.xml, without having to update static baselines. + */ +void tst_QAbstractXmlNodeModel::nextFromSimpleAxis() +{ + QFETCH(QString, queryString); + + QBuffer out; + + /* Fill out, using LoadingModel. */ + { + QXmlQuery query(m_namePool); + query.bindVariable(QLatin1String("node"), m_rootNode); + query.setQuery(queryString); + QVERIFY(query.isValid()); + + QVERIFY(out.open(QIODevice::WriteOnly)); + QXmlFormatter formatter(query, &out); + + QVERIFY(query.evaluateTo(&formatter)); + } + + QBuffer baseline; + + /* Create the baseline. */ + { + QXmlQuery openDoc(m_namePool); + openDoc.bindVariable(QLatin1String("docURI"), QVariant(inputFile(QLatin1String("tree.xml")))); + openDoc.setQuery(QLatin1String("doc($docURI)")); + QXmlResultItems doc; + QVERIFY(openDoc.isValid()); + openDoc.evaluateTo(&doc); + + QXmlQuery produceBaseline(m_namePool); + produceBaseline.bindVariable(QLatin1String("node"), doc.next()); + produceBaseline.setQuery(queryString); + QVERIFY(produceBaseline.isValid()); + QVERIFY(baseline.open(QIODevice::WriteOnly)); + + QXmlFormatter baselineFormatter(produceBaseline, &baseline); + QVERIFY(produceBaseline.evaluateTo(&baselineFormatter)); + } + + if(out.data() != baseline.data()) + { + QTextStream(stderr) << "ACTUAL:" << QString::fromUtf8(out.data().constData()) + << "EXPECTED:" << QString::fromUtf8(baseline.data().constData()); + } + + QCOMPARE(out.data(), baseline.data()); +} + +void tst_QAbstractXmlNodeModel::nextFromSimpleAxis_data() const +{ + QTest::addColumn("queryString"); + + QTest::newRow("The whole tree") + << "$node"; + + QTest::newRow("::descendant-or-self from $node, all nodes.") + << "$node/descendant-or-self::node()"; + + QTest::newRow("::descendant from $node, all nodes.") + << "$node/descendant::node()"; + + QTest::newRow("::descendant from node with no descendants.") + << "$node/descendant::node()"; + + QTest::newRow("following-sibling on $root.") + << "$node/text()[1]/following-sibling::node()"; + + QTest::newRow("following-sibling from section1.") + << "$node//section1/following-sibling::node()"; + + QTest::newRow("preceding-sibling-sibling from section1.") + << "$node//section1/preceding-sibling::node()"; + + QTest::newRow("following-sibling from oneTextChild.") + << "$node//oneTextChild/following-sibling::node()"; + + QTest::newRow("preceding-sibling-sibling from oneTextChild.") + << "$node//oneTextChild/preceding-sibling::node()"; + + QTest::newRow("preceding-sibling on $root.") + << "$node/preceding-sibling::node()"; + + QTest::newRow("::ancestor from node at the end") + << "$node//node()/ancestor::node()"; + + QTest::newRow("::ancestor-or-self from node at the end") + << "$node//node()/ancestor-or-self::node()"; + + QTest::newRow("Copy attributes from all nodes.") + << "{for $i in $node//node()/@* order by $i return $i}"; + + QTest::newRow("::preceding from node at the end") + << "($node//node())[last()]/preceding::node()"; + + QTest::newRow("::preceding from $node") + << "$node/preceding::node()"; + + QTest::newRow("::following from node at the end") + << "($node//node())[last()]/following::node()"; + + QTest::newRow("::following from $node") + << "$node//following::node()"; + + QTest::newRow("::following from $node") + << "$node/following::node()"; + + QTest::newRow("::descendant from text() nodes.") + << "$node/descendant-or-self::text()/descendant::node()"; + + QTest::newRow("::descendant-or-self from text() nodes.") + << "$node/descendant-or-self::text()/descendant-or-self::node()"; + + QTest::newRow("descendant-or-self::node() from section1.") + << "$node//section1/descendant-or-self::node()"; + + QTest::newRow("descendant::node() from section1.") + << "$node//section1/descendant::node()"; + + /* Checks for axis order. */ + + QTest::newRow("::descendant from text() nodes with last(), checking axis order.") + << "$node/descendant-or-self::text()/(descendant::node()[last()])"; + + QTest::newRow("::descendant-or-self from text() nodes with last(), checking axis order.") + << "$node/descendant-or-self::text()/(descendant-or-self::node()[last()])"; + + QTest::newRow("::descendant from text() nodes with predicate, checking axis order.") + << "$node/descendant-or-self::text()/(descendant::node()[2])"; + + QTest::newRow("::descendant-or-self from text() nodes with predicate, checking axis order.") + << "$node/descendant-or-self::text()/(descendant-or-self::node()[2])"; + + QTest::newRow("::following from node at the end with predicate, checking axis order.") + << "($node//node())[last()]/(following::node()[2])"; + + QTest::newRow("::following from node at the end with last(), checking axis order.") + << "($node//node())[last()]/(following::node()[last()])"; + + QTest::newRow("ancestor:: from node at the end with predicate, checking axis order.") + << "($node//node())[last()]/(ancestor::node()[2])"; + + QTest::newRow("ancestor:: from node at the end with last(), checking axis order.") + << "($node//node())[last()]/(ancestor::node()[last()])"; + + QTest::newRow("ancestor-or-self:: from node at the end with predicate, checking axis order.") + << "($node//node())[last()]/(ancestor::node()[2])"; + + QTest::newRow("ancestor-or-self:: from node at the end with last(), checking axis order.") + << "($node//node())[last()]/(ancestor::node()[last()])"; + + QTest::newRow("::preceding from node at the end with predicate, checking axis order.") + << "($node//node())[last()]/(preceding::node()[2])"; + + QTest::newRow("descendant-or-self in two levels, with last()") + << "$node/descendant-or-self::text()/(descendant-or-self::node()[last()])"; + + QTest::newRow("descendant-or-self with last()") + << "$node/descendant-or-self::node()[last()]"; + + QTest::newRow("::preceding from node at the end with last(), checking axis order.") + << "$node/preceding::node()[last()]"; + + QTest::newRow("::preceding combined with descendant-or-self, from node at the end with last(), checking axis order.") + << "$node//preceding::node()[last()]"; + + QTest::newRow("::preceding combined with descendant-or-self, from node at the end with last(), checking axis order.") + << "($node//node())[last()]/(preceding::node()[last()])"; +} + +void tst_QAbstractXmlNodeModel::constCorrectness() const +{ + // TODO +} + +void tst_QAbstractXmlNodeModel::createData() const +{ + // TODO + // Verify that the argument is qint64 +} + +void tst_QAbstractXmlNodeModel::createPointerAdditionalData() const +{ + // TODO + // Verify that the second argument is qint64 +} + +void tst_QAbstractXmlNodeModel::createDataAdditionalData() const +{ + // TODO +} + +void tst_QAbstractXmlNodeModel::id() const +{ + // TODO verify that invalid NCNames are not sent to the model. +} + +void tst_QAbstractXmlNodeModel::idref() const +{ + // TODO verify that invalid NCNames are not sent to the model. +} + +/*! + Verify that if QAbstractXmlNodeModel::typedValue() return a null + QVariant, it is treated as that the node has no typed value. + */ +void tst_QAbstractXmlNodeModel::typedValue() const +{ + class TypedModel : public TestNodeModel + { + public: + virtual QVariant typedValue(const QXmlNodeModelIndex &) const + { + return QVariant(); + } + + QXmlNodeModelIndex root() const + { + return createIndex(qint64(1)); + } + }; + + TypedModel model; + + QXmlQuery query; + query.bindVariable(QLatin1String("node"), model.root()); + query.setQuery(QLatin1String("declare variable $node external;" + "string($node), data($node)")); + + QByteArray output; + QBuffer buffer(&output); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + QVERIFY(query.isValid()); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + QVERIFY(output.isEmpty()); +} + +void tst_QAbstractXmlNodeModel::sourceLocation() const +{ + const QAbstractXmlNodeModel* const constModel = m_nodeModel.data(); + const QSourceLocation location = constModel->sourceLocation(m_rootNode); +} + +QTEST_MAIN(tst_QAbstractXmlNodeModel) + +#include "tst_qabstractxmlnodemodel.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qabstractxmlreceiver/.gitignore b/tests/auto/qabstractxmlreceiver/.gitignore new file mode 100644 index 0000000..d382706 --- /dev/null +++ b/tests/auto/qabstractxmlreceiver/.gitignore @@ -0,0 +1 @@ +tst_qabstractxmlreceiver diff --git a/tests/auto/qabstractxmlreceiver/TestAbstractXmlReceiver.h b/tests/auto/qabstractxmlreceiver/TestAbstractXmlReceiver.h new file mode 100644 index 0000000..0870ea0 --- /dev/null +++ b/tests/auto/qabstractxmlreceiver/TestAbstractXmlReceiver.h @@ -0,0 +1,138 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#ifndef Patternist_TestAbstractXmlReceiver_h +#define Patternist_TestAbstractXmlReceiver_h + +#include + +class TestAbstractXmlReceiver : public QAbstractXmlReceiver +{ +public: + using QAbstractXmlReceiver::attribute; + using QAbstractXmlReceiver::characters; + + virtual void startElement(const QXmlName&); + virtual void endElement(); + virtual void attribute(const QXmlName&, const QStringRef&); + virtual void comment(const QString&); + virtual void characters(const QStringRef&); + virtual void startDocument(); + virtual void endDocument(); + virtual void processingInstruction(const QXmlName&, const QString&); + virtual void atomicValue(const QVariant&); + virtual void namespaceBinding(const QXmlName&); + virtual void startOfSequence(); + virtual void endOfSequence(); + + QString receivedFromCharacters; + QString receivedFromAttribute; +}; + +void TestAbstractXmlReceiver::startElement(const QXmlName &name) +{ + Q_UNUSED(name); +} + +void TestAbstractXmlReceiver::endElement() +{ +} + +void TestAbstractXmlReceiver::attribute(const QXmlName &name, const QStringRef &value) +{ + Q_UNUSED(name); + receivedFromAttribute = value.toString(); +} + +void TestAbstractXmlReceiver::comment(const QString &value) +{ + Q_UNUSED(value); +} + +void TestAbstractXmlReceiver::characters(const QStringRef &value) +{ + receivedFromCharacters = value.toString(); +} + +void TestAbstractXmlReceiver::startDocument() +{ +} + +void TestAbstractXmlReceiver::endDocument() +{ +} + +void TestAbstractXmlReceiver::processingInstruction(const QXmlName &name, const QString &data) +{ + Q_UNUSED(name); + Q_UNUSED(data); +} + +void TestAbstractXmlReceiver::atomicValue(const QVariant &val) +{ + Q_UNUSED(val); +} + +void TestAbstractXmlReceiver::namespaceBinding(const QXmlName &name) +{ + Q_UNUSED(name); +} + +void TestAbstractXmlReceiver::startOfSequence() +{ +} + +void TestAbstractXmlReceiver::endOfSequence() +{ +} + +#endif diff --git a/tests/auto/qabstractxmlreceiver/qabstractxmlreceiver.pro b/tests/auto/qabstractxmlreceiver/qabstractxmlreceiver.pro new file mode 100644 index 0000000..2bd2ba4 --- /dev/null +++ b/tests/auto/qabstractxmlreceiver/qabstractxmlreceiver.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qabstractxmlreceiver.cpp +QT = core + +include (../xmlpatterns.pri) diff --git a/tests/auto/qabstractxmlreceiver/tst_qabstractxmlreceiver.cpp b/tests/auto/qabstractxmlreceiver/tst_qabstractxmlreceiver.cpp new file mode 100644 index 0000000..ad76750 --- /dev/null +++ b/tests/auto/qabstractxmlreceiver/tst_qabstractxmlreceiver.cpp @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +#include +#include + +#include "TestAbstractXmlReceiver.h" + +/*! + \class tst_QAbstractXmlReceiver + \internal + \since 4.4 + \brief Tests class QXmlNamePool. + + */ +class tst_QAbstractXmlReceiver : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void attributeQXmlNameStringRef() const; + void charactersStringRef() const; +}; + +void tst_QAbstractXmlReceiver::attributeQXmlNameStringRef() const +{ + TestAbstractXmlReceiver receiver; + + const QString input(QLatin1String("input")); + + QCOMPARE(receiver.receivedFromAttribute, QString()); + receiver.attribute(QXmlName(), QStringRef(&input)); + QCOMPARE(receiver.receivedFromAttribute, QString::fromLatin1("input")); +} + +void tst_QAbstractXmlReceiver::charactersStringRef() const +{ + TestAbstractXmlReceiver receiver; + + const QString input(QLatin1String("input")); + + QCOMPARE(receiver.receivedFromCharacters, QString()); + receiver.characters(QStringRef(&input)); + QCOMPARE(receiver.receivedFromCharacters, QString::fromLatin1("input")); +} + +QTEST_MAIN(tst_QAbstractXmlReceiver) + +#include "tst_qabstractxmlreceiver.moc" +#else +QTEST_NOOP_MAIN +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qapplicationargumentparser/.gitignore b/tests/auto/qapplicationargumentparser/.gitignore new file mode 100644 index 0000000..8e55e2e --- /dev/null +++ b/tests/auto/qapplicationargumentparser/.gitignore @@ -0,0 +1,3 @@ +tst_qapplicationargumentparser +tst_qapplicationargumentparser.moc +tst_qapplicationargumentparser.o diff --git a/tests/auto/qapplicationargumentparser/qapplicationargumentparser.pro b/tests/auto/qapplicationargumentparser/qapplicationargumentparser.pro new file mode 100644 index 0000000..df32e92 --- /dev/null +++ b/tests/auto/qapplicationargumentparser/qapplicationargumentparser.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +SOURCES += tst_qapplicationargumentparser.cpp \ + ../../../tools/xmlpatterns/qapplicationargument.cpp \ + ../../../tools/xmlpatterns/qapplicationargumentparser.cpp +QT -= gui +INCLUDEPATH += $$QT_SOURCE_TREE/tools/xmlpatterns/ diff --git a/tests/auto/qapplicationargumentparser/tst_qapplicationargumentparser.cpp b/tests/auto/qapplicationargumentparser/tst_qapplicationargumentparser.cpp new file mode 100644 index 0000000..bf0ecea --- /dev/null +++ b/tests/auto/qapplicationargumentparser/tst_qapplicationargumentparser.cpp @@ -0,0 +1,160 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#include "qapplicationargumentparser_p.h" +#include "qapplicationargument_p.h" +#include + +Q_DECLARE_METATYPE(QList); +Q_DECLARE_METATYPE(QApplicationArgumentParser::ExitCode); + +/*! + \class tst_QApplicationArgumentParser + \brief The class tst_QApplicationArgumentParser tests class QApplicationArgumentParser. + \internal + \since 4.5 + +*/ +class tst_QApplicationArgumentParser : public QObject +{ + Q_OBJECT +private slots: + void negativeTest() const; + void negativeTest_data() const; + void mandatoryArguments() const; + void mandatoryArguments_data() const; +}; + +/* +Comments from notes.txt: + +Different arg types: +* -name +* -name + +Both of these types in addition have a cardinality. For instance: +-name -name -name +-name value1 -name value2 -name value3 + +Possible Tests +------------------- + ./foo -ab -cd - + ./foo -ab -cd - - - + ./foo -ab -cd - input1 input + ./foo -help - + ./foo - -help + + + // -switch has upper limit of 2 + ./foo -switch -switch -switch + + // -switch has upper limit of 1 + ./foo -switch -switch + + // -switch has lower limit of 1 + ./foo + + ./foo -switch cruft -switch + ./foo -option value1 cruft -option value2 + ./foo -option value1 cruft cruft -option value2 + ./foo -option value1 cruft cruft cruft -option value2 + ./foo -option -option -option2 -option2 + ./foo -option + ./foo -option -option -option2 + ./foo -option - + ./foo -option - - +*/ + +void tst_QApplicationArgumentParser::negativeTest() const +{ +} + +void tst_QApplicationArgumentParser::negativeTest_data() const +{ + QTest::addColumn("inputArgs"); + QTest::addColumn("expectedExitCode"); + QTest::addColumn("expectedStderr"); + QTest::addColumn >("declarations"); +} + +void tst_QApplicationArgumentParser::mandatoryArguments() const +{ + QFETCH(QStringList, inputArgs); + QFETCH(QList, inputDecls); + + QApplicationArgumentParser parser(inputArgs); + parser.setDeclaredArguments(inputDecls); + + QVERIFY(!parser.parse()); + QCOMPARE(parser.exitCode(), QApplicationArgumentParser::ParseError); +} + +void tst_QApplicationArgumentParser::mandatoryArguments_data() const +{ + QTest::addColumn("inputArgs"); + QTest::addColumn >("inputDecls"); + + { + QStringList in; + in << "./appName"; + + QList decls; + QApplicationArgument arg1("name", QString(), QVariant::String); + arg1.setMinimumOccurrence(1); + decls.append(arg1); + + QTest::newRow("A single, named, argument") << in << decls; + } +} + +QTEST_APPLESS_MAIN(tst_QApplicationArgumentParser) +#include "tst_qapplicationargumentparser.moc" diff --git a/tests/auto/qautoptr/.gitignore b/tests/auto/qautoptr/.gitignore new file mode 100644 index 0000000..d52def6 --- /dev/null +++ b/tests/auto/qautoptr/.gitignore @@ -0,0 +1 @@ +tst_qautoptr diff --git a/tests/auto/qautoptr/qautoptr.pro b/tests/auto/qautoptr/qautoptr.pro new file mode 100644 index 0000000..b0c574f --- /dev/null +++ b/tests/auto/qautoptr/qautoptr.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qautoptr.cpp +QT = core +include(../xmlpatterns.pri) diff --git a/tests/auto/qautoptr/tst_qautoptr.cpp b/tests/auto/qautoptr/tst_qautoptr.cpp new file mode 100644 index 0000000..25776e5 --- /dev/null +++ b/tests/auto/qautoptr/tst_qautoptr.cpp @@ -0,0 +1,339 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include "private/qautoptr_p.h" + +using namespace QPatternist; + +/*! + \class tst_QAutoPtr + \internal + \since 4.4 + \brief Tests class QAutoPtr. + + */ +class tst_QAutoPtr : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void defaultConstructor() const; + void copyConstructor() const; + void assignmentOperator() const; + void data() const; + void dataSignature() const; + void release() const; + void reset() const; + void onConstObject() const; + void dereferenceOperator() const; + void pointerOperator() const; + void pointerOperatorSignature() const; + void negationOperator() const; + void negationOperatorSignature() const; + void operatorBool() const; + void operatorBoolSignature() const; + /* + TODO: + - Test all the type hierarchy operators/constructors + - No code is at all calling AutoPtr& operator=(AutoPtrRef ref) currently. Is it needed? + - No code is at all calling AutoPtrRef stuff. Is it needed? + - Equalness/unequalness operators? + - Test AutoPtr& operator=(AutoPtrRef ref) + */ +}; + +void tst_QAutoPtr::defaultConstructor() const +{ + /* Check that the members, one, is correctly initialized. */ + AutoPtr p; + QCOMPARE(p.data(), static_cast(0)); +} + +void tst_QAutoPtr::copyConstructor() const +{ + /* Copy default constructed value. */ + { + AutoPtr p1; + AutoPtr p2(p1); + QCOMPARE(p2.data(), static_cast(0)); + } + + /* Copy active value. */ + { + AutoPtr p1(new int(7)); + AutoPtr p2(p1); + QCOMPARE(*p2.data(), 7); + QCOMPARE(p1.data(), static_cast(0)); + } +} + +void tst_QAutoPtr::assignmentOperator() const +{ + /* Assign to self, a default constructed value. */ + { + AutoPtr p1; + p1 = p1; + p1 = p1; + p1 = p1; + } + + /* Assign to a default constructed value. */ + { + AutoPtr p1; + AutoPtr p2; + p1 = p2; + p1 = p2; + p1 = p2; + } + + /* Assign to an active value. */ + { + AutoPtr p1(new int(6)); + AutoPtr p2; + p1 = p2; + p1 = p2; + p1 = p2; + } + + /* Assign from an active value. */ + { + int *const ptr = new int(6); + AutoPtr p1(ptr); + AutoPtr p2; + p2 = p1; + + QCOMPARE(p2.data(), ptr); + /* p1 should have reset. */ + QCOMPARE(p1.data(), static_cast(0)); + } +} + +void tst_QAutoPtr::data() const +{ + AutoPtr p; + + QCOMPARE(p.data(), static_cast(0)); +} + +void tst_QAutoPtr::dataSignature() const +{ + const AutoPtr p; + /* data() should be const. */ + p.data(); +} + +void tst_QAutoPtr::release() const +{ + /* Call release() on a default constructed value. */ + { + AutoPtr p; + QCOMPARE(p.release(), static_cast(0)); + } + + /* Call release() on an active value, it shouldn't delete. */ + { + int value = 3; + AutoPtr p(&value); + p.release(); + } +} + +void tst_QAutoPtr::reset() const +{ + /* Call reset() on a default constructed value. */ + { + AutoPtr p; + p.reset(); + } + + /* Call reset() on an active value. */ + { + AutoPtr p(new int(3)); + p.reset(); + } + + /* Call reset() with a value, on an active value. */ + { + AutoPtr p(new int(3)); + + int *const value = new int(9); + p.reset(value); + QCOMPARE(*p.data(), 9); + } + + /* Call reset() with a value, on default constructed value. */ + { + AutoPtr p; + + int *const value = new int(9); + p.reset(value); + QCOMPARE(*p.data(), 9); + } +} + +void tst_QAutoPtr::onConstObject() const +{ + /* Instansiate on a const object. */ + AutoPtr p(new int(3)); + p.reset(); + p.data(); + p.release(); + p = p; +} + +class AbstractClass +{ +public: + virtual ~AbstractClass() + { + } + + virtual int member() const = 0; +}; + +class SubClass : public AbstractClass +{ +public: + virtual int member() const + { + return 5; + } +}; + +void tst_QAutoPtr::dereferenceOperator() const +{ + /* Dereference a basic value. */ + { + int value = 5; + AutoPtr p(&value); + + const int value2 = *p; + QCOMPARE(value2, 5); + p.release(); + } + + /* Dereference a pointer to an abstract class. This verifies + * that the operator returns a reference, when compiling + * with MSVC 2005. */ + { + AutoPtr p(new SubClass()); + + QCOMPARE((*p).member(), 5); + } +} + +class AnyForm +{ +public: + int value; +}; + +void tst_QAutoPtr::pointerOperator() const +{ + AnyForm af; + af.value = 5; + AutoPtr p(&af); + + QCOMPARE(p->value, 5); + p.release(); +} + +void tst_QAutoPtr::pointerOperatorSignature() const +{ + /* The operator should be const. */ + const AutoPtr p(new AnyForm); + p->value = 5; + + QVERIFY(p->value); +} + +void tst_QAutoPtr::negationOperator() const +{ + /* Invoke on default constructed value. */ + { + AutoPtr p; + QVERIFY(!p); + } +} + +void tst_QAutoPtr::negationOperatorSignature() const +{ + /* The signature should be const. */ + const AutoPtr p; + QVERIFY(!p); + + /* The return value should be bool. */ + QCOMPARE(!p, true); +} + +void tst_QAutoPtr::operatorBool() const +{ + /* Invoke on default constructed value. */ + { + AutoPtr p; + QCOMPARE(bool(p), false); + } + + /* Invoke on active value. */ + { + AutoPtr p(new int(3)); + QVERIFY(p); + } +} + +void tst_QAutoPtr::operatorBoolSignature() const +{ + /* The signature should be const. */ + const AutoPtr p; + QCOMPARE(bool(p), false); +} + +QTEST_MAIN(tst_QAutoPtr) + +#include "tst_qautoptr.moc" +#else +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qsimplexmlnodemodel/.gitignore b/tests/auto/qsimplexmlnodemodel/.gitignore new file mode 100644 index 0000000..e29cd6f --- /dev/null +++ b/tests/auto/qsimplexmlnodemodel/.gitignore @@ -0,0 +1 @@ +tst_qsimplexmlnodemodel diff --git a/tests/auto/qsimplexmlnodemodel/TestSimpleNodeModel.h b/tests/auto/qsimplexmlnodemodel/TestSimpleNodeModel.h new file mode 100644 index 0000000..983ff4e --- /dev/null +++ b/tests/auto/qsimplexmlnodemodel/TestSimpleNodeModel.h @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef TestSimpleNodeModel_h +#define TestSimpleNodeModel_h + +#include +#include + +class TestSimpleNodeModel : public QSimpleXmlNodeModel +{ +public: + + TestSimpleNodeModel(const QXmlNamePool &np); + + QXmlNodeModelIndex root() const; + + /*! + This function is made public, such that we can test its const qualification. + */ + virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis axis, + const QXmlNodeModelIndex &origin) const; + + /*! + This function is made public, such that we can test its const qualification. + */ + virtual QVector attributes(const QXmlNodeModelIndex&) const; + + virtual QUrl documentUri(const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex&, + const QXmlNodeModelIndex&) const; + virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex&) const; + virtual QXmlName name(const QXmlNodeModelIndex&) const; + virtual QVariant typedValue(const QXmlNodeModelIndex&) const; +}; + +TestSimpleNodeModel::TestSimpleNodeModel(const QXmlNamePool &np) : QSimpleXmlNodeModel(np) +{ + + /* If this fails to compile, QSimpleXmlNodeModel::namePool() + * does not return a mutable reference. */ + QXmlName(namePool(), QLatin1String("name")); +} + +QXmlNodeModelIndex TestSimpleNodeModel::root() const +{ + return createIndex(qint64(0), 1); +} + +QXmlNodeModelIndex TestSimpleNodeModel::nextFromSimpleAxis(SimpleAxis, const QXmlNodeModelIndex &) const +{ + return QXmlNodeModelIndex(); +} + +QVector TestSimpleNodeModel::attributes(const QXmlNodeModelIndex&) const +{ + return QVector(); +} + +QUrl TestSimpleNodeModel::documentUri(const QXmlNodeModelIndex &) const +{ + return QUrl(); +} + +QXmlNodeModelIndex::NodeKind TestSimpleNodeModel::kind(const QXmlNodeModelIndex &) const +{ + return QXmlNodeModelIndex::Element; +} + +QXmlNodeModelIndex::DocumentOrder TestSimpleNodeModel::compareOrder(const QXmlNodeModelIndex &, + const QXmlNodeModelIndex &) const +{ + return QXmlNodeModelIndex::Precedes; +} + +QXmlNodeModelIndex TestSimpleNodeModel::root(const QXmlNodeModelIndex &) const +{ + return QXmlNodeModelIndex(); +} + +QXmlName TestSimpleNodeModel::name(const QXmlNodeModelIndex &) const +{ + QXmlNamePool np(namePool()); + return QXmlName(np, QLatin1String("nodeName")); +} + +QVariant TestSimpleNodeModel::typedValue(const QXmlNodeModelIndex&) const +{ + return QVariant(); +} + +#endif diff --git a/tests/auto/qsimplexmlnodemodel/qsimplexmlnodemodel.pro b/tests/auto/qsimplexmlnodemodel/qsimplexmlnodemodel.pro new file mode 100644 index 0000000..f1cd455 --- /dev/null +++ b/tests/auto/qsimplexmlnodemodel/qsimplexmlnodemodel.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qsimplexmlnodemodel.cpp +HEADERS += TestSimpleNodeModel.h +include (../xmlpatterns.pri) diff --git a/tests/auto/qsimplexmlnodemodel/tst_qsimplexmlnodemodel.cpp b/tests/auto/qsimplexmlnodemodel/tst_qsimplexmlnodemodel.cpp new file mode 100644 index 0000000..6754fec --- /dev/null +++ b/tests/auto/qsimplexmlnodemodel/tst_qsimplexmlnodemodel.cpp @@ -0,0 +1,172 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include +#include +#include +#include +#include + +#include "TestSimpleNodeModel.h" + +/*! + \class tst_QSimpleXmlNodeModel + \internal + \since 4.4 + \brief Tests class QSimpleXmlNodeModel. + */ +class tst_QSimpleXmlNodeModel : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void namePool() const; + void namePoolIsReference() const; + void defaultConstructor() const; + void objectSize() const; + void constCorrectness() const; + void stringValue() const; +}; + +void tst_QSimpleXmlNodeModel::namePool() const +{ + /* Check that the name pool we pass in, is what actually is returned. */ + QXmlNamePool np; + const QXmlName name(np, QLatin1String("localName"), + QLatin1String("http://example.com/XYZ"), + QLatin1String("prefix432")); + TestSimpleNodeModel model(np); + const QXmlNamePool np2(model.namePool()); + + /* If it's a bug, this will more or less crash. */ + QCOMPARE(name.namespaceUri(np2), QString::fromLatin1("http://example.com/XYZ")); + QCOMPARE(name.localName(np2), QString::fromLatin1("localName")); + QCOMPARE(name.prefix(np2), QString::fromLatin1("prefix432")); +} + +void tst_QSimpleXmlNodeModel::namePoolIsReference() const +{ + /* Test is placed in TestSimpleNodeModel.h:~50. */ +} + +void tst_QSimpleXmlNodeModel::defaultConstructor() const +{ + QXmlNamePool np; +} + +void tst_QSimpleXmlNodeModel::objectSize() const +{ + /* We shouldn't have added any members. */ + QCOMPARE(sizeof(QSimpleXmlNodeModel), sizeof(QAbstractXmlNodeModel)); +} + +void tst_QSimpleXmlNodeModel::constCorrectness() const +{ + QXmlNamePool np; + const TestSimpleNodeModel instance(np); + + instance.nextFromSimpleAxis(QSimpleXmlNodeModel::Parent, QXmlNodeModelIndex()); + instance.attributes(QXmlNodeModelIndex()); + + instance.namePool(); +} + +/*! + Verify that if QAbstractXmlNodeModel::typedValue() return a null + QVariant, it is treated as that the node has no typed value. + + This verifies the default implementation of QSimpleXmlNodeModel::stringValue(). + */ +void tst_QSimpleXmlNodeModel::stringValue() const +{ + class TypedModel : public TestSimpleNodeModel + { + public: + TypedModel(const QXmlNamePool &np) : TestSimpleNodeModel(np) + { + } + + virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex &) const + { + return QXmlNodeModelIndex::Element; + } + + virtual QVariant typedValue(const QXmlNodeModelIndex &) const + { + return QVariant(); + } + + QXmlNodeModelIndex root() const + { + return createIndex(qint64(1)); + } + }; + + QXmlNamePool np; + TypedModel model(np); + + QXmlQuery query(np); + query.bindVariable(QLatin1String("node"), model.root()); + query.setQuery(QLatin1String("declare variable $node external;" + "string($node), data($node)")); + + QByteArray output; + QBuffer buffer(&output); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + QVERIFY(query.isValid()); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + QVERIFY(output.isEmpty()); +} + +QTEST_MAIN(tst_QSimpleXmlNodeModel) + +#include "tst_qsimplexmlnodemodel.moc" +#else //QTEST_XMLPATTERNS +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qsourcelocation/.gitignore b/tests/auto/qsourcelocation/.gitignore new file mode 100644 index 0000000..27242f6 --- /dev/null +++ b/tests/auto/qsourcelocation/.gitignore @@ -0,0 +1 @@ +tst_qsourcelocation diff --git a/tests/auto/qsourcelocation/qsourcelocation.pro b/tests/auto/qsourcelocation/qsourcelocation.pro new file mode 100644 index 0000000..3cfcb46 --- /dev/null +++ b/tests/auto/qsourcelocation/qsourcelocation.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qsourcelocation.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/qsourcelocation/tst_qsourcelocation.cpp b/tests/auto/qsourcelocation/tst_qsourcelocation.cpp new file mode 100644 index 0000000..58320b1 --- /dev/null +++ b/tests/auto/qsourcelocation/tst_qsourcelocation.cpp @@ -0,0 +1,398 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +#include + +/* We expect these headers to be available. */ +#include +#include +#include +#include + +/*! + \class tst_QSourceLocation + \internal + \since 4.4 + \brief Tests QSourceLocation + + */ +class tst_QSourceLocation : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void isNull() const; + void defaultConstructor() const; + void valueConstructor() const; + void valueConstructorDefaultArguments() const; + void copyConstructor() const; + void assignmentOperator() const; + void equalnessOperator() const; + void equalnessOperator_data() const; + void defaultValues() const; + void constCorrectness() const; + void objectSize() const; + void setLine() const; + void setColumn() const; + void setUri() const; + void withinQVariant() const; + void debugStream() const; + void debugStream_data() const; + void withQHash() const; +}; + +/*! + We allocate a couple to catch reference counting bugs. + */ +void tst_QSourceLocation::defaultConstructor() const +{ + QSourceLocation def1; + QSourceLocation def2; + QSourceLocation def3; +} + +void tst_QSourceLocation::copyConstructor() const +{ + { + QSourceLocation def; + QSourceLocation copy(def); + + QCOMPARE(def.line(), qint64(-1)); + QCOMPARE(def.column(), qint64(-1)); + QCOMPARE(def.uri(), QUrl()); + } + + { + QSourceLocation val; + val.setLine(5); + val.setColumn(600); + val.setUri(QUrl(QLatin1String("http://example.com/"))); + + QSourceLocation copy(val); + QCOMPARE(copy.line(), qint64(5)); + QCOMPARE(copy.column(), qint64(600)); + QCOMPARE(copy.uri(), QUrl(QLatin1String("http://example.com/"))); + } + + { + /* Construct from a const object. */ + const QSourceLocation val; + const QSourceLocation val2(val); + QCOMPARE(val, val2); + } +} + +void tst_QSourceLocation::valueConstructor() const +{ + const QSourceLocation sl(QUrl(QLatin1String("http://example.com/")), 5, 4); + + QCOMPARE(sl.uri(), QUrl(QLatin1String("http://example.com/"))); + QCOMPARE(sl.line(), qint64(5)); + QCOMPARE(sl.column(), qint64(4)); +} + +void tst_QSourceLocation::valueConstructorDefaultArguments() const +{ + /* The line and column arguments are optional. */ + const QSourceLocation sl(QUrl(QLatin1String("http://example.com/"))); + + QCOMPARE(sl.uri(), QUrl(QLatin1String("http://example.com/"))); + QCOMPARE(sl.line(), qint64(-1)); + QCOMPARE(sl.column(), qint64(-1)); +} + +void tst_QSourceLocation::assignmentOperator() const +{ + /* Assign to self. */ + { + QSourceLocation def; + + def = def; + + QVERIFY(def.isNull()); + QCOMPARE(def.line(), qint64(-1)); + QCOMPARE(def.column(), qint64(-1)); + QCOMPARE(def.uri(), QUrl()); + } + + /* Assign to default constructed object. */ + { + QSourceLocation val; + val.setLine(3); + val.setColumn(4); + val.setUri(QUrl(QLatin1String("http://example.com/2"))); + + QSourceLocation assigned; + assigned = val; + + QCOMPARE(assigned.line(), qint64(3)); + QCOMPARE(assigned.column(), qint64(4)); + QCOMPARE(assigned.uri(), QUrl(QLatin1String("http://example.com/2"))); + } + + /* Assign to modified object. */ + { + QSourceLocation val; + val.setLine(3); + val.setColumn(4); + val.setUri(QUrl(QLatin1String("http://example.com/2"))); + + QSourceLocation assigned; + assigned.setLine(700); + assigned.setColumn(4000); + assigned.setUri(QUrl(QLatin1String("http://example.com/3"))); + + assigned = val; + + QCOMPARE(assigned.line(), qint64(3)); + QCOMPARE(assigned.column(), qint64(4)); + QCOMPARE(assigned.uri(), QUrl(QLatin1String("http://example.com/2"))); + } +} + +/*! + This includes operator!=() + */ +void tst_QSourceLocation::equalnessOperator() const +{ + QFETCH(QSourceLocation, v1); + QFETCH(QSourceLocation, v2); + QFETCH(bool, True); + + QCOMPARE(v1 == v2, True); + QCOMPARE(v1 != v2, True); +} + +void tst_QSourceLocation::equalnessOperator_data() const +{ + QTest::addColumn("v1"); + QTest::addColumn("v2"); + QTest::addColumn("True"); + + { + QTest::newRow("Default constructed values") + << QSourceLocation() + << QSourceLocation() + << true; + } + + { + QSourceLocation modified; + modified.setColumn(4); + + QTest::newRow("Default constructed, against column-modified") + << QSourceLocation() + << modified + << false; + } + + { + QSourceLocation modified; + modified.setLine(5); + + QTest::newRow("Default constructed, against line-modified") + << QSourceLocation() + << modified + << false; + } + + { + QSourceLocation modified; + modified.setUri(QUrl(QLatin1String("http://example.com/"))); + + QTest::newRow("Default constructed, against line-modified") + << QSourceLocation() + << modified + << false; + } + + { + QSourceLocation modified; + modified.setUri(QUrl(QLatin1String("http://example.com/"))); + modified.setLine(5); + modified.setColumn(4); + + QTest::newRow("Default constructed, against all-modified") + << QSourceLocation() + << modified + << false; + } +} + +void tst_QSourceLocation::defaultValues() const +{ + QSourceLocation def; + + QCOMPARE(def.line(), qint64(-1)); + QCOMPARE(def.column(), qint64(-1)); + QCOMPARE(def.uri(), QUrl()); +} + +/*! + Call functions that must be const. + */ +void tst_QSourceLocation::constCorrectness() const +{ + const QSourceLocation def; + + def.line(); + def.column(); + def.uri(); + def.isNull(); + + const QSourceLocation def2; + + /* Equalness operator. */ + QVERIFY(def == def2); + QCOMPARE(def, def2); + + /* Inverse equalness operator. */ + QVERIFY(def != def2); +} + +void tst_QSourceLocation::objectSize() const +{ + /* We can't compare the two values. QSourceLocation is 24 on some Mac OS X, while + * the other operand evaluates to 20. */ + QVERIFY(sizeof(QSourceLocation) >= sizeof(QUrl) + sizeof(qint64) * 2); +} + +void tst_QSourceLocation::isNull() const +{ + { + QSourceLocation def; + QVERIFY(def.isNull()); + + def.setColumn(4); + QVERIFY(def.isNull()); + } + + { + QSourceLocation def2; + def2.setLine(4); + QVERIFY(def2.isNull()); + } + + { + QSourceLocation def3; + def3.setUri(QUrl(QLatin1String("http://example.com/"))); + QVERIFY(!def3.isNull()); + } +} + +void tst_QSourceLocation::setLine() const +{ + QSourceLocation sl; + sl.setLine(8); + QCOMPARE(sl.line(), qint64(8)); +} + +void tst_QSourceLocation::setColumn() const +{ + QSourceLocation sl; + sl.setColumn(5); + QCOMPARE(sl.column(), qint64(5)); +} + +void tst_QSourceLocation::setUri() const +{ + QSourceLocation sl; + sl.setUri(QUrl(QLatin1String("http://example.com/"))); + QCOMPARE(sl.uri(), QUrl(QLatin1String("http://example.com/"))); +} + +void tst_QSourceLocation::withinQVariant() const +{ + QSourceLocation val; + const QVariant variant(qVariantFromValue(val)); + QSourceLocation val2(qVariantValue(variant)); +} + +void tst_QSourceLocation::debugStream() const +{ + QFETCH(QSourceLocation, location); + QFETCH(QString, expected); + + QString actual; + QDebug stream(&actual); + +#ifndef QT_NO_DEBUG_STREAM + stream << location; + QCOMPARE(actual, expected); +#endif +} + +void tst_QSourceLocation::debugStream_data() const +{ + QTest::addColumn("location"); + QTest::addColumn("expected"); + + { + QTest::newRow("Default constructed instance") + << QSourceLocation() + << QString::fromLatin1("QSourceLocation( QUrl( \"\" ) , line: -1 , column: -1 ) "); + } + + { + QSourceLocation location(QUrl(QLatin1String("http://example.com/")), 4, 5); + QTest::newRow("Properties set") + << location + << QString::fromLatin1("QSourceLocation( QUrl( \"http://example.com/\" ) , line: 4 , column: 5 ) "); + } +} + +void tst_QSourceLocation::withQHash() const +{ + QCOMPARE(qHash(QSourceLocation()), qHash(QSourceLocation())); +} + +QTEST_MAIN(tst_QSourceLocation) + +#include "tst_qsourcelocation.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qxmlformatter/.gitignore b/tests/auto/qxmlformatter/.gitignore new file mode 100644 index 0000000..d868a74 --- /dev/null +++ b/tests/auto/qxmlformatter/.gitignore @@ -0,0 +1 @@ +tst_qxmlformatter diff --git a/tests/auto/qxmlformatter/baselines/.gitattributes b/tests/auto/qxmlformatter/baselines/.gitattributes new file mode 100644 index 0000000..de08d51 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/.gitattributes @@ -0,0 +1 @@ +*.xml -crlf Unset diff --git a/tests/auto/qxmlformatter/baselines/K2-DirectConElemContent-46.xml b/tests/auto/qxmlformatter/baselines/K2-DirectConElemContent-46.xml new file mode 100644 index 0000000..742cfdb --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/K2-DirectConElemContent-46.xml @@ -0,0 +1 @@ +12 diff --git a/tests/auto/qxmlformatter/baselines/adjacentNodes.xml b/tests/auto/qxmlformatter/baselines/adjacentNodes.xml new file mode 100644 index 0000000..a263c75 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/adjacentNodes.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tests/auto/qxmlformatter/baselines/classExample.xml b/tests/auto/qxmlformatter/baselines/classExample.xml new file mode 100644 index 0000000..5c833c6 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/classExample.xml @@ -0,0 +1,5 @@ + + + +

Some Text

+
diff --git a/tests/auto/qxmlformatter/baselines/documentElementWithWS.xml b/tests/auto/qxmlformatter/baselines/documentElementWithWS.xml new file mode 100644 index 0000000..69d62f2 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/documentElementWithWS.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/qxmlformatter/baselines/documentNodes.xml b/tests/auto/qxmlformatter/baselines/documentNodes.xml new file mode 100644 index 0000000..11dc672 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/documentNodes.xml @@ -0,0 +1,3 @@ + + + diff --git a/tests/auto/qxmlformatter/baselines/elementsWithWS.xml b/tests/auto/qxmlformatter/baselines/elementsWithWS.xml new file mode 100644 index 0000000..1c5af5b --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/elementsWithWS.xml @@ -0,0 +1,8 @@ + + someText + + somee text + + + + diff --git a/tests/auto/qxmlformatter/baselines/emptySequence.xml b/tests/auto/qxmlformatter/baselines/emptySequence.xml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/emptySequence.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/qxmlformatter/baselines/indentedAdjacentNodes.xml b/tests/auto/qxmlformatter/baselines/indentedAdjacentNodes.xml new file mode 100644 index 0000000..a263c75 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/indentedAdjacentNodes.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tests/auto/qxmlformatter/baselines/indentedMixedContent.xml b/tests/auto/qxmlformatter/baselines/indentedMixedContent.xml new file mode 100644 index 0000000..9a9729b --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/indentedMixedContent.xml @@ -0,0 +1,20 @@ + + +

char1 +

+

+ char2

+

char3char3

+

+ + char 4 + + +

char1 +

+

+ char2

+

char3char3

+ +

+
diff --git a/tests/auto/qxmlformatter/baselines/mixedContent.xml b/tests/auto/qxmlformatter/baselines/mixedContent.xml new file mode 100644 index 0000000..915cd92 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/mixedContent.xml @@ -0,0 +1,17 @@ + +

char1 +

+

+ char2

+

char3char3

+

+ char4 + +

char1 +

+

+ char2

+

char3char3

+ +

+
diff --git a/tests/auto/qxmlformatter/baselines/mixedTopLevelContent.xml b/tests/auto/qxmlformatter/baselines/mixedTopLevelContent.xml new file mode 100644 index 0000000..ff072e5 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/mixedTopLevelContent.xml @@ -0,0 +1 @@ +1 2 34567 diff --git a/tests/auto/qxmlformatter/baselines/nodesAndWhitespaceAtomics.xml b/tests/auto/qxmlformatter/baselines/nodesAndWhitespaceAtomics.xml new file mode 100644 index 0000000..2c660d5 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/nodesAndWhitespaceAtomics.xml @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/qxmlformatter/baselines/onlyDocumentNode.xml b/tests/auto/qxmlformatter/baselines/onlyDocumentNode.xml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/onlyDocumentNode.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/qxmlformatter/baselines/prolog.xml b/tests/auto/qxmlformatter/baselines/prolog.xml new file mode 100644 index 0000000..1b48c58 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/prolog.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/auto/qxmlformatter/baselines/simpleDocument.xml b/tests/auto/qxmlformatter/baselines/simpleDocument.xml new file mode 100644 index 0000000..5e64f7b --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/simpleDocument.xml @@ -0,0 +1,3 @@ + +We try to simulate 189611 + diff --git a/tests/auto/qxmlformatter/baselines/singleElement.xml b/tests/auto/qxmlformatter/baselines/singleElement.xml new file mode 100644 index 0000000..c859d31 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/singleElement.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/qxmlformatter/baselines/singleTextNode.xml b/tests/auto/qxmlformatter/baselines/singleTextNode.xml new file mode 100644 index 0000000..47a943b --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/singleTextNode.xml @@ -0,0 +1 @@ +a text node diff --git a/tests/auto/qxmlformatter/baselines/textNodeAtomicValue.xml b/tests/auto/qxmlformatter/baselines/textNodeAtomicValue.xml new file mode 100644 index 0000000..1563439 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/textNodeAtomicValue.xml @@ -0,0 +1 @@ +a3 diff --git a/tests/auto/qxmlformatter/baselines/threeAtomics.xml b/tests/auto/qxmlformatter/baselines/threeAtomics.xml new file mode 100644 index 0000000..dcee688 --- /dev/null +++ b/tests/auto/qxmlformatter/baselines/threeAtomics.xml @@ -0,0 +1 @@ +1 2 Bam 3000 10 4 diff --git a/tests/auto/qxmlformatter/input/K2-DirectConElemContent-46.xq b/tests/auto/qxmlformatter/input/K2-DirectConElemContent-46.xq new file mode 100644 index 0000000..b4ffb53 --- /dev/null +++ b/tests/auto/qxmlformatter/input/K2-DirectConElemContent-46.xq @@ -0,0 +1 @@ +{1}{text{()}}{2} diff --git a/tests/auto/qxmlformatter/input/adjacentNodes.xml b/tests/auto/qxmlformatter/input/adjacentNodes.xml new file mode 100644 index 0000000..a263c75 --- /dev/null +++ b/tests/auto/qxmlformatter/input/adjacentNodes.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tests/auto/qxmlformatter/input/adjacentNodes.xq b/tests/auto/qxmlformatter/input/adjacentNodes.xq new file mode 100644 index 0000000..44605fb --- /dev/null +++ b/tests/auto/qxmlformatter/input/adjacentNodes.xq @@ -0,0 +1 @@ +doc("adjacentNodes.xml") diff --git a/tests/auto/qxmlformatter/input/classExample.xml b/tests/auto/qxmlformatter/input/classExample.xml new file mode 100644 index 0000000..b3321f2 --- /dev/null +++ b/tests/auto/qxmlformatter/input/classExample.xml @@ -0,0 +1 @@ +

Some Text

diff --git a/tests/auto/qxmlformatter/input/classExample.xq b/tests/auto/qxmlformatter/input/classExample.xq new file mode 100644 index 0000000..bb10fc0 --- /dev/null +++ b/tests/auto/qxmlformatter/input/classExample.xq @@ -0,0 +1 @@ +doc("classExample.xml") diff --git a/tests/auto/qxmlformatter/input/documentElementWithWS.xml b/tests/auto/qxmlformatter/input/documentElementWithWS.xml new file mode 100644 index 0000000..636923c --- /dev/null +++ b/tests/auto/qxmlformatter/input/documentElementWithWS.xml @@ -0,0 +1,2 @@ + + diff --git a/tests/auto/qxmlformatter/input/documentElementWithWS.xq b/tests/auto/qxmlformatter/input/documentElementWithWS.xq new file mode 100644 index 0000000..cfa5fd6 --- /dev/null +++ b/tests/auto/qxmlformatter/input/documentElementWithWS.xq @@ -0,0 +1 @@ +doc('documentElementWithWS.xml') diff --git a/tests/auto/qxmlformatter/input/documentNodes.xq b/tests/auto/qxmlformatter/input/documentNodes.xq new file mode 100644 index 0000000..fd8211b --- /dev/null +++ b/tests/auto/qxmlformatter/input/documentNodes.xq @@ -0,0 +1,7 @@ +document{()}, +document{()}, +document{()}, +document{}, +document{}, +document{}, +document{()} diff --git a/tests/auto/qxmlformatter/input/elementsWithWS.xml b/tests/auto/qxmlformatter/input/elementsWithWS.xml new file mode 100644 index 0000000..7b3e9a3 --- /dev/null +++ b/tests/auto/qxmlformatter/input/elementsWithWS.xml @@ -0,0 +1,12 @@ + + someText + + somee text + + + + + + + + diff --git a/tests/auto/qxmlformatter/input/elementsWithWS.xq b/tests/auto/qxmlformatter/input/elementsWithWS.xq new file mode 100644 index 0000000..6b3bffb --- /dev/null +++ b/tests/auto/qxmlformatter/input/elementsWithWS.xq @@ -0,0 +1 @@ +doc('elementsWithWS.xml') diff --git a/tests/auto/qxmlformatter/input/emptySequence.xq b/tests/auto/qxmlformatter/input/emptySequence.xq new file mode 100644 index 0000000..1418a72 --- /dev/null +++ b/tests/auto/qxmlformatter/input/emptySequence.xq @@ -0,0 +1,2 @@ +(: This query simply evaluate to an empty sequence. :) +() diff --git a/tests/auto/qxmlformatter/input/indentedAdjacentNodes.xml b/tests/auto/qxmlformatter/input/indentedAdjacentNodes.xml new file mode 100644 index 0000000..a263c75 --- /dev/null +++ b/tests/auto/qxmlformatter/input/indentedAdjacentNodes.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tests/auto/qxmlformatter/input/indentedAdjacentNodes.xq b/tests/auto/qxmlformatter/input/indentedAdjacentNodes.xq new file mode 100644 index 0000000..201af14 --- /dev/null +++ b/tests/auto/qxmlformatter/input/indentedAdjacentNodes.xq @@ -0,0 +1 @@ +doc("indentedAdjacentNodes.xml") diff --git a/tests/auto/qxmlformatter/input/indentedMixedContent.xml b/tests/auto/qxmlformatter/input/indentedMixedContent.xml new file mode 100644 index 0000000..a0340e6 --- /dev/null +++ b/tests/auto/qxmlformatter/input/indentedMixedContent.xml @@ -0,0 +1,16 @@ + + +

char1

+

char2

+

char3char3

+

+ + char 4 + + +

char1

+

char2

+

char3char3

+
+

+ diff --git a/tests/auto/qxmlformatter/input/indentedMixedContent.xq b/tests/auto/qxmlformatter/input/indentedMixedContent.xq new file mode 100644 index 0000000..6845093 --- /dev/null +++ b/tests/auto/qxmlformatter/input/indentedMixedContent.xq @@ -0,0 +1 @@ +doc("indentedMixedContent.xml") diff --git a/tests/auto/qxmlformatter/input/mixedContent.xml b/tests/auto/qxmlformatter/input/mixedContent.xml new file mode 100644 index 0000000..2987c44 --- /dev/null +++ b/tests/auto/qxmlformatter/input/mixedContent.xml @@ -0,0 +1 @@ +

char1

char2

char3char3

char4

char1

char2

char3char3

diff --git a/tests/auto/qxmlformatter/input/mixedContent.xq b/tests/auto/qxmlformatter/input/mixedContent.xq new file mode 100644 index 0000000..ea56c7b --- /dev/null +++ b/tests/auto/qxmlformatter/input/mixedContent.xq @@ -0,0 +1 @@ +doc("mixedContent.xml") diff --git a/tests/auto/qxmlformatter/input/mixedTopLevelContent.xq b/tests/auto/qxmlformatter/input/mixedTopLevelContent.xq new file mode 100644 index 0000000..d862ec1 --- /dev/null +++ b/tests/auto/qxmlformatter/input/mixedTopLevelContent.xq @@ -0,0 +1,16 @@ +(: Top level atomic values, mixed with elements. :) +1, +2, +3, +, +4, +, +5, + + { + (: This is a bit tricky. The receiver is sent the start of an element and then an atomic value. Must not + be indented. :) + 6 + } +, +7 diff --git a/tests/auto/qxmlformatter/input/nodesAndWhitespaceAtomics.xq b/tests/auto/qxmlformatter/input/nodesAndWhitespaceAtomics.xq new file mode 100644 index 0000000..a4b5674 --- /dev/null +++ b/tests/auto/qxmlformatter/input/nodesAndWhitespaceAtomics.xq @@ -0,0 +1,13 @@ +xs:string(" "), +xs:string(" "), + +{ + xs:string(" "), + , + xs:string(" ") +} +, +xs:string(" "), +xs:string(" "), +, +xs:string(" ") diff --git a/tests/auto/qxmlformatter/input/onlyDocumentNode.xq b/tests/auto/qxmlformatter/input/onlyDocumentNode.xq new file mode 100644 index 0000000..c0c40ee --- /dev/null +++ b/tests/auto/qxmlformatter/input/onlyDocumentNode.xq @@ -0,0 +1 @@ +document{ () } diff --git a/tests/auto/qxmlformatter/input/prolog.xml b/tests/auto/qxmlformatter/input/prolog.xml new file mode 100644 index 0000000..1b48c58 --- /dev/null +++ b/tests/auto/qxmlformatter/input/prolog.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/auto/qxmlformatter/input/prolog.xq b/tests/auto/qxmlformatter/input/prolog.xq new file mode 100644 index 0000000..6f4a72b --- /dev/null +++ b/tests/auto/qxmlformatter/input/prolog.xq @@ -0,0 +1 @@ +doc("prolog.xml") diff --git a/tests/auto/qxmlformatter/input/simpleDocument.xml b/tests/auto/qxmlformatter/input/simpleDocument.xml new file mode 100644 index 0000000..4bea9bd --- /dev/null +++ b/tests/auto/qxmlformatter/input/simpleDocument.xml @@ -0,0 +1,4 @@ + + +We try to simulate 189611 + diff --git a/tests/auto/qxmlformatter/input/simpleDocument.xq b/tests/auto/qxmlformatter/input/simpleDocument.xq new file mode 100644 index 0000000..73702dd --- /dev/null +++ b/tests/auto/qxmlformatter/input/simpleDocument.xq @@ -0,0 +1 @@ +doc("simpleDocument.xml") diff --git a/tests/auto/qxmlformatter/input/singleElement.xml b/tests/auto/qxmlformatter/input/singleElement.xml new file mode 100644 index 0000000..c859d31 --- /dev/null +++ b/tests/auto/qxmlformatter/input/singleElement.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/qxmlformatter/input/singleElement.xq b/tests/auto/qxmlformatter/input/singleElement.xq new file mode 100644 index 0000000..a37691e --- /dev/null +++ b/tests/auto/qxmlformatter/input/singleElement.xq @@ -0,0 +1 @@ +doc("singleElement.xml") diff --git a/tests/auto/qxmlformatter/input/singleTextNode.xq b/tests/auto/qxmlformatter/input/singleTextNode.xq new file mode 100644 index 0000000..5d1e4ff --- /dev/null +++ b/tests/auto/qxmlformatter/input/singleTextNode.xq @@ -0,0 +1 @@ +text{"a text node"} diff --git a/tests/auto/qxmlformatter/input/textNodeAtomicValue.xq b/tests/auto/qxmlformatter/input/textNodeAtomicValue.xq new file mode 100644 index 0000000..b3cc124 --- /dev/null +++ b/tests/auto/qxmlformatter/input/textNodeAtomicValue.xq @@ -0,0 +1 @@ +a{3} diff --git a/tests/auto/qxmlformatter/input/threeAtomics.xq b/tests/auto/qxmlformatter/input/threeAtomics.xq new file mode 100644 index 0000000..e95c3fe --- /dev/null +++ b/tests/auto/qxmlformatter/input/threeAtomics.xq @@ -0,0 +1 @@ +1, 2, "Bam", 3e3, 5 + 5, data(4) diff --git a/tests/auto/qxmlformatter/qxmlformatter.pro b/tests/auto/qxmlformatter/qxmlformatter.pro new file mode 100644 index 0000000..bcab0b4 --- /dev/null +++ b/tests/auto/qxmlformatter/qxmlformatter.pro @@ -0,0 +1,10 @@ +load(qttest_p4) +SOURCES += tst_qxmlformatter.cpp + +include (../xmlpatterns.pri) + +wince*|symbian:{ + addFiles.files = baselines input + addFiles.path = . + DEPLOYMENT += addFiles +} diff --git a/tests/auto/qxmlformatter/tst_qxmlformatter.cpp b/tests/auto/qxmlformatter/tst_qxmlformatter.cpp new file mode 100644 index 0000000..bde5bac --- /dev/null +++ b/tests/auto/qxmlformatter/tst_qxmlformatter.cpp @@ -0,0 +1,205 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +#include +#include + +/*! + \class tst_QXmlFormatter + \internal + \since 4.4 + \brief Tests class QXmlFormatter. + + This test is not intended for testing the engine, but the functionality specific + to the QXmlFormatter class. + + In other words, if you have an engine bug; don't add it here because it won't be + tested properly. Instead add it to the test suite. + + */ +class tst_QXmlFormatter : public QObject +{ + Q_OBJECT + +public: + tst_QXmlFormatter(); + +private Q_SLOTS: + void indentationDepth() const; + void setIndentationDepth() const; + void constCorrectness() const; + void objectSize() const; + void format(); + void format_data() const; + void cleanupTestCase() const; +private: + enum + { + ExpectedTestCount = 19 + }; + + int m_generatedBaselines; +}; + +tst_QXmlFormatter::tst_QXmlFormatter() : m_generatedBaselines(0) +{ +} + +void tst_QXmlFormatter::indentationDepth() const +{ + /* Check default value. */ + { + QXmlQuery query; + QByteArray out; + QBuffer buffer(&out); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + + QXmlFormatter formatter(query, &buffer); + QCOMPARE(formatter.indentationDepth(), 4); + } +} + +void tst_QXmlFormatter::setIndentationDepth() const +{ + QXmlQuery query; + QByteArray out; + QBuffer buffer(&out); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + + QXmlFormatter formatter(query, &buffer); + + formatter.setIndentationDepth(1); + QCOMPARE(formatter.indentationDepth(), 1); + + formatter.setIndentationDepth(654987); + QCOMPARE(formatter.indentationDepth(), 654987); +} + +void tst_QXmlFormatter::constCorrectness() const +{ + QXmlQuery query; + QByteArray out; + QBuffer buffer(&out); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + + const QXmlFormatter formatter(query, &buffer); + + /* These functions should be const. */ + formatter.indentationDepth(); +} + +void tst_QXmlFormatter::objectSize() const +{ + /* We shouldn't add something. */ + QCOMPARE(sizeof(QXmlFormatter), sizeof(QXmlSerializer)); +} + +void tst_QXmlFormatter::format() +{ + QFETCH(QString, testName); + + const QString location(QLatin1String("input/") + testName); + QFile queryFile(location); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + + QXmlQuery query; + query.setQuery(&queryFile, QUrl::fromLocalFile(location)); + + QByteArray formatted; + QBuffer bridge(&formatted); + QVERIFY(bridge.open(QIODevice::WriteOnly)); + + QXmlFormatter formatter(query, &bridge); + + QVERIFY(query.evaluateTo(&formatter)); + + QFile expectedFile(QLatin1String("baselines/") + testName.left(testName.length() - 2) + QString::fromLatin1("xml")); + + if(expectedFile.exists()) + { + QVERIFY(expectedFile.open(QIODevice::ReadOnly)); + const QByteArray expectedOutput(expectedFile.readAll()); + QCOMPARE(formatted, expectedOutput); + } + else + { + ++m_generatedBaselines; + expectedFile.close(); + QVERIFY(expectedFile.open(QIODevice::WriteOnly)); + QCOMPARE(expectedFile.write(formatted), qint64(formatted.size())); + } +} + +void tst_QXmlFormatter::format_data() const +{ + // TODO test with pis and document nodes commencing indentaiton. + // TODO atomic values doesn't trigger characters, it seems. + QTest::addColumn("testName"); + + QDir dir; + dir.cd(QLatin1String("input")); + + const QStringList entries(dir.entryList(QStringList(QLatin1String("*.xq")))); + for(int i = 0; i < entries.count(); ++i) + { + const QString &at = entries.at(i); + QTest::newRow(at.toUtf8().constData()) << at; + } + + QCOMPARE(int(ExpectedTestCount), entries.count()); +} + +void tst_QXmlFormatter::cleanupTestCase() const +{ + QCOMPARE(m_generatedBaselines, 0); +} + +QTEST_MAIN(tst_QXmlFormatter) + +#include "tst_qxmlformatter.moc" +#else +QTEST_NOOP_MAIN +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qxmlitem/.gitignore b/tests/auto/qxmlitem/.gitignore new file mode 100644 index 0000000..a0de965 --- /dev/null +++ b/tests/auto/qxmlitem/.gitignore @@ -0,0 +1 @@ +tst_qxmlitem diff --git a/tests/auto/qxmlitem/qxmlitem.pro b/tests/auto/qxmlitem/qxmlitem.pro new file mode 100644 index 0000000..54c8969 --- /dev/null +++ b/tests/auto/qxmlitem/qxmlitem.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qxmlitem.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlitem/tst_qxmlitem.cpp b/tests/auto/qxmlitem/tst_qxmlitem.cpp new file mode 100644 index 0000000..2cc9cdf --- /dev/null +++ b/tests/auto/qxmlitem/tst_qxmlitem.cpp @@ -0,0 +1,373 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include + +/*! + \class tst_QXmlItem + \internal + \since 4.4 + \brief Tests class QXmlItem. + */ +class tst_QXmlItem : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void defaultConstructor() const; + void copyConstructor() const; + void copyConstructorFromQVariant() const; + void copyConstructorFromQXmlNodeModelIndex() const; + void assignmentOperator() const; + void isNull() const; + void isNode() const; + void isAtomicValue() const; + void toAtomicValue() const; + void toNodeModelIndex() const; + + void objectSize() const; + void constCorrectness() const; + void withinQVariant() const; +}; + +void tst_QXmlItem::defaultConstructor() const +{ + { + QXmlItem(); + } + + { + QXmlItem(); + QXmlItem(); + } + + { + QXmlItem(); + QXmlItem(); + QXmlItem(); + } +} + +void tst_QXmlItem::copyConstructor() const +{ + /* Check that we can copy from a const reference. */ + { + const QXmlItem item; + const QXmlItem copy(item); + } + + /* On a QXmlItem constructed from a null QVariant. */ + { + const QXmlItem item((QVariant())); + const QXmlItem copy(item); + } + + /* On a QXmlItem constructed from a null QXmlNodeModelIndex. */ + { + const QXmlItem item((QXmlNodeModelIndex())); + const QXmlItem copy(item); + } +} + +void tst_QXmlItem::copyConstructorFromQVariant() const +{ + /* Construct & destruct a single value. */ + { + const QXmlItem item(QVariant(QString::fromLatin1("dummy"))); + } + + /* Copy a null QVariant. */ + { + const QXmlItem item((QVariant())); + QVERIFY(item.isNull()); + } + +} + +void tst_QXmlItem::copyConstructorFromQXmlNodeModelIndex() const +{ + // TODO copy a valid model index. + + /* Construct from a null QXmlNodeModelIndex. */ + { + const QXmlItem item((QXmlNodeModelIndex())); + QVERIFY(item.isNull()); + } +} + +void tst_QXmlItem::assignmentOperator() const +{ + /* Assign to self. */ + { + /* With null value. */ + { + QXmlItem item; + item = item; + item = item; + item = item; + item = item; + item = item; + } + + /* With the same atomic value. */ + { + QXmlItem item(QVariant(QString::fromLatin1("dummy"))); + item = item; + item = item; + item = item; + item = item; + item = item; + } + + /* With the same node. */ + { + // TODO + } + + /* With a QXmlItem constructed from a null QVariant. */ + { + QXmlItem item((QVariant())); + item = item; + item = item; + item = item; + item = item; + item = item; + } + + /* With a QXmlItem constructed from a null QXmlNodeModelIndex. */ + { + QXmlItem item((QXmlNodeModelIndex())); + item = item; + item = item; + item = item; + item = item; + item = item; + } + } +} + +void tst_QXmlItem::isNull() const +{ + /* Check default value. */ + { + const QXmlItem item; + QVERIFY(item.isNull()); + } + + /* On atomic value. */ + { + const QXmlItem item(QVariant(3)); + QVERIFY(!item.isNull()); + } + + /* On a QXmlItem constructed from a null QVariant. */ + { + const QXmlItem item((QVariant())); + QVERIFY(item.isNull()); + } + + /* On a QXmlItem constructed from a null QXmlNodeModelIndex. */ + { + const QXmlItem item((QXmlNodeModelIndex())); + QVERIFY(item.isNull()); + } +} + +void tst_QXmlItem::isNode() const +{ + /* Check default value. */ + { + const QXmlItem item; + QVERIFY(!item.isNode()); + } + + /* On atomic value. */ + { + const QXmlItem item(QVariant(3)); + QVERIFY(!item.isNode()); + } + // TODO on valid node index + + /* On a QXmlItem constructed from a null QVariant. */ + { + const QXmlItem item((QVariant())); + QVERIFY(!item.isNode()); + } + + /* On a QXmlItem constructed from a null QXmlNodeModelIndex. */ + { + const QXmlItem item((QXmlNodeModelIndex())); + QVERIFY(!item.isNode()); + } +} + +void tst_QXmlItem::isAtomicValue() const +{ + /* Check default value. */ + { + const QXmlItem item; + QVERIFY(!item.isAtomicValue()); + } + + /* On valid atomic value. */ + { + const QXmlItem item(QVariant(3)); + QVERIFY(item.isAtomicValue()); + } + + // TODO on valid node index + + /* On a QXmlItem constructed from a null QVariant. */ + { + const QXmlItem item((QVariant())); + QVERIFY(!item.isAtomicValue()); + } + + /* On a QXmlItem constructed from a null QXmlNodeModelIndex. */ + { + const QXmlItem item((QXmlNodeModelIndex())); + QVERIFY(!item.isAtomicValue()); + } +} + +void tst_QXmlItem::toAtomicValue() const +{ + /* Check default value. */ + { + const QXmlItem item; + QVERIFY(item.toAtomicValue().isNull()); + } + + /* On atomic value. */ + { + const QXmlItem item(QVariant(3)); + QCOMPARE(item.toAtomicValue(), QVariant(3)); + } + + /* On a QXmlItem constructed from a null QVariant. */ + { + const QXmlItem item((QVariant())); + QVERIFY(item.toAtomicValue().isNull()); + } + + /* On a QXmlItem constructed from a null QXmlNodeModelIndex. */ + { + const QXmlItem item((QXmlNodeModelIndex())); + QVERIFY(item.toAtomicValue().isNull()); + } +} + +void tst_QXmlItem::toNodeModelIndex() const +{ + /* Check default value. */ + { + const QXmlItem item; + QVERIFY(item.toNodeModelIndex().isNull()); + } + + /* On valid atomic value. */ + { + const QXmlItem item(QVariant(3)); + QVERIFY(item.toNodeModelIndex().isNull()); + } + + /* On a QXmlItem constructed from a null QVariant. */ + { + const QXmlItem item((QVariant())); + QVERIFY(item.isNull()); + } + + /* On a QXmlItem constructed from a null QXmlNodeModelIndex. */ + { + const QXmlItem item((QXmlNodeModelIndex())); + QVERIFY(item.isNull()); + } +} + +void tst_QXmlItem::objectSize() const +{ + /* We can't currently test this in portable way, + * so disable it. */ + return; + + QCOMPARE(sizeof(QPatternist::NodeIndexStorage), sizeof(QXmlItem)); + + /* Data, additional data, and pointer to model. We test for two, such that we + * account for the padding that MSVC do. */ + QVERIFY(sizeof(QXmlItem) == sizeof(qint64) * 2 + sizeof(QAbstractXmlNodeModel *) * 2 + || sizeof(QXmlItem) == sizeof(qint64) * 2 + sizeof(QAbstractXmlNodeModel *) * 2); +} + +/*! + Check that the functions that should be const, are. + */ +void tst_QXmlItem::constCorrectness() const +{ + const QXmlItem item; + item.isNull(); + item.isNode(); + item.isAtomicValue(); + + item.toAtomicValue(); + item.toNodeModelIndex(); +} + +/*! + Check that QXmlItem can be used inside QVariant. + */ +void tst_QXmlItem::withinQVariant() const +{ + QXmlItem val; + const QVariant variant(qVariantFromValue(val)); + QXmlItem val2(qVariantValue(variant)); +} + +QTEST_MAIN(tst_QXmlItem) + +#include "tst_qxmlitem.moc" +#else //QTEST_XMLPATTERNS +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qxmlname/.gitignore b/tests/auto/qxmlname/.gitignore new file mode 100644 index 0000000..ed61edb --- /dev/null +++ b/tests/auto/qxmlname/.gitignore @@ -0,0 +1 @@ +tst_qxmlname diff --git a/tests/auto/qxmlname/qxmlname.pro b/tests/auto/qxmlname/qxmlname.pro new file mode 100644 index 0000000..dd317a7 --- /dev/null +++ b/tests/auto/qxmlname/qxmlname.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qxmlname.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlname/tst_qxmlname.cpp b/tests/auto/qxmlname/tst_qxmlname.cpp new file mode 100644 index 0000000..d8fc76d --- /dev/null +++ b/tests/auto/qxmlname/tst_qxmlname.cpp @@ -0,0 +1,565 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +#include +#include + +/*! + \class tst_QXmlName + \internal + \since 4.4 + \brief Tests class QXmlName. + + This test is not intended for testing the engine, but the functionality specific + to the QXmlName class. + + In other words, if you have an engine bug; don't add it here because it won't be + tested properly. Instead add it to the test suite. + + */ +class tst_QXmlName : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void defaultConstructor() const; + void argumentConstructor() const; + void argumentConstructor_data() const; + void argumentConstructorDefaultArguments() const; + void equalnessoperator() const; + void inequalnessoperator() const; + + void isNull() const; + void operatorEqual() const; + void operatorEqual_data() const; + void operatorNotEqual() const; + void operatorNotEqual_data() const; + void toClarkName() const; + void toClarkName_data() const; + void constCorrectness() const; + void qHash() const; + void objectSize() const; + void withinQVariant() const; + void typeWithinQVariant() const; + void isNCName() const; + void isNCName_data() const; + void isNCNameSignature() const; + void fromClarkName() const; + void fromClarkName_data() const; + void fromClarkNameSignature() const; +}; + +void tst_QXmlName::defaultConstructor() const +{ + /* Allocate instance in different orders. */ + { + QXmlName name; + } + + { + QXmlName name1; + QXmlName name2; + QXmlName name3; + } +} + +Q_DECLARE_METATYPE(QXmlNamePool) +void tst_QXmlName::argumentConstructor() const +{ + QFETCH(QString, namespaceURI); + QFETCH(QString, localName); + QFETCH(QString, prefix); + QFETCH(QXmlNamePool, namePool); + + const QXmlName name(namePool, localName, namespaceURI, prefix); + + QCOMPARE(name.namespaceUri(namePool), namespaceURI); + QCOMPARE(name.localName(namePool), localName); + QCOMPARE(name.prefix(namePool), prefix); +} + +/*! + \internal + + Below we use the same QXmlNamePool instance. This means the same name pool + is used. + */ +void tst_QXmlName::argumentConstructor_data() const +{ + QTest::addColumn("namespaceURI"); + QTest::addColumn("localName"); + QTest::addColumn("prefix"); + QTest::addColumn("namePool"); + + QXmlNamePool namePool; + QTest::newRow("Basic test") + << QString::fromLatin1("http://example.com/Namespace1") + << QString::fromLatin1("localName1") + << QString::fromLatin1("prefix1") + << namePool; + + QTest::newRow("Same namespace & prefix as before, different local name.") + << QString::fromLatin1("http://example.com/Namespace1") + << QString::fromLatin1("localName2") + << QString::fromLatin1("prefix1") + << namePool; + + QTest::newRow("Same namespace & local name as before, different prefix.") + << QString::fromLatin1("http://example.com/Namespace1") + << QString::fromLatin1("localName2") + << QString::fromLatin1("prefix2") + << namePool; + + QTest::newRow("No prefix") + << QString::fromLatin1("http://example.com/Namespace2") + << QString::fromLatin1("localName3") + << QString() + << namePool; +} + +/*! + Ensure that the three last arguments have default values, and that they are null strings. + */ +void tst_QXmlName::argumentConstructorDefaultArguments() const +{ + QXmlNamePool np; + const QXmlName n1(np, QLatin1String("localName")); + const QXmlName n2(np, QLatin1String("localName"), QString(), QString()); + + QCOMPARE(n1, n2); + QCOMPARE(n1.toClarkName(np), QString::fromLatin1("localName")); +} + +void tst_QXmlName::equalnessoperator() const +{ + const QXmlName o1; + const QXmlName o2; + o1 == o2; + // TODO +} + +void tst_QXmlName::inequalnessoperator() const +{ + const QXmlName o1; + const QXmlName o2; + o1 != o2; + // TODO +} + +void tst_QXmlName::isNull() const +{ + /* Check default value. */ + QXmlName name; + QVERIFY(name.isNull()); +} + +void tst_QXmlName::operatorEqual() const +{ + QFETCH(QXmlName, op1); + QFETCH(QXmlName, op2); + QFETCH(bool, expected); + + QCOMPARE(op1 == op2, expected); +} + +void tst_QXmlName::operatorEqual_data() const +{ + QTest::addColumn("op1"); + QTest::addColumn("op2"); + QTest::addColumn("expected"); + + QXmlNamePool namePool; + const QXmlName n1(namePool, QString::fromLatin1("localName1"), + QString::fromLatin1("http://example.com/Namespace1"), + QString::fromLatin1("prefix1")); + + const QXmlName n2(namePool, QString::fromLatin1("localName2"), + QString::fromLatin1("http://example.com/Namespace1"), + QString::fromLatin1("prefix1")); + + const QXmlName n3(namePool, QString::fromLatin1("localName2"), + QString::fromLatin1("http://example.com/Namespace1"), + QString::fromLatin1("prefix2")); + + const QXmlName n4(namePool, QString::fromLatin1("localName3"), + QString::fromLatin1("http://example.com/Namespace2")); + + const QXmlName n5(namePool, QString::fromLatin1("localName4"), + QString::fromLatin1("http://example.com/Namespace2")); + + const QXmlName n6(namePool, QString::fromLatin1("localName4"), + QString::fromLatin1("http://example.com/Namespace2"), + QString::fromLatin1("prefix3")); + + const QXmlName n7(namePool, QString::fromLatin1("localName2"), + QString::fromLatin1("http://example.com/Namespace2"), + QString::fromLatin1("prefix3")); + + QTest::newRow(qPrintable(n1.toClarkName(namePool))) + << n1 + << n1 + << true; + + QTest::newRow(qPrintable(n2.toClarkName(namePool))) + << n2 + << n2 + << true; + + QTest::newRow(qPrintable(n3.toClarkName(namePool))) + << n3 + << n3 + << true; + + QTest::newRow(qPrintable(n4.toClarkName(namePool))) + << n4 + << n4 + << true; + + QTest::newRow(qPrintable(n5.toClarkName(namePool))) + << n5 + << n5 + << true; + + QTest::newRow(qPrintable(n6.toClarkName(namePool))) + << n6 + << n6 + << true; + + QTest::newRow(qPrintable(n7.toClarkName(namePool))) + << n7 + << n7 + << true; + + QTest::newRow("Prefix differs") + << n2 + << n3 + << true; + + QTest::newRow("No prefix vs. prefix") + << n5 + << n6 + << true; + + QTest::newRow("Local name differs") + << n1 + << n2 + << false; + + QTest::newRow("Namespace differs") + << n2 + << n7 + << false; +} + +void tst_QXmlName::operatorNotEqual() const +{ + QFETCH(QXmlName, op1); + QFETCH(QXmlName, op2); + QFETCH(bool, expected); + + QCOMPARE(op1 != op2, !expected); +} + +void tst_QXmlName::operatorNotEqual_data() const +{ + operatorEqual_data(); +} + +/*! + Check that functions have the correct const qualification. + */ +void tst_QXmlName::constCorrectness() const +{ + const QXmlName name; + + /* isNull() */ + QVERIFY(name.isNull()); + + /* operator==() */ + QVERIFY(name == name); + + /* operator!=() */ + QVERIFY(!(name != name)); + + QXmlNamePool namePool; + const QXmlName name2(namePool, QLatin1String("localName"), QLatin1String("http://example.com/"), QLatin1String("prefix")); + + /* namespaceUri(). */ + QCOMPARE(name2.namespaceUri(namePool), QLatin1String("http://example.com/")); + + /* localName(). */ + QCOMPARE(name2.localName(namePool), QLatin1String("localName")); + + /* prefix(). */ + QCOMPARE(name2.prefix(namePool), QLatin1String("prefix")); + + /* toClarkname(). */ + QCOMPARE(name2.toClarkName(namePool), QLatin1String("{http://example.com/}prefix:localName")); +} + +void tst_QXmlName::qHash() const +{ + /* Just call it, so we know it exist and that we don't trigger undefined + * behavior. We can't test the return value, since it's opaque. */ + QXmlName name; + ::qHash(name); +} + +void tst_QXmlName::objectSize() const +{ + QVERIFY2(sizeof(QXmlName) == sizeof(qint64), "QXmlName should have at least a d-pointer."); +} + +void tst_QXmlName::toClarkName() const +{ + QFETCH(QString, produced); + QFETCH(QString, expected); + + QCOMPARE(produced, expected); +} + +void tst_QXmlName::toClarkName_data() const +{ + QTest::addColumn("produced"); + QTest::addColumn("expected"); + + QXmlNamePool np; + + /* A null QXmlName. */ + { + const QXmlName n; + QTest::newRow("") << n.toClarkName(np) + << QString::fromLatin1("QXmlName(null)"); + } + + { + const QXmlName n(np, QLatin1String("localName")); + QTest::newRow("") << n.toClarkName(np) + << QString::fromLatin1("localName"); + } + + /* Local name with namespace URI, empty prefix. */ + { + const QXmlName n(np, QLatin1String("localName"), + QLatin1String("http://example.com/")); + QTest::newRow("") << n.toClarkName(np) + << QString::fromLatin1("{http://example.com/}localName"); + } + + /* Local name with namespace URI and prefix. */ + { + const QXmlName n(np, QLatin1String("localName"), + QLatin1String("http://example.com/"), + QLatin1String("p")); + QTest::newRow("") << n.toClarkName(np) + << QString::fromLatin1("{http://example.com/}p:localName"); + } +} + +/*! + Check that QXmlName can be used inside QVariant. + */ +void tst_QXmlName::withinQVariant() const +{ + /* The extra paranthesis silences a warning on win32-msvc2005. */ + QVariant value(qVariantFromValue(QXmlName())); +} + +/*! + Check that the user type of QXmlName holds. + */ +void tst_QXmlName::typeWithinQVariant() const +{ + const int qxmlNameType = QVariant(qVariantFromValue(QXmlName())).userType(); + + const QVariant value(qVariantFromValue(QXmlName())); + + QCOMPARE(value.userType(), qxmlNameType); +} + +/*! + We don't do full testing here. Don't have the resources for it. We simply assume + we use a code path which is fully tested elsewhere. + */ +void tst_QXmlName::isNCName() const +{ + QFETCH(QString, input); + QFETCH(bool, expectedValidity); + + QCOMPARE(QXmlName::isNCName(input), expectedValidity); +} + +void tst_QXmlName::isNCName_data() const +{ + QTest::addColumn("input"); + QTest::addColumn("expectedValidity"); + + QTest::newRow("empty string") + << QString() + << false; + + QTest::newRow("A number") + << QString::fromLatin1("1") + << false; + + QTest::newRow("Simple valid string") + << QString::fromLatin1("abc") + << true; + + QTest::newRow("Simple valid string") + << QString::fromLatin1("abc.123") + << true; +} + +void tst_QXmlName::isNCNameSignature() const +{ + const QString constQString; + + /* Verify that we can take a const QString. */ + QXmlName::isNCName(constQString); + + /* Verify that we can take a temporary QString. */ + QXmlName::isNCName(QString()); +} + +void tst_QXmlName::fromClarkName() const +{ + QFETCH(QString, input); + QFETCH(QXmlName, expected); + QFETCH(QXmlNamePool, namePool); + + QCOMPARE(QXmlName::fromClarkName(input, namePool), expected); +} + +void tst_QXmlName::fromClarkName_data() const +{ + QTest::addColumn("input"); + QTest::addColumn("expected"); + QTest::addColumn("namePool"); + + QXmlNamePool np; + + QTest::newRow("A null string") + << QString() + << QXmlName() + << np; + + QTest::newRow("An empty string") + << QString(QLatin1String("")) + << QXmlName() + << np; + + QTest::newRow("A single local name") + << QString(QLatin1String("foo")) + << QXmlName(np, QLatin1String("foo")) + << np; + + QTest::newRow("Has prefix, but no namespace, that's invalid") + << QString(QLatin1String("prefix:foo")) + << QXmlName() + << np; + + QTest::newRow("Namespace, local name, no prefix") + << QString(QLatin1String("{def}abc")) + << QXmlName(np, QLatin1String("abc"), QLatin1String("def")) + << np; + + QTest::newRow("Namespace, local name, prefix") + << QString(QLatin1String("{def}p:abc")) + << QXmlName(np, QLatin1String("abc"), QLatin1String("def"), QLatin1String("p")) + << np; + + QTest::newRow("Namespace, local name, prefix syntax error") + << QString(QLatin1String("{def}:abc")) + << QXmlName() + << np; + + QTest::newRow("Namespace, local name syntax error, prefix") + << QString(QLatin1String("{def}p:")) + << QXmlName() + << np; + + QTest::newRow("Only local name which is invalid") + << QString(QLatin1String(":::")) + << QXmlName() + << np; + + QTest::newRow("Namespace, invalid local name") + << QString(QLatin1String("{def}a|bc")) + << QXmlName() + << np; + + QTest::newRow("Namespace, local name, invalid prefix") + << QString(QLatin1String("{def}a|b:c")) + << QXmlName() + << np; + + QTest::newRow("A single left curly, invalid") + << QString(QLatin1String("{")) + << QXmlName() + << np; + + QTest::newRow("A single left curly, invalid") + << QString(QLatin1String("{aaswd")) + << QXmlName() + << np; +} + +void tst_QXmlName::fromClarkNameSignature() const +{ + /* We should take const references. */ + const QXmlNamePool np; + const QString in; + + QXmlName::fromClarkName(in, np); +} + +QTEST_MAIN(tst_QXmlName) + +#include "tst_qxmlname.moc" +#else +QTEST_NOOP_MAIN +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qxmlnamepool/.gitignore b/tests/auto/qxmlnamepool/.gitignore new file mode 100644 index 0000000..ffdd14c --- /dev/null +++ b/tests/auto/qxmlnamepool/.gitignore @@ -0,0 +1 @@ +tst_qxmlnamepool diff --git a/tests/auto/qxmlnamepool/qxmlnamepool.pro b/tests/auto/qxmlnamepool/qxmlnamepool.pro new file mode 100644 index 0000000..04d1e7a --- /dev/null +++ b/tests/auto/qxmlnamepool/qxmlnamepool.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qxmlnamepool.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlnamepool/tst_qxmlnamepool.cpp b/tests/auto/qxmlnamepool/tst_qxmlnamepool.cpp new file mode 100644 index 0000000..2365a09 --- /dev/null +++ b/tests/auto/qxmlnamepool/tst_qxmlnamepool.cpp @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +#include +#include + +/*! + \class tst_QXmlNamePool + \internal + \since 4.4 + \brief Tests class QXmlNamePool. + + */ +class tst_QXmlNamePool : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void constCorrectness() const; + void size() const; + void assignmentOperator() const; +}; + +/*! + Check that functions have the correct const qualification. + */ +void tst_QXmlNamePool::constCorrectness() const +{ + /* No functions are const in the name pool, so do nothing. */ +} + +void tst_QXmlNamePool::size() const +{ + QVERIFY2(sizeof(QXmlNamePool) == sizeof(void *), "QXmlNamePool should have a d-pointer."); +} + +void tst_QXmlNamePool::assignmentOperator() const +{ + // TODO +} + +QTEST_MAIN(tst_QXmlNamePool) + +#include "tst_qxmlnamepool.moc" +#else +QTEST_NOOP_MAIN +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qxmlnodemodelindex/.gitignore b/tests/auto/qxmlnodemodelindex/.gitignore new file mode 100644 index 0000000..4cee2fe --- /dev/null +++ b/tests/auto/qxmlnodemodelindex/.gitignore @@ -0,0 +1 @@ +tst_qxmlnodemodelindex diff --git a/tests/auto/qxmlnodemodelindex/qxmlnodemodelindex.pro b/tests/auto/qxmlnodemodelindex/qxmlnodemodelindex.pro new file mode 100644 index 0000000..73a5b00 --- /dev/null +++ b/tests/auto/qxmlnodemodelindex/qxmlnodemodelindex.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qxmlnodemodelindex.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp b/tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp new file mode 100644 index 0000000..6962f3e --- /dev/null +++ b/tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp @@ -0,0 +1,197 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include + +/*! + \class tst_QXmlNodeModelIndex + \internal + \since 4.4 + \brief Tests class QXmlNodeModelIndex. + + */ +class tst_QXmlNodeModelIndex : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void copyConstructor() const; + void constCorrectness() const; + void assignmentOperator() const; + void equalnessOperator() const; + void inequalnessOperator() const; + void objectSize() const; + void internalPointer() const; + void data() const; + void additionalData() const; + void isNull() const; + void model() const; + void withqHash() const; +}; + +void tst_QXmlNodeModelIndex::objectSize() const +{ + /* We can't do an exact comparison, because some platforms do padding. */ + QVERIFY(sizeof(QXmlNodeModelIndex) >= sizeof(QAbstractXmlNodeModel *) + sizeof(qint64) * 2); +} + +void tst_QXmlNodeModelIndex::constCorrectness() const +{ + const QXmlNodeModelIndex index; + /* All these functions should be const. */ + index.internalPointer(); + index.data(); + index.additionalData(); + index.isNull(); + index.model(); +} + +void tst_QXmlNodeModelIndex::assignmentOperator() const +{ + QXmlNodeModelIndex o1; + const QXmlNodeModelIndex o2; + o1 = o2; + // TODO +} + +void tst_QXmlNodeModelIndex::equalnessOperator() const +{ + QXmlNodeModelIndex o1; + const QXmlNodeModelIndex o2; + // TODO check const correctness + o1 == o2; +} + +void tst_QXmlNodeModelIndex::inequalnessOperator() const +{ + QXmlNodeModelIndex o1; + const QXmlNodeModelIndex o2; + // TODO check const correctness + o1 != o2; +} + +void tst_QXmlNodeModelIndex::copyConstructor() const +{ + /* Check that we can take a const reference. */ + { + const QXmlNodeModelIndex index; + const QXmlNodeModelIndex copy(index); + } + + /* Take a copy of a temporary. */ + { + /* The extra paranthesis silences a warning on win32-msvc. */ + const QXmlNodeModelIndex copy((QXmlNodeModelIndex())); + } +} + +void tst_QXmlNodeModelIndex::internalPointer() const +{ + /* Check default value. */ + { + const QXmlNodeModelIndex index; + QCOMPARE(index.internalPointer(), static_cast(0)); + } +} + +void tst_QXmlNodeModelIndex::data() const +{ + /* Check default value. */ + { + const QXmlNodeModelIndex index; + QCOMPARE(index.data(), qint64(0)); + } + + // TODO check that the return value for data() is qint64. +} + +void tst_QXmlNodeModelIndex::additionalData() const +{ + /* Check default value. */ + { + const QXmlNodeModelIndex index; + QCOMPARE(index.additionalData(), qint64(0)); + } + + // TODO check that the return value for data() is qint64. +} + +void tst_QXmlNodeModelIndex::isNull() const +{ + /* Check default value. */ + { + const QXmlNodeModelIndex index; + QVERIFY(index.isNull()); + } + + /* Test default value on a temporary object. */ + { + QVERIFY(QXmlNodeModelIndex().isNull()); + } +} + +void tst_QXmlNodeModelIndex::model() const +{ + /* Check default value. */ + { + const QXmlNodeModelIndex index; + QCOMPARE(index.model(), static_cast(0)); + } +} + +void tst_QXmlNodeModelIndex::withqHash() const +{ + QXmlNodeModelIndex null; + qHash(null); + //Do something which means operator== must be available. +} + +QTEST_MAIN(tst_QXmlNodeModelIndex) + +#include "tst_qxmlnodemodelindex.moc" +#else //QTEST_XMLPATTERNS +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qxmlquery/.gitignore b/tests/auto/qxmlquery/.gitignore new file mode 100644 index 0000000..8b18180 --- /dev/null +++ b/tests/auto/qxmlquery/.gitignore @@ -0,0 +1 @@ +tst_qxmlquery diff --git a/tests/auto/qxmlquery/MessageSilencer.h b/tests/auto/qxmlquery/MessageSilencer.h new file mode 100644 index 0000000..385a5c2 --- /dev/null +++ b/tests/auto/qxmlquery/MessageSilencer.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#ifndef MessageSilencer_h +#define MessageSilencer_h + +#include + +/*! + \class MessageSilencer + \internal + \since 4.5 + \brief A message handler for QXmlQuery that simply discards the messages, such + that they aren't printed to \c stderr. + */ +class MessageSilencer : public QAbstractMessageHandler +{ +protected: + virtual void handleMessage(QtMsgType type, + const QString &description, + const QUrl &identifier, + const QSourceLocation &sourceLocation); +}; + +void MessageSilencer::handleMessage(QtMsgType type, + const QString &description, + const QUrl &identifier, + const QSourceLocation &sourceLocation) +{ + Q_UNUSED(type); + Q_UNUSED(description); + Q_UNUSED(sourceLocation); + Q_UNUSED(identifier); +} + +#endif diff --git a/tests/auto/qxmlquery/MessageValidator.cpp b/tests/auto/qxmlquery/MessageValidator.cpp new file mode 100644 index 0000000..58b2b31 --- /dev/null +++ b/tests/auto/qxmlquery/MessageValidator.cpp @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifdef QTEST_XMLPATTERNS +#include + +#include "MessageValidator.h" + +MessageValidator::MessageValidator() : m_success(false) + , m_hasChecked(false) +{ +} + +MessageValidator::~MessageValidator() +{ + Q_ASSERT_X(m_hasChecked, + Q_FUNC_INFO, + "You must call success()."); +} + +void MessageValidator::handleMessage(QtMsgType type, + const QString &description, + const QUrl &identifier, + const QSourceLocation &sourceLocation) +{ + Q_UNUSED(type); + Q_UNUSED(description); + Q_UNUSED(sourceLocation); + Q_UNUSED(identifier); + + QXmlStreamReader reader(description); + + m_received = QLatin1String("Type:") + + QString::number(type) + + QLatin1String("\nDescription: ") + + description + + QLatin1String("\nIdentifier: ") + + identifier.toString() + + QLatin1String("\nLocation: ") + + sourceLocation.uri().toString() + + QLatin1String("#") + + QString::number(sourceLocation.line()) + + QLatin1String(",") + + QString::number(sourceLocation.column()); + + /* We just walk through it, to check that it's valid. */ + while(!reader.atEnd()) + reader.readNext(); + + m_success = !reader.hasError(); +} + +bool MessageValidator::success() +{ + m_hasChecked = true; + return m_success; +} + +QString MessageValidator::received() const +{ + return m_received; +} + +#endif //QTEST_XMLPATTERNS diff --git a/tests/auto/qxmlquery/MessageValidator.h b/tests/auto/qxmlquery/MessageValidator.h new file mode 100644 index 0000000..be7c02b --- /dev/null +++ b/tests/auto/qxmlquery/MessageValidator.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#ifndef MessageValidator_h +#define MessageValidator_h + +#include + +/*! + \class MessageValidator + \internal + \since 4.4. + \brief A message handler for QXmlQuery that simply discards the messages, such + that they aren't printed to \c stderr. + */ +class MessageValidator : public QAbstractMessageHandler +{ +public: + MessageValidator(); + ~MessageValidator(); + QString received() const; + bool success(); + +protected: + virtual void handleMessage(QtMsgType type, + const QString &description, + const QUrl &identifier, + const QSourceLocation &sourceLocation); +private: + QString m_received; + bool m_success; + bool m_hasChecked; +}; + +#endif diff --git a/tests/auto/qxmlquery/NetworkOverrider.h b/tests/auto/qxmlquery/NetworkOverrider.h new file mode 100644 index 0000000..10a85c1 --- /dev/null +++ b/tests/auto/qxmlquery/NetworkOverrider.h @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#ifndef NetworkOverrider_h +#define NetworkOverrider_h + +#include + +/*! + \class MessageSilencer + \internal + \since 4.5 + \brief A message handler for QXmlQuery that simply discards the messages, such + that they aren't printed to \c stderr. + */ +class NetworkOverrider : public QNetworkAccessManager +{ +public: + NetworkOverrider(const QUrl &rewriteFrom, + const QUrl &rewriteTo); + + virtual QNetworkReply *createRequest(Operation op, + const QNetworkRequest &req, + QIODevice *outgoingData); + +private: + const QUrl m_rewriteFrom; + const QUrl m_rewriteTo; +}; + +NetworkOverrider::NetworkOverrider(const QUrl &rewriteFrom, + const QUrl &rewriteTo) : m_rewriteFrom(rewriteFrom) + , m_rewriteTo(rewriteTo) +{ + Q_ASSERT(m_rewriteFrom.isValid()); + Q_ASSERT(m_rewriteTo.isValid()); +} + +QNetworkReply *NetworkOverrider::createRequest(Operation op, + const QNetworkRequest &req, + QIODevice *outgoingData) +{ + QNetworkRequest newReq(req); + + if(req.url() == m_rewriteFrom) + newReq.setUrl(m_rewriteTo); + + return QNetworkAccessManager::createRequest(op, newReq, outgoingData); +} +#endif diff --git a/tests/auto/qxmlquery/PushBaseliner.h b/tests/auto/qxmlquery/PushBaseliner.h new file mode 100644 index 0000000..0648c90 --- /dev/null +++ b/tests/auto/qxmlquery/PushBaseliner.h @@ -0,0 +1,149 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#ifndef Patternist_PushBaseliner_h +#define Patternist_PushBaseliner_h + +#include +#include +#include +#include + +class PushBaseliner : public QAbstractXmlReceiver +{ +public: + PushBaseliner(QTextStream &out, + const QXmlNamePool &namePool) : m_out(out) + , m_namePool(namePool) + { + Q_ASSERT(m_out.codec()); + } + + virtual void startElement(const QXmlName&); + virtual void endElement(); + virtual void attribute(const QXmlName&, const QStringRef&); + virtual void comment(const QString&); + virtual void characters(const QStringRef&); + virtual void startDocument(); + virtual void endDocument(); + virtual void processingInstruction(const QXmlName&, const QString&); + virtual void atomicValue(const QVariant&); + virtual void namespaceBinding(const QXmlName&); + virtual void startOfSequence(); + virtual void endOfSequence(); + +private: + QTextStream & m_out; + const QXmlNamePool m_namePool; +}; + +void PushBaseliner::startElement(const QXmlName &name) +{ + m_out << "startElement(" << name.toClarkName(m_namePool) << ')'<< endl; +} + +void PushBaseliner::endElement() +{ + m_out << "endElement()" << endl; +} + +void PushBaseliner::attribute(const QXmlName &name, const QStringRef &value) +{ + m_out << "attribute(" << name.toClarkName(m_namePool) << ", " << value.toString() << ')'<< endl; +} + +void PushBaseliner::comment(const QString &value) +{ + m_out << "comment(" << value << ')' << endl; +} + +void PushBaseliner::characters(const QStringRef &value) +{ + m_out << "characters(" << value.toString() << ')' << endl; +} + +void PushBaseliner::startDocument() +{ + m_out << "startDocument()" << endl; +} + +void PushBaseliner::endDocument() +{ + m_out << "endDocument()" << endl; +} + +void PushBaseliner::processingInstruction(const QXmlName &name, const QString &data) +{ + m_out << "processingInstruction(" << name.toClarkName(m_namePool) << ", " << data << ')' << endl; +} + +void PushBaseliner::atomicValue(const QVariant &val) +{ + m_out << "atomicValue(" << val.toString() << ')' << endl; +} + +void PushBaseliner::namespaceBinding(const QXmlName &name) +{ + m_out << "namespaceBinding(" << name.toClarkName(m_namePool) << ')' << endl; +} + +void PushBaseliner::startOfSequence() +{ + m_out << "startOfSequence()" << endl; +} + +void PushBaseliner::endOfSequence() +{ + m_out << "endOfSequence()" << endl; +} + +#endif diff --git a/tests/auto/qxmlquery/TestFundament.cpp b/tests/auto/qxmlquery/TestFundament.cpp new file mode 100644 index 0000000..7d3c85f --- /dev/null +++ b/tests/auto/qxmlquery/TestFundament.cpp @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include +#include + +#include "TestFundament.h" + +/*! + This constructor is protected, such + that inheritance is necessary. + */ +TestFundament::TestFundament() +{ +} + +QString TestFundament::offset() +{ +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) + /* On Windows, the executable is placed in a release/ or debug/ folder. */ + return QLatin1String("../"); +#elif defined(Q_OS_MAC) + return QLatin1String("../../../"); +#else + return QString(); +#endif +} + +QString TestFundament::relativeInputFile(const QString &file) +{ + return QDir::cleanPath(offset() + file); +} + +QUrl TestFundament::inputFileAsURI(const QString &file) +{ + return QUrl::fromLocalFile(inputFile(file)); +} + +QString TestFundament::inputFile(const QString &file) +{ + if(QDir::isAbsolutePath(file)) + return file; + else + { + return QDir::cleanPath(QCoreApplication::applicationDirPath() + + QLatin1Char('/') + + offset() + + file); + } +} + diff --git a/tests/auto/qxmlquery/TestFundament.h b/tests/auto/qxmlquery/TestFundament.h new file mode 100644 index 0000000..ead3eb0 --- /dev/null +++ b/tests/auto/qxmlquery/TestFundament.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef Qt_TestFundament_h +#define Qt_TestFundament_h + +#include + +QT_BEGIN_NAMESPACE +class QString; +class QUrl; +QT_END_NAMESPACE + +class TestFundament +{ +protected: + TestFundament(); + static QUrl inputFileAsURI(const QString &file); + static QString inputFile(const QString &file); + static QString relativeInputFile(const QString &file); + +private: + static QString offset(); + + Q_DISABLE_COPY(TestFundament) +}; + +#endif diff --git a/tests/auto/qxmlquery/data/notWellformed.xml b/tests/auto/qxmlquery/data/notWellformed.xml new file mode 100644 index 0000000..36567a1 --- /dev/null +++ b/tests/auto/qxmlquery/data/notWellformed.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/qxmlquery/input.qrc b/tests/auto/qxmlquery/input.qrc new file mode 100644 index 0000000..bd0c516 --- /dev/null +++ b/tests/auto/qxmlquery/input.qrc @@ -0,0 +1,9 @@ + + + + data/oneElement.xml + data/notWellformed.xml + ../xmlpatterns/queries/staticBaseURI.xq + ../xmlpatterns/queries/syntaxError.xq + + diff --git a/tests/auto/qxmlquery/input.xml b/tests/auto/qxmlquery/input.xml new file mode 100644 index 0000000..5c5060e --- /dev/null +++ b/tests/auto/qxmlquery/input.xml @@ -0,0 +1,2 @@ + + diff --git a/tests/auto/qxmlquery/pushBaselines/allAtomics.ref b/tests/auto/qxmlquery/pushBaselines/allAtomics.ref new file mode 100644 index 0000000..cceabfe --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/allAtomics.ref @@ -0,0 +1,45 @@ +startOfSequence() +atomicValue(xs:untypedAtomic) +atomicValue(2002-10-10T23:02:11) +atomicValue(2002-10-10) +atomicValue() +atomicValue() +atomicValue() +atomicValue() +atomicValue(3000) +atomicValue(40000) +atomicValue(2) +atomicValue(16) +atomicValue(-6) +atomicValue(-4) +atomicValue(5) +atomicValue(6) +atomicValue(7) +atomicValue(8) +atomicValue(9) +atomicValue(10) +atomicValue(11) +atomicValue(12) +atomicValue(13) +atomicValue(14) +atomicValue() +atomicValue() +atomicValue() +atomicValue() +atomicValue() +atomicValue(true) +atomicValue(i¦š) +atomicValue(ÿÿ) +atomicValue(http://example.com/) +atomicValue() +atomicValue(An xs:string) +atomicValue(normalizedString) +atomicValue(token) +atomicValue(language) +atomicValue(NMTOKEN) +atomicValue(Name) +atomicValue(NCName) +atomicValue(ID) +atomicValue(IDREF) +atomicValue(ENTITY) +endOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/concat.ref b/tests/auto/qxmlquery/pushBaselines/concat.ref new file mode 100644 index 0000000..c19c099 --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/concat.ref @@ -0,0 +1,3 @@ +startOfSequence() +atomicValue(abcdef) +endOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/emptySequence.ref b/tests/auto/qxmlquery/pushBaselines/emptySequence.ref new file mode 100644 index 0000000..528e307 --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/emptySequence.ref @@ -0,0 +1,2 @@ +startOfSequence() +endOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/errorFunction.ref b/tests/auto/qxmlquery/pushBaselines/errorFunction.ref new file mode 100644 index 0000000..620bc86 --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/errorFunction.ref @@ -0,0 +1 @@ +startOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/nodeSequence.ref b/tests/auto/qxmlquery/pushBaselines/nodeSequence.ref new file mode 100644 index 0000000..57b4c7c --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/nodeSequence.ref @@ -0,0 +1,81 @@ +startOfSequence() +startDocument() +endDocument() +startDocument() +endDocument() +startDocument() +endDocument() +startDocument() +atomicValue() +endDocument() +startDocument() +atomicValue() +endDocument() +startDocument() +characters() +endDocument() +startDocument() +characters() +endDocument() +startDocument() +characters(text1) +endDocument() +startDocument() +characters(text2) +endDocument() +startDocument() +startElement(f) +namespaceBinding(empty) +endElement() +endDocument() +startElement(e1) +namespaceBinding(empty) +endElement() +startElement(e2) +namespaceBinding(empty) +endElement() +startElement(e3) +namespaceBinding(empty) +endElement() +startElement(e3) +namespaceBinding(empty) +attribute(attr1, value1) +endElement() +attribute(name, value) +characters() +characters(text3) +startElement(e5) +namespaceBinding(empty) +characters( + text4 + ) +startElement(e) +endElement() +characters( + text5 + ) +processingInstruction(target, data) +comment( comment ) +startElement(e6) +attribute(attr2, value2) +attribute(attr3, value2) +endElement() +startElement(e6) +attribute(attr2, value3) +attribute(attr3, value3) +endElement() +startElement(e6) +attribute(attr2, value4) +attribute(attr3, value4) +endElement() +endElement() +processingInstruction(target, data) +comment( comment ) +startElement({http://example.com/}e) +namespaceBinding({http://example.com/}empty) +endElement() +startElement({http://example.com/}p:e) +namespaceBinding({http://example.com/}p:empty) +namespaceBinding(empty) +endElement() +endOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/oneElement.ref b/tests/auto/qxmlquery/pushBaselines/oneElement.ref new file mode 100644 index 0000000..b2a20a7 --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/oneElement.ref @@ -0,0 +1,5 @@ +startOfSequence() +startElement(e) +namespaceBinding(empty) +endElement() +endOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/onePlusOne.ref b/tests/auto/qxmlquery/pushBaselines/onePlusOne.ref new file mode 100644 index 0000000..ce1426b --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/onePlusOne.ref @@ -0,0 +1,3 @@ +startOfSequence() +atomicValue(2) +endOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/onlyDocumentNode.ref b/tests/auto/qxmlquery/pushBaselines/onlyDocumentNode.ref new file mode 100644 index 0000000..9fec191 --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/onlyDocumentNode.ref @@ -0,0 +1,4 @@ +startOfSequence() +startDocument() +endDocument() +endOfSequence() diff --git a/tests/auto/qxmlquery/pushBaselines/openDocument.ref b/tests/auto/qxmlquery/pushBaselines/openDocument.ref new file mode 100644 index 0000000..95e9c53 --- /dev/null +++ b/tests/auto/qxmlquery/pushBaselines/openDocument.ref @@ -0,0 +1,22 @@ +startOfSequence() +startDocument() +startElement({http://example.com}e) +namespaceBinding({http://example.com}empty) +namespaceBinding({http://example.com/P}p:empty) +attribute(attr, 1) +attribute({http://example.com/P}p:attr, ) +processingInstruction(target, data) +comment( a comment ) +startElement({http://example.com}e) +namespaceBinding({http://example.com}empty) +namespaceBinding({http://example.com/P}p:empty) +endElement() +characters(text ) +startElement({http://example.com}f) +namespaceBinding({http://example.com}empty) +namespaceBinding({http://example.com/P}p:empty) +endElement() +characters(text node) +endElement() +endDocument() +endOfSequence() diff --git a/tests/auto/qxmlquery/qxmlquery.pro b/tests/auto/qxmlquery/qxmlquery.pro new file mode 100644 index 0000000..d5e8228 --- /dev/null +++ b/tests/auto/qxmlquery/qxmlquery.pro @@ -0,0 +1,34 @@ +load(qttest_p4) +SOURCES += tst_qxmlquery.cpp MessageValidator.cpp TestFundament.cpp +HEADERS += PushBaseliner.h \ + MessageSilencer.h \ + ../qsimplexmlnodemodel/TestSimpleNodeModel.h \ + MessageValidator.h \ + NetworkOverrider.h + +RESOURCES = input.qrc + +QT += network + +wince* { + DEFINES += SRCDIR=\\\"./\\\" +} else:!symbian { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} + +include (../xmlpatterns.pri) + +wince*|symbian: { + addFiles.files = pushBaselines input.xml + addFiles.path = . + + patternistFiles.files = ../xmlpatterns/queries + symbian: { + #../xmlpatterns resolves to an illegal path for deployment + patternistFiles.path = xmlpatterns + } else { + patternistFiles.path = ../xmlpatterns + } + + DEPLOYMENT += addFiles patternistFiles +} diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp new file mode 100644 index 0000000..e3c97d2 --- /dev/null +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -0,0 +1,3481 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "MessageSilencer.h" +#include "MessageValidator.h" +#include "NetworkOverrider.h" +#include "PushBaseliner.h" +#include "../qabstracturiresolver/TestURIResolver.h" +#include "../qsimplexmlnodemodel/TestSimpleNodeModel.h" +#include "TestFundament.h" +#include "../network-settings.h" + +#if defined(Q_OS_SYMBIAN) +#define SRCDIR "" +#define XMLPATTERNSDIR "xmlpatterns" +#else +#define XMLPATTERNSDIR SRCDIR "../xmlpatterns" +#endif + +/*! + \class tst_QXmlQuery + \internal + \since 4.4 + \brief Tests class QXmlQuery. + + This test is not intended for testing the engine, but the functionality specific + to the QXmlQuery class. + + In other words, if you have an engine bug; don't add it here because it won't be + tested properly. Instead add it to the test suite. + + */ +class tst_QXmlQuery : public QObject + , private TestFundament +{ + Q_OBJECT + +public: + inline tst_QXmlQuery() : m_generatedBaselines(0) + , m_pushTestsCount(0) + , m_testNetwork(true) + { + Q_SET_DEFAULT_IAP + } + +private Q_SLOTS: + void defaultConstructor() const; + void copyConstructor() const; + void constructorQXmlNamePool() const; + void constructorQXmlNamePoolQueryLanguage() const; + void constructorQXmlNamePoolWithinQSimpleXmlNodeModel() const; + void assignmentOperator() const; + void isValid() const; + void sequentialExecution() const; + void bindVariableQString() const; + void bindVariableQStringNoExternalDeclaration() const; + void bindVariableQXmlName() const; + void bindVariableQXmlNameTriggerWarnings() const; + void bindVariableQStringQIODevice() const; + void bindVariableQStringQIODeviceWithByteArray() const; + void bindVariableQStringQIODeviceWithString() const; + void bindVariableQStringQIODeviceWithQFile() const; + void bindVariableQXmlNameQIODevice() const; + void bindVariableQXmlNameQIODeviceTriggerWarnings() const; + void bindVariableXSLTSuccess() const; + void bindVariableTemporaryNode() const; + void setMessageHandler() const; + void messageHandler() const; + void evaluateToQAbstractXmlReceiverTriggerWarnings() const; + void evaluateToQXmlResultItems() const; + void evaluateToQXmlResultItemsTriggerWarnings() const; + void evaluateToQXmlResultItemsErrorAtEnd() const; + void evaluateToReceiver(); + void evaluateToReceiver_data() const; + void evaluateToReceiverOnInvalidQuery() const; + void evaluateToQStringTriggerError() const; + void evaluateToQString() const; + void evaluateToQString_data() const; + void evaluateToQStringSignature() const; + void checkGeneratedBaselines() const; + void basicXQueryToQtTypeCheck() const; + void basicQtToXQueryTypeCheck() const; + void bindNode() const; + void relativeBaseURI() const; + void emptyBaseURI() const; + void roundTripDateWithinQXmlItem() const; + void bindingMissing() const; + void bindDefaultConstructedItem() const; + void bindDefaultConstructedItem_data() const; + void bindEmptyNullString() const; + void bindEmptyString() const; + void rebindVariableSameType() const; + void rebindVariableDifferentType() const; + void rebindVariableWithNullItem() const; + void eraseQXmlItemBinding() const; + void eraseDeviceBinding() const; + void constCorrectness() const; + void objectSize() const; + void setUriResolver() const; + void uriResolver() const; + void messageXML() const; + void resultItemsDeallocatedQuery() const; + void copyCheckMessageHandler() const; + void shadowedVariables() const; + void setFocusQXmlItem() const; + void setFocusQUrl() const; + void setFocusQIODevice() const; + void setFocusQIODeviceAvoidVariableClash() const; + void setFocusQIODeviceFailure() const; + void setFocusQIODeviceTriggerWarnings() const; + void setFocusQString() const; + void setFocusQStringFailure() const; + void setFocusQStringSignature() const; + void recompilationWithEvaluateToResultFailing() const; + void secondEvaluationWithEvaluateToResultFailing() const; + void recompilationWithEvaluateToReceiver() const; + void fnDocOnQIODeviceTimeout() const; + void evaluateToQStringListOnInvalidQuery() const; + void evaluateToQStringList() const; + void evaluateToQStringListTriggerWarnings() const; + void evaluateToQStringList_data() const; + void evaluateToQStringListNoConversion() const; + void evaluateToQIODevice() const; + void evaluateToQIODeviceTriggerWarnings() const; + void evaluateToQIODeviceSignature() const; + void evaluateToQIODeviceOnInvalidQuery() const; + void setQueryQIODeviceQUrl() const; + void setQueryQIODeviceQUrlTriggerWarnings() const; + void setQueryQString() const; + void setQueryQUrlSuccess() const; + void setQueryQUrlSuccess_data() const; + void setQueryQUrlFailSucceed() const; + void setQueryQUrlFailure() const; + void setQueryQUrlFailure_data() const; + void setQueryQUrlBaseURI() const; + void setQueryQUrlBaseURI_data() const; + void setQueryWithNonExistentQUrlOnValidQuery() const; + void setQueryWithInvalidQueryFromQUrlOnValidQuery() const; + void retrieveNameFromQuery() const; + void retrieveNameFromQuery_data() const; + void cleanupTestCase() const; + void declareUnavailableExternal() const; + void msvcCacheIssue() const; + void unavailableExternalVariable() const; + void useUriResolver() const; + void queryWithFocusAndVariable() const; + void undefinedFocus() const; + void basicFocusUsage() const; + + void queryLanguage() const; + void queryLanguageSignature() const; + void enumQueryLanguage() const; + + void setNetworkAccessManager() const; + void networkAccessManagerSignature() const; + void networkAccessManagerDefaultValue() const; + void networkAccessManager() const; + + void setInitialTemplateNameQXmlName() const; + void setInitialTemplateNameQXmlNameSignature() const; + void setInitialTemplateNameQString() const; + void setInitialTemplateNameQStringSignature() const; + void initialTemplateName() const; + void initialTemplateNameSignature() const; + + void fnDocNetworkAccessSuccess() const; + void fnDocNetworkAccessSuccess_data() const; + void fnDocNetworkAccessFailure() const; + void fnDocNetworkAccessFailure_data() const; + void multipleDocsAndFocus() const; + void multipleEvaluationsWithDifferentFocus() const; + void bindVariableQXmlQuery() const; + void bindVariableQXmlQuery_data() const; + void bindVariableQStringQXmlQuerySignature() const; + void bindVariableQXmlNameQXmlQuerySignature() const; + void bindVariableQXmlNameQXmlQuery() const; + void bindVariableQXmlQueryInvalidate() const; + void unknownSourceLocation() const; + + void identityConstraintSuccess() const; + void identityConstraintFailure() const; + void identityConstraintFailure_data() const; + + // TODO call all URI resolving functions where 1) the URI resolver return a null QUrl(); 2) resolves into valid, existing URI, 3) invalid, non-existing URI. + // TODO bind stringlists, variant lists, both ways. + // TODO trigger serialization error, or any error in evaluateToushCallback(). + // TODO let items travle between two queries, as seen in the SDK + // TODO what happens if the query declares local variable and external ones are provided? + +private: + enum + { + /** + * One excluded, since we skip static-base-uri.xq. + */ + ExpectedQueryCount = 29 + }; + + static void checkBaseURI(const QUrl &baseURI, const QString &candidate); + static QStringList queries(); + static const char *const queriesDirectory; + + int m_generatedBaselines; + int m_pushTestsCount; + const bool m_testNetwork; +}; + +void tst_QXmlQuery::checkBaseURI(const QUrl &baseURI, const QString &candidate) +{ + /* The use of QFileInfo::canonicalFilePath() takes into account that drive letters + * on Windows may have different cases. */ + QVERIFY(QDir(baseURI.toLocalFile()).relativeFilePath(QFileInfo(candidate).canonicalFilePath()).startsWith("../")); +} + +const char *const tst_QXmlQuery::queriesDirectory = XMLPATTERNSDIR "/queries/"; + +QStringList tst_QXmlQuery::queries() +{ + QDir dir; + dir.cd(inputFile(QLatin1String(queriesDirectory))); + + return dir.entryList(QStringList(QLatin1String("*.xq"))); +} + +void tst_QXmlQuery::defaultConstructor() const +{ + /* Allocate instance in different orders. */ + { + QXmlQuery query; + } + + { + QXmlQuery query1; + QXmlQuery query2; + } + + { + QXmlQuery query1; + QXmlQuery query2; + QXmlQuery query3; + } +} + +void tst_QXmlQuery::copyConstructor() const +{ + /* Verify that we can take a const reference, and simply do a copy of a default constructed object. */ + { + const QXmlQuery query1; + QXmlQuery query2(query1); + } + + /* Copy twice. */ + { + const QXmlQuery query1; + QXmlQuery query2(query1); + QXmlQuery query3(query2); + } + + /* Verify that copying default values works. */ + { + const QXmlQuery query1; + const QXmlQuery query2(query1); + QCOMPARE(query2.messageHandler(), query1.messageHandler()); + QCOMPARE(query2.uriResolver(), query1.uriResolver()); + QCOMPARE(query2.queryLanguage(), query1.queryLanguage()); + QCOMPARE(query2.initialTemplateName(), query1.initialTemplateName()); + QCOMPARE(query2.networkAccessManager(), query1.networkAccessManager()); + } + + /* Check that the + * + * - name pool + * - URI resolver + * - message handler + * - query language + * - initial template name + * + * sticks with the copy. */ + { + MessageSilencer silencer; + TestURIResolver resolver; + QNetworkAccessManager networkManager; + QXmlQuery query1(QXmlQuery::XSLT20); + QXmlNamePool np1(query1.namePool()); + + query1.setMessageHandler(&silencer); + query1.setUriResolver(&resolver); + query1.setNetworkAccessManager(&networkManager); + + const QXmlName name(np1, QLatin1String("localName"), + QLatin1String("http://example.com/"), + QLatin1String("prefix")); + query1.setInitialTemplateName(name); + + const QXmlQuery query2(query1); + QCOMPARE(query2.messageHandler(), static_cast(&silencer)); + QCOMPARE(query2.uriResolver(), static_cast(&resolver)); + QCOMPARE(query2.queryLanguage(), QXmlQuery::XSLT20); + QCOMPARE(query2.initialTemplateName(), name); + QCOMPARE(query2.networkAccessManager(), &networkManager); + + QXmlNamePool np2(query2.namePool()); + + QCOMPARE(name.namespaceUri(np2), QString::fromLatin1("http://example.com/")); + QCOMPARE(name.localName(np2), QString::fromLatin1("localName")); + QCOMPARE(name.prefix(np2), QString::fromLatin1("prefix")); + } + + { + QXmlQuery original; + + original.setFocus(QXmlItem(4)); + original.setQuery(QLatin1String(".")); + QVERIFY(original.isValid()); + + const QXmlQuery copy(original); + + QXmlResultItems result; + copy.evaluateTo(&result); + QCOMPARE(result.next().toAtomicValue(), QVariant(4)); + QVERIFY(result.next().isNull()); + QVERIFY(!result.hasError()); + } + + /* Copy, set, compare. Check that copies are independent. */ + { + // TODO all members except queryLanguage(). + } +} + +void tst_QXmlQuery::constructorQXmlNamePool() const +{ + /* Check that the namepool we are passed, is actually used. */ + QXmlNamePool np; + + QXmlQuery query(np); + const QXmlName name(np, QLatin1String("localName"), + QLatin1String("http://example.com/"), + QLatin1String("prefix")); + + QXmlNamePool np2(query.namePool()); + QCOMPARE(name.namespaceUri(np2), QString::fromLatin1("http://example.com/")); + QCOMPARE(name.localName(np2), QString::fromLatin1("localName")); + QCOMPARE(name.prefix(np2), QString::fromLatin1("prefix")); +} + +/*! + Ensure that the internal variable loading mechanisms uses the user-supplied + name pool. + + If that is not the case, different name pools are used and the code crashes. + + \since 4.5 + */ +void tst_QXmlQuery::constructorQXmlNamePoolQueryLanguage() const +{ + QXmlNamePool np; + QXmlName name(np, QLatin1String("arbitraryName")); + + QXmlQuery query(QXmlQuery::XQuery10, np); + + QBuffer input; + input.setData(""); + + QVERIFY(input.open(QIODevice::ReadOnly)); + query.bindVariable(name, &input); + query.setQuery("string(doc($arbitraryName))"); + + QStringList result; + query.evaluateTo(&result); +} + +void tst_QXmlQuery::constructorQXmlNamePoolWithinQSimpleXmlNodeModel() const +{ + class TestCTOR : public TestSimpleNodeModel + { + public: + TestCTOR(const QXmlNamePool &np) : TestSimpleNodeModel(np) + { + } + + void checkCTOR() const + { + /* If this fails to compile, the constructor has trouble with taking + * a mutable reference. + * + * The reason we use the this pointer explicitly, is to avoid a compiler + * warnings with MSVC 2005. */ + QXmlQuery(this->namePool()); + } + }; + + QXmlNamePool np; + TestCTOR ctor(np); + ctor.checkCTOR(); +} + +void tst_QXmlQuery::assignmentOperator() const +{ + class ReturnURI : public QAbstractUriResolver + { + public: + ReturnURI() {} + virtual QUrl resolve(const QUrl &relative, + const QUrl &baseURI) const + { + return baseURI.resolved(relative); + } + }; + + /* Assign this to this. */ + { + QXmlQuery query; + query = query; + query = query; + query = query; + + /* Just call a couple of functions to give valgrind + * something to check. */ + QVERIFY(!query.isValid()); + query.messageHandler(); + } + + /* Assign null instances a couple of times. */ + { + QXmlQuery query1; + QXmlQuery query2; + query1 = query2; + query1 = query2; + query1 = query2; + + /* Just call a couple of functions to give valgrind + * something to check. */ + QVERIFY(!query1.isValid()); + query1.messageHandler(); + + /* Just call a couple of functions to give valgrind + * something to check. */ + QVERIFY(!query2.isValid()); + query2.messageHandler(); + } + + /* Create a query, set all the things it stores, and ensure it + * travels over to the new instance. */ + { + MessageSilencer silencer; + const ReturnURI returnURI; + QXmlNamePool namePool; + + QBuffer documentDevice; + documentDevice.setData(QByteArray("a")); + QVERIFY(documentDevice.open(QIODevice::ReadOnly)); + + QXmlQuery original(namePool); + QXmlName testName(namePool, QLatin1String("somethingToCheck")); + + original.setMessageHandler(&silencer); + original.bindVariable(QLatin1String("var"), QXmlItem(1)); + original.bindVariable(QLatin1String("device"), &documentDevice); + original.setUriResolver(&returnURI); + original.setFocus(QXmlItem(3)); + original.setQuery(QLatin1String("$var, 1 + 1, ., string(doc($device))")); + + /* Do a copy, and check that everything followed on into the copy. No modification + * of the copy. */ + { + QXmlQuery copy; + + /* We use assignment operator, not copy constructor. */ + copy = original; + + QVERIFY(copy.isValid()); + QCOMPARE(copy.uriResolver(), static_cast(&returnURI)); + QCOMPARE(copy.messageHandler(), static_cast(&silencer)); + QCOMPARE(testName.localName(copy.namePool()), QString::fromLatin1("somethingToCheck")); + + QXmlResultItems result; + copy.evaluateTo(&result); + QCOMPARE(result.next().toAtomicValue(), QVariant(1)); + QCOMPARE(result.next().toAtomicValue(), QVariant(2)); + QCOMPARE(result.next().toAtomicValue(), QVariant(3)); + QCOMPARE(result.next().toAtomicValue(), QVariant(QString::fromLatin1("a"))); + QVERIFY(result.next().isNull()); + QVERIFY(!result.hasError()); + } + + /* Copy, and change values. Things should detach. */ + { + /* Evaluate the copy. */ + { + MessageSilencer secondSilencer; + const ReturnURI secondUriResolver; + QBuffer documentDeviceCopy; + documentDeviceCopy.setData(QByteArray("b")); + QVERIFY(documentDeviceCopy.open(QIODevice::ReadOnly)); + + QXmlQuery copy; + copy = original; + + copy.setMessageHandler(&secondSilencer); + /* Here we rebind variable values. */ + copy.bindVariable(QLatin1String("var"), QXmlItem(4)); + copy.bindVariable(QLatin1String("device"), &documentDeviceCopy); + copy.setUriResolver(&secondUriResolver); + copy.setFocus(QXmlItem(6)); + copy.setQuery(QLatin1String("$var, 1 + 1, ., string(doc($device))")); + + /* Check that the copy picked up the new things. */ + QVERIFY(copy.isValid()); + QCOMPARE(copy.uriResolver(), static_cast(&secondUriResolver)); + QCOMPARE(copy.messageHandler(), static_cast(&secondSilencer)); + + QXmlResultItems resultCopy; + copy.evaluateTo(&resultCopy); + QCOMPARE(resultCopy.next().toAtomicValue(), QVariant(4)); + QCOMPARE(resultCopy.next().toAtomicValue(), QVariant(2)); + QCOMPARE(resultCopy.next().toAtomicValue(), QVariant(6)); + const QString stringedDevice(resultCopy.next().toAtomicValue().toString()); + QCOMPARE(stringedDevice, QString::fromLatin1("b")); + QVERIFY(resultCopy.next().isNull()); + QVERIFY(!resultCopy.hasError()); + } + + /* Evaluate the original. */ + { + /* Check that the original is unchanged. */ + QVERIFY(original.isValid()); + QCOMPARE(original.uriResolver(), static_cast(&returnURI)); + QCOMPARE(original.messageHandler(), static_cast(&silencer)); + + QXmlResultItems resultOriginal; + original.evaluateTo(&resultOriginal); + QCOMPARE(resultOriginal.next().toAtomicValue(), QVariant(1)); + QCOMPARE(resultOriginal.next().toAtomicValue(), QVariant(2)); + QCOMPARE(resultOriginal.next().toAtomicValue(), QVariant(3)); + QCOMPARE(resultOriginal.next().toAtomicValue(), QVariant(QString::fromLatin1("a"))); + QVERIFY(resultOriginal.next().isNull()); + QVERIFY(!resultOriginal.hasError()); + } + } + } +} + +/*! + Since QXmlQuery doesn't seek devices to position 0, this code triggers a bug + where document caching doesn't work. Since the document caching doesn't work, + the device will be read twice, and the second time the device is at the end, + hence premature end of document. + */ +void tst_QXmlQuery::sequentialExecution() const +{ + QBuffer inBuffer; + inBuffer.setData(QByteArray("")); + QVERIFY(inBuffer.open(QIODevice::ReadOnly)); + + QXmlQuery query; + query.bindVariable("inputDocument", &inBuffer); + + QByteArray outArray; + QBuffer outBuffer(&outArray); + outBuffer.open(QIODevice::WriteOnly); + + const QString queryString(QLatin1String("doc($inputDocument)")); + query.setQuery(queryString); + + QXmlFormatter formatter(query, &outBuffer); + + QVERIFY(query.evaluateTo(&formatter)); + + /* If this line is removed, the bug isn't triggered. */ + query.setQuery(queryString); + + QVERIFY(query.evaluateTo(&formatter)); +} + +void tst_QXmlQuery::isValid() const +{ + /* Check default value. */ + QXmlQuery query; + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::bindVariableQString() const +{ + { + QXmlQuery query; + /* Bind with a null QXmlItem. */ + query.bindVariable(QLatin1String("name"), QXmlItem()); + } + + { + QXmlQuery query; + /* Bind with a null QVariant. */ + query.bindVariable(QLatin1String("name"), QXmlItem(QVariant())); + } + + { + QXmlQuery query; + /* Bind with a null QXmlNodeModelIndex. */ + query.bindVariable(QLatin1String("name"), QXmlItem(QXmlNodeModelIndex())); + } +} + +void tst_QXmlQuery::bindVariableQStringNoExternalDeclaration() const +{ + QXmlQuery query; + query.bindVariable(QLatin1String("foo"), QXmlItem(QLatin1String("Variable Value"))); + query.setQuery(QLatin1String("$foo")); + + QVERIFY(query.isValid()); + + QStringList result; + QVERIFY(query.evaluateTo(&result)); + + QCOMPARE(result, QStringList() << QLatin1String("Variable Value")); +} + +void tst_QXmlQuery::bindVariableQXmlName() const +{ + // TODO +} + +void tst_QXmlQuery::bindVariableQXmlNameTriggerWarnings() const +{ + QXmlQuery query; + + QTest::ignoreMessage(QtWarningMsg, "The variable name cannot be null."); + query.bindVariable(QXmlName(), QVariant()); +} + +void tst_QXmlQuery::bindVariableQStringQIODeviceWithByteArray() const +{ + QXmlQuery query; + + QByteArray in(""); + QBuffer device(&in); + QVERIFY(device.open(QIODevice::ReadOnly)); + + query.bindVariable("doc", &device); + + query.setQuery(QLatin1String("declare variable $doc external; $doc")); + + QVERIFY(query.isValid()); + + /* Check the URI corresponding to the variable. */ + { + QXmlResultItems items; + query.evaluateTo(&items); + + QCOMPARE(items.next().toAtomicValue().toString(), QString::fromLatin1("tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:doc")); + } + + /* Now, actually load the document. We use the same QXmlQuery just to stress recompilation a bit. */ + { + query.setQuery(QLatin1String("declare variable $doc external; doc($doc)")); + + QByteArray out; + QBuffer outBuffer(&out); + QVERIFY(outBuffer.open(QIODevice::WriteOnly)); + + QXmlSerializer serializer(query, &outBuffer); + + QVERIFY(query.evaluateTo(&serializer)); + QCOMPARE(out, in); + } +} + +void tst_QXmlQuery::bindVariableQStringQIODeviceWithString() const +{ + QXmlQuery query; + + QString in(""); + QByteArray inUtf8(in.toUtf8()); + QBuffer inDevice(&inUtf8); + + QVERIFY(inDevice.open(QIODevice::ReadOnly)); + + query.bindVariable("doc", &inDevice); + + query.setQuery(QLatin1String("declare variable $doc external; doc($doc)")); + + QByteArray out; + QBuffer outBuffer(&out); + QVERIFY(outBuffer.open(QIODevice::WriteOnly)); + + QXmlSerializer serializer(query, &outBuffer); + QVERIFY(query.evaluateTo(&serializer)); + + QCOMPARE(out, inUtf8); +} + +void tst_QXmlQuery::bindVariableQStringQIODeviceWithQFile() const +{ + QXmlQuery query; + QFile inDevice(QLatin1String(SRCDIR "input.xml")); + + QVERIFY(inDevice.open(QIODevice::ReadOnly)); + + query.bindVariable("doc", &inDevice); + + query.setQuery(QLatin1String("declare variable $doc external; doc($doc)")); + + QByteArray out; + QBuffer outBuffer(&out); + QVERIFY(outBuffer.open(QIODevice::WriteOnly)); + + QXmlSerializer serializer(query, &outBuffer); + QVERIFY(query.evaluateTo(&serializer)); + outBuffer.close(); + + QCOMPARE(out, QByteArray("")); +} + +void tst_QXmlQuery::bindVariableQStringQIODevice() const +{ + QXmlQuery query; + + /* Rebind the variable. */ + { + /* First evaluation. */ + { + QByteArray in1(""); + QBuffer inDevice1(&in1); + QVERIFY(inDevice1.open(QIODevice::ReadOnly)); + + query.bindVariable("in", &inDevice1); + query.setQuery(QLatin1String("doc($in)")); + + QByteArray out1; + QBuffer outDevice1(&out1); + QVERIFY(outDevice1.open(QIODevice::WriteOnly)); + + QXmlSerializer serializer(query, &outDevice1); + query.evaluateTo(&serializer); + QCOMPARE(out1, in1); + } + + /* Second evaluation, rebind variable. */ + { + QByteArray in2(""); + QBuffer inDevice2(&in2); + QVERIFY(inDevice2.open(QIODevice::ReadOnly)); + + query.bindVariable(QLatin1String("in"), &inDevice2); + + QByteArray out2; + QBuffer outDevice2(&out2); + QVERIFY(outDevice2.open(QIODevice::WriteOnly)); + + QXmlSerializer serializer(query, &outDevice2); + QVERIFY(query.evaluateTo(&serializer)); + QCOMPARE(out2, in2); + } + } + + // TODO trigger recompilation when setting qiodevices., and qiodevice overwritten by other type, etc. +} + +void tst_QXmlQuery::bindVariableQXmlNameQIODevice() const +{ + // TODO +} + +void tst_QXmlQuery::bindVariableQXmlNameQIODeviceTriggerWarnings() const +{ + QXmlNamePool np; + QXmlQuery query(np); + + QBuffer buffer; + QTest::ignoreMessage(QtWarningMsg, "A null, or readable QIODevice must be passed."); + query.bindVariable(QXmlName(np, QLatin1String("foo")), &buffer); + + QTest::ignoreMessage(QtWarningMsg, "The variable name cannot be null."); + query.bindVariable(QXmlName(), 0); +} + +void tst_QXmlQuery::bindVariableXSLTSuccess() const +{ + QXmlQuery stylesheet(QXmlQuery::XSLT20); + stylesheet.setInitialTemplateName(QLatin1String("main")); + + stylesheet.bindVariable(QLatin1String("variableNoSelectNoBodyBoundWithBindVariable"), + QVariant(QLatin1String("MUST NOT SHOW 1"))); + + stylesheet.bindVariable(QLatin1String("variableSelectBoundWithBindVariable"), + QVariant(QLatin1String("MUST NOT SHOW 2"))); + + stylesheet.bindVariable(QLatin1String("variableSelectWithTypeIntBoundWithBindVariable"), + QVariant(QLatin1String("MUST NOT SHOW 3"))); + + stylesheet.bindVariable(QLatin1String("paramNoSelectNoBodyBoundWithBindVariable"), + QVariant(QLatin1String("param1"))); + + stylesheet.bindVariable(QLatin1String("paramNoSelectNoBodyBoundWithBindVariableRequired"), + QVariant(QLatin1String("param1"))); + + stylesheet.bindVariable(QLatin1String("paramSelectBoundWithBindVariable"), + QVariant(QLatin1String("param2"))); + + stylesheet.bindVariable(QLatin1String("paramSelectBoundWithBindVariableRequired"), + QVariant(QLatin1String("param3"))); + + stylesheet.bindVariable(QLatin1String("paramSelectWithTypeIntBoundWithBindVariable"), + QVariant(4)); + + stylesheet.bindVariable(QLatin1String("paramSelectWithTypeIntBoundWithBindVariableRequired"), + QVariant(QLatin1String("param5"))); + + stylesheet.setQuery(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/parameters.xsl")))); + + QVERIFY(stylesheet.isValid()); + + QBuffer deviceOut; + QVERIFY(deviceOut.open(QIODevice::ReadWrite)); + + QVERIFY(stylesheet.evaluateTo(&deviceOut)); + + const QString result(QString::fromUtf8(deviceOut.data().constData())); + + QCOMPARE(result, + QString::fromLatin1("Variables: variableSelectsDefaultValue variableSelectsDefaultValue2 3 4 " + "Parameters: param1 param1 param2 param3 4 param5")); +} + +void tst_QXmlQuery::bindVariableTemporaryNode() const +{ + /* First we do it with QXmlResultItems staying in scope. */; + { + QXmlQuery query1; + query1.setQuery(""); + + QXmlResultItems result1; + query1.evaluateTo(&result1); + + QXmlQuery query2(query1); + query2.bindVariable("fromQuery1", result1.next()); + query2.setQuery("$fromQuery1"); + + QString output; + QVERIFY(query2.evaluateTo(&output)); + + QCOMPARE(output, QString::fromLatin1("\n")); + } + + /* And now with it deallocating, so its internal DynamicContext pointer is + * released. This doesn't work in Qt 4.5 and is ok. */ + { + QXmlQuery query1; + query1.setQuery(""); + + QXmlQuery query2; + + { + QXmlResultItems result1; + query1.evaluateTo(&result1); + + query2.bindVariable("fromQuery1", result1.next()); + query2.setQuery("$fromQuery1"); + } + + QString output; + return; // See comment above. + QVERIFY(query2.evaluateTo(&output)); + + QCOMPARE(output, QString::fromLatin1("\n")); + } +} + +void tst_QXmlQuery::messageHandler() const +{ + { + /* Check default value. */ + QXmlQuery query; + QCOMPARE(query.messageHandler(), static_cast(0)); + } +} + +void tst_QXmlQuery::setMessageHandler() const +{ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + QCOMPARE(static_cast(&silencer), query.messageHandler()); +} + +void tst_QXmlQuery::evaluateToReceiver() +{ + QFETCH(QString, inputQuery); + + /* This query prints a URI specific to the local system. */ + if(inputQuery == QLatin1String("static-base-uri.xq")) + return; + + ++m_pushTestsCount; + const QString queryURI(inputFile(QLatin1String(queriesDirectory) + inputQuery)); + QFile queryFile(queryURI); + + QVERIFY(queryFile.exists()); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + + QXmlQuery query; + + MessageSilencer receiver; + query.setMessageHandler(&receiver); + query.setQuery(&queryFile, QUrl::fromLocalFile(queryURI)); + + /* We read all the queries, and some of them are invalid. However, we + * only want those that compile. */ + if(!query.isValid()) + return; + + QString produced; + QTextStream stream(&produced, QIODevice::WriteOnly); + PushBaseliner push(stream, query.namePool()); + query.evaluateTo(&push); + + const QString baselineName(inputFile(QLatin1String(SRCDIR "pushBaselines/") + inputQuery.left(inputQuery.length() - 2) + QString::fromLatin1("ref"))); + QFile baseline(baselineName); + + if(baseline.exists()) + { + QVERIFY(baseline.open(QIODevice::ReadOnly | QIODevice::Text)); + const QString stringedBaseline(QString::fromUtf8(baseline.readAll())); + QCOMPARE(produced, stringedBaseline); + } + else + { + QVERIFY(baseline.open(QIODevice::WriteOnly)); + /* This is intentionally a warning, don't remove it. Update the baselines instead. */ + qWarning() << "Generated baseline for:" << baselineName; + ++m_generatedBaselines; + + baseline.write(produced.toUtf8()); + } +} + +void tst_QXmlQuery::evaluateToReceiver_data() const +{ + QTest::addColumn("inputQuery"); + + const QStringList qs(queries()); + + for(int i = 0; i < qs.size(); ++i) + { + /* This outputs a URI specific to the environment, so we can't use it for this + * particular test. */ + if(qs.at(i) != QLatin1String("staticBaseURI.xq")) + QTest::newRow(qs.at(i).toUtf8().constData()) << qs.at(i); + } +} + +void tst_QXmlQuery::evaluateToReceiverOnInvalidQuery() const +{ + /* Invoke on a default constructed object. */ + { + QByteArray out; + QBuffer buffer(&out); + buffer.open(QIODevice::WriteOnly); + + QXmlQuery query; + QXmlSerializer serializer(query, &buffer); + QVERIFY(!query.evaluateTo(&serializer)); + } + + /* Invoke on an invalid query; compile time error. */ + { + QByteArray out; + QBuffer buffer(&out); + buffer.open(QIODevice::WriteOnly); + MessageSilencer silencer; + + QXmlQuery query; + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("1 + ")); + QXmlSerializer serializer(query, &buffer); + QVERIFY(!query.evaluateTo(&serializer)); + } + + /* Invoke on an invalid query; runtime error. */ + { + QByteArray out; + QBuffer buffer(&out); + buffer.open(QIODevice::WriteOnly); + MessageSilencer silencer; + + QXmlQuery query; + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("error()")); + QXmlSerializer serializer(query, &buffer); + QVERIFY(!query.evaluateTo(&serializer)); + } +} + +void tst_QXmlQuery::evaluateToQStringTriggerError() const +{ + /* Invoke on a default constructed object. */ + { + QXmlQuery query; + QString out; + QVERIFY(!query.evaluateTo(&out)); + } + + /* Invoke on an invalid query; compile time error. */ + { + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("1 + ")); + + QString out; + QVERIFY(!query.evaluateTo(&out)); + } + + /* Invoke on an invalid query; runtime error. */ + { + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("error()")); + + QString out; + QVERIFY(!query.evaluateTo(&out)); + } +} + +void tst_QXmlQuery::evaluateToQString() const +{ + QFETCH(QString, query); + QFETCH(QString, expectedOutput); + + QXmlQuery queryInstance; + queryInstance.setQuery(query); + QVERIFY(queryInstance.isValid()); + + QString result; + QVERIFY(queryInstance.evaluateTo(&result)); + + QCOMPARE(result, expectedOutput); +} + +void tst_QXmlQuery::evaluateToQString_data() const +{ + QTest::addColumn("query"); + QTest::addColumn("expectedOutput"); + + QTest::newRow("Two atomics") + << QString::fromLatin1("1, 'two'") + << QString::fromLatin1("1 two\n"); + + QTest::newRow("An element") + << QString::fromLatin1("{1}") + << QString::fromLatin1("1\n"); +} + +void tst_QXmlQuery::evaluateToQStringSignature() const +{ + const QXmlQuery query; + + QString output; + + /* evaluateTo(QString *) should be a const function. */ + query.evaluateTo(&output); +} + +void tst_QXmlQuery::evaluateToQAbstractXmlReceiverTriggerWarnings() const +{ + QXmlQuery query; + + /* We check the return value as well as warning message here. */ + QTest::ignoreMessage(QtWarningMsg, "A non-null callback must be passed."); + QCOMPARE(query.evaluateTo(static_cast(0)), + false); +} + +void tst_QXmlQuery::evaluateToQXmlResultItems() const +{ + /* Invoke on a default constructed object. */ + { + QXmlQuery query; + QXmlResultItems result; + query.evaluateTo(&result); + QVERIFY(result.next().isNull()); + } +} + +void tst_QXmlQuery::evaluateToQXmlResultItemsTriggerWarnings() const +{ + QTest::ignoreMessage(QtWarningMsg, "A null pointer cannot be passed."); + QXmlQuery query; + query.evaluateTo(static_cast(0)); +} + +void tst_QXmlQuery::evaluateToQXmlResultItemsErrorAtEnd() const +{ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("1 to 100, fn:error()")); + QVERIFY(query.isValid()); + + QXmlResultItems it; + query.evaluateTo(&it); + + while(!it.next().isNull()) + { + } +} + +/*! + If baselines were generated, we flag it as a failure such that it gets + attention, and that they are adjusted accordingly. + */ +void tst_QXmlQuery::checkGeneratedBaselines() const +{ + QCOMPARE(m_generatedBaselines, 0); + + /* If this check fails, the auto test setup is misconfigured, or files have + * been added/removed without this number being updated. */ + QCOMPARE(m_pushTestsCount, int(ExpectedQueryCount)); +} + +void tst_QXmlQuery::basicXQueryToQtTypeCheck() const +{ + QFile queryFile(QLatin1String(queriesDirectory) + QString::fromLatin1("allAtomics.xq")); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + + QXmlQuery query; + query.setQuery(&queryFile); + QVERIFY(query.isValid()); + + QXmlResultItems it; + query.evaluateTo(&it); + + QVariantList expectedValues; + expectedValues.append(QString::fromLatin1("xs:untypedAtomic")); + expectedValues.append(QDateTime(QDate(2002, 10, 10), QTime(23, 2, 11), Qt::UTC)); + expectedValues.append(QDate(2002, 10, 10)); + expectedValues.append(QVariant()); /* We currently doesn't support xs:time through the API. */ + + expectedValues.append(QVariant()); /* xs:duration */ + expectedValues.append(QVariant()); /* xs:dayTimeDuration */ + expectedValues.append(QVariant()); /* xs:yearMonthDuration */ + + if(sizeof(qreal) == sizeof(float)) {//ARM casts to Float not to double + expectedValues.append(QVariant(float(3e3))); /* xs:float */ + expectedValues.append(QVariant(float(4e4))); /* xs:double */ + expectedValues.append(QVariant(float(2))); /* xs:decimal */ + } else { + expectedValues.append(QVariant(double(3e3))); /* xs:float */ + expectedValues.append(QVariant(double(4e4))); /* xs:double */ + expectedValues.append(QVariant(double(2))); /* xs:decimal */ + } + + /* xs:integer and its sub-types. */ + expectedValues.append(QVariant(qlonglong(16))); + expectedValues.append(QVariant(qlonglong(-6))); + expectedValues.append(QVariant(qlonglong(-4))); + expectedValues.append(QVariant(qlonglong(5))); + expectedValues.append(QVariant(qlonglong(6))); + expectedValues.append(QVariant(qlonglong(7))); + expectedValues.append(QVariant(qlonglong(8))); + expectedValues.append(QVariant(qlonglong(9))); + expectedValues.append(QVariant(qulonglong(10))); + expectedValues.append(QVariant(qlonglong(11))); + expectedValues.append(QVariant(qlonglong(12))); + expectedValues.append(QVariant(qlonglong(13))); + expectedValues.append(QVariant(qlonglong(14))); + + expectedValues.append(QVariant()); /* xs:gYearMonth("1976-02"), */ + expectedValues.append(QVariant()); /* xs:gYear("2005-12:00"), */ + expectedValues.append(QVariant()); /* xs:gMonthDay("--12-25-14:00"), */ + expectedValues.append(QVariant()); /* xs:gDay("---25-14:00"), */ + expectedValues.append(QVariant()); /* xs:gMonth("--12-14:00"), */ + expectedValues.append(true); /* xs:boolean("true"), */ + expectedValues.append(QVariant(QByteArray::fromBase64(QByteArray("aaaa")))); /* xs:base64Binary("aaaa"), */ + expectedValues.append(QVariant(QByteArray::fromHex(QByteArray("FFFF")))); /* xs:hexBinary("FFFF"), */ + expectedValues.append(QVariant(QString::fromLatin1("http://example.com/"))); /* xs:anyURI("http://example.com/"), */ + QXmlNamePool np(query.namePool()); + expectedValues.append(QVariant(qVariantFromValue(QXmlName(np, QLatin1String("localName"), + QLatin1String("http://example.com/2"), + QLatin1String("prefix"))))); + + expectedValues.append(QVariant(QString::fromLatin1("An xs:string"))); + expectedValues.append(QVariant(QString::fromLatin1("normalizedString"))); + expectedValues.append(QVariant(QString::fromLatin1("token"))); + expectedValues.append(QVariant(QString::fromLatin1("language"))); + expectedValues.append(QVariant(QString::fromLatin1("NMTOKEN"))); + expectedValues.append(QVariant(QString::fromLatin1("Name"))); + expectedValues.append(QVariant(QString::fromLatin1("NCName"))); + expectedValues.append(QVariant(QString::fromLatin1("ID"))); + expectedValues.append(QVariant(QString::fromLatin1("IDREF"))); + expectedValues.append(QVariant(QString::fromLatin1("ENTITY"))); + + int i = 0; + QXmlItem item(it.next()); + + while(!item.isNull()) + { + QVERIFY(item.isAtomicValue()); + const QVariant produced(item.toAtomicValue()); + + const QVariant &expected = expectedValues.at(i); + + /* For the cases where we can't represent a value in the XDM with Qt, + * we return an invalid QVariant. */ + QCOMPARE(expected.isValid(), produced.isValid()); + + QCOMPARE(produced.type(), expected.type()); + + if(expected.isValid()) + { + /* This is only needed for xs:decimal though, for some reason. Probably + * just artifacts created somewhere. */ + if(produced.type() == QVariant::Double) + QVERIFY(qFuzzyCompare(produced.toDouble(), expected.toDouble())); + else if(qVariantCanConvert(produced)) + { + /* QVariant::operator==() does identity comparison, it doesn't delegate to operator==() of + * the contained type, unless it's hardcoded into QVariant. */ + const QXmlName n1 = qVariantValue(produced); + const QXmlName n2 = qVariantValue(expected); + QCOMPARE(n1, n2); + } + else + QCOMPARE(produced, expected); + } + + ++i; + item = it.next(); + } + + QCOMPARE(i, expectedValues.count()); +} + +/*! + Send values from Qt into XQuery. + */ +void tst_QXmlQuery::basicQtToXQueryTypeCheck() const +{ + QFile queryFile(QLatin1String(queriesDirectory) + QLatin1String("allAtomicsExternally.xq")); + QVERIFY(queryFile.exists()); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + + QCOMPARE(QVariant(QDate(1999, 9, 10)).type(), QVariant::Date); + + QXmlQuery query; + + QXmlNamePool np(query.namePool()); + + const QXmlName name(np, QLatin1String("localname"), + QLatin1String("http://example.com"), + QLatin1String("prefix")); + + query.bindVariable(QLatin1String("fromQUrl"), QXmlItem(QUrl(QString::fromLatin1("http://example.com/")))); + query.bindVariable(QLatin1String("fromQByteArray"), QXmlItem(QByteArray("AAAA"))); + query.bindVariable(QLatin1String("fromBool"), QXmlItem(bool(true))); + query.bindVariable(QLatin1String("fromQDate"), QXmlItem(QDate(2000, 10, 11))); + // TODO Do with different QDateTime time specs + query.bindVariable(QLatin1String("fromQDateTime"), QXmlItem(QDateTime(QDate(2001, 9, 10), QTime(1, 2, 3)))); + query.bindVariable(QLatin1String("fromDouble"), QXmlItem(double(3))); + query.bindVariable(QLatin1String("fromFloat"), QXmlItem(float(4))); + query.bindVariable(QLatin1String("integer"), QXmlItem(5)); + query.bindVariable(QLatin1String("fromQString"), QXmlItem(QString::fromLatin1("A QString"))); + query.bindVariable(QLatin1String("fromQChar"), QXmlItem(QChar::fromLatin1('C'))); + + query.bindVariable(QLatin1String("fromIntLiteral"), QXmlItem(QVariant(654))); + + { + QVariant ui(uint(5)); + QCOMPARE(ui.type(), QVariant::UInt); + query.bindVariable(QLatin1String("fromUInt"), ui); + } + + { + QVariant ulnglng(qulonglong(6)); + QCOMPARE(ulnglng.type(), QVariant::ULongLong); + query.bindVariable(QLatin1String("fromULongLong"), ulnglng); + } + + { + QVariant qlnglng(qlonglong(7)); + QCOMPARE(qlnglng.type(), QVariant::LongLong); + query.bindVariable(QLatin1String("fromLongLong"), qlnglng); + } + + query.setQuery(&queryFile); + + // TODO do queries which declares external variables with types. Tons of combos here. + // TODO ensure that binding with QXmlItem() doesn't make a binding available. + // TODO test rebinding a variable. + + QVERIFY(query.isValid()); + + QXmlResultItems it; + query.evaluateTo(&it); + QXmlItem item(it.next()); + QVERIFY(!item.isNull()); + QVERIFY(item.isAtomicValue()); + + if(sizeof(qreal) == sizeof(float)) //ARM casts to Float not to double + QCOMPARE(item.toAtomicValue().toString(), + QLatin1String("4 true 3 654 7 41414141 C 2000-10-11Z 2001-09-10T01:02:03 " + "A QString http://example.com/ 5 6 true false false true true true true true true true " + "true true true")); + else + QCOMPARE(item.toAtomicValue().toString(), + QLatin1String("4 true 3 654 7 41414141 C 2000-10-11Z 2001-09-10T01:02:03 " + "A QString http://example.com/ 5 6 true true true true true true true true true true " + "true true true")); + +} + +void tst_QXmlQuery::bindNode() const +{ + QXmlQuery query; + TestSimpleNodeModel nodeModel(query.namePool()); + + query.bindVariable(QLatin1String("node"), nodeModel.root()); + QByteArray out; + QBuffer buff(&out); + QVERIFY(buff.open(QIODevice::WriteOnly)); + + query.setQuery(QLatin1String("declare variable $node external; $node")); + QXmlSerializer serializer(query, &buff); + + QVERIFY(query.evaluateTo(&serializer)); + QCOMPARE(out, QByteArray("")); +} + +/*! + Pass in a relative URI, and make sure it is resolved against the current application directory. + */ +void tst_QXmlQuery::relativeBaseURI() const +{ + QXmlQuery query; + query.setQuery(QLatin1String("fn:static-base-uri()"), QUrl(QLatin1String("a/relative/uri.weirdExtension"))); + QVERIFY(query.isValid()); + + QByteArray result; + QBuffer buffer(&result); + QVERIFY(buffer.open(QIODevice::ReadWrite)); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + const QUrl loaded(QUrl::fromEncoded(result)); + QUrl appPath(QUrl::fromLocalFile(QCoreApplication::applicationFilePath())); + + QVERIFY(loaded.isValid()); + QVERIFY(appPath.isValid()); + QVERIFY(!loaded.isRelative()); + QVERIFY(!appPath.isRelative()); + + QFileInfo dir(appPath.toLocalFile()); + dir.setFile(QString()); + + /* We can't use QUrl::isParentOf() because it doesn't do what we want it to */ + if(!loaded.toLocalFile().startsWith(dir.absoluteFilePath())) + QTextStream(stderr) << "dir.absoluteFilePath():" << dir.absoluteFilePath() << "loaded.toLocalFile():" << loaded.toLocalFile(); + + checkBaseURI(loaded, dir.absoluteFilePath()); +} + +void tst_QXmlQuery::emptyBaseURI() const +{ + QXmlQuery query; + query.setQuery(QLatin1String("fn:static-base-uri()"), QUrl()); + QVERIFY(query.isValid()); + + QByteArray result; + QBuffer buffer(&result); + QVERIFY(buffer.open(QIODevice::ReadWrite)); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + const QUrl loaded(QUrl::fromEncoded(result)); + QUrl appPath(QUrl::fromLocalFile(QCoreApplication::applicationFilePath())); + + QVERIFY(loaded.isValid()); + QVERIFY(appPath.isValid()); + QVERIFY(!loaded.isRelative()); + QVERIFY(!appPath.isRelative()); + + QFileInfo dir(appPath.toLocalFile()); + dir.setFile(QString()); + + QCOMPARE(loaded, appPath); +} + +/*! + Ensure that QDate comes out as QDateTime. + */ +void tst_QXmlQuery::roundTripDateWithinQXmlItem() const +{ + const QDate date(1999, 9, 10); + QVERIFY(date.isValid()); + + const QVariant variant(date); + QVERIFY(variant.isValid()); + QCOMPARE(variant.type(), QVariant::Date); + + const QXmlItem item(variant); + QVERIFY(!item.isNull()); + QVERIFY(item.isAtomicValue()); + + const QVariant out(item.toAtomicValue()); + QVERIFY(out.isValid()); + QCOMPARE(out.type(), QVariant::Date); + QCOMPARE(out.toDate(), date); +} + +/*! + Check whether a query is valid, which uses an unbound variable. + */ +void tst_QXmlQuery::bindingMissing() const +{ + QXmlQuery query; + MessageSilencer messageHandler; + query.setMessageHandler(&messageHandler); + + QFile queryFile(QLatin1String(queriesDirectory) + QString::fromLatin1("externalVariable.xq")); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + query.setQuery(&queryFile); + + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::bindDefaultConstructedItem() const +{ + QFETCH(QXmlItem, item); + + QXmlQuery query; + MessageSilencer messageHandler; + query.setMessageHandler(&messageHandler); + + QFile queryFile(QLatin1String(queriesDirectory) + QString::fromLatin1("externalVariable.xq")); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + query.setQuery(&queryFile); + query.bindVariable(QLatin1String("externalVariable"), item); + + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::bindDefaultConstructedItem_data() const +{ + QTest::addColumn("item"); + + QTest::newRow("QXmlItem()") << QXmlItem(); + QTest::newRow("QXmlItem(QVariant())") << QXmlItem(QVariant()); + QTest::newRow("QXmlItem(QXmlNodeModelIndex())") << QXmlItem(QXmlNodeModelIndex()); +} + +/*! + Remove a binding by binding QXmlItem() with the same name. + */ +void tst_QXmlQuery::eraseQXmlItemBinding() const +{ + QXmlQuery query; + MessageSilencer messageHandler; + query.setMessageHandler(&messageHandler); + + QFile queryFile(QLatin1String(queriesDirectory) + QString::fromLatin1("externalVariable.xq")); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + query.bindVariable(QLatin1String("externalVariable"), QXmlItem(3)); + query.setQuery(&queryFile); + QVERIFY(query.isValid()); + + QByteArray result; + QBuffer buffer(&result); + QVERIFY(buffer.open(QIODevice::ReadWrite)); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + QCOMPARE(result, QByteArray("3 63false")); + + query.bindVariable(QLatin1String("externalVariable"), QXmlItem()); + QVERIFY(!query.isValid()); +} + +/*! + Erase a variable binding + */ +void tst_QXmlQuery::eraseDeviceBinding() const +{ + /* Erase an existing QIODevice binding with another QIODevice binding. */ + { + QXmlQuery query; + + QByteArray doc(""); + QBuffer buffer(&doc); + QVERIFY(buffer.open(QIODevice::ReadOnly)); + + query.bindVariable(QLatin1String("in"), &buffer); + query.setQuery(QLatin1String("$in")); + QVERIFY(query.isValid()); + + query.bindVariable(QLatin1String("in"), 0); + QVERIFY(!query.isValid()); + } + + /* Erase an existing QXmlItem binding with another QIODevice binding. */ + { + QXmlQuery query; + + query.bindVariable(QLatin1String("in"), QXmlItem(5)); + query.setQuery(QLatin1String("$in")); + QVERIFY(query.isValid()); + + query.bindVariable(QLatin1String("in"), 0); + QVERIFY(!query.isValid()); + } +} + +/*! + Bind a variable, evaluate, bind with a different value but same type, and evaluate again. + */ +void tst_QXmlQuery::rebindVariableSameType() const +{ + QXmlQuery query; + MessageSilencer messageHandler; + query.setMessageHandler(&messageHandler); + + query.bindVariable(QLatin1String("externalVariable"), QXmlItem(3)); + + { + QFile queryFile(QLatin1String(queriesDirectory) + QString::fromLatin1("externalVariable.xq")); + QVERIFY(queryFile.open(QIODevice::ReadOnly)); + query.setQuery(&queryFile); + } + + QVERIFY(query.isValid()); + + { + QByteArray result; + QBuffer buffer(&result); + QVERIFY(buffer.open(QIODevice::ReadWrite)); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + QCOMPARE(result, QByteArray("3 63false")); + } + + { + query.bindVariable(QLatin1String("externalVariable"), QXmlItem(5)); + QByteArray result; + QBuffer buffer(&result); + QVERIFY(buffer.open(QIODevice::ReadWrite)); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + QCOMPARE(result, QByteArray("5 85false")); + } + +} + +void tst_QXmlQuery::rebindVariableDifferentType() const +{ + /* Rebind QXmlItem variable with QXmlItem variable. */ + { + QXmlQuery query; + query.bindVariable(QLatin1String("in"), QXmlItem(3)); + query.setQuery(QLatin1String("$in")); + QVERIFY(query.isValid()); + + query.bindVariable(QLatin1String("in"), QXmlItem("A string")); + QVERIFY(!query.isValid()); + } + + /* Rebind QIODevice variable with QXmlItem variable. */ + { + QXmlQuery query; + QBuffer buffer; + buffer.setData(QByteArray("")); + QVERIFY(buffer.open(QIODevice::ReadOnly)); + + query.bindVariable(QLatin1String("in"), &buffer); + query.setQuery(QLatin1String("$in")); + QVERIFY(query.isValid()); + + query.bindVariable(QLatin1String("in"), QXmlItem("A string")); + QVERIFY(!query.isValid()); + } + + /* Rebind QXmlItem variable with QIODevice variable. The type of the + * variable changes, so a recompile is necessary. */ + { + QXmlQuery query; + + query.bindVariable(QLatin1String("in"), QXmlItem(QLatin1String("A string"))); + query.setQuery(QLatin1String("$in")); + QVERIFY(query.isValid()); + + QBuffer buffer; + buffer.setData(QByteArray("")); + QVERIFY(buffer.open(QIODevice::ReadOnly)); + query.bindVariable(QLatin1String("in"), &buffer); + QVERIFY(!query.isValid()); + } +} + +void tst_QXmlQuery::rebindVariableWithNullItem() const +{ + QXmlQuery query; + + query.bindVariable(QLatin1String("name"), QXmlItem(5)); + query.bindVariable(QLatin1String("name"), QXmlItem()); +} + +void tst_QXmlQuery::constCorrectness() const +{ + QXmlResultItems result; + QXmlQuery tmp; + tmp.setQuery(QLatin1String("1")); /* Just so we have a valid query. */ + const QXmlQuery query(tmp); + + /* These functions should be const. */ + query.isValid(); + query.evaluateTo(&result); + query.namePool(); + query.uriResolver(); + query.messageHandler(); + + { + QString dummyString; + QTextStream dummyStream(&dummyString); + PushBaseliner dummy(dummyStream, query.namePool()); + query.evaluateTo(&dummy); + } +} + +void tst_QXmlQuery::objectSize() const +{ + /* We have a d pointer. */ + QCOMPARE(sizeof(QXmlQuery), sizeof(void *)); +} + +void tst_QXmlQuery::setUriResolver() const +{ + /* Set a null resolver, and make sure it can take a const pointer. */ + { + QXmlQuery query; + query.setUriResolver(static_cast(0)); + QCOMPARE(query.uriResolver(), static_cast(0)); + } + + { + TestURIResolver resolver; + QXmlQuery query; + query.setUriResolver(&resolver); + QCOMPARE(query.uriResolver(), static_cast(&resolver)); + } +} + +void tst_QXmlQuery::uriResolver() const +{ + /* Check default value. */ + { + QXmlQuery query; + QCOMPARE(query.uriResolver(), static_cast(0)); + } +} + +void tst_QXmlQuery::messageXML() const +{ + QXmlQuery query; + + MessageValidator messageValidator; + query.setMessageHandler(&messageValidator); + + query.setQuery(QLatin1String("1basicSyntaxError")); + + const QRegExp removeFilename(QLatin1String("Location: file:.*\\#")); + QVERIFY(removeFilename.isValid()); + + QVERIFY(messageValidator.success()); + QCOMPARE(messageValidator.received().remove(removeFilename), + QString::fromLatin1("Type:3\n" + "Description:

syntax error, unexpected unknown keyword

\n" + "Identifier: http://www.w3.org/2005/xqt-errors#XPST0003\n" + "1,1")); +} + +/*! + 1. Allocate QXmlResultItems + 2. Allocate QXmlQuery + 3. evaluate to the QXmlResultItems instance + 4. Dellocate the QXmlQuery instance + 5. Ensure QXmlResultItems works + */ +void tst_QXmlQuery::resultItemsDeallocatedQuery() const +{ + QXmlResultItems result; + + { + QXmlQuery query; + query.setQuery(QLatin1String("1, 2, xs:integer(3)")); + query.evaluateTo(&result); + } + + QCOMPARE(result.next().toAtomicValue(), QVariant(1)); + QCOMPARE(result.next().toAtomicValue(), QVariant(2)); + QCOMPARE(result.next().toAtomicValue(), QVariant(3)); + QVERIFY(result.next().isNull()); + QVERIFY(!result.hasError()); +} + +/*! + 1. Bind variable with bindVariable() + 2. setQuery that has 'declare variable' with same name. + 3. Ensure the value inside the query is used. We don't guarantee this behavior + but that's what we lock. + */ +void tst_QXmlQuery::shadowedVariables() const +{ + QXmlQuery query; + query.bindVariable("varName", QXmlItem(3)); + query.setQuery(QLatin1String("declare variable $varName := 5; $varName")); + + QXmlResultItems result; + query.evaluateTo(&result); + + QCOMPARE(result.next().toAtomicValue(), QVariant(5)); +} + +void tst_QXmlQuery::setFocusQXmlItem() const +{ + /* Make sure we can take a const reference. */ + { + QXmlQuery query; + const QXmlItem item; + query.setFocus(item); + } + + // TODO evaluate with atomic value, check type + // TODO evaluate with node, check type + // TODO ensure that setFocus() triggers query recompilation, as appropriate. + // TODO let the focus be undefined, call isvalid, call evaluate anyway + // TODO let the focus be undefined, call evaluate directly +} + +void tst_QXmlQuery::setFocusQUrl() const +{ + /* Load a focus which isn't well-formed. */ + { + QXmlQuery query; + MessageSilencer silencer; + + query.setMessageHandler(&silencer); + + QVERIFY(!query.setFocus(QUrl(QLatin1String("data/notWellformed.xml")))); + } + + /* Ensure the same URI resolver is used. */ + { + QXmlQuery query(QXmlQuery::XSLT20); + + const TestURIResolver resolver(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml")))); + query.setUriResolver(&resolver); + + QVERIFY(query.setFocus(QUrl(QLatin1String("arbitraryURI")))); + query.setQuery(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/copyWholeDocument.xsl")))); + QVERIFY(query.isValid()); + + QBuffer result; + QVERIFY(result.open(QIODevice::ReadWrite)); + QXmlSerializer serializer(query, &result); + query.evaluateTo(&serializer); + + QCOMPARE(result.data(), QByteArray("")); + } + + // TODO ensure that the focus type doesn't change from XSLT20 on the main instance. +} + +/*! + This code poses a challenge wrt. to internal caching. + */ +void tst_QXmlQuery::setFocusQIODevice() const +{ + QXmlQuery query; + + { + QBuffer focus; + focus.setData(QByteArray("abc")); + QVERIFY(focus.open(QIODevice::ReadOnly)); + query.setFocus(&focus); + query.setQuery(QLatin1String("string()")); + QVERIFY(query.isValid()); + + QString output; + query.evaluateTo(&output); + + QCOMPARE(output, QString::fromLatin1("abc\n")); + } + + /* Set a new focus, make sure it changes & works. */ + { + QBuffer focus2; + focus2.setData(QByteArray("abc2")); + QVERIFY(focus2.open(QIODevice::ReadOnly)); + query.setFocus(&focus2); + QVERIFY(query.isValid()); + + QString output; + query.evaluateTo(&output); + + QCOMPARE(output, QString::fromLatin1("abc2\n")); + } +} + +/*! + Since we internally use variable bindings for implementing the focus, we need + to make sure we don't clash in this area. +*/ +void tst_QXmlQuery::setFocusQIODeviceAvoidVariableClash() const +{ + QBuffer buffer; + buffer.setData("focus"); + QVERIFY(buffer.open(QIODevice::ReadOnly)); + + /* First we bind the variable name, then the focus. */ + { + QXmlQuery query; + query.bindVariable(QString(QLatin1Char('u')), QVariant(1)); + query.setFocus(&buffer); + query.setQuery(QLatin1String("string()")); + + QString out; + query.evaluateTo(&out); + + QCOMPARE(out, QString::fromLatin1("focus\n")); + } + + /* First we bind the focus, then the variable name. */ + { + QXmlQuery query; + QVERIFY(buffer.open(QIODevice::ReadOnly)); + query.setFocus(&buffer); + query.bindVariable(QString(QLatin1Char('u')), QVariant(1)); + query.setQuery(QLatin1String("string()")); + + QString out; + query.evaluateTo(&out); + + QCOMPARE(out, QString::fromLatin1("focus\n")); + } +} + +void tst_QXmlQuery::setFocusQIODeviceFailure() const +{ + /* A not well-formed input document. */ + { + QXmlQuery query; + + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + QBuffer input; + input.setData("textNode
"))); + query.setQuery(QLatin1String("string()")); + QVERIFY(query.isValid()); + QString out; + query.evaluateTo(&out); + QCOMPARE(out, QString::fromLatin1("textNode\n")); + } + + /* Set to a new focus, make sure it changes and works. */ + { + QVERIFY(query.setFocus(QLatin1String("newFocus"))); + QString out; + query.evaluateTo(&out); + QCOMPARE(out, QString::fromLatin1("newFocus\n")); + } +} + +void tst_QXmlQuery::setFocusQStringFailure() const +{ + QXmlQuery query; + MessageSilencer silencer; + + query.setMessageHandler(&silencer); + QVERIFY(!query.setFocus(QLatin1String("(query.setFocus(QString())); +} + +void tst_QXmlQuery::setFocusQIODeviceTriggerWarnings() const +{ + /* A null pointer. */ + { + QXmlQuery query; + + QTest::ignoreMessage(QtWarningMsg, "A null QIODevice pointer cannot be passed."); + QCOMPARE(query.setFocus(static_cast(0)), false); + } + + /* A non opened-device. */ + { + QXmlQuery query; + + QBuffer notReadable; + QVERIFY(!notReadable.isReadable()); + + QTest::ignoreMessage(QtWarningMsg, "The device must be readable."); + QCOMPARE(query.setFocus(¬Readable), false); + } +} + +void tst_QXmlQuery::fnDocNetworkAccessSuccess() const +{ +#if defined(Q_OS_WINCE) && !defined(_X86_) + QStringList testsToSkip; + testsToSkip << "http scheme" << "ftp scheme"; + if (testsToSkip.contains(QTest::currentDataTag())) + QSKIP("Network tests are currently unsupported on Windows CE.", SkipSingle); +#endif + + QFETCH(QUrl, uriToOpen); + QFETCH(QByteArray, expectedOutput); + + if(!uriToOpen.isValid()) + qDebug() << "uriToOpen:" << uriToOpen; + + QVERIFY(uriToOpen.isValid()); + + QXmlQuery query; + query.bindVariable(QLatin1String("uri"), QVariant(uriToOpen)); + query.setQuery(QLatin1String("declare variable $uri external;\ndoc($uri)")); + QVERIFY(query.isValid()); + + QByteArray result; + QBuffer buffer(&result); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + + QXmlSerializer serializer(query, &buffer); + QVERIFY(query.evaluateTo(&serializer)); + + QCOMPARE(result, expectedOutput); +} + +void tst_QXmlQuery::fnDocNetworkAccessSuccess_data() const +{ + QTest::addColumn("uriToOpen"); + QTest::addColumn("expectedOutput"); + + QTest::newRow("file scheme") + << inputFileAsURI(QLatin1String(SRCDIR "input.xml")) + << QByteArray(""); + + QTest::newRow("data scheme with ASCII") + /* QUrl::toPercentEncoding(QLatin1String("")) yields "%3Ce%2F%3E". */ + << QUrl::fromEncoded("data:application/xml,%3Ce%2F%3E") + << QByteArray(""); + + QTest::newRow("data scheme with ASCII no MIME type") + << QUrl::fromEncoded("data:,%3Ce%2F%3E") + << QByteArray(""); + + QTest::newRow("data scheme with base 64") + << QUrl::fromEncoded("data:application/xml;base64,PGUvPg==") + << QByteArray(""); + + QTest::newRow("qrc scheme") + << QUrl::fromEncoded("qrc:/QXmlQueryTestData/data/oneElement.xml") + << QByteArray(""); + + if(!m_testNetwork) + return; + + QTest::newRow("http scheme") + << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/wellFormed.xml")) + << QByteArray("Some Text"); + + QTest::newRow("ftp scheme") + << QUrl(QString("ftp://" + QtNetworkSettings::serverName() + "/pub/qxmlquery/wellFormed.xml")) + << QByteArray("Some Text"); + +} + +void tst_QXmlQuery::fnDocNetworkAccessFailure() const +{ + QFETCH(QUrl, uriToOpen); + + QVERIFY(uriToOpen.isValid()); + + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + query.bindVariable(QLatin1String("uri"), QVariant(uriToOpen)); + query.setQuery(QLatin1String("declare variable $uri external;\ndoc($uri)")); + QVERIFY(query.isValid()); + + QXmlResultItems result; + query.evaluateTo(&result); + + while(!result.next().isNull()) + { + /* Just loop until the end. */ + } + + // TODO do something that triggers a /timeout/. + QVERIFY(result.hasError()); +} + +void tst_QXmlQuery::fnDocNetworkAccessFailure_data() const +{ + QTest::addColumn("uriToOpen"); + + QTest::newRow("data scheme, not-well-formed") + << QUrl(QLatin1String("data:application/xml;base64,PGUvg===")); + + QTest::newRow("file scheme, non-existant file") + << QUrl(QLatin1String("file:///example.com/does/notExist.xml")); + + QTest::newRow("http scheme, file not found") + << QUrl(QLatin1String("http://www.example.com/does/not/exist.xml")); + + QTest::newRow("http scheme, nonexistent host") + << QUrl(QLatin1String("http://this.host.does.not.exist.I.SWear")); + + QTest::newRow("qrc scheme, not well-formed") + << QUrl(QLatin1String("qrc:/QXmlQueryTestData/notWellformed.xml")); + + QTest::newRow("'qrc:/', non-existing file") + << QUrl(QLatin1String(":/QXmlQueryTestData/data/thisFileDoesNotExist.xml")); + + QTest::newRow("':/', this scheme is not supported") + << QUrl(QLatin1String(":/QXmlQueryTestData/data/notWellformed.xml")); + + if(!m_testNetwork) + return; + + QTest::newRow("http scheme, not well-formed") + << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/notWellformed.xml")); + + QTest::newRow("https scheme, not well-formed") + << QUrl(QString("https://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/notWellformedViaHttps.xml")); + + QTest::newRow("https scheme, nonexistent host") + << QUrl(QLatin1String("https://this.host.does.not.exist.I.SWear")); + + QTest::newRow("ftp scheme, nonexistent host") + << QUrl(QLatin1String("ftp://this.host.does.not.exist.I.SWear")); + + QTest::newRow("ftp scheme, not well-formed") + << QUrl(QString("ftp://" + QtNetworkSettings::serverName() + "/pub/qxmlquery/notWellFormed.xml")); +} + +/*! + Create a network timeout from a QIODevice binding such + that we ensure we don't hang infinitely. + */ +void tst_QXmlQuery::fnDocOnQIODeviceTimeout() const +{ + if(!m_testNetwork) + return; + + QTcpServer server; + server.listen(QHostAddress::LocalHost, 1088); + + QTcpSocket client; + client.connectToHost("localhost", 1088); + QVERIFY(client.isReadable()); + + QXmlQuery query; + + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.bindVariable(QLatin1String("inDevice"), &client); + query.setQuery(QLatin1String("declare variable $inDevice external;\ndoc($inDevice)")); + QVERIFY(query.isValid()); + + QXmlResultItems result; + query.evaluateTo(&result); + QXmlItem next(result.next()); + + while(!next.isNull()) + { + next = result.next(); + } + + QVERIFY(result.hasError()); +} + +/*! + When changing query, the static context must change too, such that + the source locations are updated. + */ +void tst_QXmlQuery::recompilationWithEvaluateToResultFailing() const +{ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("1 + 1")); /* An arbitrary valid query. */ + QVERIFY(query.isValid()); /* Trigger query compilation. */ + + query.setQuery(QLatin1String("fn:doc('doesNotExist.example.com.xml')")); /* An arbitrary invalid query that make use of a source location. */ + QVERIFY(query.isValid()); /* Trigger second compilation. */ + + QXmlResultItems items; + query.evaluateTo(&items); + items.next(); + QVERIFY(items.hasError()); +} + +void tst_QXmlQuery::secondEvaluationWithEvaluateToResultFailing() const +{ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("1 + 1")); /* An arbitrary valid query. */ + QVERIFY(query.isValid()); /* Trigger query compilation. */ + + query.setQuery(QLatin1String("fn:doc('doesNotExist.example.com.xml')")); /* An arbitrary invalid query that make use of a source location. */ + /* We don't call isValid(). */ +QXmlResultItems items; + query.evaluateTo(&items); + items.next(); + QVERIFY(items.hasError()); +} + +/*! + Compilation is triggered in the evaluation function due to no call to QXmlQuery::isValid(). + */ +void tst_QXmlQuery::recompilationWithEvaluateToReceiver() const +{ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("1 + 1")); /* An arbitrary valid query. */ + QVERIFY(query.isValid()); /* Trigger query compilation. */ + + query.setQuery(QLatin1String("fn:doc('doesNotExist.example.com.xml')")); /* An arbitrary invalid query that make use of a source location. */ + /* We don't call isValid(). */ + + QByteArray dummy; + QBuffer buffer(&dummy); + buffer.open(QIODevice::WriteOnly); + + QXmlSerializer serializer(query, &buffer); + + QVERIFY(!query.evaluateTo(&serializer)); +} + +void tst_QXmlQuery::evaluateToQStringListOnInvalidQuery() const +{ + MessageSilencer silencer; + + /* Invoke on a default constructed object. */ + { + QXmlQuery query; + QStringList out; + QVERIFY(!query.evaluateTo(&out)); + } + + /* Invoke on a syntactically invalid query. */ + { + QXmlQuery query; + QStringList out; + MessageSilencer silencer; + + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("1 + ")); + + QVERIFY(!query.evaluateTo(&out)); + } + + /* Invoke on a query with the wrong type, one atomic. */ + { + QXmlQuery query; + QStringList out; + + query.setQuery(QLatin1String("1")); + query.setMessageHandler(&silencer); + QVERIFY(!query.evaluateTo(&out)); + } + + /* Invoke on a query with the wrong type, one element. */ + { + QXmlQuery query; + QStringList out; + + query.setQuery(QLatin1String("")); + QVERIFY(!query.evaluateTo(&out)); + } + + /* Invoke on a query with the wrong type, mixed nodes & atomics. */ + { + QXmlQuery query; + QStringList out; + + query.setQuery(QLatin1String(", 1, 'a string'")); + query.setMessageHandler(&silencer); + QVERIFY(!query.evaluateTo(&out)); + } + + /* Evaluate the empty sequence. */ + { + QXmlQuery query; + QStringList out; + + query.setQuery(QLatin1String("()")); + QVERIFY(!query.evaluateTo(&out)); + QVERIFY(out.isEmpty()); + } +} + +void tst_QXmlQuery::evaluateToQStringList() const +{ + QFETCH(QString, queryString); + QFETCH(QStringList, expectedOutput); + + QXmlQuery query; + query.setQuery(queryString); + QStringList out; + QVERIFY(query.isValid()); + + QVERIFY(query.evaluateTo(&out)); + + QCOMPARE(out, expectedOutput); +} + +void tst_QXmlQuery::evaluateToQStringListTriggerWarnings() const +{ + QXmlQuery query; + + QTest::ignoreMessage(QtWarningMsg, "A non-null callback must be passed."); + QCOMPARE(query.evaluateTo(static_cast(0)), + false); +} + +void tst_QXmlQuery::evaluateToQStringList_data() const +{ + QTest::addColumn("queryString"); + QTest::addColumn("expectedOutput"); + + QTest::newRow("One atomic") + << QString::fromLatin1("(1 + 1) cast as xs:string") + << QStringList(QString::fromLatin1("2")); + + { + QStringList expected; + expected << QLatin1String("2"); + expected << QLatin1String("a string"); + + QTest::newRow("Two atomics") + << QString::fromLatin1("(1 + 1) cast as xs:string, 'a string'") + << expected; + } + + QTest::newRow("A query which evaluates to sub-types of xs:string.") + << QString::fromLatin1("xs:NCName('NCName'), xs:normalizedString(' a b c ')") + << (QStringList() << QString::fromLatin1("NCName") + << QString::fromLatin1(" a b c ")); + + QTest::newRow("A query which evaluates to two elements.") + << QString::fromLatin1("string(theString1), string(theString2)") + << (QStringList() << QString::fromLatin1("theString1") + << QString::fromLatin1("theString2")); +} + +/*! + Ensure that we don't automatically convert non-xs:string values. + */ +void tst_QXmlQuery::evaluateToQStringListNoConversion() const +{ + QXmlQuery query; + query.setQuery(QString::fromLatin1("")); + QVERIFY(query.isValid()); + QStringList result; + QVERIFY(!query.evaluateTo(&result)); +} + +void tst_QXmlQuery::evaluateToQIODevice() const +{ + /* an XQuery, check that no indentation is performed. */ + { + QBuffer out; + QVERIFY(out.open(QIODevice::ReadWrite)); + + QXmlQuery query; + query.setQuery(QLatin1String("")); + QVERIFY(query.isValid()); + QVERIFY(query.evaluateTo(&out)); + QCOMPARE(out.data(), QByteArray("")); + } +} + +void tst_QXmlQuery::evaluateToQIODeviceTriggerWarnings() const +{ + QXmlQuery query; + + QTest::ignoreMessage(QtWarningMsg, "The pointer to the device cannot be null."); + QCOMPARE(query.evaluateTo(static_cast(0)), + false); + + QBuffer buffer; + + QTest::ignoreMessage(QtWarningMsg, "The device must be writable."); + QCOMPARE(query.evaluateTo(&buffer), + false); +} + +void tst_QXmlQuery::evaluateToQIODeviceSignature() const +{ + /* The function should be const. */ + { + QBuffer out; + QVERIFY(out.open(QIODevice::ReadWrite)); + + const QXmlQuery query; + + query.evaluateTo(&out); + } +} + +void tst_QXmlQuery::evaluateToQIODeviceOnInvalidQuery() const +{ + QBuffer out; + QVERIFY(out.open(QIODevice::WriteOnly)); + + /* On syntactically invalid query. */ + { + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("1 +")); + QVERIFY(!query.isValid()); + QVERIFY(!query.evaluateTo(&out)); + } + + /* On null QXmlQuery instance. */ + { + QXmlQuery query; + QVERIFY(!query.evaluateTo(&out)); + } + +} + +void tst_QXmlQuery::setQueryQIODeviceQUrl() const +{ + /* Basic test. */ + { + QBuffer buffer; + buffer.setData("1, 2, 2 + 1"); + QVERIFY(buffer.open(QIODevice::ReadOnly)); + + QXmlQuery query; + query.setQuery(&buffer); + QVERIFY(query.isValid()); + + QXmlResultItems result; + query.evaluateTo(&result); + QCOMPARE(result.next().toAtomicValue(), QVariant(1)); + QCOMPARE(result.next().toAtomicValue(), QVariant(2)); + QCOMPARE(result.next().toAtomicValue(), QVariant(3)); + QVERIFY(result.next().isNull()); + QVERIFY(!result.hasError()); + } + + /* Set query that is invalid. */ + { + QBuffer buffer; + buffer.setData("1, "); + QVERIFY(buffer.open(QIODevice::ReadOnly)); + + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + query.setQuery(&buffer); + QVERIFY(!query.isValid()); + } + + /* Check that the base URI passes through. */ + { + QBuffer buffer; + buffer.setData("string(static-base-uri())"); + QVERIFY(buffer.open(QIODevice::ReadOnly)); + + QXmlQuery query; + query.setQuery(&buffer, QUrl::fromEncoded("http://www.example.com/QIODeviceQUrl")); + QVERIFY(query.isValid()); + + QStringList result; + query.evaluateTo(&result); + QCOMPARE(result, QStringList(QLatin1String("http://www.example.com/QIODeviceQUrl"))); + } +} + +void tst_QXmlQuery::setQueryQIODeviceQUrlTriggerWarnings() const +{ + QXmlQuery query; + QTest::ignoreMessage(QtWarningMsg, "A null QIODevice pointer cannot be passed."); + query.setQuery(0); + + QBuffer buffer; + QTest::ignoreMessage(QtWarningMsg, "The device must be readable."); + query.setQuery(&buffer); +} + +void tst_QXmlQuery::setQueryQString() const +{ + /* Basic test. */ + { + QXmlQuery query; + query.setQuery(QLatin1String("1, 2, 2 + 1")); + QVERIFY(query.isValid()); + + QXmlResultItems result; + query.evaluateTo(&result); + QCOMPARE(result.next().toAtomicValue(), QVariant(1)); + QCOMPARE(result.next().toAtomicValue(), QVariant(2)); + QCOMPARE(result.next().toAtomicValue(), QVariant(3)); + QVERIFY(result.next().isNull()); + QVERIFY(!result.hasError()); + } + + /* Set query that is invalid. */ + { + MessageSilencer silencer; + QXmlQuery query; + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("1, ")); + QVERIFY(!query.isValid()); + } + + /* Check that the base URI passes through. */ + { + QXmlQuery query; + query.setQuery(QLatin1String("string(static-base-uri())"), QUrl::fromEncoded("http://www.example.com/QIODeviceQUrl")); + QVERIFY(query.isValid()); + + QStringList result; + query.evaluateTo(&result); + QCOMPARE(result, QStringList(QLatin1String("http://www.example.com/QIODeviceQUrl"))); + } +} + +void tst_QXmlQuery::setQueryQUrlSuccess() const +{ +#if defined(Q_OS_WINCE) && !defined(_X86_) + QStringList testsToSkip; + testsToSkip << "A valid query via the ftp scheme" << "A valid query via the http scheme"; + if (testsToSkip.contains(QTest::currentDataTag())) + QSKIP("Network tests are currently unsupported on Windows CE.", SkipSingle); +#endif + + QFETCH(QUrl, queryURI); + QFETCH(QByteArray, expectedOutput); + + QVERIFY(queryURI.isValid()); + + QXmlQuery query; + + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(queryURI); + QVERIFY(query.isValid()); + + QByteArray out; + QBuffer buffer(&out); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + QXmlSerializer serializer(query, &buffer); + + query.evaluateTo(&serializer); + QCOMPARE(out, expectedOutput); +} + +void tst_QXmlQuery::setQueryQUrlSuccess_data() const +{ + QTest::addColumn("queryURI"); + QTest::addColumn("expectedOutput"); + + QTest::newRow("A valid query via the data scheme") + << QUrl::fromEncoded("data:application/xml,1%20%2B%201") /* "1 + 1" */ + << QByteArray("2"); + + QTest::newRow("A valid query via the file scheme") + << QUrl::fromLocalFile(inputFile(QLatin1String(queriesDirectory) + QLatin1String("onePlusOne.xq"))) + << QByteArray("2"); + + if(!m_testNetwork) + return; + + QTest::newRow("A valid query via the ftp scheme") + << QUrl::fromEncoded(QString("ftp://" + QtNetworkSettings::serverName() + "/pub/qxmlquery/viaFtp.xq").toLatin1()) + << QByteArray("This was received via FTP"); + + QTest::newRow("A valid query via the http scheme") + << QUrl::fromEncoded(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/viaHttp.xq").toLatin1()) + << QByteArray("This was received via HTTP."); +} + +void tst_QXmlQuery::setQueryQUrlFailSucceed() const +{ + QXmlQuery query; + MessageSilencer silencer; + + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("1 + 1")); + QVERIFY(query.isValid()); + + query.setQuery(QUrl::fromEncoded("file://example.com/does/not/exist")); + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::setQueryQUrlFailure() const +{ + QFETCH(QUrl, queryURI); + + MessageSilencer silencer; + + QXmlQuery query; + query.setMessageHandler(&silencer); + query.setQuery(queryURI); + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::setQueryQUrlFailure_data() const +{ + QTest::addColumn("queryURI"); + + QTest::newRow("Query via file:// that does not exist.") + << QUrl::fromEncoded("file://example.com/does/not/exist"); + + QTest::newRow("A query via file:// that is completely empty, but readable.") + << QUrl::fromLocalFile(QCoreApplication::applicationFilePath()).resolved(QUrl("../xmlpatterns/queries/completelyEmptyQuery.xq")); + + { + const QString name(QLatin1String("nonReadableFile.xq")); + QFile outFile(name); + QVERIFY(outFile.open(QIODevice::WriteOnly)); + outFile.write(QByteArray("1")); + outFile.close(); + /* On some windows versions, this fails, so we don't check that this works with QVERIFY. */ + outFile.setPermissions(QFile::Permissions(QFile::Permissions())); + + QTest::newRow("Query via file:/ that does not have read permissions.") + << QUrl::fromLocalFile(QCoreApplication::applicationFilePath()).resolved(QUrl("nonReadableFile.xq")); + } + + if(!m_testNetwork) + return; + + QTest::newRow("Query via HTTP that does not exist.") + << QUrl::fromEncoded("http://example.com/NoQuery/ISWear"); + + /* + QTest::newRow("Query via FTP that does not exist.") + << QUrl::fromEncoded("ftp://example.com/NoQuery/ISWear"); + */ + + QTest::newRow("A query via http:// that is completely empty, but readable.") + << QUrl::fromEncoded(QString( + "http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/completelyEmptyQuery.xq").toLatin1()); + + QTest::newRow("A query via ftp:// that is completely empty, but readable.") + << QUrl::fromEncoded(QString( + "ftp://" + QtNetworkSettings::serverName() + "/pub/qxmlquery/completelyEmptyQuery.xq").toLatin1()); + +} + +void tst_QXmlQuery::setQueryQUrlBaseURI() const +{ + QFETCH(QUrl, inputBaseURI); + QFETCH(QUrl, expectedBaseURI); + + QXmlQuery query; + + query.setQuery(QUrl(QLatin1String("qrc:/QXmlQueryTestData/queries/staticBaseURI.xq")), inputBaseURI); + QVERIFY(query.isValid()); + + QStringList result; + QVERIFY(query.evaluateTo(&result)); + QCOMPARE(result.count(), 1); + + if(qstrcmp(QTest::currentDataTag(), "Relative base URI") == 0) + checkBaseURI(QUrl(result.first()), QCoreApplication::applicationFilePath()); + else + QCOMPARE(result.first(), expectedBaseURI.toString()); +} + +void tst_QXmlQuery::setQueryQUrlBaseURI_data() const +{ + QTest::addColumn("inputBaseURI"); + QTest::addColumn("expectedBaseURI"); + + QTest::newRow("absolute HTTP") + << QUrl(QLatin1String("http://www.example.com/")) + << QUrl(QLatin1String("http://www.example.com/")); + + QTest::newRow("None, so the query URI is used") + << QUrl() + << QUrl(QLatin1String("qrc:/QXmlQueryTestData/queries/staticBaseURI.xq")); + + QTest::newRow("Relative base URI") + << QUrl(QLatin1String("../data/relative.uri")) + << QUrl(); +} + +/*! + 1. Create a valid query. + 2. Call setQuery(QUrl), with a query file that doesn't exist. + 3. Verify that the query has changed state into invalid. + */ +void tst_QXmlQuery::setQueryWithNonExistentQUrlOnValidQuery() const +{ + QXmlQuery query; + + MessageSilencer messageSilencer; + query.setMessageHandler(&messageSilencer); + + query.setQuery(QLatin1String("1 + 1")); + QVERIFY(query.isValid()); + + query.setQuery(QUrl::fromEncoded("qrc:/QXmlQueryTestData/DOESNOTEXIST.xq")); + QVERIFY(!query.isValid()); +} + +/*! + 1. Create a valid query. + 2. Call setQuery(QUrl), with a query file that is invalid. + 3. Verify that the query has changed state into invalid. + */ +void tst_QXmlQuery::setQueryWithInvalidQueryFromQUrlOnValidQuery() const +{ + QXmlQuery query; + + MessageSilencer messageSilencer; + query.setMessageHandler(&messageSilencer); + + query.setQuery(QLatin1String("1 + 1")); + QVERIFY(query.isValid()); + + query.setQuery(QUrl::fromEncoded("qrc:/QXmlQueryTestData/queries/syntaxError.xq")); + QVERIFY(!query.isValid()); +} + +/*! + This triggered two bugs: + + - First, the DynamicContext wasn't assigned to QXmlResultItems, meaning it went out of + scope and therefore deallocated the document pool, and calls + to QXmlResultItems::next() would use dangling pointers. + + - Conversion between QPatternist::Item and QXmlItem was incorrectly done, leading to nodes + being treated as atomic values, and subsequent crashes. + + */ +void tst_QXmlQuery::retrieveNameFromQuery() const +{ + QFETCH(QString, queryString); + QFETCH(QString, expectedName); + + QXmlQuery query; + query.setQuery(queryString); + QVERIFY(query.isValid()); + QXmlResultItems result; + query.evaluateTo(&result); + + QVERIFY(!result.hasError()); + + const QXmlItem item(result.next()); + QVERIFY(!result.hasError()); + QVERIFY(!item.isNull()); + QVERIFY(item.isNode()); + + const QXmlNodeModelIndex node(item.toNodeModelIndex()); + QVERIFY(!node.isNull()); + + QCOMPARE(node.model()->name(node).localName(query.namePool()), expectedName); +} + +void tst_QXmlQuery::retrieveNameFromQuery_data() const +{ + QTest::addColumn("queryString"); + QTest::addColumn("expectedName"); + + QTest::newRow("Document-node") + << QString::fromLatin1("document{}") + << QString(); + + QTest::newRow("Element") + << QString::fromLatin1("document{}/*") + << QString::fromLatin1("elementName"); +} + +/*! + Binding a null QString leads to no variable binding, but an + empty non-null QString is possible. + */ +void tst_QXmlQuery::bindEmptyNullString() const +{ + MessageSilencer messageHandler; + QXmlQuery query; + query.setMessageHandler(&messageHandler); + query.setQuery(QLatin1String("declare variable $v external; $v")); + /* Here, we effectively pass an invalid QVariant. */ + query.bindVariable(QLatin1String("v"), QVariant(QString())); + QVERIFY(!query.isValid()); + + QStringList result; + QVERIFY(!query.evaluateTo(&result)); +} + +void tst_QXmlQuery::bindEmptyString() const +{ + QXmlQuery query; + query.bindVariable(QLatin1String("v"), QVariant(QString(QLatin1String("")))); + query.setQuery(QLatin1String("declare variable $v external; $v")); + QVERIFY(query.isValid()); + + QStringList result; + QVERIFY(query.evaluateTo(&result)); + QStringList expected((QString())); + QCOMPARE(result, expected); +} + +void tst_QXmlQuery::cleanupTestCase() const +{ + /* Remove a weird file we created. */ + const QString name(QLatin1String("nonReadableFile.xq")); + + if(QFile::exists(name)) + { + QFile file(name); + QVERIFY(file.setPermissions(QFile::WriteOwner)); + QVERIFY(file.remove()); + } +} + +void tst_QXmlQuery::declareUnavailableExternal() const +{ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("declare variable $var external;" + "1 + 1")); + /* We do not bind $var with QXmlQuery::bindVariable(). */ + QVERIFY(!query.isValid()); +} + +/*! + This test triggers an assert in one of the cache iterator + with MSVC 2005 when compiled in debug mode. + */ +void tst_QXmlQuery::msvcCacheIssue() const +{ + QXmlQuery query; + query.bindVariable(QLatin1String("externalVariable"), QXmlItem("Variable Value")); + query.setQuery(QUrl::fromLocalFile(QLatin1String(queriesDirectory) + QString::fromLatin1("externalVariableUsedTwice.xq"))); + QStringList result; + QVERIFY(query.evaluateTo(&result)); + + QCOMPARE(result, + QStringList() << QString::fromLatin1("Variable Value") << QString::fromLatin1("Variable Value")); +} + +void tst_QXmlQuery::unavailableExternalVariable() const +{ + QXmlQuery query; + + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("declare variable $foo external; 1")); + + QVERIFY(!query.isValid()); +} + +/*! + Ensure that setUriResolver() affects \c fn:doc() and \c fn:doc-available(). + */ +void tst_QXmlQuery::useUriResolver() const +{ + class TestUriResolver : public QAbstractUriResolver + , private TestFundament + { + public: + TestUriResolver() {} + virtual QUrl resolve(const QUrl &relative, + const QUrl &baseURI) const + { + Q_UNUSED(relative); + return baseURI.resolved(inputFile(QLatin1String(queriesDirectory) + QLatin1String("simpleDocument.xml"))); + } + }; + + const TestUriResolver uriResolver; + QXmlQuery query; + + query.setUriResolver(&uriResolver); + query.setQuery(QLatin1String("let $i := 'http://www.example.com/DoesNotExist'" + "return (string(doc($i)), doc-available($i))")); + + + QXmlResultItems result; + query.evaluateTo(&result); + + QVERIFY(!result.hasError()); + QCOMPARE(result.next().toAtomicValue().toString(), QString::fromLatin1("text text node")); + QCOMPARE(result.next().toAtomicValue().toBool(), true); + QVERIFY(result.next().isNull()); + QVERIFY(!result.hasError()); +} + +void tst_QXmlQuery::queryWithFocusAndVariable() const +{ + QXmlQuery query; + query.setFocus(QXmlItem(5)); + query.bindVariable(QLatin1String("var"), QXmlItem(2)); + + query.setQuery(QLatin1String("string(. * $var)")); + + QStringList result; + + QVERIFY(query.evaluateTo(&result)); + + QCOMPARE(result, QStringList(QLatin1String("10"))); +} + +void tst_QXmlQuery::undefinedFocus() const +{ + QXmlQuery query; + + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String(".")); + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::basicFocusUsage() const +{ + QXmlQuery query; + + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setFocus(QXmlItem(5)); + query.setQuery(QLatin1String("string(. * .)")); + QVERIFY(query.isValid()); + + QStringList result; + QVERIFY(query.evaluateTo(&result)); + + QCOMPARE(result, QStringList(QLatin1String("25"))); +} + +/*! + Triggers an ownership related crash. + */ +void tst_QXmlQuery::copyCheckMessageHandler() const +{ + QXmlQuery query; + QCOMPARE(query.messageHandler(), static_cast(0)); + + query.setQuery(QLatin1String("doc('qrc:/QXmlQueryTestData/data/oneElement.xml')")); + /* By now, we should have set the builtin message handler. */ + const QAbstractMessageHandler *const messageHandler = query.messageHandler(); + QVERIFY(messageHandler); + + { + /* This copies QXmlQueryPrivate::m_ownerObject, and its destructor + * will delete it, and hence the builtin message handler attached to it. */ + QXmlQuery copy(query); + } + + QXmlResultItems result; + query.evaluateTo(&result); + + while(!result.next().isNull()) + { + } + QVERIFY(!result.hasError()); +} + +void tst_QXmlQuery::queryLanguage() const +{ + /* Check default value. */ + { + const QXmlQuery query; + QCOMPARE(query.queryLanguage(), QXmlQuery::XQuery10); + } + + /* Check default value of copies default instance. */ + { + const QXmlQuery query1; + const QXmlQuery query2(query1); + + QCOMPARE(query1.queryLanguage(), QXmlQuery::XQuery10); + QCOMPARE(query2.queryLanguage(), QXmlQuery::XQuery10); + } +} + +void tst_QXmlQuery::queryLanguageSignature() const +{ + /* This getter should be const. */ + QXmlQuery query; + query.queryLanguage(); +} + +void tst_QXmlQuery::enumQueryLanguage() const +{ + /* These enum values should be possible to OR for future plans. */ + QCOMPARE(int(QXmlQuery::XQuery10), 1); + QCOMPARE(int(QXmlQuery::XSLT20), 2); + QCOMPARE(int(QXmlQuery::XmlSchema11IdentityConstraintSelector), 1024); + QCOMPARE(int(QXmlQuery::XmlSchema11IdentityConstraintField), 2048); + QCOMPARE(int(QXmlQuery::XPath20), 4096); +} + +void tst_QXmlQuery::setInitialTemplateNameQXmlName() const +{ + QXmlQuery query(QXmlQuery::XSLT20); + QXmlNamePool np(query.namePool()); + const QXmlName name(np, QLatin1String("main")); + + query.setInitialTemplateName(name); + + QCOMPARE(query.initialTemplateName(), name); + + query.setQuery(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/namedTemplate.xsl")))); + QVERIFY(query.isValid()); + + QBuffer result; + QVERIFY(result.open(QIODevice::ReadWrite)); + QXmlSerializer serializer(query, &result); + query.evaluateTo(&serializer); + + QCOMPARE(result.data(), QByteArray("1 2 3 4 5")); + + // TODO invoke a template which has required params. +} + +void tst_QXmlQuery::setInitialTemplateNameQXmlNameSignature() const +{ + QXmlQuery query; + QXmlNamePool np(query.namePool()); + const QXmlName name(np, QLatin1String("foo")); + + /* The signature should take a const reference. */ + query.setInitialTemplateName(name); +} + +void tst_QXmlQuery::setInitialTemplateNameQString() const +{ + QXmlQuery query; + QXmlNamePool np(query.namePool()); + query.setInitialTemplateName(QLatin1String("foo")); + + QCOMPARE(query.initialTemplateName(), QXmlName(np, QLatin1String("foo"))); +} + +void tst_QXmlQuery::setInitialTemplateNameQStringSignature() const +{ + const QString name(QLatin1String("name")); + QXmlQuery query; + + /* We should take a const reference. */ + query.setInitialTemplateName(name); +} + +void tst_QXmlQuery::initialTemplateName() const +{ + /* Check our default value. */ + QXmlQuery query; + QCOMPARE(query.initialTemplateName(), QXmlName()); + QVERIFY(query.initialTemplateName().isNull()); +} + +void tst_QXmlQuery::initialTemplateNameSignature() const +{ + const QXmlQuery query; + /* This should be a const member. */ + query.initialTemplateName(); +} + +void tst_QXmlQuery::setNetworkAccessManager() const +{ + + /* Ensure fn:doc() picks up the right QNetworkAccessManager. */ + { + NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")), + QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/queries/simpleDocument.xml")))); + + QXmlQuery query; + query.setNetworkAccessManager(&networkOverrider); + query.setQuery(QLatin1String("string(doc('tag:example.com:DOESNOTEXIST'))")); + QVERIFY(query.isValid()); + + QStringList result; + QVERIFY(query.evaluateTo(&result)); + + QCOMPARE(result, QStringList(QLatin1String("text text node"))); + } + + /* Ensure setQuery() is using the right network manager. */ + { + NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")), + QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/queries/concat.xq")))); + + QXmlQuery query; + query.setNetworkAccessManager(&networkOverrider); + query.setQuery(QUrl("tag:example.com:DOESNOTEXIST")); + QVERIFY(query.isValid()); + + QStringList result; + QVERIFY(query.evaluateTo(&result)); + + QCOMPARE(result, QStringList(QLatin1String("abcdef"))); + } +} +void tst_QXmlQuery::networkAccessManagerSignature() const +{ + /* Const object. */ + const QXmlQuery query; + + /* The function should be const. */ + query.networkAccessManager(); +} + +void tst_QXmlQuery::networkAccessManagerDefaultValue() const +{ + const QXmlQuery query; + + QCOMPARE(query.networkAccessManager(), static_cast(0)); +} + +void tst_QXmlQuery::networkAccessManager() const +{ + /* Test that we return the network manager that was set. */ + { + QNetworkAccessManager manager; + QXmlQuery query; + query.setNetworkAccessManager(&manager); + QCOMPARE(query.networkAccessManager(), &manager); + } +} + +/*! + \internal + \since 4.5 + + 1. Load a document into QXmlQuery's document cache, by executing a query which does it. + 2. Set a focus + 3. Change query, to one which uses the focus + 4. Evaluate + + Used to crash. + */ +void tst_QXmlQuery::multipleDocsAndFocus() const +{ + QXmlQuery query; + + /* We use string concatenation, since variable bindings might disturb what + * we're testing. */ + query.setQuery(QLatin1String("string(doc('") + + inputFile(QLatin1String(XMLPATTERNSDIR "/queries/simpleDocument.xml")) + + QLatin1String("'))")); + query.setFocus(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml")))); + query.setQuery(QLatin1String("string(.)")); + + QStringList result; + QVERIFY(query.evaluateTo(&result)); +} + +/*! + \internal + \since 4.5 + + 1. Set a focus + 2. Set a query + 3. Evaluate + 4. Change focus + 5. Evaluate + + Used to crash. + */ +void tst_QXmlQuery::multipleEvaluationsWithDifferentFocus() const +{ + QXmlQuery query; + QStringList result; + + query.setFocus(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml")))); + query.setQuery(QLatin1String("string(.)")); + QVERIFY(query.evaluateTo(&result)); + + query.setFocus(QUrl(inputFileAsURI(QLatin1String(XMLPATTERNSDIR "/stylesheets/documentElement.xml")))); + QVERIFY(query.evaluateTo(&result)); +} + +void tst_QXmlQuery::bindVariableQXmlQuery() const +{ + QFETCH(QString, query1); + QFETCH(QString, query2); + QFETCH(QString, expectedOutput); + QFETCH(bool, expectedSuccess); + + MessageSilencer silencer; + QXmlQuery xmlQuery1; + xmlQuery1.setMessageHandler(&silencer); + xmlQuery1.setQuery(query1); + + QXmlQuery xmlQuery2(xmlQuery1); + xmlQuery2.bindVariable("query1", xmlQuery1); + xmlQuery2.setQuery(query2); + + QString output; + const bool querySuccess = xmlQuery2.evaluateTo(&output); + + QCOMPARE(querySuccess, expectedSuccess); + + if(querySuccess) + QCOMPARE(output, expectedOutput); +} + +void tst_QXmlQuery::bindVariableQXmlQuery_data() const +{ + QTest::addColumn("query1"); + QTest::addColumn("query2"); + QTest::addColumn("expectedOutput"); + QTest::addColumn("expectedSuccess"); + + QTest::newRow("First query has one atomic value.") + << "2" + << "1, $query1, 3" + << "1 2 3\n" + << true; + + QTest::newRow("First query has two atomic values.") + << "2, 3" + << "1, $query1, 4" + << "1 2 3 4\n" + << true; + + QTest::newRow("First query is a node.") + << "" + << "1, $query1, 3" + << "13\n" + << true; + + /* This is a good test, because it triggers the exception in the + * bindVariable() call, as supposed to when the actual evaluation is done. + */ + QTest::newRow("First query has a dynamic error.") + << "error()" + << "1, $query1" + << QString() /* We don't care. */ + << false; +} + +void tst_QXmlQuery::bindVariableQStringQXmlQuerySignature() const +{ + QXmlQuery query1; + query1.setQuery("'dummy'"); + + QXmlQuery query2; + const QString name(QLatin1String("name")); + + /* We should be able to take a const QXmlQuery reference. Evaluation never mutate + * QXmlQuery, and evaluation is what we do here. */ + query2.bindVariable(name, const_cast(query1)); +} + +void tst_QXmlQuery::bindVariableQXmlNameQXmlQuerySignature() const +{ + QXmlNamePool np; + QXmlQuery query1(np); + query1.setQuery("'dummy'"); + + QXmlQuery query2; + const QXmlName name(np, QLatin1String("name")); + + /* We should be able to take a const QXmlQuery reference. Evaluation never mutate + * QXmlQuery, and evaluation is what we do here. */ + query2.bindVariable(name, const_cast(query1)); +} + +/*! + Check that the QXmlName is handled correctly. + */ +void tst_QXmlQuery::bindVariableQXmlNameQXmlQuery() const +{ + QXmlNamePool np; + QXmlQuery query1; + query1.setQuery(QLatin1String("1")); + + QXmlQuery query2(np); + query2.bindVariable(QXmlName(np, QLatin1String("theName")), query1); + query2.setQuery("$theName"); + + QString result; + query2.evaluateTo(&result); + + QCOMPARE(result, QString::fromLatin1("1\n")); +} + +void tst_QXmlQuery::bindVariableQXmlQueryInvalidate() const +{ + QXmlQuery query; + query.bindVariable(QLatin1String("name"), QVariant(1)); + query.setQuery("$name"); + QVERIFY(query.isValid()); + + QXmlQuery query2; + query2.setQuery("'query2'"); + + query.bindVariable(QLatin1String("name"), query); + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::unknownSourceLocation() const +{ + QBuffer b; + b.setData(""); + b.open(QIODevice::ReadOnly); + + MessageSilencer silencer; + QXmlQuery query; + query.bindVariable(QLatin1String("inputDocument"), &b); + query.setMessageHandler(&silencer); + + query.setQuery(QLatin1String("doc($inputDocument)/a/(let $v := b/string() return if ($v) then $v else ())")); + + QString output; + query.evaluateTo(&output); +} + +void tst_QXmlQuery::identityConstraintSuccess() const +{ + QXmlQuery::QueryLanguage queryLanguage = QXmlQuery::XmlSchema11IdentityConstraintSelector; + + /* We run this code for Selector and Field. */ + for(int i = 0; i < 3; ++i) + { + QXmlNamePool namePool; + QXmlResultItems result; + QXmlItem node; + + { + QXmlQuery nodeSource(namePool); + nodeSource.setQuery(QLatin1String("")); + + nodeSource.evaluateTo(&result); + node = result.next(); + } + + /* Basic use: + * 1. The focus is undefined, but it's still valid. + * 2. We never evaluate. */ + { + QXmlQuery query(queryLanguage); + query.setQuery(QLatin1String("a")); + QVERIFY(query.isValid()); + } + + /* Basic use: + * 1. The focus is undefined, but it's still valid. + * 2. We afterwards set the focus. */ + { + QXmlQuery query(queryLanguage, namePool); + query.setQuery(QLatin1String("a")); + query.setFocus(node); + QVERIFY(query.isValid()); + } + + /* Basic use: + * 1. The focus is undefined, but it's still valid. + * 2. We afterwards set the focus. + * 3. We evaluate. */ + { + QXmlQuery query(queryLanguage, namePool); + query.setQuery(QString(QLatin1Char('.'))); + query.setFocus(node); + QVERIFY(query.isValid()); + + QString result; + QVERIFY(query.evaluateTo(&result)); + QCOMPARE(result, QString::fromLatin1("\n")); + } + + /* A slightly more complex Field. */ + { + QXmlQuery query(queryLanguage); + query.setQuery(QLatin1String("* | .//xml:*/.")); + QVERIFY(query.isValid()); + } + + /* @ is only allowed in Field. */ + if(queryLanguage == QXmlQuery::XmlSchema11IdentityConstraintField) + { + QXmlQuery query(QXmlQuery::XmlSchema11IdentityConstraintField); + query.setQuery(QLatin1String("@abc")); + QVERIFY(query.isValid()); + } + + /* Field allows attribute:: and child:: .*/ + if(queryLanguage == QXmlQuery::XmlSchema11IdentityConstraintField) + { + QXmlQuery query(QXmlQuery::XmlSchema11IdentityConstraintField); + query.setQuery(QLatin1String("attribute::name | child::name")); + QVERIFY(query.isValid()); + } + + /* Selector allows only child:: .*/ + { + QXmlQuery query(QXmlQuery::XmlSchema11IdentityConstraintSelector); + query.setQuery(QLatin1String("child::name")); + QVERIFY(query.isValid()); + } + + if(i == 0) + queryLanguage = QXmlQuery::XmlSchema11IdentityConstraintField; + else if(i == 1) + queryLanguage = QXmlQuery::XPath20; + } +} + +Q_DECLARE_METATYPE(QXmlQuery::QueryLanguage); + +/*! + We just do some basic tests for boot strapping and sanity checking. The actual regression + testing is in the Schema suite. + */ +void tst_QXmlQuery::identityConstraintFailure() const +{ + QFETCH(QXmlQuery::QueryLanguage, queryLanguage); + QFETCH(QString, inputQuery); + + QXmlQuery query(queryLanguage); + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(inputQuery); + QVERIFY(!query.isValid()); +} + +void tst_QXmlQuery::identityConstraintFailure_data() const +{ + QTest::addColumn("queryLanguage"); + QTest::addColumn("inputQuery"); + + QTest::newRow("We don't have element constructors in identity constraint pattern, " + "it's an XQuery feature(Selector).") + << QXmlQuery::XmlSchema11IdentityConstraintSelector + << QString::fromLatin1(""); + + QTest::newRow("We don't have functions in identity constraint pattern, " + "it's an XPath feature(Selector).") + << QXmlQuery::XmlSchema11IdentityConstraintSelector + << QString::fromLatin1("current-time()"); + + QTest::newRow("We don't have element constructors in identity constraint pattern, " + "it's an XQuery feature(Field).") + << QXmlQuery::XmlSchema11IdentityConstraintSelector + << QString::fromLatin1(""); + + QTest::newRow("We don't have functions in identity constraint pattern, " + "it's an XPath feature(Field).") + << QXmlQuery::XmlSchema11IdentityConstraintSelector + << QString::fromLatin1("current-time()"); + + QTest::newRow("@attributeName is disallowed for the selector.") + << QXmlQuery::XmlSchema11IdentityConstraintSelector + << QString::fromLatin1("@abc"); + + QTest::newRow("attribute:: is disallowed for the selector.") + << QXmlQuery::XmlSchema11IdentityConstraintSelector + << QString::fromLatin1("attribute::name"); + + QTest::newRow("ancestor::name is disallowed for the selector.") + << QXmlQuery::XmlSchema11IdentityConstraintSelector + << QString::fromLatin1("ancestor::name"); + + QTest::newRow("ancestor::name is disallowed for the field.") + << QXmlQuery::XmlSchema11IdentityConstraintField + << QString::fromLatin1("ancestor::name"); +} + +QTEST_MAIN(tst_QXmlQuery) + +#include "tst_qxmlquery.moc" +#else //QTEST_XMLPATTERNS +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qxmlresultitems/.gitignore b/tests/auto/qxmlresultitems/.gitignore new file mode 100644 index 0000000..d05df6d --- /dev/null +++ b/tests/auto/qxmlresultitems/.gitignore @@ -0,0 +1 @@ +tst_qxmlresultitems diff --git a/tests/auto/qxmlresultitems/qxmlresultitems.pro b/tests/auto/qxmlresultitems/qxmlresultitems.pro new file mode 100644 index 0000000..7d74c20 --- /dev/null +++ b/tests/auto/qxmlresultitems/qxmlresultitems.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qxmlresultitems.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlresultitems/tst_qxmlresultitems.cpp b/tests/auto/qxmlresultitems/tst_qxmlresultitems.cpp new file mode 100644 index 0000000..3a27359 --- /dev/null +++ b/tests/auto/qxmlresultitems/tst_qxmlresultitems.cpp @@ -0,0 +1,240 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +#include +#include +#include + +#include "../qxmlquery/MessageSilencer.h" +/*! + \class tst_QXmlResultItems + \internal + \since 4.4 + \brief Tests class QXmlResultItems. + + */ +class tst_QXmlResultItems : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void defaultConstructor() const; + void next() const; + void current() const; + void hasError() const; + void objectSize() const; + void constCorrectness() const; + + void evalateWithInstantError() const; + void evalateWithQueryError() const; + void evaluate() const; + void evaluate_data() const; +}; + +void tst_QXmlResultItems::defaultConstructor() const +{ + { + QXmlResultItems result; + } + + { + QXmlResultItems result1; + QXmlResultItems result2; + } + + { + QXmlResultItems result1; + QXmlResultItems result2; + QXmlResultItems result3; + } +} + +void tst_QXmlResultItems::next() const +{ + /* Check default value. */ + { + QXmlResultItems result; + QVERIFY(result.next().isNull()); + } + + /* Stress it on a default constructed value. */ + { + QXmlResultItems result; + QVERIFY(result.next().isNull()); + QVERIFY(result.next().isNull()); + QVERIFY(result.next().isNull()); + } +} + +void tst_QXmlResultItems::current() const +{ + /* Check default value. */ + { + QXmlResultItems result; + QVERIFY(result.current().isNull()); + } + + /* Stress it on a default constructed value. */ + { + QXmlResultItems result; + QVERIFY(result.current().isNull()); + QVERIFY(result.current().isNull()); + QVERIFY(result.current().isNull()); + } +} + +void tst_QXmlResultItems::hasError() const +{ + /* Check default value. */ + { + QXmlResultItems result; + QVERIFY(!result.hasError()); + } + + /* Stress it on a default constructed value. */ + { + QXmlResultItems result; + QVERIFY(!result.hasError()); + QVERIFY(!result.hasError()); + QVERIFY(!result.hasError()); + } +} + +void tst_QXmlResultItems::objectSize() const +{ + /* A d-pointer plus a vtable pointer. */ + QCOMPARE(sizeof(QXmlResultItems), sizeof(void *) * 2); +} + +void tst_QXmlResultItems::constCorrectness() const +{ + const QXmlResultItems result; + + /* These functions should be const. */ + result.current(); + result.hasError(); +} + +/*! + What's special about this is that it's not the QAbstractXmlForwardIterator::next() + that triggers the error, it's QPatternist::Expression::evaluateSingleton() directly. + */ +void tst_QXmlResultItems::evalateWithInstantError() const +{ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + query.setQuery(QLatin1String("fn:error()")); + + QXmlResultItems result; + query.evaluateTo(&result); + + /* Check the values, and stress it. */ + for(int i = 0; i < 3; ++i) + { + QVERIFY(result.current().isNull()); + QVERIFY(result.next().isNull()); + QVERIFY(result.hasError()); + } +} + +void tst_QXmlResultItems::evaluate() const +{ + QFETCH(QString, queryString); + + QXmlQuery query; + query.setQuery(queryString); + + QVERIFY(query.isValid()); + + QXmlResultItems result; + query.evaluateTo(&result); + QXmlItem item(result.next()); + + while(!item.isNull()) + { + QVERIFY(!result.current().isNull()); + QVERIFY(!result.hasError()); + item = result.next(); + } + + /* Now, stress beyond the end. */ + for(int i = 0; i < 3; ++i) + { + QVERIFY(result.current().isNull()); + QVERIFY(result.next().isNull()); + } +} + +void tst_QXmlResultItems::evaluate_data() const +{ + QTest::addColumn("queryString"); + + QTest::newRow("one atomic value") << QString::fromLatin1("1"); + QTest::newRow("two atomic values") << QString::fromLatin1("1, xs:hexBinary('FF')"); + QTest::newRow("one node") << QString::fromLatin1("attribute name {'body'}"); + QTest::newRow("one node") << QString::fromLatin1("attribute name {'body'}"); + QTest::newRow("two nodes") << QString::fromLatin1("attribute name {'body'}, "); +} + +void tst_QXmlResultItems::evalateWithQueryError() const +{ + /* This query is invalid. */ + const QXmlQuery query; + + QXmlResultItems result; + query.evaluateTo(&result); + + QVERIFY(result.hasError()); + QVERIFY(result.next().isNull()); +} + +QTEST_MAIN(tst_QXmlResultItems) + +#include "tst_qxmlresultitems.moc" +#else +QTEST_NOOP_MAIN +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/qxmlschema/.gitignore b/tests/auto/qxmlschema/.gitignore new file mode 100644 index 0000000..5cf52a0 --- /dev/null +++ b/tests/auto/qxmlschema/.gitignore @@ -0,0 +1 @@ +tst_qxmlschema diff --git a/tests/auto/qxmlschema/qxmlschema.pro b/tests/auto/qxmlschema/qxmlschema.pro new file mode 100644 index 0000000..f5abe4f --- /dev/null +++ b/tests/auto/qxmlschema/qxmlschema.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qxmlschema.cpp +QT += network + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlschema/tst_qxmlschema.cpp b/tests/auto/qxmlschema/tst_qxmlschema.cpp new file mode 100644 index 0000000..9ae399f --- /dev/null +++ b/tests/auto/qxmlschema/tst_qxmlschema.cpp @@ -0,0 +1,406 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#ifdef QTEST_XMLPATTERNS + +#include +#include +#include +#include +#include + +#include "../qabstracturiresolver/TestURIResolver.h" +#include "../qxmlquery/MessageSilencer.h" + +/*! + \class tst_QXmlSchema + \internal + \brief Tests class QXmlSchema. + + This test is not intended for testing the engine, but the functionality specific + to the QXmlSchema class. + */ +class tst_QXmlSchema : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void defaultConstructor() const; + void copyConstructor() const; + void constructorQXmlNamePool() const; + void copyMutationTest() const; + + void isValid() const; + void documentUri() const; + + void loadSchemaUrlSuccess() const; + void loadSchemaUrlFail() const; + void loadSchemaDeviceSuccess() const; + void loadSchemaDeviceFail() const; + void loadSchemaDataSuccess() const; + void loadSchemaDataFail() const; + + void networkAccessManagerSignature() const; + void networkAccessManagerDefaultValue() const; + void networkAccessManager() const; + + void messageHandlerSignature() const; + void messageHandlerDefaultValue() const; + void messageHandler() const; + + void uriResolverSignature() const; + void uriResolverDefaultValue() const; + void uriResolver() const; +}; + +void tst_QXmlSchema::defaultConstructor() const +{ + /* Allocate instance in different orders. */ + { + QXmlSchema schema; + } + + { + QXmlSchema schema1; + QXmlSchema schema2; + } + + { + QXmlSchema schema1; + QXmlSchema schema2; + QXmlSchema schema3; + } +} + +void tst_QXmlSchema::copyConstructor() const +{ + /* Verify that we can take a const reference, and simply do a copy of a default constructed object. */ + { + const QXmlSchema schema1; + QXmlSchema schema2(schema1); + } + + /* Copy twice. */ + { + const QXmlSchema schema1; + QXmlSchema schema2(schema1); + QXmlSchema schema3(schema2); + } + + /* Verify that copying default values works. */ + { + const QXmlSchema schema1; + const QXmlSchema schema2(schema1); + QCOMPARE(schema2.messageHandler(), schema1.messageHandler()); + QCOMPARE(schema2.uriResolver(), schema1.uriResolver()); + QCOMPARE(schema2.networkAccessManager(), schema1.networkAccessManager()); + QCOMPARE(schema2.isValid(), schema1.isValid()); + } +} + +void tst_QXmlSchema::constructorQXmlNamePool() const +{ + QXmlSchema schema; + + QXmlNamePool np = schema.namePool(); + + const QXmlName name(np, QLatin1String("localName"), + QLatin1String("http://example.com/"), + QLatin1String("prefix")); + + QXmlNamePool np2(schema.namePool()); + QCOMPARE(name.namespaceUri(np2), QString::fromLatin1("http://example.com/")); + QCOMPARE(name.localName(np2), QString::fromLatin1("localName")); + QCOMPARE(name.prefix(np2), QString::fromLatin1("prefix")); + + // make sure namePool() is const + const QXmlSchema constSchema; + np = constSchema.namePool(); +} + +void tst_QXmlSchema::copyMutationTest() const +{ + QXmlSchema schema1; + QXmlSchema schema2(schema1); + + // check that everything is equal + QVERIFY(schema2.messageHandler() == schema1.messageHandler()); + QVERIFY(schema2.uriResolver() == schema1.uriResolver()); + QVERIFY(schema2.networkAccessManager() == schema1.networkAccessManager()); + + MessageSilencer handler; + const TestURIResolver resolver; + QNetworkAccessManager manager; + + // modify schema1 + schema1.setMessageHandler(&handler); + schema1.setUriResolver(&resolver); + schema1.setNetworkAccessManager(&manager); + + // check that schema2 is not effected by the modifications of schema1 + QVERIFY(schema2.messageHandler() != schema1.messageHandler()); + QVERIFY(schema2.uriResolver() != schema1.uriResolver()); + QVERIFY(schema2.networkAccessManager() != schema1.networkAccessManager()); + + // modify schema1 further + const QByteArray data( "" + "" + "" ); + + const QUrl documentUri("http://qt.nokia.com/xmlschematest"); + schema1.load(data, documentUri); + + QVERIFY(schema2.isValid() != schema1.isValid()); +} + +void tst_QXmlSchema::isValid() const +{ + /* Check default value. */ + QXmlSchema schema; + QVERIFY(!schema.isValid()); +} + +void tst_QXmlSchema::documentUri() const +{ + const QByteArray data( "" + "" + "" ); + + const QUrl documentUri("http://qt.nokia.com/xmlschematest"); + QXmlSchema schema; + schema.load(data, documentUri); + + QCOMPARE(documentUri, schema.documentUri()); +} + +void tst_QXmlSchema::loadSchemaUrlSuccess() const +{ +/** + TODO: put valid schema file on given url and enable test + const QUrl url("http://notavailable/"); + + QXmlSchema schema; + QVERIFY(!schema.load(url)); +*/ +} + +void tst_QXmlSchema::loadSchemaUrlFail() const +{ + const QUrl url("http://notavailable/"); + + QXmlSchema schema; + QVERIFY(!schema.load(url)); +} + +void tst_QXmlSchema::loadSchemaDeviceSuccess() const +{ + QByteArray data( "" + "" + "" ); + + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchema schema; + QVERIFY(schema.load(&buffer)); +} + +void tst_QXmlSchema::loadSchemaDeviceFail() const +{ + QByteArray data( "" + "" + "" ); + + QBuffer buffer(&data); + // a closed device can not be loaded + + QXmlSchema schema; + QVERIFY(!schema.load(&buffer)); +} + +void tst_QXmlSchema::loadSchemaDataSuccess() const +{ + const QByteArray data( "" + "" + "" ); + QXmlSchema schema; + QVERIFY(schema.load(data)); +} + +void tst_QXmlSchema::loadSchemaDataFail() const +{ + // empty schema can not be loaded + const QByteArray data; + + QXmlSchema schema; + QVERIFY(!schema.load(data)); +} + + +void tst_QXmlSchema::networkAccessManagerSignature() const +{ + /* Const object. */ + const QXmlSchema schema; + + /* The function should be const. */ + schema.networkAccessManager(); +} + +void tst_QXmlSchema::networkAccessManagerDefaultValue() const +{ + /* Test that the default value of network access manager is not empty. */ + { + QXmlSchema schema; + QVERIFY(schema.networkAccessManager() != static_cast(0)); + } +} + +void tst_QXmlSchema::networkAccessManager() const +{ + /* Test that we return the network manager that was set. */ + { + QNetworkAccessManager manager; + QXmlSchema schema; + schema.setNetworkAccessManager(&manager); + QCOMPARE(schema.networkAccessManager(), &manager); + } +} + +void tst_QXmlSchema::messageHandlerSignature() const +{ + /* Const object. */ + const QXmlSchema schema; + + /* The function should be const. */ + schema.messageHandler(); +} + +void tst_QXmlSchema::messageHandlerDefaultValue() const +{ + /* Test that the default value of message handler is not empty. */ + { + QXmlSchema schema; + QVERIFY(schema.messageHandler() != static_cast(0)); + } +} + +void tst_QXmlSchema::messageHandler() const +{ + /* Test that we return the message handler that was set. */ + { + MessageSilencer handler; + + QXmlSchema schema; + schema.setMessageHandler(&handler); + QCOMPARE(schema.messageHandler(), static_cast(&handler)); + } +} + +void tst_QXmlSchema::uriResolverSignature() const +{ + /* Const object. */ + const QXmlSchema schema; + + /* The function should be const. */ + schema.uriResolver(); + + /* Const object. */ + const TestURIResolver resolver; + + /* This should compile */ + QXmlSchema schema2; + schema2.setUriResolver(&resolver); +} + +void tst_QXmlSchema::uriResolverDefaultValue() const +{ + /* Test that the default value of uri resolver is empty. */ + { + QXmlSchema schema; + QVERIFY(schema.uriResolver() == static_cast(0)); + } +} + +void tst_QXmlSchema::uriResolver() const +{ + /* Test that we return the uri resolver that was set. */ + { + TestURIResolver resolver; + + QXmlSchema schema; + schema.setUriResolver(&resolver); + QCOMPARE(schema.uriResolver(), static_cast(&resolver)); + } +} + +QTEST_MAIN(tst_QXmlSchema) + +#include "tst_qxmlschema.moc" +#else //QTEST_PATTERNIST +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qxmlschemavalidator/.gitignore b/tests/auto/qxmlschemavalidator/.gitignore new file mode 100644 index 0000000..8857212 --- /dev/null +++ b/tests/auto/qxmlschemavalidator/.gitignore @@ -0,0 +1 @@ +tst_qxmlschemavalidator diff --git a/tests/auto/qxmlschemavalidator/qxmlschemavalidator.pro b/tests/auto/qxmlschemavalidator/qxmlschemavalidator.pro new file mode 100644 index 0000000..0b439d7 --- /dev/null +++ b/tests/auto/qxmlschemavalidator/qxmlschemavalidator.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qxmlschemavalidator.cpp +QT += network + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp b/tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp new file mode 100644 index 0000000..d2df251 --- /dev/null +++ b/tests/auto/qxmlschemavalidator/tst_qxmlschemavalidator.cpp @@ -0,0 +1,479 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#ifdef QTEST_XMLPATTERNS + +#include +#include +#include +#include +#include +#include + +#include "../qabstracturiresolver/TestURIResolver.h" +#include "../qxmlquery/MessageSilencer.h" + +/*! + \class tst_QXmlSchemaValidatorValidator + \internal + \brief Tests class QXmlSchemaValidator. + + This test is not intended for testing the engine, but the functionality specific + to the QXmlSchemaValidator class. + */ +class tst_QXmlSchemaValidator : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void defaultConstructor() const; + void constructorQXmlNamePool() const; + void propertyInitialization() const; + void resetSchemaNamePool() const; + + void loadInstanceUrlSuccess() const; + void loadInstanceUrlFail() const; + void loadInstanceDeviceSuccess() const; + void loadInstanceDeviceFail() const; + void loadInstanceDataSuccess() const; + void loadInstanceDataFail() const; + + void networkAccessManagerSignature() const; + void networkAccessManagerDefaultValue() const; + void networkAccessManager() const; + + void messageHandlerSignature() const; + void messageHandlerDefaultValue() const; + void messageHandler() const; + + void uriResolverSignature() const; + void uriResolverDefaultValue() const; + void uriResolver() const; +}; + +static QXmlSchema createValidSchema() +{ + const QByteArray data( "" + "" + " " + "" ); + + const QUrl documentUri("http://qt.nokia.com/xmlschematest"); + + QXmlSchema schema; + schema.load(data, documentUri); + + return schema; +} + +void tst_QXmlSchemaValidator::defaultConstructor() const +{ + /* Allocate instance in different orders. */ + { + QXmlSchema schema; + QXmlSchemaValidator validator(schema); + } + + { + QXmlSchema schema1; + QXmlSchema schema2; + + QXmlSchemaValidator validator1(schema1); + QXmlSchemaValidator validator2(schema2); + } + + { + QXmlSchema schema; + + QXmlSchemaValidator validator1(schema); + QXmlSchemaValidator validator2(schema); + } +} + +void tst_QXmlSchemaValidator::propertyInitialization() const +{ + /* Verify that properties set in the schema are used as default values for the validator */ + { + MessageSilencer handler; + TestURIResolver resolver; + QNetworkAccessManager manager; + + QXmlSchema schema; + schema.setMessageHandler(&handler); + schema.setUriResolver(&resolver); + schema.setNetworkAccessManager(&manager); + + QXmlSchemaValidator validator(schema); + QCOMPARE(validator.messageHandler(), static_cast(&handler)); + QCOMPARE(validator.uriResolver(), static_cast(&resolver)); + QCOMPARE(validator.networkAccessManager(), &manager); + } +} + +void tst_QXmlSchemaValidator::constructorQXmlNamePool() const +{ + // test that the name pool from the schema is used by + // the schema validator as well + QXmlSchema schema; + + QXmlNamePool np = schema.namePool(); + + const QXmlName name(np, QLatin1String("localName"), + QLatin1String("http://example.com/"), + QLatin1String("prefix")); + + QXmlSchemaValidator validator(schema); + + QXmlNamePool np2(validator.namePool()); + QCOMPARE(name.namespaceUri(np2), QString::fromLatin1("http://example.com/")); + QCOMPARE(name.localName(np2), QString::fromLatin1("localName")); + QCOMPARE(name.prefix(np2), QString::fromLatin1("prefix")); + + // make sure namePool() is const + const QXmlSchemaValidator constValidator(schema); + np = constValidator.namePool(); +} + +void tst_QXmlSchemaValidator::resetSchemaNamePool() const +{ + QXmlSchema schema1; + QXmlNamePool np1 = schema1.namePool(); + + const QXmlName name1(np1, QLatin1String("localName"), + QLatin1String("http://example.com/"), + QLatin1String("prefix")); + + QXmlSchemaValidator validator(schema1); + + { + QXmlNamePool compNamePool(validator.namePool()); + QCOMPARE(name1.namespaceUri(compNamePool), QString::fromLatin1("http://example.com/")); + QCOMPARE(name1.localName(compNamePool), QString::fromLatin1("localName")); + QCOMPARE(name1.prefix(compNamePool), QString::fromLatin1("prefix")); + } + + QXmlSchema schema2; + QXmlNamePool np2 = schema2.namePool(); + + const QXmlName name2(np2, QLatin1String("remoteName"), + QLatin1String("http://example.com/"), + QLatin1String("suffix")); + + // make sure that after re-setting the schema, the new namepool is used + validator.setSchema(schema2); + + { + QXmlNamePool compNamePool(validator.namePool()); + QCOMPARE(name2.namespaceUri(compNamePool), QString::fromLatin1("http://example.com/")); + QCOMPARE(name2.localName(compNamePool), QString::fromLatin1("remoteName")); + QCOMPARE(name2.prefix(compNamePool), QString::fromLatin1("suffix")); + } +} + +void tst_QXmlSchemaValidator::loadInstanceUrlSuccess() const +{ +/* + TODO: put valid schema file on given url and enable test + const QXmlSchema schema(createValidSchema()); + const QUrl url("http://notavailable/"); + + QXmlSchemaValidator validator(schema); + QVERIFY(!validator.validate(url)); +*/ +} + +void tst_QXmlSchemaValidator::loadInstanceUrlFail() const +{ + const QXmlSchema schema(createValidSchema()); + const QUrl url("http://notavailable/"); + + QXmlSchemaValidator validator(schema); + QVERIFY(!validator.validate(url)); +} + +void tst_QXmlSchemaValidator::loadInstanceDeviceSuccess() const +{ + const QXmlSchema schema(createValidSchema()); + + QByteArray data( "Testme" ); + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchemaValidator validator(schema); + QVERIFY(validator.validate(&buffer)); +} + +void tst_QXmlSchemaValidator::loadInstanceDeviceFail() const +{ + const QXmlSchema schema(createValidSchema()); + + QByteArray data( "Testme" ); + QBuffer buffer(&data); + // a closed device can not be loaded + + QXmlSchemaValidator validator(schema); + QVERIFY(!validator.validate(&buffer)); +} + +void tst_QXmlSchemaValidator::loadInstanceDataSuccess() const +{ + const QXmlSchema schema(createValidSchema()); + + const QByteArray data( "Testme" ); + + QXmlSchemaValidator validator(schema); + QVERIFY(validator.validate(data)); +} + +void tst_QXmlSchemaValidator::loadInstanceDataFail() const +{ + const QXmlSchema schema(createValidSchema()); + + // empty instance can not be loaded + const QByteArray data; + + QXmlSchemaValidator validator(schema); + QVERIFY(!validator.validate(data)); +} + +void tst_QXmlSchemaValidator::networkAccessManagerSignature() const +{ + const QXmlSchema schema; + + /* Const object. */ + const QXmlSchemaValidator validator(schema); + + /* The function should be const. */ + validator.networkAccessManager(); +} + +void tst_QXmlSchemaValidator::networkAccessManagerDefaultValue() const +{ + /* Test that the default value of network access manager is equal to the one from the schema. */ + { + const QXmlSchema schema; + const QXmlSchemaValidator validator(schema); + QVERIFY(validator.networkAccessManager() == schema.networkAccessManager()); + } + + /* Test that the default value of network access manager is equal to the one from the schema. */ + { + QXmlSchema schema; + + QNetworkAccessManager manager; + schema.setNetworkAccessManager(&manager); + + const QXmlSchemaValidator validator(schema); + QVERIFY(validator.networkAccessManager() == schema.networkAccessManager()); + } +} + +void tst_QXmlSchemaValidator::networkAccessManager() const +{ + /* Test that we return the network access manager that was set. */ + { + QNetworkAccessManager manager; + + const QXmlSchema schema; + QXmlSchemaValidator validator(schema); + + validator.setNetworkAccessManager(&manager); + QCOMPARE(validator.networkAccessManager(), &manager); + } + + /* Test that we return the network access manager that was set, even if the schema changed in between. */ + { + QNetworkAccessManager manager; + + const QXmlSchema schema; + QXmlSchemaValidator validator(schema); + + validator.setNetworkAccessManager(&manager); + + const QXmlSchema schema2; + validator.setSchema(schema2); + + QCOMPARE(validator.networkAccessManager(), &manager); + } +} + +void tst_QXmlSchemaValidator::messageHandlerSignature() const +{ + const QXmlSchema schema; + + /* Const object. */ + const QXmlSchemaValidator validator(schema); + + /* The function should be const. */ + validator.messageHandler(); +} + +void tst_QXmlSchemaValidator::messageHandlerDefaultValue() const +{ + /* Test that the default value of message handler is equal to the one from the schema. */ + { + const QXmlSchema schema; + const QXmlSchemaValidator validator(schema); + QVERIFY(validator.messageHandler() == schema.messageHandler()); + } + + /* Test that the default value of network access manager is equal to the one from the schema. */ + { + QXmlSchema schema; + + MessageSilencer handler; + schema.setMessageHandler(&handler); + + const QXmlSchemaValidator validator(schema); + QVERIFY(validator.messageHandler() == schema.messageHandler()); + } +} + +void tst_QXmlSchemaValidator::messageHandler() const +{ + /* Test that we return the message handler that was set. */ + { + MessageSilencer handler; + + const QXmlSchema schema; + QXmlSchemaValidator validator(schema); + + validator.setMessageHandler(&handler); + QCOMPARE(validator.messageHandler(), static_cast(&handler)); + } + + /* Test that we return the message handler that was set, even if the schema changed in between. */ + { + MessageSilencer handler; + + const QXmlSchema schema; + QXmlSchemaValidator validator(schema); + + validator.setMessageHandler(&handler); + + const QXmlSchema schema2; + validator.setSchema(schema2); + + QCOMPARE(validator.messageHandler(), static_cast(&handler)); + } +} + +void tst_QXmlSchemaValidator::uriResolverSignature() const +{ + const QXmlSchema schema; + + /* Const object. */ + const QXmlSchemaValidator validator(schema); + + /* The function should be const. */ + validator.uriResolver(); + + /* Const object. */ + const TestURIResolver resolver; + + /* This should compile */ + QXmlSchema schema2; + schema2.setUriResolver(&resolver); +} + +void tst_QXmlSchemaValidator::uriResolverDefaultValue() const +{ + /* Test that the default value of uri resolver is equal to the one from the schema. */ + { + const QXmlSchema schema; + const QXmlSchemaValidator validator(schema); + QVERIFY(validator.uriResolver() == schema.uriResolver()); + } + + /* Test that the default value of uri resolver is equal to the one from the schema. */ + { + QXmlSchema schema; + + TestURIResolver resolver; + schema.setUriResolver(&resolver); + + const QXmlSchemaValidator validator(schema); + QVERIFY(validator.uriResolver() == schema.uriResolver()); + } +} + +void tst_QXmlSchemaValidator::uriResolver() const +{ + /* Test that we return the uri resolver that was set. */ + { + TestURIResolver resolver; + + const QXmlSchema schema; + QXmlSchemaValidator validator(schema); + + validator.setUriResolver(&resolver); + QCOMPARE(validator.uriResolver(), static_cast(&resolver)); + } + + /* Test that we return the uri resolver that was set, even if the schema changed in between. */ + { + TestURIResolver resolver; + + const QXmlSchema schema; + QXmlSchemaValidator validator(schema); + + validator.setUriResolver(&resolver); + + const QXmlSchema schema2; + validator.setSchema(schema2); + + QCOMPARE(validator.uriResolver(), static_cast(&resolver)); + } +} + +QTEST_MAIN(tst_QXmlSchemaValidator) + +#include "tst_qxmlschemavalidator.moc" +#else //QTEST_PATTERNIST +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qxmlserializer/.gitignore b/tests/auto/qxmlserializer/.gitignore new file mode 100644 index 0000000..c3bed62 --- /dev/null +++ b/tests/auto/qxmlserializer/.gitignore @@ -0,0 +1 @@ +tst_qxmlserializer diff --git a/tests/auto/qxmlserializer/qxmlserializer.pro b/tests/auto/qxmlserializer/qxmlserializer.pro new file mode 100644 index 0000000..bc957c2 --- /dev/null +++ b/tests/auto/qxmlserializer/qxmlserializer.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qxmlserializer.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/qxmlserializer/tst_qxmlserializer.cpp b/tests/auto/qxmlserializer/tst_qxmlserializer.cpp new file mode 100644 index 0000000..33df943 --- /dev/null +++ b/tests/auto/qxmlserializer/tst_qxmlserializer.cpp @@ -0,0 +1,198 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS +#include +#include +#include + +#include "../qxmlquery/MessageSilencer.h" + +/*! + \class tst_QXmlSerializer + \internal + \since 4.4 + \brief Tests QSourceLocation + + */ +class tst_QXmlSerializer : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void constructorTriggerWarnings() const; + void objectSize() const; + void constCorrectness() const; + void setCodec() const; + void codec() const; + void outputDevice() const; + void serializationError() const; + void serializationError_data() const; + void cleanUpTestCase() const; +}; + +void tst_QXmlSerializer::constructorTriggerWarnings() const +{ + QXmlQuery query; + + QTest::ignoreMessage(QtWarningMsg, "outputDevice cannot be null."); + QXmlSerializer(query, 0); + + QTest::ignoreMessage(QtWarningMsg, "outputDevice must be opened in write mode."); + QBuffer buffer; + QXmlSerializer(query, &buffer); +} + +void tst_QXmlSerializer::constCorrectness() const +{ + QXmlQuery query; + QFile file(QLatin1String("dummy.xml")); + file.open(QIODevice::WriteOnly); + const QXmlSerializer serializer(query, &file); + /* These functions must be const. */ + + serializer.outputDevice(); + serializer.codec(); +} + +void tst_QXmlSerializer::objectSize() const +{ + QCOMPARE(sizeof(QXmlSerializer), sizeof(QAbstractXmlReceiver)); +} + +void tst_QXmlSerializer::setCodec() const +{ + QFile file(QLatin1String("dummy.xml")); + file.open(QIODevice::WriteOnly); + + /* Ensure we can take a const pointer. */ + { + QXmlQuery query; + QXmlSerializer serializer(query, &file); + serializer.setCodec(const_cast(QTextCodec::codecForName("UTF-8"))); + } + + /* Check that setting the codec has effect. */ + { + QXmlQuery query; + QXmlSerializer serializer(query, &file); + serializer.setCodec(const_cast(QTextCodec::codecForName("UTF-16"))); + QCOMPARE(serializer.codec()->name(), QTextCodec::codecForName("UTF-16")->name()); + + /* Set it back. */ + serializer.setCodec(const_cast(QTextCodec::codecForName("UTF-8"))); + QCOMPARE(serializer.codec()->name(), QTextCodec::codecForName("UTF-8")->name()); + } +} + +void tst_QXmlSerializer::codec() const +{ + QFile file(QLatin1String("dummy.xml")); + file.open(QIODevice::WriteOnly); + + /* Check default value. */ + { + const QXmlQuery query; + const QXmlSerializer serializer(query, &file); + QCOMPARE(serializer.codec()->name(), QTextCodec::codecForName("UTF-8")->name()); + } +} + +void tst_QXmlSerializer::outputDevice() const +{ + QFile file(QLatin1String("dummy.xml")); + file.open(QIODevice::WriteOnly); + + /* Check default value. */ + { + const QXmlQuery query; + const QXmlSerializer serializer(query, &file); + QCOMPARE(serializer.outputDevice(), static_cast< QIODevice *>(&file)); + } +} + +void tst_QXmlSerializer::serializationError() const +{ + QFETCH(QString, queryString); + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + query.setQuery(queryString); + + QByteArray output; + QBuffer buffer(&output); + QVERIFY(buffer.open(QIODevice::WriteOnly)); + QVERIFY(query.isValid()); + + QXmlSerializer serializer(query, &buffer); + + QEXPECT_FAIL("Two top elements", "Bug, this is not checked for", Continue); + QVERIFY(!query.evaluateTo(&serializer)); +} + +void tst_QXmlSerializer::serializationError_data() const +{ + QTest::addColumn("queryString"); + + QTest::newRow("Two top elements") + << QString::fromLatin1(", "); + + QTest::newRow("An attribute") + << QString::fromLatin1("attribute name {'foo'}"); +} + +void tst_QXmlSerializer::cleanUpTestCase() const +{ + QVERIFY(QFile::remove(QLatin1String("dummy.xml"))); +} + +QTEST_MAIN(tst_QXmlSerializer) + +#include "tst_qxmlserializer.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatterns.pri b/tests/auto/xmlpatterns.pri new file mode 100644 index 0000000..57b8517 --- /dev/null +++ b/tests/auto/xmlpatterns.pri @@ -0,0 +1,36 @@ +contains(QT_CONFIG,xmlpatterns) { + DEFINES += QTEST_XMLPATTERNS + QT += xmlpatterns +} + +wince*: { + patternsdk.files = $$QT_BUILD_TREE/lib/QtXmlPatternsSDK*.dll + patternsdk.path = . + basedata.files = xmlpaternsxqts/Baseline.xml + basedata.path = . + DEPLOYMENT += patternsdk + QT += network +} +QT -= gui + +XMLPATTERNS_SDK = QtXmlPatternsSDK +if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { + symbian: XMLPATTERNS_SDK = $${XMLPATTERNS_SDK} + else:win32: XMLPATTERNS_SDK = $${XMLPATTERNS_SDK}d + else: XMLPATTERNS_SDK = $${XMLPATTERNS_SDK}_debug +} + +INCLUDEPATH += \ + $$QT_SOURCE_TREE/src/xmlpatterns/acceltree \ + $$QT_SOURCE_TREE/src/xmlpatterns/api \ + $$QT_SOURCE_TREE/src/xmlpatterns/data \ + $$QT_SOURCE_TREE/src/xmlpatterns/environment \ + $$QT_SOURCE_TREE/src/xmlpatterns/expr \ + $$QT_SOURCE_TREE/src/xmlpatterns/functions \ + $$QT_SOURCE_TREE/src/xmlpatterns/iterators \ + $$QT_SOURCE_TREE/src/xmlpatterns/janitors \ + $$QT_SOURCE_TREE/src/xmlpatterns/parser \ + $$QT_SOURCE_TREE/src/xmlpatterns/projection \ + $$QT_SOURCE_TREE/src/xmlpatterns/schema \ + $$QT_SOURCE_TREE/src/xmlpatterns/type \ + $$QT_SOURCE_TREE/src/xmlpatterns/utils diff --git a/tests/auto/xmlpatterns/.gitattributes b/tests/auto/xmlpatterns/.gitattributes new file mode 100644 index 0000000..1b5e28a --- /dev/null +++ b/tests/auto/xmlpatterns/.gitattributes @@ -0,0 +1,3 @@ +stylesheets/copyWholeDocument.xsl -crlf +stylesheets/onlyRootTemplate.xsl -crlf +stylesheets/useParameters.xsl -crlf diff --git a/tests/auto/xmlpatterns/.gitignore b/tests/auto/xmlpatterns/.gitignore new file mode 100644 index 0000000..70e7478 --- /dev/null +++ b/tests/auto/xmlpatterns/.gitignore @@ -0,0 +1,5 @@ +notWritable.out +existingContent.out +basicOutput.out +basicOutput2.out +tst_xmlpatterns diff --git a/tests/auto/xmlpatterns/XSLTTODO b/tests/auto/xmlpatterns/XSLTTODO new file mode 100644 index 0000000..5a20441 --- /dev/null +++ b/tests/auto/xmlpatterns/XSLTTODO @@ -0,0 +1,1450 @@ +This is a TODO file for XSL-T 2.0 support. + +- LHF: + * Warning bug, last parameter is always whined about. + * Box in comment/PI/text/ws(?) handling -- pending Matthias + * type036 -- namespace on top element isn't copied + * XTDE0865 + * Attend XSLTTokenizer::isXSLT() + * Remove redundant set() calls in setFocusHelper(). + +- Missing features: + General Priority + --------------------- + * 1.0 QXmlQuery::evaluateTo(QIODevice *) P1 DONE + * 1.0 Test suite integration P1 DONE + * 1.0 xsl:key P1 + * 1.0 fn:key() P1 + * 1.0 2.0 Compatibility mode P1 + * 1.0 Regular parameters in templates P1 + * 1.0 xsl:include P1 + * 1.0 xsl:copy-of P1 + * 1.0 xsl:copy P1 + * 1.0 xsl:import P1 + * 1.0 fn:format-number P1 + * 1.0 xsl:message P2 + * 1.0 fn:current() P1 DONE + * 2.0 fn:type-available() P3 DONE + * 2.0 xsl:use-when P3 + * 2.0 fn:unparsed-entity-uri() P3 + * 2.0 fn:unparsed-entity-public-id() P3 + * 2.0 Tunnel Parameters P3 + * 2.0 xsl:attribute-set P3 + * 1.0 xsl:decimal-format P2 + * 1.0 xmlpatterns: initial template P1 DONE + * 1.0 xsl:number P1 + * 1.0 Complete handling of xsl:sort P2 + * 2.0 Grouping + - fn:current-group() + - fn:grouping-key() + - xsl:for-each-group() + * 2.0 Regexp + - xsl:analyze-string + - xsl:matching-substring + - xsl:non-matching-substring + - fn:regex-group() + * 2.0 Date & Time formatting + - fn:format-dateTime() + - fn:format-date() + - fn:format-time() + + Serialization & Output: + ---------------------- + * 1.0 xsl:output + --- Tie together serialization. Should we add + QXmlQuery::evaluateTo(QIODevice 1.0 const) ? + * 2.0 xsl:character-maps + * 2.0 xsl:character-map + * 2.0 xsl:result-document + --- Should the "default output" be handle with xsl:result-document? Would + depend on compilation. + +Optimizations: + * Remove adjacent text node constructors + * Remove string-join when first arg's static cardinality is not more than one + * Remove string-join when the second arg is statically known to be the empty string. + * Remove string-join when the second arg is a single space and the parent is a text node ctor. + * Rewrite to operand if operands are one. What about type conversions? + * Replace lookups with xml:id with calls on id(). + * Recognize that a/(b, c) is equal to a/(b | c). The later does selection and node sorting in one step. + * Remove LetClause which has empty sequence as return clause, or no variable dependencies at all. + * Do a mega test for rewriting /patterns/: + "node() | element()" => element() + "comment() | node()" => comment() + + and so forth. This sometimes happens in poorly written patterns. How does + this rewrite affect priority calculation? + +Tests: + * xml:id + - Come on, the stuff needs to be reorganized xml:id. + - Read in xml:id document with whitespace in attrs, write the doc out. Attrs should be normalized. + - Do lookups of IDs with xml:id attrs containing whitespace. + + * current() + - Use current() inside each instruction + - In a template pattern + - Several invocations: current()/current()/current() + + + * Diagnosticsts: + - See http://www.w3.org/Bugs/Public/show_bug.cgi?id=5643 . Comments + should be taken into account when comparing. This suggests that we + don't have any test which produces a document with XML comments. + + * element-available() + - Review the tests. + - Try using declarations in XSL-T, should return false + - Use xsl:variable(both instr and decl) + - invoke with all the XSL-T instructions. + - Should return false for when, otherwise, matching-substring, non-matching-substring, etc? + - Supply the namespace in the name via the default namespace, no prefix. + + * unparsed-text() + - Load an empty file + - Use a fragment in the URI + - Use an invalid URI + - Use device bindings and a QRC to ensure that we're not using a generic + network manager. + - Duplicate all the network tests. Same as for doc() + + * unparsed-text-available() + - Same as for unparsed-text() + + * Sequence constructor that contains only: + - XML comment + - whitespace text node + - processing instruction + - a mix of the three + + * xsl:function + - Ensure that it's not it's not in scope for use-when. + - xsl:function/xsl:param: use processing instructions, whitespace and comments as child: should be stripped + - Use : @name missing. + - Don't strip ws, and have ws between two xsl:param, and between xsl:function and xsl:param. + - Use xsl:function with no body. + - use xsl:param/@tunnel = no + - use xsl:param/@tunnel = yes + - use an invalid value for xsl:param/@tunnel = yes + - Have a non-WS text node in xsl:function/xsl:param/ + - Have a WS text node in xsl:function/xsl:param/ + - Have a WS text node in xsl:function/xsl:param/ while preserving WS. + - use a comment as child of xsl:param + - use a PI as child of xsl:param + - XTSE0770 with import precedence and all that. + - have two identical function in the stylesheet. The last has override=no. Should still report XTSE0770. + - have @override with invalid value. + - have whitespace inside xsl:param with different strip modes. + - Have @select => error + - Have body => error + - call current() inside body. XPDY0002? + + * Does xml:base/StaticBaseURI and StaticCompatiblityStore prevent proper + type checking due to expectedOperandTypes() returns item()*? + + * xsl:template/xsl:param + - Have @required=yes, and have @select => error + - Have @required=yes, and have body => error + - Have a variable reference in a template after another, which has + param, to ensure they aren't in scope. + + * xsl:template/@match + - Have a pattern with unions, and have a body which relies on its + static type. + + * @version: + Have @version on *all* attributes. + + * xsl:call-template + - Have a variable reference just after a xsl:call-template which has + with-param, to ensure they aren't in scope. + - Have an xsl:with-param which isn't used in the template. Error? + - Have an xsl:with-param that has a type error. + - an xsl:with-param is not in scope for the next one. Test this => error. + - Have a call:template, whose with-param computes its value by calling + another template, while using an with-param too. + + * XQuery: + - DONE Ensure namespace {expr} {expr} is flagged as invalid + - Use all XSL-T functions: error. Or we do that already? + - Ensure order by collation 1 + 1 is an error + - Ensure order by collation {1 + 1} is an error + + * document() + - Basic node deduplication, no test exists for that. + + * xsl:perform-sort + - Have no xsl:sort. Error. Must be at least one. + - have xsl:sort with invalid value. + - sort atomic values. + - Trigger "The stable attribute is permitted only on the first xsl:sort element within a sort key specification" + - have xsl:sort with no select and no seq ctor. + - trigger the delegated queueing. All instructions inside.. xsl:sort? + - have multiple sort statements, with the last being only. + - have WS between xsl:sort that is not ignorable. + - Use a variable reference whose name is equal to our synthetic name. This should be XPST0008, but probably isn't. + - Have an invalid value in xsl:sort/order. Use space + - have xsl:sort return numbers, but data-type specify string. + - have an AVT in xsl:sort/@lang + - have an AVT in xsl:sort/@case-order + - have an AVT in xsl:sort/@data-type + - have an AVT in xsl:sort/@stable + - Have mixed result, and hence incorrectly trigger XPTY0018 which the code currently raise. + - Depend on the context position inside xsl:sort, when being child of + perform-sort. Currently we create singleton focuses(I think), while + we want the focus to be over the whole input sequence, not on indivual items. + - Have : xsl:sort is missing + - Use current() in the xsl:sort and the body, to ensure the right scope is picked up + + * xsl:copy-of + - Have a text node. It's not allowed. + - Have PIs, comments, and ignorable whitespace as children. Sigh. + + * xsl:namespace + - Use xsl:fallback. + - Use xsl:namespace inside xsl:variable and introspec the result in various + ways. This is a big area, we don't have namespace nodes in XQuery. Yes, calling evaluateSingleton() will probably crash. + - Use no select and no body, error: XTSE0910 + - Have name expression evaluate to the empty sequence. + + * Sequence ctor that: + - Has invalid element in XSL namespace. E.g, xsl:foo + + * xsl:import + - Have element as child as xsl:import: disallowed. + - Have text as child as xsl:import: disallowed. + - Have PIs and comments as child as xsl:import: allowed. + + * xsl:include + - Have element as child as xsl:include: disallowed. + - Have text as child as xsl:include: disallowed. + - Have PIs and comments as child as xsl:include: allowed. + + * xsl:strip-space + - Have PIs, comments, whitespace as child. + + * xsl:element + - Extract EBV from result. + - Use space in validation element. + + * xsl:perform-sort + - Have PIs and comments in between xsl:sort elements. + + * xml:space + - We never pop our stack. Fix the bug, and ensure we have tests for it. + + * fn:unparsed-entity-uri + - Check type of return value + - Do basic unparsed-entity-uri("does-not-exist") + + * fn:unparsed-entity-public-id + - Do basic unparsed-entity-uri("does-not-exist"), two permutations, check the spec + + * xsl:element + - Use disallowed attribute: select + - use unknown type in @type + - Use @namespace, but be not in the lexical space of xs:anyURI + - use disallowed enumeration in @validation + - have a name expression that evaluates to a xs:QName value as opposed to a string. + - have a name expression that evaluates to a xs:QName value as opposed to a string. but + also have the namespace attribute + + * xsl:attribute + - Use disallowed attribute: match + - use unknown type in @type + - Use @namespace, but be not in the lexical space of xs:anyURI + - use disallowed enumeration in @validation + - have a name expression that evaluates to a xs:QName value as opposed to a string. + - have a name expression that evaluates to a xs:QName value as opposed to a string. but + also have the namespace attribute + + * xsl:template + - Use the union keyword, it's forbidden, only "|" is allowed + - Use an expression other than Literal and VarRef in KeyValue[8] + - use a function other than key(). + - have a declaration that only can apperar as a child of xsl:stylesheet. + - Have an element in the XSL-T namespace, but which is invalid, e.g "bar" + - Use an axis other than child or attribute in pattern. + - Have a template that no no match and no name attribute., XTSE0500 + - use child::document-node() in pattern + - use @foo/child in pattern + - apply templates to parentless attributes. + - Have 3e3 in @priority + - Have a @match with more than two alternatives, e.g "a | b | c", and have them all actually matching. + - Use an XML name in the mode so we trigger + NCNameConstructor::validateTargetName() + - A template which only has a non-WS text node. + - A template with param, followed by text node. + + * Simplified stylesheet + - Use @version attribute only on doc element. Should fail, since @{XSL-T]version must be present + + * fn:current() + - Have + + * xsl:variable have a variable reference appearing before its global declaration, and then somehow trigger recursion. + * xsl:choose + - elements/nodes intermixed with xsl:choose/xsl:when + - invalid attribute on xsl:choose + - invalid attribute on xsl:when + - invalid attribute on xsl:otherwise + - invalid attribute on xsl:if + - invalid attribute on xsl:template + - invalid attribute on xsl:stylesheet + - invalid attribute on xsl:transform + - xsl:otherwise in the middle between xsl:when elements. + - use namespace declarations on xsl:when + - use namespace declarations on xsl:otherwise + - use namespace declarations on xsl:choose + + * Namespaces: + - Have: + + + + * XPath + - For each XQuery-specific expression, add a test using that expression: + - typeswitch + - let + - validate + - extension expression + - unordered + - ordered + - for + - computed text node constructor + - computed attribute constructor + - computed comment constructor + - computed PI constructor + - computed element constructor + - computed document constructor + - direct element constructor + - direct comment constructor + - direct PI constructor + - all declarations + + - Use all the predefined prefixes in XQuery; non are in XSL-T. + + * xsl:when + - Use xml:space on it + + * xsl:otherwise + - Use xml:space on it + + * xsl:version + - Use letters, XTSE0110 + - Use a float: 2e3, XTSE0110 + - Use a weird number, 2.00000001 + + * xsl:document + - use disallowed attribute: select. + - use unknown type in @type + - use disallowed enumeration in @validation + - What happens if the type in @type is unknown? + - Use xml:base attr and check URI. + + * xsl:sequence + - use match attribute + + * xsl:stylesheet + - Use @xsl:default-collation on xsl:stylesheet. Shouldn't have any effect. Or? + - Use an XSL-T instruction as child -- invalid. + - Have an element in the XSL-T namespace, but which is invalid, e.g "foo" + - Have xsl:default-collation="http://example.com/" on xsl:stylesheet + - Use prefix local: in say a function name. Not allowed. + - Use comments after document element. + - XTSE0010: + - Change the version with @xsl:version on all elements that we have. + + * Patterns. + - Basic */* test: + + + + + + - Basic a/b test: + + + + + * xsl:strip-whitespace + - Use a namespace prefix which is not unboudn + - have a syntax error in one of the node tests + + * xsl:preserve-whitespace + - Use a namespace prefix which is not unboudn + - have a syntax error in one of the node tests + + * xsl:value-of + - select attribute, and comment in body(error, XTSE0870) + - select attribute, and processing instruction in body(error, XTSE0870) + - select attribute, and CCDATA in body(error, XTSE0870) + - select attribute, and element in body(error, XTSE0870) + - use xsl:sequence in body. Default separator should be none. + - use match attribute + - use double apostrophes/quotes. How are they dealt with? + + * xsl:apply-templates + - use match attribute + - apply in a mode for which no templates are declared + - apply in a mode which is mispelled for another. + - Have: + We CRASH + + * xsl:for-each + - No body: + - No select attribute: text + - Have mixed result, and hence incorrectly trigger XPTY0018 which the code currently raise. + - Have: + + + + + * xsl:variable + - Test that function conversion rules are invoked + - For what is an xsl:variable in scope? Where does the spec state it? Test + that it is not in scope where applicable. + - Have: + + * xsl:text + - count the result of a template that has text node(non-ws), + xsl:text(content), xsl:content(zero content), text node(non-ws + - Have an element inside xsl:text: XTSE0010. + - Use comments and PIs intermixed with text inside. + + * xsl:for-each + - use match attribute + - What should this produce? Saxon produces "123" but with xsl:text removed, "1 2 3". + + + + + + + + * xsl:if + - Have body. Error + - Have . That is, empty body. + + * xsl:sequence + - select attribute missing: + - content other than xsl:fallback, e.g text node. + - How do we sort? + + * for every state for XSL-T parsing: + - Use invalid element that is in the XSL-T namespace. + + * In all cases expressions are queued/generated: + - Trigger expression precedence bugs, due to lack of paranteses. + + * Use xml:space in stylsheeet that doesn't have value preserve nor default. + * For each case we have while(!reader.atEnd()): + - test that triggers parser error and that we detect it properly. + + * for every element that allows text: + * Use CDATA. QXmlStreamReader distinguishes between the two. text before and after.:wa + * Use XML Comments and split up text nodes. + + * Patterns: + * Ensure node() doesn't match document nodes(). + * "//" is an invalid pattern + * Is there some expression which has no children? findAxisStep() + * Use @*/asdo + * XPST0003: key(concat("abc", "def"), "abc") + * XPST0003: id(concat("abc", "def")) + * XPST0003: concat('abc', 'def') // WILL CRASH + * XPST0003: unknownFunction() + * Use double: key("abc", 3e3) + * Use three argument key() in pattern. + + * Simplified stylsheet modules: + * Omit the xsl:version attribute. XTSE0010 + + * type-available() + * We have no tests at all? + + * have xml:base on the following elements and check them with + static-base-uri(): + - all instructions + - all declarations, eg: + - xsl:choose, xsl:choice, xsl:otherwise + - xsl:template + - xsl:function + - etc + + Embedded stylesheet modules + - Verify that we don't choke on xsl attrs with invalid attributes outside; + "In an embedded stylesheet module, standard attributes appearing on + ancestors of the outermost element of the stylesheet module have no effect." + + Parsing: + - Error message for: + + + + + - Use the document " + + + + + + + + +*( +((/)/call-template(t0)) +(*/call-template(t1)) +(element(asd)/call-template(t2)) +(comment()/call-template(t3)) +(a/b/call-template(t3)) +) + +==> + +*/typeswitch(.) + case $g0 as document-root() return call-template(t0) + case $g0 as element() return call-template(t1) + case $g0 as element(asd) return call-template(t2) + case $g0 as comment() return (call-template(t3) + case $g0 as a/b return (call-template(t4) + + +Patterns are used in: + - xsl:for-each-group/@group-starting-with + - xsl:key/@match + - xsl:number/(@count, @from) + - xsl:template/@match + + + +c/b +=> +child-or-self::element(b)[parent::element(c)] + +c/b/a +=> +child-or-self::element(a)[parent::element(b)[parent::element(c)]] + +d/c/b/a +=> +child-or-self::element(a)[parent::element(b)[parent::element(c)[parent::element(d)]]] + + + +----------------------------------- + + => + + child::element(foo) map apply-template(#default) +----------------------------------- + +----------------------------------- + + + + => + + let $g0 := for $g1 in child::element(foo) + order by @bar + return $g1 + return apply-template(yo) +----------------------------------- + +----------------------------------- + + + + + => + +sort $in/order by @sortKey +----------------------------------- + + +----------- + +John Snelson of Oracle Berkeley DB XML & XQilla writes in private mail: + + I'd had the same thought myself, too - you must be reading my mind ;-) + +What is he referring to? + +If one spends some time on fancy diagrams, QtXmlPatterns[LINK]'s, the XQuery +engine that shipped in Qt 4.4, architecture looks like this: + + +Recently I've started implementing XSL-T 2.0(hopefully to be done for Qt 4.5) +and the whole approach to this is modifying the existing codebase as follows: + + + + + + +Put differently, when QtXmlPatterns is dealing with XSL-T stylesheets, it +replaces the XQuery tokenizer with a tokenizer which translates the +stylesheet into XQuery tokens, that is consumed by the existing XQuery +parser, extended with both grammar non-terminals and tokens to accomodate the +XSL-T features that XQuery doesn't have. In compiler terms, it can be seen as +an "extreme" frontend. Not only is the same intermediate representation used, +the grammar is too. + +What is the point of this? + +The functional overlaps XQuery, XSL-T and others as well have is of course +widely established. Even the specifications are at times generated from the +same source documents, and that implementations subsequently modularize code +is of course second nature to any engineer, and seen to some degree or +another in contemporary implementations. Typically this happens in a +traditional fashion, classes are re-used, their functionality widened to +cover both/more languages. However, I believe doing it directly on the +grammar level introduce several advantages. + +The parser is based on Bison and since it's not running in the experimental +pull mode, it uninterruptedly calls the tokenizer. The tokenizer, class +XSLTTokenizer, in turns calls an pull-based XML parser: QXmlStreamReader. +What often complicate in ocassions like this is who that gets the right to +call who, and who gets the convenience of tracking state in a natural way +through a call stack. + +XSLTTokenizer is conveniently implemented: as it encounters declarations and +instructions in the stylsheet, it recursively descends in the XSL-T grammar +through its own functions, adding tokens to a queue, which is delivered to +the parser when asked -- and when the queue is empty it resumes queuing +tokens. The tokenizer is fairly crude, it queues up tokens for instructions +uninterrupted, and only have states between declarations. Hence, +XSLTTokenizer queues up tokens for each template and function body, but +enters "delivery mode" inbetween. This of course periodically breaks +streaming since it's buffering up tokens, but considering that the memory +usage for tokens is low and that a finer granularity for states(say, being +able to pop the stacks when being inbetween two xsl:when elements) requires a +significant effort, this is fine until proven otherwise. + + +Advantages +--------------- +discuss analysis. + + +XSLTTokenizer rewrite XSL-T to XQuery as follows:' + +Instructions +------------- +xsl:if An if/then/else expression whose else branch is the empty sequence + +xsl:choose: again, a nesting of if/then/else expressions + +xsl:value-of: a computed text node constructor. Its body contains a call to +string-join() involving the separator attribute + +xsl:variable: a let/return binding. Since XSL-T is statement-like in its +sequence constructors, parantheses are used to ensure the variable binding is +in-scope for all subsequent statements. + +for-each: it is the iteration/mapping mechanism XQuery fails to supply, +despite path steps and the FLWOR machinery. for-each iterates using a +focus(which for doesn't, but paths do), but can do so over atomic values and +unconditionally without sorting the result by document order(which paths +can't/doesn't, but for do). For implementations that normalize paths into for +loops as the formal semantics do, the approach is straight forward. In +QtXmlPatterns' case, a synthetic token is queued which signals to create +a "relaxed" path expression which skips halting on atomic values in its +operands(XPTY0019) and also skips node sorting. + +All "direct" node constructors, like , and "computed" node +constructors, like xsl:element, are all rewritten into the corresponding +XQuery computed node constructors. In some cases direct node constructors +could have been used, but in anycase the IR yielded is the same, and that +computed constructors happen to use less tokens. + +A particular case is xsl:namespace, an instruction which doesn't have any +corresponding expression in XQuery. In the case of QtXmlPatterns, the code +obvious already have a notion of "create this namespace on this element", and +an AST node was trivially added for fetching the namespace components +computationally. However, the introduction of xsl:namespace in an XQuery +implementation is not to be taken lightly wrt. to for instance testing, since +it introduces a new node type. + +perform-sort: surprisingly this expression of all complicate matters, for the +simple reason that its operands occur in the opposite order compared to +XQuery when the input sequence is supplied through a sequence constructor, +hence breaking the streamed approach. XSLTokenizer solves this by +buffer: the attributes of the xsl:perform-sort elements are stored, +the xsl:sort elements queued onto a temporary queue, and subsequently is +either the select attribute or the sequence constructor queued, and the +tokens for xsl:sort appended afterwards. This complicated code greatly, since +XSLTokenizer had to be able to "move around" sequences of tokens. + +In addition perform-sort has the same problem as for-each, the iteration +mechanism falls inbetween paths and the for loop. The focus for perform-sort +is also the focus for the sequence constructor and the select attribute, but +the focus for the xsl:sort elements is the initial sequence. This is +approached by having a for loop, and where the expression in each order by +clause has a relaxed path expression whose left operand is a variable +reference to what the for loop bound. +TODO Doesn't work. Focus size wrong. + +This is an approach that implementations of the "second generation" of the +technologies can take. The bif difference is that XSL-T 2.0 doesn't have the +restrictions of 1.0, more evident in XQuery's syntax. + +xsl:sort XSL-T is much more dynamic than XQuery through the use of templates, +but also +because more decisions can be taken at runtime through all attribute value +templates. xsl:sort is surely a good example of this with its AVTs for +language, order, collation, stability and what not. XQuery's order by stands +in strong contrast, which has these coded in the grammar. In QtXmlPatterns' +case, the AST node corresponding to order by was generalized to take things +such as stability and order from operands. This is paid by the code paths in +XQuery since for them are constants generated and inserted as operands even +though its known at compile time what is needed. However, considering that +these evaluations are not inside the actual sort loop, but instead only +computed on each sort invocation, it shouldn't be too bad. + +xsl:message + +Templates +------------------------- + +A big bucket of questions for an XQuery implementation is of course the +introduction of templates. In this case it is too of large interest to +rewrite relevant code into primitive XQuery expressions. + +Templates' drawback is often mentioned to be their dynamic nature which makes +static inferences hard or impossible. However, by again rewriting in clever +ways and making the code visible in a standard way, existing analysis code +can operate upon it. + +For the purposes of this discussion, templates can be broken down into three +distinct problems: + +A Finding what nodes to invoke upon. This is the expression found on +xsl:apply-templates/@select, in the case of template rules + +B Concluding what template to invoke. This is the analyzis and evaluation of +patterns, as found on xsl:template/@match, in the case of templates rules. +This is seen as a critical, as for instance Michael Kay emphasizes in Saxon: +Anatomy of an XSLT processor [LINK +http://www.ibm.com/developerworks/library/x-xslt2/] + +C Invoking the template for the given context node + +For these three steps, the two first are specific to template rules, while the +latter, invoking templates, can be seen to be treated identically regardless +of kind: template rules as well as named templates. + +With this perspective as background, lets try to write it into XQuery +primitives. + +First, all templates regardless of kind are instanciated by name. In the case +of templates rules, a synthetic name is given. They are invoked by an XPath +function named call-template() that as first argument takes the name of the +template, and also handles template parameters. This "template callsite" +which is separated from what it is invoked with and whether it is invoked, +knows its target template statically, and hence can be subject to inlining, +and usual functional analysis. + +Focus and concatenation of output handled. +One should consider whether templates couldn't be considered as functions, +with specialized arguments in the case of tunnel parameters. +Knowing what templates will be invoked could be used to conclude +node sorting is not necessary. +Mention how we do builtin templates + +Attribute Value Templates +------------------------- +XSL-T make extensive use of Attribute Value Templates(AVTs), which are handled +by turning the grammar piece in XQuery that is closest, into an expression. +Simply, ExprSingle[32] is extended with the branch: + +AVT LPAREN AttrValueContent RPAREN + +where AVT is a synthetic token XSLTokenizer generates. This means that the +code handling AVTs in XQuery's direct attribute constructors handles AVTs as +generic expressions. AttrValueContent creates a call to the concat() +function, over the operands. + +Deal with fn:current by using let $current := . return instruction. + +Another thing related to order and parsing is that XSL-T has more freedom wrt. +to where variables are in scope. For instance, a variable declaration appearing +after a user function declaration is in scope for the function in XSL-T, but +that's not the case in XQuery. This means that delayed variable resolution must +be added, something which wasn't, and cannot be active, for the XQuery code. +See 9.7 Scope of Variables. + +The parser generates for the builtin template rules: + + declare template matches (text() | @*) mode #all + { + text{.} + }; + + * +By having templates invocations essentially expressed as a callsite, or +branching, allows control flow analysis in a traditional manner, and hence the +possiblity to conclude what templates that are possibly invoked in various +contexts (or not invoked). One good example where this could improve template +matching is patterns containg predicates: let's say a template matches text +nodes with a predicate, but , doh I'm wrong. + +The problem with expressing template invocation with if expressions, is finding +ambiguous matches. + +Although normalizing down to a small set of primitives has its advantages, one +problem is with doing it too early. When doing it directly when tokenization, +the higher-level perspective is lost and therefore must be restored +again(example?). For instance, if an error is reported in a primitive, it must +not appear as originating from that primitive. It's not contstrained to error +reporting(example?). However, this is a general problem when compilers shift +between different representations. + +One effect this parsing approach has, is that the stylesheet cannot be used as +an input document(e.g, what document("") would evaluate to); in that case it +has to be parsed again. I think this is for the better; in the case that the +stylsheet has this dual role, it means representations are used which are +designed specifically for these respective roles. Although doing a dual parsing +step is costly, it's somewhat relieved by that the input is typically cached at +the byte level(file system and higher layers such as web/application caches) in +the case of traditional file loading. + +Another problem is that the grammar is used to solve implementation details, +and this might show as part of when the parser do error reporting. + +If one decide to not send XSL-T through the XQuery parser, it can be an +advantage to have as little business logic as possible in the XQuery parser +such that it can be reused. + +Some parts of XSL-T's syntax doesn't translate well to XQUery syntax. Some +parts doesn't follow structure very strongly, surely not the structures that +map well to XQuery's syntax. These are xml:base, @version and other attributes +that can appear on any element. Their information needs to be preserved and +need to affect the output code, but these cannot be done in a way which fits +naturally with the XQuery syntax, and hence leads to workarounds. Have whole +section on how we do @version and @xml:base. Another problem is namespace +declarations on the top document element. + +What largely makes me believe this technique fails is that the large and most +important parts, templates, instructions, maps well to XQuery, but the small +but yet not ignorable details like @version and @xml:base does not, to the +degree that the approach at large fails. + +fn:document() +------------------------ +See class documentation for DocumentFN. Document what optimizations one typically +wants to implement(const-fold on card 1, constant propagate). + + +In other words, it's reasonable to believe that it's possible to extend the +XQuery grammar such that it functionality wise is able to do the same as XSL-T, +but this doesn't equal that it is a good way to reach every gritty corner of +the XSL-T specification. + +Patterns +-------------------- +The up-side-down turning, discuss id/key(). + +Declarations +--------------------- +xsl:function: the 'declare function' declaration. TODO override + +XSL-T's error codes goes against good refactoring. Its codes are +specific on each usage, compared to for instance XPTY0004. + +Optimizations: string-join()/value-of + + + + + + + + => + + document-node()/child::element(doc) map apply-template + + matches child-or-top::element(doc) + + => + + N/root(.)//(EE) + + N == document-node() + EE == child::element(doc) + + => + + document-node()/root(.)/descendant-or-self::node()/child::element(doc) + + Optimize out already in createCopyOf() + +Bugs: + - DynamicContextStore and CurrentItemStore needs to implement + evaluateToReceiver(). + - Don't we have a parsing bug in each place where we call insideSequenceConstructor(), and don't + wrap the result in parantheses? E.g, a whitespace node followed by an instruction will lead to parse + error if the parent is for instance xsl:when. + +In patterns we find: + - Function :id() + - Function :key() + - AxisStep + - GenericPredicate. Also used for paths. + - (CombineNodes) + - empty sequence; attribute::foo()/child::asd + + +Test case, tokenizer asserts(fixed in 2a0e83b): + + + + + + + + + + + + + + + + + + + + + + + + +Typing code: + + + + + + + + + + + + + + + + + + +Compat mode in attribute sets: + + + + + + + + + + + + +Space in mode: + + + + + + + + + +Type error in global template: + + + + + + + + + + +Variables are not in scope before its siblings: + + + + + + + + + + +Crashes: + + + + + + + + + + + +Whitespace handling, the important part is WS after xsl:template: + + + + + + + + + +Whitespace handling, preserve, but not inside xsl:apply-templates: + + + + MATCH + + + + + +Have top-level xml:space, ensure whitespace as child of xsl:stylesheet is ignored: + + + + MATCH + + + + + + +Compat mode, Saxon & QtXmlPatterns fails: + + + + + + + + + +Compat mode, this is not in the suite: + + + + + + + + +Crashes: + + + + + + + + + + +Incorrectly yields compile error, XPST0003: + + + + + + + + +Have a basic simplified stylesheet module: + + + + + +Have no @version: + + + + + +Is valid: + + + + + + + + + + + + +Is valid: + + + + + + TEXT + + + + + +XTSE0020: + + +XTSE0020: + + +XTSE0805: + + +not XPST0003, not in test suite: + + + + + + + +Parsing of many exprs in xsl:value-of(with separator): + + + + + + + + + + + + + +Parsing of many exprs in xsl:value-of(without separator): + + + + + + + + + + + + + +Check type of empty variables: + + + + + + + + + + + + +Crashes: + + + + + + + + + +invalid standard attributes on a simplified stylesheet module. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Asserts(not wellformed): + + + + + + + + + + +From within a function, use the focus /through/ a variable reference: + + + + + + + + + + + + + + + + + +Loops infinitely: + + + + + + + + + + +Gives crash in coloring code: + Stylesheet: + + + + + + + + Focus: + < + + +Should evaluate to true: + + + + + + + + + + + + + + + + + + +Crashes, should be XTTE0570: + + + + + + + + + + + + def + + + + + +* Parse error: + + + + + + + + + + + + +* Write tests with xsl:with-param whose body is empty. That's effectively an + empty sequence(?) which needs to be handled properly, and (dynamically) type + checked correctly. + +-------------------------------------------------------------------------- + + + + + +-------------------------------------------------------------------------- + + + + ------------------------------------------------------------- + /a/b + + => + + b[parent::a[parent::document()]] + + but we currently have: + + (b[parent::a])[parent::document()] + + ------------------------------------------------------------- + a/b + + => + + b[parent::a] + + ------------------------------------------------------------- + a/b/c + + => + + c[parent::b[parent::a]] + + ------------------------------------------------------------- + a/b/c/d + + => + + d[parent::c[parent::b[parent::a]]] + + + ------------------------------------------------------------- + /a/b/c/d + + => + + d[parent::c[parent::b[parent::a[parent::document()]]]] + + This is handled specially; see | SLASH RelativePathPattern + + + b/c rewrites to: + TruthPredicate + AxisStep self::element(c) + AxisStep parent::element(b) + + For a/b/c we get: + + TruthPredicate + TruthPredicate + AxisStep self::element(c) + AxisStep parent::element(b) + AxisStep parent::element(a) + + But we want: + + TruthPredicate + AxisStep child-or-top::element(c) + TruthPredicate + AxisStep parent::element(b) + AxisStep parent::element(a) + + For a/b/c/d we get: + + TruthPredicate + TruthPredicate + TruthPredicate + AxisStep self::element(d) + AxisStep parent::element(c) + AxisStep parent::element(b) + AxisStep parent::element(a) + + For a/b/c/d we want: + + TruthPredicate + AxisStep self::element(d) + TruthPredicate + AxisStep parent::element(c) + TruthPredicate + AxisStep parent::element(b) + AxisStep parent::element(a) + + + For /a/b we get: + + TruthPredicate + TruthPredicate: + AxisStep self::element(b) + AxisStep parent::element(a) + AxisStep parent::document() + + but we want: + + TruthPredicate + AxisStep self::element(b) + TruthPredicate: // PREDICATE + AxisStep parent::element(a) + AxisStep parent::document() // PREDICATE + + -------------------------------------------------------------- + For a/b/c we get: + TruthPredicate + AxisStep self::element(c) + TruthPredicate + parent::element(b) + parent::element(a) + diff --git a/tests/auto/xmlpatterns/baselines/globals.xml b/tests/auto/xmlpatterns/baselines/globals.xml new file mode 100644 index 0000000..2457aaa --- /dev/null +++ b/tests/auto/xmlpatterns/baselines/globals.xml @@ -0,0 +1,12 @@ +Global variables report for globals.gccxml

The following global, complex variables were found:

  1. constComplex2 in globals.cpp at line 17
  2. constComplex1 in globals.cpp at line 16
  3. mutableComplex2 in globals.cpp at line 15
  4. mutableComplex1 in globals.cpp at line 14

The following mutable primitives were found:

  1. mutablePrimitive2 in globals.cpp at line 2
  2. mutablePrimitive1 in globals.cpp at line 1

This report was generated on

\ No newline at end of file diff --git a/tests/auto/xmlpatterns/queries/README b/tests/auto/xmlpatterns/queries/README new file mode 100644 index 0000000..ab0726f --- /dev/null +++ b/tests/auto/xmlpatterns/queries/README @@ -0,0 +1,4 @@ +The queries in this directory are used by several tests, at least: cli/ and +qxmlquery/. When adding queries, make sure the correct baselines have been +generated for the auto tests that use them. + diff --git a/tests/auto/xmlpatterns/queries/allAtomics.xq b/tests/auto/xmlpatterns/queries/allAtomics.xq new file mode 100644 index 0000000..f2ea459 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/allAtomics.xq @@ -0,0 +1,50 @@ +xs:untypedAtomic("xs:untypedAtomic"), +xs:dateTime("2002-10-10T23:02:11Z"), +xs:date("2002-10-10Z"), +xs:time("23:02:12Z"), +xs:duration("P12M"), + +(: Sub-types of xs:duration :) +xs:dayTimeDuration("PT1S"), +xs:yearMonthDuration("P1M"), + +xs:float("3e3"), +xs:double("4e4"), +xs:decimal("2.0"), +(: Sub-types of xs:decimal :) +xs:integer("16"), +xs:nonPositiveInteger("-6"), +xs:negativeInteger("-4"), +xs:long("5"), +xs:int("6"), +xs:short("7"), +xs:byte("8"), +xs:nonNegativeInteger("9"), +xs:unsignedLong("10"), +xs:unsignedInt("11"), +xs:unsignedShort("12"), +xs:unsignedByte("13"), +xs:positiveInteger("14"), + +xs:gYearMonth("1976-02Z"), +xs:gYear("2005-12:00"), +xs:gMonthDay("--12-25-14:00"), +xs:gDay("---25-14:00"), +xs:gMonth("--12-14:00"), +xs:boolean("true"), +xs:base64Binary("aaaa"), +xs:hexBinary("FFFF"), +xs:anyURI("http://example.com/"), +QName("http://example.com/2", "prefix:localName"), + +xs:string("An xs:string"), +(: Sub-types of xs:string :) +xs:normalizedString("normalizedString"), +xs:token("token"), +xs:language("language"), +xs:NMTOKEN("NMTOKEN"), +xs:Name("Name"), +xs:NCName("NCName"), +xs:ID("ID"), +xs:IDREF("IDREF"), +xs:ENTITY("ENTITY") diff --git a/tests/auto/xmlpatterns/queries/allAtomicsExternally.xq b/tests/auto/xmlpatterns/queries/allAtomicsExternally.xq new file mode 100644 index 0000000..e3f8686 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/allAtomicsExternally.xq @@ -0,0 +1,33 @@ +(: fromQTime is intentionally not here, since + we don't support it. :) + +string-join(for $i in ( + $fromFloat, + $fromBool, + $fromDouble, + $fromIntLiteral, + $fromLongLong, + $fromQByteArray, + $fromQChar, + $fromQDate, + $fromQDateTime, + $fromQString, + $fromQUrl, + $fromUInt, + $fromULongLong, + $fromBool instance of xs:boolean, + $fromDouble instance of xs:double, + $fromFloat instance of xs:double, + $fromIntLiteral instance of xs:integer, + $fromLongLong instance of xs:integer, + $fromQByteArray instance of xs:base64Binary, + $fromQChar instance of xs:string, + $fromQDate instance of xs:date, + $fromQDateTime instance of xs:dateTime, + $fromQString instance of xs:string, + $fromQUrl instance of xs:string, + $fromUInt instance of xs:integer, + $fromULongLong instance of xs:unsignedLong) + return string($i), + " ") + diff --git a/tests/auto/xmlpatterns/queries/completelyEmptyQuery.xq b/tests/auto/xmlpatterns/queries/completelyEmptyQuery.xq new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/queries/concat.xq b/tests/auto/xmlpatterns/queries/concat.xq new file mode 100644 index 0000000..08acf55 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/concat.xq @@ -0,0 +1 @@ +concat("abc", "def") diff --git a/tests/auto/xmlpatterns/queries/emptySequence.xq b/tests/auto/xmlpatterns/queries/emptySequence.xq new file mode 100644 index 0000000..df672d0 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/emptySequence.xq @@ -0,0 +1,2 @@ +(: This query evaluates to nothing. :) +() diff --git a/tests/auto/xmlpatterns/queries/errorFunction.xq b/tests/auto/xmlpatterns/queries/errorFunction.xq new file mode 100644 index 0000000..a77884a --- /dev/null +++ b/tests/auto/xmlpatterns/queries/errorFunction.xq @@ -0,0 +1 @@ +fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')) diff --git a/tests/auto/xmlpatterns/queries/externalStringVariable.xq b/tests/auto/xmlpatterns/queries/externalStringVariable.xq new file mode 100644 index 0000000..1133714 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/externalStringVariable.xq @@ -0,0 +1 @@ +concat("START ", $externalString, " END") diff --git a/tests/auto/xmlpatterns/queries/externalVariable.xq b/tests/auto/xmlpatterns/queries/externalVariable.xq new file mode 100644 index 0000000..edff16e --- /dev/null +++ b/tests/auto/xmlpatterns/queries/externalVariable.xq @@ -0,0 +1,2 @@ +declare variable $externalVariableAsInt as xs:integer := xs:integer($externalVariable); +$externalVariable, $externalVariableAsInt + 3, {$externalVariable}, $externalVariable instance of xs:string diff --git a/tests/auto/xmlpatterns/queries/externalVariableUsedTwice.xq b/tests/auto/xmlpatterns/queries/externalVariableUsedTwice.xq new file mode 100644 index 0000000..ba13875 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/externalVariableUsedTwice.xq @@ -0,0 +1 @@ +$externalVariable, $externalVariable diff --git a/tests/auto/xmlpatterns/queries/flwor.xq b/tests/auto/xmlpatterns/queries/flwor.xq new file mode 100644 index 0000000..16e3b2c --- /dev/null +++ b/tests/auto/xmlpatterns/queries/flwor.xq @@ -0,0 +1,4 @@ +for $a in (1, 4, 2) +let $i := (1, 3, 2) +order by $i +return $i diff --git a/tests/auto/xmlpatterns/queries/globals.gccxml b/tests/auto/xmlpatterns/queries/globals.gccxml new file mode 100644 index 0000000..81bcb22 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/globals.gccxml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/xmlpatterns/queries/invalidRegexp.xq b/tests/auto/xmlpatterns/queries/invalidRegexp.xq new file mode 100644 index 0000000..fa89b22 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/invalidRegexp.xq @@ -0,0 +1 @@ +tokenize("input", "\") diff --git a/tests/auto/xmlpatterns/queries/invalidRegexpFlag.xq b/tests/auto/xmlpatterns/queries/invalidRegexpFlag.xq new file mode 100644 index 0000000..b15f8ad --- /dev/null +++ b/tests/auto/xmlpatterns/queries/invalidRegexpFlag.xq @@ -0,0 +1 @@ +tokenize("input", "pattern", "INVALID") diff --git a/tests/auto/xmlpatterns/queries/nodeSequence.xq b/tests/auto/xmlpatterns/queries/nodeSequence.xq new file mode 100644 index 0000000..721cb86 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/nodeSequence.xq @@ -0,0 +1,31 @@ +document{()}, +document{()}, +document{()}, +document{""}, +document{""}, +document{text{()}}, +document{text{()}}, +document{text{"text1"}}, +document{text{"text2"}}, +document{}, +, +, +, +, +attribute name {"value"}, +text{()}, +text{"text3"}, + + text4 + + text5 + + + + + +, +, +, +, + diff --git a/tests/auto/xmlpatterns/queries/nonexistingCollection.xq b/tests/auto/xmlpatterns/queries/nonexistingCollection.xq new file mode 100644 index 0000000..1c18cc4 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/nonexistingCollection.xq @@ -0,0 +1 @@ +collection("doesNotExistForSure") diff --git a/tests/auto/xmlpatterns/queries/oneElement.xq b/tests/auto/xmlpatterns/queries/oneElement.xq new file mode 100644 index 0000000..10a7e70 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/oneElement.xq @@ -0,0 +1 @@ + diff --git a/tests/auto/xmlpatterns/queries/onePlusOne.xq b/tests/auto/xmlpatterns/queries/onePlusOne.xq new file mode 100644 index 0000000..8d2f097 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/onePlusOne.xq @@ -0,0 +1 @@ +1 + 1 diff --git a/tests/auto/xmlpatterns/queries/onlyDocumentNode.xq b/tests/auto/xmlpatterns/queries/onlyDocumentNode.xq new file mode 100644 index 0000000..c0c40ee --- /dev/null +++ b/tests/auto/xmlpatterns/queries/onlyDocumentNode.xq @@ -0,0 +1 @@ +document{ () } diff --git a/tests/auto/xmlpatterns/queries/openDocument.xq b/tests/auto/xmlpatterns/queries/openDocument.xq new file mode 100644 index 0000000..73702dd --- /dev/null +++ b/tests/auto/xmlpatterns/queries/openDocument.xq @@ -0,0 +1 @@ +doc("simpleDocument.xml") diff --git a/tests/auto/xmlpatterns/queries/reportGlobals.xq b/tests/auto/xmlpatterns/queries/reportGlobals.xq new file mode 100644 index 0000000..52fecd5 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/reportGlobals.xq @@ -0,0 +1,101 @@ +(: + This query opens a C++ GCC-XML output file, and outputs a report describing the use + of globals variables. + + Run it, by invoking, for instance: + + patternist reportGlobal.xq fileToOpen=globals.gccxml > globals.html + + "fileToOpen=globals.gccxml" binds the string "globals.gccxml" to the variable + "fileToOpen." It identifies the GCC-XML file to open. + +:) +declare variable $inDoc as document-node() := doc($fileToOpen); + +(: Determines whether the type by ID @p typeId is a complex type such as QString. :) +declare function local:isComplexType($typeID as xs:string) as xs:boolean +{ + (: We're being a bit crude here and only checks whether it's a class. We + actually should check whether it has non-synthesized, + constructors, I believe. :) + + exists($inDoc/GCC_XML/Class[@id = $typeID]) + or + (: We also want const-qualified variables. :) + exists($inDoc/GCC_XML/Class[@id = $inDoc/GCC_XML/CvQualifiedType[@id = $typeID]/@type]) +}; + +declare function local:isPrimitive($typeId as xs:string) as xs:boolean +{ + exists($inDoc/GCC_XML/FundamentalType[@id = $typeId]) +}; + +(: Returns a string for human consumption that describes + the location of @p block. :) +declare function local:location($block as element()) as xs:string +{ + concat($inDoc/GCC_XML/File[@id = $block/@file]/@name, " at line ", $block/@line) +}; + +declare function local:report() as element()+ +{ + let $complexVariables as element(Variable)* := $inDoc/GCC_XML/Variable[local:isComplexType(@type)] + return if(exists($complexVariables)) (: Is the length larger than zero? :) + + then (

The following global, complex variables were found:

, +
    + { + (: For each Variable in $complexVariables... :) + $complexVariables/
  1. {string(@name)} in {local:location(.)}
  2. + } +
) + + else

No global variables that are of complex types were found.

+ + , + + (: List primitive, mutable types. :) + let $primitiveVariables as element(Variable)+ := $inDoc/GCC_XML/Variable[local:isPrimitive(@type)] + return if(exists($primitiveVariables)) + + then (

The following mutable primitives were found:

, +
    + { + (: For each Variable in $complexVariables... :) + $primitiveVariables/
  1. {string(@name)} in {local:location(.)}
  2. + } +
) + + else

No global variables that are of complex types were found.

+}; + + + + Global variables report for {$fileToOpen} + + + + + { + (: We don't want simple types that are const, but all other types. + One could frown upon const integers and say enums should be used instead, but + let's be gentle. :) + + local:report() + } + +

This report was generated on

+ + + diff --git a/tests/auto/xmlpatterns/queries/simpleDocument.xml b/tests/auto/xmlpatterns/queries/simpleDocument.xml new file mode 100644 index 0000000..9b0ff02 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/simpleDocument.xml @@ -0,0 +1 @@ + text node diff --git a/tests/auto/xmlpatterns/queries/simpleLibraryModule.xq b/tests/auto/xmlpatterns/queries/simpleLibraryModule.xq new file mode 100644 index 0000000..42b4d2e --- /dev/null +++ b/tests/auto/xmlpatterns/queries/simpleLibraryModule.xq @@ -0,0 +1,5 @@ +module namespace prefix = "http://example.com"; +declare function prefix:myFunction() +{ +1 +}; diff --git a/tests/auto/xmlpatterns/queries/staticBaseURI.xq b/tests/auto/xmlpatterns/queries/staticBaseURI.xq new file mode 100644 index 0000000..25b307a --- /dev/null +++ b/tests/auto/xmlpatterns/queries/staticBaseURI.xq @@ -0,0 +1,3 @@ +(: We convert the value to xs:string such that we can use it + with QXmlQuery::evaluateTo(QStringList) :) +string(static-base-uri()) diff --git a/tests/auto/xmlpatterns/queries/staticError.xq b/tests/auto/xmlpatterns/queries/staticError.xq new file mode 100644 index 0000000..1aff277 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/staticError.xq @@ -0,0 +1 @@ +"This string literal is never closeThis string literal is never closed diff --git a/tests/auto/xmlpatterns/queries/syntaxError.xq b/tests/auto/xmlpatterns/queries/syntaxError.xq new file mode 100644 index 0000000..5ad4982 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/syntaxError.xq @@ -0,0 +1 @@ +for 1 to 100 diff --git a/tests/auto/xmlpatterns/queries/threeVariables.xq b/tests/auto/xmlpatterns/queries/threeVariables.xq new file mode 100644 index 0000000..d0f98c1 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/threeVariables.xq @@ -0,0 +1 @@ +$var1, $var2, $var3 diff --git a/tests/auto/xmlpatterns/queries/twoVariables.xq b/tests/auto/xmlpatterns/queries/twoVariables.xq new file mode 100644 index 0000000..a3a67c8 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/twoVariables.xq @@ -0,0 +1 @@ +$var1, $var2 diff --git a/tests/auto/xmlpatterns/queries/typeError.xq b/tests/auto/xmlpatterns/queries/typeError.xq new file mode 100644 index 0000000..d91861a --- /dev/null +++ b/tests/auto/xmlpatterns/queries/typeError.xq @@ -0,0 +1 @@ +1 + "type error" diff --git a/tests/auto/xmlpatterns/queries/unavailableExternalVariable.xq b/tests/auto/xmlpatterns/queries/unavailableExternalVariable.xq new file mode 100644 index 0000000..219ba0d --- /dev/null +++ b/tests/auto/xmlpatterns/queries/unavailableExternalVariable.xq @@ -0,0 +1,2 @@ +declare variable $thisVariableIsNotBound external; +1 diff --git a/tests/auto/xmlpatterns/queries/unsupportedCollation.xq b/tests/auto/xmlpatterns/queries/unsupportedCollation.xq new file mode 100644 index 0000000..679323c --- /dev/null +++ b/tests/auto/xmlpatterns/queries/unsupportedCollation.xq @@ -0,0 +1,2 @@ +declare default collation "http://example.com/UnsupportedCollation"; +1 diff --git a/tests/auto/xmlpatterns/queries/wrongArity.xq b/tests/auto/xmlpatterns/queries/wrongArity.xq new file mode 100644 index 0000000..4e507a3 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/wrongArity.xq @@ -0,0 +1 @@ +fn:doc() diff --git a/tests/auto/xmlpatterns/queries/zeroDivision.xq b/tests/auto/xmlpatterns/queries/zeroDivision.xq new file mode 100644 index 0000000..34d5ac5 --- /dev/null +++ b/tests/auto/xmlpatterns/queries/zeroDivision.xq @@ -0,0 +1 @@ +1 div 0 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Anunboundexternalvariable.txt b/tests/auto/xmlpatterns/stderrBaselines/Anunboundexternalvariable.txt new file mode 100644 index 0000000..b620e05 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Anunboundexternalvariable.txt @@ -0,0 +1 @@ +Error XPST0008 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/externalVariable.xq, at line 1, column 69: No variable with name externalVariable exists diff --git a/tests/auto/xmlpatterns/stderrBaselines/Asimplemathquery.txt b/tests/auto/xmlpatterns/stderrBaselines/Asimplemathquery.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Asingledashthatsinvalid.txt b/tests/auto/xmlpatterns/stderrBaselines/Asingledashthatsinvalid.txt new file mode 100644 index 0000000..9cbc501 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Asingledashthatsinvalid.txt @@ -0,0 +1,2 @@ +query/stylesheet must occur at least 1 times, therefore 0 times is insufficient. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Asinglequerythatdoesnotexist.txt b/tests/auto/xmlpatterns/stderrBaselines/Asinglequerythatdoesnotexist.txt new file mode 100644 index 0000000..595c6e7 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Asinglequerythatdoesnotexist.txt @@ -0,0 +1 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/doesNotExist.xq: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/doesNotExist.xq: No such file or directory diff --git a/tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputqueryfirst.txt b/tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputqueryfirst.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputquerylast.txt b/tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputquerylast.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariable.txt b/tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariable.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariablequeryappearinglast.txt b/tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariablequeryappearinglast.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Callanamedtemplateandusenofocus..txt b/tests/auto/xmlpatterns/stderrBaselines/Callanamedtemplateandusenofocus..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Callfnerror.txt b/tests/auto/xmlpatterns/stderrBaselines/Callfnerror.txt new file mode 100644 index 0000000..3ff933a --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Callfnerror.txt @@ -0,0 +1 @@ +Error FOER0000 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/errorFunction.xq, at line 1, column 1: diff --git a/tests/auto/xmlpatterns/stderrBaselines/Ensureisuricanappearafterthequeryfilename.txt b/tests/auto/xmlpatterns/stderrBaselines/Ensureisuricanappearafterthequeryfilename.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Evaluatealibrarymodule.txt b/tests/auto/xmlpatterns/stderrBaselines/Evaluatealibrarymodule.txt new file mode 100644 index 0000000..55a04ac --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Evaluatealibrarymodule.txt @@ -0,0 +1 @@ +Error XPST0003 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/simpleLibraryModule.xq, at line 1, column 17: syntax error, unexpected namespace, expecting end of file diff --git a/tests/auto/xmlpatterns/stderrBaselines/Evaluateastylesheetwithnocontextdocument.txt b/tests/auto/xmlpatterns/stderrBaselines/Evaluateastylesheetwithnocontextdocument.txt new file mode 100644 index 0000000..572552b --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Evaluateastylesheetwithnocontextdocument.txt @@ -0,0 +1 @@ +When a stylesheet is used, a document must be specified as a focus, or an initial template name must be specified, or both. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invalidtemplatename.txt b/tests/auto/xmlpatterns/stderrBaselines/Invalidtemplatename.txt new file mode 100644 index 0000000..0ee649c --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Invalidtemplatename.txt @@ -0,0 +1 @@ +abc:def is an invalid Clark Name diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invokeatemplateandusepassparameters..txt b/tests/auto/xmlpatterns/stderrBaselines/Invokeatemplateandusepassparameters..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invokeversion.txt b/tests/auto/xmlpatterns/stderrBaselines/Invokeversion.txt new file mode 100644 index 0000000..4c41928 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Invokeversion.txt @@ -0,0 +1 @@ +xmlpatterns version 0.1 using \ No newline at end of file diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invokewithcoloninvariablename..txt b/tests/auto/xmlpatterns/stderrBaselines/Invokewithcoloninvariablename..txt new file mode 100644 index 0000000..0516df7 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Invokewithcoloninvariablename..txt @@ -0,0 +1 @@ +The variable name must be a valid NCName, which xs:name isn't. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invokewithinvalidparamvalue..txt b/tests/auto/xmlpatterns/stderrBaselines/Invokewithinvalidparamvalue..txt new file mode 100644 index 0000000..6b2eafa --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Invokewithinvalidparamvalue..txt @@ -0,0 +1 @@ +Each binding must contain an equal sign. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invokewithmissingnameinparamarg..txt b/tests/auto/xmlpatterns/stderrBaselines/Invokewithmissingnameinparamarg..txt new file mode 100644 index 0000000..5782ce1 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Invokewithmissingnameinparamarg..txt @@ -0,0 +1 @@ +The variable name must be a valid NCName, which isn't. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathasnovalue..txt b/tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathasnovalue..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathastwoadjacentequalsigns..txt b/tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathastwoadjacentequalsigns..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaFTP.txt b/tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaFTP.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaHTTP.txt b/tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaHTTP.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Loadqueryviadatascheme.txt b/tests/auto/xmlpatterns/stderrBaselines/Loadqueryviadatascheme.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/MakesurequerypathsareresolvedagainstCWDnotthelocationoftheexecutable..txt b/tests/auto/xmlpatterns/stderrBaselines/MakesurequerypathsareresolvedagainstCWDnotthelocationoftheexecutable..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Notwellformedinstancedocumentcausescrashincoloringcode..txt b/tests/auto/xmlpatterns/stderrBaselines/Notwellformedinstancedocumentcausescrashincoloringcode..txt new file mode 100644 index 0000000..190300f --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Notwellformedinstancedocumentcausescrashincoloringcode..txt @@ -0,0 +1 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-45/tests/auto/xmlpatterns/stylesheets/bool070.xml, at line 1, column 9: Unexpected '<'. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Notwellformedstylesheetcausescrashincoloringcode..txt b/tests/auto/xmlpatterns/stderrBaselines/Notwellformedstylesheetcausescrashincoloringcode..txt new file mode 100644 index 0000000..f070936 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Notwellformedstylesheetcausescrashincoloringcode..txt @@ -0,0 +1 @@ +Error XTSE0010 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/stylesheets/notWellformed.xsl, at line 4, column 9: Parse error: Unexpected '<'. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Openannonexistentfile.txt b/tests/auto/xmlpatterns/stderrBaselines/Openannonexistentfile.txt new file mode 100644 index 0000000..5be39d9 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Openannonexistentfile.txt @@ -0,0 +1 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/ThisFileDoesNotExist.xq: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/ThisFileDoesNotExist.xq: No such file or directory diff --git a/tests/auto/xmlpatterns/stderrBaselines/Openanonexistingcollection..txt b/tests/auto/xmlpatterns/stderrBaselines/Openanonexistingcollection..txt new file mode 100644 index 0000000..9c648e9 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Openanonexistingcollection..txt @@ -0,0 +1 @@ +Error FODC0004 in file:///home/fenglich/dev/qt-45/tests/auto/xmlpatterns/queries/nonexistingCollection.xq, at line 1, column 1: doesNotExistForSure cannot be retrieved diff --git a/tests/auto/xmlpatterns/stderrBaselines/Passhelp.txt b/tests/auto/xmlpatterns/stderrBaselines/Passhelp.txt new file mode 100644 index 0000000..4a86f75 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Passhelp.txt @@ -0,0 +1,31 @@ + + xmlpatterns -- A tool for running XQuery queries. + + - When appearing, any following options are not + interpreted as switches. + -help Displays this help. + -initial-template The name of the initial template to call as a + Clark Name. + -is-uri If specified, all filenames on the command line + are interpreted as URIs instead of a local + filenames. + -no-format By default output is formatted for readability. + When specified, strict serialization is + performed. + -output A local file to which the output should be + written. The file is overwritten, or if not + exist, created. If absent, stdout is used. + -param Binds an external variable. The value is + directly available using the variable + reference: $name. + -version Displays version information. + focus The document to use as focus. Mandatory in case + a stylesheet is used. This option is also + affected by the is-uris option. + query/stylesheet A local filename pointing to the query to run. + If the name ends with .xsl it's assumed to be + an XSL-T stylesheet. If it ends with .xq, it's + assumed to be an XQuery query. (In other cases + it's also assumed to be an XQuery query, but + that interpretation may change in a future + release of Qt.) diff --git a/tests/auto/xmlpatterns/stderrBaselines/Passinanexternalvariablebutthequerydoesntuseit..txt b/tests/auto/xmlpatterns/stderrBaselines/Passinanexternalvariablebutthequerydoesntuseit..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Passinastylesheetfileandafocusfilewhichdoesntexist.txt b/tests/auto/xmlpatterns/stderrBaselines/Passinastylesheetfileandafocusfilewhichdoesntexist.txt new file mode 100644 index 0000000..b2edfa1 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Passinastylesheetfileandafocusfilewhichdoesntexist.txt @@ -0,0 +1 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/doesNotExist.Nope.xml: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/doesNotExist.Nope.xml: No such file or directory diff --git a/tests/auto/xmlpatterns/stderrBaselines/PassinastylesheetfilewhichcontainsanXQueryquery.txt b/tests/auto/xmlpatterns/stderrBaselines/PassinastylesheetfilewhichcontainsanXQueryquery.txt new file mode 100644 index 0000000..1122c3e --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/PassinastylesheetfilewhichcontainsanXQueryquery.txt @@ -0,0 +1 @@ +Error XTSE0010 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl, at line 1, column 1: Parse error: Start tag expected. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Passinastylsheetfileandafocusfilewhichdoesntexist.txt b/tests/auto/xmlpatterns/stderrBaselines/Passinastylsheetfileandafocusfilewhichdoesntexist.txt new file mode 100644 index 0000000..c890e65 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Passinastylsheetfileandafocusfilewhichdoesntexist.txt @@ -0,0 +1,15 @@ + QUrl( "file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/doesNotExist.Nope.xml" ) +virtual QExplicitlySharedDataPointer QPatternist::ExpressionFactory::createExpression(QIODevice*, const QExplicitlySharedDataPointer&, QXmlQuery::QueryLanguage, const QExplicitlySharedDataPointer&, const QUrl&) QUrl( "file:///home/fenglich/shadow/qt-xslt/bin/xmlpatterns" ) +----- Initial AST build. ----- +------------------------------ +----- Type Check ----- +------------------------------ +----- Compress ----- +------------------------------ +Tokens Revealed: "doc ( $ u ) end of file " +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/doesNotExist.Nope.xml: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/doesNotExist.Nope.xml: No such file or directory +virtual QExplicitlySharedDataPointer QPatternist::ExpressionFactory::createExpression(QIODevice*, const QExplicitlySharedDataPointer&, QXmlQuery::QueryLanguage, const QExplicitlySharedDataPointer&, const QUrl&) QUrl( "file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl" ) +PUSHED STATE 0 +void QPatternist::XSLTTokenizer::stateOutsideDocumentElement() +Error XPST0003 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl, at line 22, column -1212431692: syntax error, unexpected end of file, expecting QName +Tokens Revealed: "end of file " diff --git a/tests/auto/xmlpatterns/stderrBaselines/PassinastylsheetfilewhichcontainsanXQueryquery.txt b/tests/auto/xmlpatterns/stderrBaselines/PassinastylsheetfilewhichcontainsanXQueryquery.txt new file mode 100644 index 0000000..73edd0e --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/PassinastylsheetfilewhichcontainsanXQueryquery.txt @@ -0,0 +1,16 @@ +virtual QExplicitlySharedDataPointer QPatternist::ExpressionFactory::createExpression(QIODevice*, const QExplicitlySharedDataPointer&, QXmlQuery::QueryLanguage, const QExplicitlySharedDataPointer&, const QUrl&) QUrl( "file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl" ) +PUSHED STATE 0 +void QPatternist::XSLTTokenizer::stateOutsideDocumentElement() +Now at end of input. +Reducing stack by rule 3 (line 1018): +-> $$ = nterm VersionDecl (: ) +Stack now 0 +Entering state 3 +Now at end of input. +Reducing stack by rule 10 (line 1139): +-> $$ = nterm Prolog (: ) +Stack now 0 3 +Entering state 10 +Now at end of input. +Error XPST0003 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl, at line -1212346368, column -1214801237: syntax error, unexpected end of file +Tokens Revealed: "end of file " diff --git a/tests/auto/xmlpatterns/stderrBaselines/Passingasingledashisinsufficient.txt b/tests/auto/xmlpatterns/stderrBaselines/Passingasingledashisinsufficient.txt new file mode 100644 index 0000000..9cbc501 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Passingasingledashisinsufficient.txt @@ -0,0 +1,2 @@ +query/stylesheet must occur at least 1 times, therefore 0 times is insufficient. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Passingtwodashesthelastisinterpretedasafilename.txt b/tests/auto/xmlpatterns/stderrBaselines/Passingtwodashesthelastisinterpretedasafilename.txt new file mode 100644 index 0000000..03c3d99 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Passingtwodashesthelastisinterpretedasafilename.txt @@ -0,0 +1 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/-: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/-: No such file or directory diff --git a/tests/auto/xmlpatterns/stderrBaselines/PassininvalidURI.txt b/tests/auto/xmlpatterns/stderrBaselines/PassininvalidURI.txt new file mode 100644 index 0000000..eab49d4 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/PassininvalidURI.txt @@ -0,0 +1 @@ +Error XPST0003 in data:application/xml;base64,PGUvg===, at line 1, column 3: syntax error, unexpected unknown keyword, expecting POSITION_SET diff --git a/tests/auto/xmlpatterns/stderrBaselines/Passthreedashesthetwolastgetsinterpretedastwoqueryarguments.txt b/tests/auto/xmlpatterns/stderrBaselines/Passthreedashesthetwolastgetsinterpretedastwoqueryarguments.txt new file mode 100644 index 0000000..4fadd23 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Passthreedashesthetwolastgetsinterpretedastwoqueryarguments.txt @@ -0,0 +1,2 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/-: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/-: No such file or directory +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/-: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/-: No such file or directory diff --git a/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt b/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt new file mode 100644 index 0000000..9f09298 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt @@ -0,0 +1,5 @@ +Error FORX0001 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/invalidRegexpFlag.xq, at line 1, column 1: I is an invalid flag for regular expressions. Valid flags are: +x - Whitespace characters are removed, except when they appear in character classes +i - Matches are case insensitive +m - ^ and $ match the start and end of a line. +s - . matches newline characters diff --git a/tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestoasingledocumentnodewithnochildren..txt b/tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestoasingledocumentnodewithnochildren..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestotheemptysequence..txt b/tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestotheemptysequence..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatdoesnotexists.txt b/tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatdoesnotexists.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatexists.txt b/tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatexists.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Specifynoargumentsatall..txt b/tests/auto/xmlpatterns/stderrBaselines/Specifynoargumentsatall..txt new file mode 100644 index 0000000..9cbc501 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Specifynoargumentsatall..txt @@ -0,0 +1,2 @@ +query/stylesheet must occur at least 1 times, therefore 0 times is insufficient. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicedifferentvalues.txt b/tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicedifferentvalues.txt new file mode 100644 index 0000000..6f65a8c --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicedifferentvalues.txt @@ -0,0 +1 @@ +Each parameter must be unique, duplicated is specified at least twice. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicesamevalues.txt b/tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicesamevalues.txt new file mode 100644 index 0000000..6f65a8c --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicesamevalues.txt @@ -0,0 +1 @@ +Each parameter must be unique, duplicated is specified at least twice. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Specifytwodifferentquerynames.txt b/tests/auto/xmlpatterns/stderrBaselines/Specifytwodifferentquerynames.txt new file mode 100644 index 0000000..e9fd86b --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Specifytwodifferentquerynames.txt @@ -0,0 +1,2 @@ + can occur at most 1 times +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Specifytwoidenticalquerynames.txt b/tests/auto/xmlpatterns/stderrBaselines/Specifytwoidenticalquerynames.txt new file mode 100644 index 0000000..40ad757 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Specifytwoidenticalquerynames.txt @@ -0,0 +1,2 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/query.xq: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/query.xq: No such file or directory +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/query.xq: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/query.xq: No such file or directory diff --git a/tests/auto/xmlpatterns/stderrBaselines/TriggeranassertinQPatternistColorOutput.ThequerynaturallycontainsanerrorXPTY0004..txt b/tests/auto/xmlpatterns/stderrBaselines/TriggeranassertinQPatternistColorOutput.ThequerynaturallycontainsanerrorXPTY0004..txt new file mode 100644 index 0000000..8cac706 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/TriggeranassertinQPatternistColorOutput.ThequerynaturallycontainsanerrorXPTY0004..txt @@ -0,0 +1,2 @@ +Warning in : The variable a is unused +Error XPTY0004 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/flwor.xq, at line 2, column 13: Required cardinality is zero or one("?"); got cardinality one or more("+"). diff --git a/tests/auto/xmlpatterns/stderrBaselines/TriggerasecondassertinQPatternistColorOutput.ThequerynaturallycontainsXPST0003..txt b/tests/auto/xmlpatterns/stderrBaselines/TriggerasecondassertinQPatternistColorOutput.ThequerynaturallycontainsXPST0003..txt new file mode 100644 index 0000000..af9a5f1 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/TriggerasecondassertinQPatternistColorOutput.ThequerynaturallycontainsXPST0003..txt @@ -0,0 +1 @@ +Error XPST0003 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/syntaxError.xq, at line 1, column 5: syntax error, unexpected , expecting end of file diff --git a/tests/auto/xmlpatterns/stderrBaselines/Triggerastaticerror..txt b/tests/auto/xmlpatterns/stderrBaselines/Triggerastaticerror..txt new file mode 100644 index 0000000..371fac5 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Triggerastaticerror..txt @@ -0,0 +1 @@ +Error XPST0003 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/staticError.xq, at line 1, column 1: syntax error, unexpected unknown keyword diff --git a/tests/auto/xmlpatterns/stderrBaselines/Unknownswitchd.txt b/tests/auto/xmlpatterns/stderrBaselines/Unknownswitchd.txt new file mode 100644 index 0000000..ece8ed4 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Unknownswitchd.txt @@ -0,0 +1,2 @@ +"d" is an unknown argument. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Unknownswitchunknownswitch.txt b/tests/auto/xmlpatterns/stderrBaselines/Unknownswitchunknownswitch.txt new file mode 100644 index 0000000..91b45df --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Unknownswitchunknownswitch.txt @@ -0,0 +1,2 @@ +"unknown-switch" is an unknown argument. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Useanativepath.txt b/tests/auto/xmlpatterns/stderrBaselines/Useanativepath.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Useanexternalvariablemultipletimes..txt b/tests/auto/xmlpatterns/stderrBaselines/Useanexternalvariablemultipletimes..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Useasimplifiedstylesheetmodule.txt b/tests/auto/xmlpatterns/stderrBaselines/Useasimplifiedstylesheetmodule.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Usefndoc.txt b/tests/auto/xmlpatterns/stderrBaselines/Usefndoc.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatfirst.txt b/tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatfirst.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatlast.txt b/tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatlast.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Useoutputonafilewithexistingcontenttoensurewetruncatenotappendthecontentweproduce..txt b/tests/auto/xmlpatterns/stderrBaselines/Useoutputonafilewithexistingcontenttoensurewetruncatenotappendthecontentweproduce..txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Useoutputtwice.txt b/tests/auto/xmlpatterns/stderrBaselines/Useoutputtwice.txt new file mode 100644 index 0000000..a5dc84c --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Useoutputtwice.txt @@ -0,0 +1,2 @@ +"output" can only be used once. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/Useparamthrice.txt b/tests/auto/xmlpatterns/stderrBaselines/Useparamthrice.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Useparamtwice.txt b/tests/auto/xmlpatterns/stderrBaselines/Useparamtwice.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/Wedontsupportformatanylonger.txt b/tests/auto/xmlpatterns/stderrBaselines/Wedontsupportformatanylonger.txt new file mode 100644 index 0000000..3f1694f --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/Wedontsupportformatanylonger.txt @@ -0,0 +1,2 @@ +"format" is an unknown argument. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/XQuerydataXQuerykeywordmessagemarkups.txt b/tests/auto/xmlpatterns/stderrBaselines/XQuerydataXQuerykeywordmessagemarkups.txt new file mode 100644 index 0000000..b43698c --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/XQuerydataXQuerykeywordmessagemarkups.txt @@ -0,0 +1 @@ +Error FOAR0001 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/zeroDivision.xq, at line 1, column 1: Division (div) by zero (0) is undefined. diff --git a/tests/auto/xmlpatterns/stderrBaselines/XQueryexpressionmessagemarkups.txt b/tests/auto/xmlpatterns/stderrBaselines/XQueryexpressionmessagemarkups.txt new file mode 100644 index 0000000..4bfef93 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/XQueryexpressionmessagemarkups.txt @@ -0,0 +1 @@ +Error FORX0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/invalidRegexp.xq, at line 1, column 1: \ is an invalid regular expression pattern: unexpected end diff --git a/tests/auto/xmlpatterns/stderrBaselines/XQueryfunctionmessagemarkups.txt b/tests/auto/xmlpatterns/stderrBaselines/XQueryfunctionmessagemarkups.txt new file mode 100644 index 0000000..bde01fb --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/XQueryfunctionmessagemarkups.txt @@ -0,0 +1 @@ +Error XPST0017 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/wrongArity.xq, at line 1, column 1: fn:doc($uri as xs:string?) as document()? requires at least 1 argument(s). 0 is therefore invalid. diff --git a/tests/auto/xmlpatterns/stderrBaselines/XQuerytypemessagemarkups.txt b/tests/auto/xmlpatterns/stderrBaselines/XQuerytypemessagemarkups.txt new file mode 100644 index 0000000..4d40ccf --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/XQuerytypemessagemarkups.txt @@ -0,0 +1 @@ +Error XPTY0004 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/typeError.xq, at line 1, column 1: Operator + cannot be used on atomic values of type xs:integer and xs:string. diff --git a/tests/auto/xmlpatterns/stderrBaselines/XQueryurimessagemarkups.txt b/tests/auto/xmlpatterns/stderrBaselines/XQueryurimessagemarkups.txt new file mode 100644 index 0000000..89e19dd --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/XQueryurimessagemarkups.txt @@ -0,0 +1 @@ +Error XQST0038 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/unsupportedCollation.xq, at line 1, column 1: Only the Unicode Codepoint Collation is supported(http://www.w3.org/2005/xpath-functions/collation/codepoint). http://example.com/UnsupportedCollation is unsupported. diff --git a/tests/auto/xmlpatterns/stderrBaselines/initialtemplatedoesntworkwithXQueries..txt b/tests/auto/xmlpatterns/stderrBaselines/initialtemplatedoesntworkwithXQueries..txt new file mode 100644 index 0000000..8f94e34 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/initialtemplatedoesntworkwithXQueries..txt @@ -0,0 +1 @@ +An initial template name cannot be specified when running an XQuery. diff --git a/tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue.txt b/tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue.txt new file mode 100644 index 0000000..5b67eef --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue.txt @@ -0,0 +1 @@ +stylesheets/onlyRootTemplate.xsl is an invalid Clark Name diff --git a/tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue2.txt b/tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue2.txt new file mode 100644 index 0000000..5ed490c --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue2.txt @@ -0,0 +1,2 @@ +"initial-template" must be followed by a value. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/onequeryandaterminatingdashattheend.txt b/tests/auto/xmlpatterns/stderrBaselines/onequeryandaterminatingdashattheend.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/onequerywithaprecedingdash.txt b/tests/auto/xmlpatterns/stderrBaselines/onequerywithaprecedingdash.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/auto/xmlpatterns/stderrBaselines/onlynoformat.txt b/tests/auto/xmlpatterns/stderrBaselines/onlynoformat.txt new file mode 100644 index 0000000..9cbc501 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/onlynoformat.txt @@ -0,0 +1,2 @@ +query/stylesheet must occur at least 1 times, therefore 0 times is insufficient. +Pass -help for information about the command line. diff --git a/tests/auto/xmlpatterns/stderrBaselines/outputwithanonwritablefile.txt b/tests/auto/xmlpatterns/stderrBaselines/outputwithanonwritablefile.txt new file mode 100644 index 0000000..1303af2 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/outputwithanonwritablefile.txt @@ -0,0 +1 @@ +Failed to open file notWritable.out for writing: Permission denied diff --git a/tests/auto/xmlpatterns/stderrBaselines/paramismissingsomultiplequeriesappear.txt b/tests/auto/xmlpatterns/stderrBaselines/paramismissingsomultiplequeriesappear.txt new file mode 100644 index 0000000..23fa5a7 --- /dev/null +++ b/tests/auto/xmlpatterns/stderrBaselines/paramismissingsomultiplequeriesappear.txt @@ -0,0 +1 @@ +Error FODC0002 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/fileToOpen=globals.gccxml: Error opening file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/fileToOpen=globals.gccxml: No such file or directory diff --git a/tests/auto/xmlpatterns/stylesheets/bool070.xml b/tests/auto/xmlpatterns/stylesheets/bool070.xml new file mode 100644 index 0000000..3504667 --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/bool070.xml @@ -0,0 +1 @@ +< diff --git a/tests/auto/xmlpatterns/stylesheets/bool070.xsl b/tests/auto/xmlpatterns/stylesheets/bool070.xsl new file mode 100644 index 0000000..a78e61a --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/bool070.xsl @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/auto/xmlpatterns/stylesheets/copyWholeDocument.xsl b/tests/auto/xmlpatterns/stylesheets/copyWholeDocument.xsl new file mode 100644 index 0000000..1cd90c4 --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/copyWholeDocument.xsl @@ -0,0 +1,9 @@ + + + + + + + diff --git a/tests/auto/xmlpatterns/stylesheets/documentElement.xml b/tests/auto/xmlpatterns/stylesheets/documentElement.xml new file mode 100644 index 0000000..69d62f2 --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/documentElement.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/xmlpatterns/stylesheets/namedAndRootTemplate.xsl b/tests/auto/xmlpatterns/stylesheets/namedAndRootTemplate.xsl new file mode 100644 index 0000000..3e8f93d --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/namedAndRootTemplate.xsl @@ -0,0 +1,5 @@ + + root-template + named-template + namespaced-template + diff --git a/tests/auto/xmlpatterns/stylesheets/namedTemplate.xsl b/tests/auto/xmlpatterns/stylesheets/namedTemplate.xsl new file mode 100644 index 0000000..e296e6d --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/namedTemplate.xsl @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/auto/xmlpatterns/stylesheets/notWellformed.xsl b/tests/auto/xmlpatterns/stylesheets/notWellformed.xsl new file mode 100644 index 0000000..241668a --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/notWellformed.xsl @@ -0,0 +1,9 @@ + + + + + + + diff --git a/tests/auto/xmlpatterns/stylesheets/onlyRootTemplate.xsl b/tests/auto/xmlpatterns/stylesheets/onlyRootTemplate.xsl new file mode 100644 index 0000000..d40874c --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/onlyRootTemplate.xsl @@ -0,0 +1,9 @@ + + + + + + + diff --git a/tests/auto/xmlpatterns/stylesheets/parameters.xsl b/tests/auto/xmlpatterns/stylesheets/parameters.xsl new file mode 100644 index 0000000..db0a4aa --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/parameters.xsl @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl b/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl new file mode 100644 index 0000000..8d2f097 --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl @@ -0,0 +1 @@ +1 + 1 diff --git a/tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xml b/tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xml new file mode 100644 index 0000000..067f98f --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xml @@ -0,0 +1 @@ +some text diff --git a/tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xsl b/tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xsl new file mode 100644 index 0000000..63da011 --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xsl @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/xmlpatterns/stylesheets/useParameters.xsl b/tests/auto/xmlpatterns/stylesheets/useParameters.xsl new file mode 100644 index 0000000..72aa056 --- /dev/null +++ b/tests/auto/xmlpatterns/stylesheets/useParameters.xsl @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp new file mode 100644 index 0000000..4d59f22 --- /dev/null +++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp @@ -0,0 +1,1023 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include + +#ifdef QTEST_XMLPATTERNS + +#include "../qxmlquery/TestFundament.h" +#include "../network-settings.h" + +#if defined(Q_OS_SYMBIAN) +#define SRCDIR "" +#endif + +/*! + \class tst_XmlPatterns + \internal + \since 4.4 + \brief Tests the command line interface, \c xmlpatterns, for the XQuery code. + + This test is not intended for testing the engine, but all the gluing the + command line interface do: error reporting, query output, variable bindings, exit + codes, and so on. + + In other words, if you have an engine bug; don't add it here because it won't be + tested properly. Instead add it to the test suite. + + */ +class tst_XmlPatterns : public QObject + , private TestFundament +{ + Q_OBJECT + +public: + tst_XmlPatterns(); + +private Q_SLOTS: + void initTestCase(); + void xquerySupport(); + void xquerySupport_data() const; + void xsltSupport(); + void xsltSupport_data() const; + void stdoutFailure() const; + void cleanupTestCase() const; + +private: + static void createNonWritable(const QString &name); + static void removeNonWritable(QFile &outFile); + + int m_generatedTests; + /** + * Get rid of characters that complicates on various file systems. + */ + const QRegExp m_normalizeTestName; + /** + * @note Perforce disallows wildcards in the name. + */ + const QRegExp m_filenameInStderr; + const QString m_command; + bool m_dontRun; +}; + +tst_XmlPatterns::tst_XmlPatterns() : m_generatedTests(0) + , m_normalizeTestName(QLatin1String("[\\*\\?#\\-\\/:; ()',&]")) + , m_filenameInStderr(QLatin1String("file:\\/\\/.*(\\.xq|\\.gccxml|\\.xml|\\.xsl|-)(,|:)")) + , m_command(QLatin1String("xmlpatterns")) + , m_dontRun(false) +{ + Q_SET_DEFAULT_IAP + + Q_ASSERT(m_normalizeTestName.isValid()); + Q_ASSERT(m_filenameInStderr.isValid()); +} + +void tst_XmlPatterns::initTestCase() +{ + QProcess process; + process.start(m_command); + + if(!process.waitForFinished()) + { + m_dontRun = true; + QEXPECT_FAIL("", "The command line tool is not in the path, most likely because Qt " + "has been partically built, such as only the sub-src rule. No tests will be run.", Abort); + QVERIFY(false); + } + +} + +void tst_XmlPatterns::xquerySupport() +{ + if(m_dontRun) + QSKIP("The command line utility is not in the path.", SkipAll); + +#ifdef Q_OS_WINCE + QSKIP("WinCE: This test uses unsupported WinCE functionality", SkipAll); +#elif defined(Q_OS_SYMBIAN) + QSKIP("Symbian: This test uses unsupported Symbian functionality (QProcess with std streams)", SkipAll); +#endif + + QFETCH(int, expectedExitCode); + QFETCH(QByteArray, expectedQueryOutput); + QFETCH(QStringList, arguments); + QFETCH(QString, cwd); + QFETCH(QString, outputFile); + + QProcess process; + + if(!cwd.isEmpty()) + process.setWorkingDirectory(inputFile(cwd)); + + process.start(m_command, arguments); + + QCOMPARE(process.exitStatus(), QProcess::NormalExit); + QVERIFY(process.waitForFinished()); + + if(process.exitCode() != expectedExitCode) + QTextStream(stderr) << "stderr:" << process.readAllStandardError(); + + QCOMPARE(process.exitCode(), expectedExitCode); + + const QByteArray rawProducedStderr((process.readAllStandardError())); + QString fixedStderr(QString::fromLocal8Bit(rawProducedStderr).remove(m_filenameInStderr)); + // convert Windows line endings to Unix ones + fixedStderr.replace("\r\n", "\n"); + + const QString errorFileName(inputFile(QLatin1String(SRCDIR "stderrBaselines/") + + QString::fromUtf8(QTest::currentDataTag()).remove(m_normalizeTestName) + + QLatin1String(".txt"))); + + QFile writeErr(errorFileName); + + if(writeErr.exists()) + { + QVERIFY(writeErr.open(QIODevice::ReadOnly)); + QString rawExpectedStdErr(QString::fromLocal8Bit(writeErr.readAll())); + + /* On Windows, at least MinGW, this differs. */ + if(qstrcmp(QTest::currentDataTag(), "-output with a non-writable file") == 0) + { + QVERIFY(fixedStderr == rawExpectedStdErr.remove(m_filenameInStderr) || + fixedStderr.trimmed() == "Failed to open file notWritable.out for writing: Access is denied."); + } + else if(qstrcmp(QTest::currentDataTag(), "Invoke -version") == 0) + { + /* There's a wide range of different version strings used. For + * instance, "4.4.0-rc1". */ + const QRegExp removeVersion(QLatin1String(" Qt \\d\\.\\d.*")); + QVERIFY(removeVersion.isValid()); + QCOMPARE(QString(fixedStderr).remove(removeVersion) + QChar('|'), rawExpectedStdErr + QChar('|')); + } + else + QCOMPARE(fixedStderr, rawExpectedStdErr.remove(m_filenameInStderr)); + } + else + { + QFile writeErr(errorFileName); + QVERIFY(writeErr.open(QIODevice::WriteOnly)); + + QCOMPARE(writeErr.write(rawProducedStderr), qint64(rawProducedStderr.count())); + QTextStream(stderr) << "creating file " << errorFileName; + ++m_generatedTests; + } + + const QByteArray actual(process.readAllStandardOutput()); + + if(outputFile.isEmpty()) + { + QCOMPARE(actual, expectedQueryOutput); + return; /* We're done, this test was not creating any output file. */ + } + else + { + QVERIFY(actual.isEmpty()); + + QFile outFile(outputFile); + + QVERIFY(outFile.exists()); + QVERIFY(outFile.open(QIODevice::ReadOnly)); + + QCOMPARE(outFile.readAll(), expectedQueryOutput); + + removeNonWritable(outFile); + } +} + +void tst_XmlPatterns::xquerySupport_data() const +{ +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) + return; +#endif + + /* Check one file for existence, to avoid possible false positives. */ + QVERIFY(QFile::exists(inputFile(QLatin1String(SRCDIR "queries/onePlusOne.xq")))); + + QTest::addColumn("expectedExitCode"); + QTest::addColumn("expectedQueryOutput"); + QTest::addColumn("arguments"); + QTest::addColumn("cwd"); + QTest::addColumn("outputFile"); + + QTest::newRow("A simple math query") + << 0 + << QByteArray("2\n") + << QStringList((QLatin1String(SRCDIR "queries/onePlusOne.xq"))) + << QString() + << QString(); + + QTest::newRow("An unbound external variable") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/externalVariable.xq")) + << QString() + << QString(); + + QTest::newRow("Bind an external variable") + << 0 + << QByteArray("1 41true\n") + << (QStringList() << QLatin1String(SRCDIR "queries/externalVariable.xq") + << QLatin1String("-param") + << QLatin1String("externalVariable=1")) + << QString() + << QString(); + + QTest::newRow("Bind an external variable, query appearing last") + << 0 + << QByteArray("1 41true\n") + << (QStringList() << QLatin1String("-param") + << QLatin1String("externalVariable=1") + << QLatin1String(SRCDIR "queries/externalVariable.xq")) + << QString() + << QString(); + + QTest::newRow("Use fn:doc") + << 0 + << QByteArray("\n \n \n text text node\n") + << QStringList(QLatin1String(SRCDIR "queries/openDocument.xq")) + << QString() + << QString(); + + QTest::newRow("Use fn:doc, together with -no-format, last") + << 0 + << QByteArray("text text node") + << (QStringList() << QLatin1String(SRCDIR "queries/openDocument.xq") + << QLatin1String("-no-format")) + << QString() + << QString(); + + QTest::newRow("Use fn:doc, together with -no-format, first") + << 0 + << QByteArray("text text node") + << (QStringList() << QLatin1String("-no-format") + << QLatin1String(SRCDIR "queries/openDocument.xq")) + << QString() + << QString(); + + /* This is true for the command line utility, but not QXmlQuery::setQuery(). */ + QTest::newRow("Make sure query paths are resolved against CWD, not the location of the executable.") + << 0 + << QByteArray("2\n") + << QStringList(QLatin1String(SRCDIR "queries/onePlusOne.xq")) + << QString::fromLatin1("queries") + << QString(); + + QTest::newRow("Call fn:error()") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/errorFunction.xq")) + << QString() + << QString(); + + QTest::newRow("Evaluate a library module") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/simpleLibraryModule.xq")) + << QString() + << QString(); + + QTest::newRow("Trigger a static error.") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/staticError.xq")) + << QString() + << QString(); + + QTest::newRow("Pass -help") + << 0 + << QByteArray() + << QStringList(QLatin1String("-help")) + << QString() + << QString(); + + QTest::newRow("Open an nonexistent file") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/ThisFileDoesNotExist.xq")) + << QString() + << QString(); + + /* The following five tests exists to test the various + * markup classes in the message. */ + QTest::newRow("XQuery-function message markups") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/wrongArity.xq")) + << QString() + << QString(); + + QTest::newRow("XQuery-type message markups") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/typeError.xq")) + << QString() + << QString(); + + QTest::newRow("XQuery-data & XQuery-keyword message markups") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/zeroDivision.xq")) + << QString() + << QString(); + + QTest::newRow("XQuery-uri message markups") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/unsupportedCollation.xq")) + << QString() + << QString(); + + QTest::newRow("XQuery-expression message markups") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/invalidRegexp.xq")) + << QString() + << QString(); + + QTest::newRow("Print a list of available regexp flags(The available flags are formatted in a complex way.)") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/invalidRegexpFlag.xq")) + << QString() + << QString(); + + QTest::newRow("Trigger an assert in QPatternist::ColorOutput. The query naturally contains an error; XPTY0004.") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/flwor.xq")) + << QString() + << QString(); + + QTest::newRow("Trigger a second assert in QPatternist::ColorOutput. The query naturally contains XPST0003.") + << 2 + << QByteArray() + << QStringList(QLatin1String(SRCDIR "queries/syntaxError.xq")) + << QString() + << QString(); + + QTest::newRow("-param is missing so multiple queries appear") + << 2 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/reportGlobals.xq") + << QLatin1String("fileToOpen=globals.gccxml")) + << QString() + << QString(); + + QTest::newRow("only -no-format") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-no-format")) + << QString() + << QString(); + + QTest::newRow("Basic use of -output, query first") + << 0 + << QByteArray("2\n") + << (QStringList() << QLatin1String(SRCDIR "queries/onePlusOne.xq") + << QLatin1String("-output") + << QLatin1String("basicOutput.out")) + << QString() + << QString::fromLatin1("basicOutput.out"); + + QTest::newRow("Basic use of -output, query last") + << 0 + << QByteArray("\n") + << (QStringList() << QLatin1String("-output") + << QLatin1String("basicOutput2.out") + << QLatin1String(SRCDIR "queries/oneElement.xq")) + << QString() + << QString::fromLatin1("basicOutput2.out"); + + QTest::newRow("A single query, that does not exist") + << 2 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "doesNotExist.xq")) + << QString() + << QString(); + + QTest::newRow("Specify two identical query names") + << 2 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "query.xq") + << QLatin1String(SRCDIR "query.xq")) + << QString() + << QString(); + + QTest::newRow("Specify no arguments at all.") + << 1 + << QByteArray() + << QStringList() + << QString() + << QString(); + + QTest::newRow("Use -output twice") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-output") + << QLatin1String("output1") + << QLatin1String("-output") + << QLatin1String("output2")) + << QString() + << QString(); + + { + const QString filename(QString::fromLatin1("notWritable.out")); + createNonWritable(filename); + + QTest::newRow("-output with a non-writable file") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-output") + << filename + << QLatin1String(SRCDIR "queries/onePlusOne.xq")) + << QString() + << filename; + } + + { + const QString outName(QString::fromLatin1("existingContent.out")); + QFile outFile(outName); + QVERIFY(outFile.open(QIODevice::WriteOnly)); + QCOMPARE(outFile.write("Existing content\n"), qint64(17)); + outFile.close(); + + QTest::newRow("Use -output on a file with existing content, to ensure we truncate, not append the content we produce.") + << 0 + << QByteArray("2\n") + << (QStringList() << QLatin1String("-output") + << outName + << QLatin1String(SRCDIR "queries/onePlusOne.xq")) + << QString() + << outName; + } + + QTest::newRow("one query, and a terminating dash at the end") + << 0 + << QByteArray("2\n") + << (QStringList() << QLatin1String(SRCDIR "queries/onePlusOne.xq") + << QLatin1String("-")) + << QString() + << QString(); + + QTest::newRow("one query, with a preceding dash") + << 0 + << QByteArray("2\n") + << (QStringList() << QLatin1String("-") + << QLatin1String(SRCDIR "queries/onePlusOne.xq")) + << QString() + << QString(); + + QTest::newRow("A single dash, that's invalid") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-")) + << QString() + << QString(); + + QTest::newRow("Invoke -version") + << 0 + << QByteArray() + << (QStringList() << QLatin1String("-version")) + << QString() + << QString(); + + QTest::newRow("Unknown switch; -unknown-switch") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-unknown-switch")) + << QString() + << QString(); + + QTest::newRow("Unknown switch; -d") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-d")) + << QString() + << QString(); + + QTest::newRow("Passing a single dash is insufficient") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-")) + << QString() + << QString(); + + QTest::newRow("Passing two dashes, the last is interpreted as a file name") + << 2 + << QByteArray() + << (QStringList() << QLatin1String("-") + << QLatin1String("-")) + << QString() + << QString(); + + QTest::newRow("Pass three dashes, the two last gets interpreted as two query arguments") + << 2 + << QByteArray() + << (QStringList() << QLatin1String("-") + << QLatin1String("-") + << QLatin1String("-")) + << QString() + << QString(); + + QTest::newRow("Load query via data: scheme") + << 0 + << QByteArray("\n") + << (QStringList() << QLatin1String("-is-uri") << QLatin1String("data:application/xml,%3Ce%2F%3E")) + << QString() + << QString(); + + QTest::newRow("Load query via FTP") + << 0 + << QByteArray("This was received via FTP\n") + << (QStringList() << QLatin1String("-is-uri") << QString("ftp://" + QtNetworkSettings::serverName() + "/pub/qxmlquery/viaFtp.xq")) + << QString() + << QString(); + + QTest::newRow("Load query via HTTP") + << 0 + << QByteArray("This was received via HTTP.\n") + << (QStringList() << QLatin1String("-is-uri") << QString("http://" + QtNetworkSettings::serverName() + "/qxmlquery/viaHttp.xq")) + << QString() + << QString(); + + QTest::newRow("We don't support -format any longer") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-format")) + << QString() + << QString(); + + QTest::newRow("Run a query which evaluates to the empty sequence.") + << 0 + << QByteArray("\n") + << (QStringList() << QLatin1String(SRCDIR "queries/emptySequence.xq")) + << QString() + << QString(); + + QTest::newRow("Run a query which evaluates to a single document node with no children.") + << 0 + << QByteArray("\n") + << (QStringList() << QLatin1String(SRCDIR "queries/onlyDocumentNode.xq")) + << QString() + << QString(); + + QTest::newRow("Invoke with invalid -param value.") + << 1 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/externalVariable.xq") + << QLatin1String("-param") + << QLatin1String("EqualSignIsMissing")) + << QString() + << QString(); + + QTest::newRow("Invoke with colon in variable name.") + << 1 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/externalVariable.xq") + << QLatin1String("-param") + << QLatin1String("xs:name=value")) + << QString() + << QString(); + + QTest::newRow("Invoke with missing name in -param arg.") + << 1 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/externalVariable.xq") + << QLatin1String("-param") + << QLatin1String("=value")) + << QString() + << QString(); + + QTest::newRow("Invoke with -param that has two adjacent equal signs.") + << 0 + << QByteArray("START =text END\n") + << (QStringList() << QLatin1String(SRCDIR "queries/externalStringVariable.xq") + << QLatin1String("-param") + << QLatin1String("externalString==text")) + << QString() + << QString(); + + QTest::newRow("Pass in an external variable, but the query doesn't use it.") + << 0 + << QByteArray("2\n") + << (QStringList() << QLatin1String(SRCDIR "queries/onePlusOne.xq") + << QLatin1String("-param") + << QLatin1String("externalString==text")) + << QString() + << QString(); + + /* This is how an empty string would have been passed in. */ + QTest::newRow("Invoke with -param that has no value.") + << 0 + << QByteArray("START END\n") + << (QStringList() << QLatin1String(SRCDIR "queries/externalStringVariable.xq") + << QLatin1String("-param") + << QLatin1String("externalString=")) + << QString() + << QString(); + + QTest::newRow("Ensure -is-uri can appear after the query filename") + << 0 + << QByteArray("\n") + << (QStringList() << QLatin1String("data:application/xml,%3Ce%2F%3E") << QLatin1String("-is-uri")) + << QString() + << QString(); + + QTest::newRow("Use a native path") + << 0 + << QByteArray("2\n") + << (QStringList() << QDir::toNativeSeparators(QLatin1String(SRCDIR "queries/onePlusOne.xq"))) + << QString() + << QString(); + + QTest::newRow("Pass in invalid URI") + << 2 + << QByteArray() + << (QStringList() << QLatin1String("-is-uri") << QLatin1String("data:application/xml;base64,PGUvg===")) + << QString() + << QString(); + + /* Not relevant anymore. + QTest::newRow("A valid, existing query, followed by a bogus one") + << 1 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/onePlusOne.xq") + << QLatin1String(SRCDIR "doesNotExist.xq")) + << QString() + << QString(); + */ + + /* Not relevant anymore. + QTest::newRow("Specify two different query names") + << 1 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "query1.xq") + << QLatin1String(SRCDIR "query2.xq")) + << QString() + << QString(); + */ + + // TODO use focus with xquery + // TODO fail to load focus with xquery + // TODO focus with URI with xquery + // TODO focus via FTP or so with xquery + + + QTest::newRow("Use -param twice") + << 0 + << QByteArray("param1 param2\n") + << (QStringList() << QLatin1String(SRCDIR "queries/twoVariables.xq") + << QLatin1String("-param") + << QLatin1String("var1=param1") + << QLatin1String("-param") + << QLatin1String("var2=param2")) + << QString() + << QString(); + + QTest::newRow("Use -param thrice") + << 0 + << QByteArray("param1 param2 third\n") + << (QStringList() << QLatin1String(SRCDIR "queries/threeVariables.xq") + << QLatin1String("-param") + << QLatin1String("var1=param1") + << QLatin1String("-param") + << QLatin1String("var2=param2") + << QLatin1String("-param") + << QLatin1String("var3=third")) + << QString() + << QString(); + + QTest::newRow("Specify the same parameter twice, different values") + << 1 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/onePlusOne.xq") + << QLatin1String("-param") + << QLatin1String("duplicated=param1") + << QLatin1String("-param") + << QLatin1String("duplicated=param2")) + << QString() + << QString(); + + QTest::newRow("Specify the same parameter twice, same values") + << 1 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/onePlusOne.xq") + << QLatin1String("-param") + << QLatin1String("duplicated=param1") + << QLatin1String("-param") + << QLatin1String("duplicated=param2")) + << QString() + << QString(); + + QTest::newRow("Open a non-existing collection.") + << 2 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "queries/nonexistingCollection.xq")) + << QString() + << QString(); + + // TODO https? + // TODO pass external variables that allows space around the equal sign. + // TODO run fn:trace() + // TODO Trigger warning + // TODO what can we do with queries/nodeSequence.xq? + // TODO trigger serialization error + // TODO "xmlpatterns e.xq x" gives "binding must equal .." + // + // TODO use stdout where it's connected to a non-writable file. + // TODO specify -format twice, or whatever it's called. + // TODO query name that starts with "-". + // + // TODO Consider what we should do with paths on windows. Stuff like path\filename.xml fails. + // TODO use invalid URI in query name, xmlpatterns -is-uri 'as1/#(¤/¤)("#' + + // TODO add xmlpatterns file1 file2 file3 + // TODO add xmlpatterns -is-uri file1 file2 file3 +} + +void tst_XmlPatterns::createNonWritable(const QString &name) +{ + /* Create an existing, empty, non-writable file. */ + QFile outFile(name); + QVERIFY(outFile.open(QIODevice::ReadWrite)); + outFile.write(QByteArray("1")); + QVERIFY(outFile.resize(0)); + outFile.close(); + QVERIFY(outFile.setPermissions(QFile::Permissions(QFile::ReadOwner))); +} + +void tst_XmlPatterns::removeNonWritable(QFile &outFile) +{ + /* Kill off temporary files. */ + if(!outFile.remove()) + { + /* Since one file is used for testing that we can handle non-writable file by + * changing the permissions, we need to revert it such that we can remove it. */ + outFile.setPermissions(QFile::WriteOwner); + outFile.remove(); + } +} + +/*! + Check that we gracefully handle writing out to stdout + when the latter is not writable. + */ +void tst_XmlPatterns::stdoutFailure() const +{ + return; // TODO It's really hard to write testing code for this. + + const QString outName(QLatin1String("stdoutFailure.out")); + createNonWritable(outName); + + QProcess process; + // If we enable this line, waitForFinished() fails. + //process.setStandardOutputFile(outName); + + process.setWorkingDirectory(QDir::current().absoluteFilePath(QString())); + process.start(m_command, QStringList(SRCDIR "queries/onePlusOne.xq")); + + QCOMPARE(process.exitStatus(), QProcess::NormalExit); + QVERIFY(process.waitForFinished()); + + QFile outFile(outName); + QVERIFY(outFile.open(QIODevice::ReadOnly)); + QCOMPARE(outFile.readAll(), QByteArray()); + + QCOMPARE(process.exitCode(), 1); + + removeNonWritable(outFile); +} + +void tst_XmlPatterns::cleanupTestCase() const +{ + /* Remove temporaries that we create. */ + QStringList files; + files << QLatin1String("existingContent.out") + << QLatin1String("notWritable.out") + << QLatin1String("output1"); + + for(int i = 0; i < files.count(); ++i) + { + QFile file(files.at(i)); + removeNonWritable(file); + } + + QCOMPARE(m_generatedTests, 0); +} + +void tst_XmlPatterns::xsltSupport() +{ + xquerySupport(); +} + +void tst_XmlPatterns::xsltSupport_data() const +{ + if(m_dontRun) + QSKIP("The command line utility is not in the path.", SkipAll); + +#ifdef Q_OS_WINCE + QSKIP("WinCE: This test uses unsupported WinCE functionality", SkipAll); +#elif defined(Q_OS_SYMBIAN) + QSKIP("Symbian: This test uses unsupported Symbian functionality (QProcess with std streams)", SkipAll); +#endif + + QTest::addColumn("expectedExitCode"); + QTest::addColumn("expectedQueryOutput"); + QTest::addColumn("arguments"); + QTest::addColumn("cwd"); + QTest::addColumn("outputFile"); + + QTest::newRow("Evaluate a stylesheet, with no context document") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("stylesheets/onlyRootTemplate.xsl")) + << QString() + << QString(); + + QTest::newRow("Pass in a stylesheet file which contains an XQuery query") + << 2 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "stylesheets/queryAsStylesheet.xsl") + << QLatin1String(SRCDIR "queries/simpleDocument.xml")) + << QString() + << QString(); + + QTest::newRow("Pass in a stylesheet file and a focus file which doesn't exist") + << 2 + << QByteArray() + << (QStringList() << QLatin1String("stylesheets/onlyRootTemplate.xsl") + << QLatin1String("doesNotExist.Nope.xml")) + << QString() + << QString(); + + QTest::newRow("-initial-template doesn't work with XQueries.") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-initial-template") + << QLatin1String("name") + << QLatin1String(SRCDIR "queries/onePlusOne.xq")) + << QString() + << QString(); + + QTest::newRow("-initial-template must be followed by a value") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-initial-template") + << QLatin1String("stylesheets/onlyRootTemplate.xsl")) + << QString() + << QString(); + + QTest::newRow("-initial-template must be followed by a value(#2)") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("stylesheets/onlyRootTemplate.xsl") + << QLatin1String("-initial-template")) + << QString() + << QString(); + + QTest::newRow("Invalid template name") + << 1 + << QByteArray() + << (QStringList() << QLatin1String("-initial-template") + << QLatin1String("abc:def") + << QLatin1String("stylesheets/onlyRootTemplate.xsl")) + << QString() + << QString(); + + QTest::newRow("Specify a named template, that exists") + << 0 + << QByteArray("named-template") + << (QStringList() << QLatin1String("-no-format") + << QLatin1String("-initial-template") + << QLatin1String("main") + << QLatin1String(SRCDIR "stylesheets/namedAndRootTemplate.xsl") + << QLatin1String(SRCDIR "stylesheets/documentElement.xml")) + << QString() + << QString(); + + QTest::newRow("Specify a named template, that does not exists") + << 0 + << QByteArray("root-template") + << (QStringList() << QLatin1String("-no-format") + << QLatin1String("-initial-template") + << QLatin1String("no-template-by-this-name") + << QLatin1String(SRCDIR "stylesheets/namedAndRootTemplate.xsl") + << QLatin1String(SRCDIR "stylesheets/documentElement.xml")) + << QString() + << QString(); + + QTest::newRow("Call a named template, and use no focus.") + << 0 + << QByteArray("named-template") + << (QStringList() << QLatin1String("-no-format") + << QLatin1String("-initial-template") + << QLatin1String("main") + << QLatin1String(SRCDIR "stylesheets/namedAndRootTemplate.xsl")) + << QString() + << QString(); + + QTest::newRow("Call a named template, and use no focus.") + << 0 + << QByteArray("namespaced-template") + << (QStringList() << QLatin1String("-no-format") + << QLatin1String("-initial-template") + << QLatin1String("{http://example.com/NS}main") + << QLatin1String(SRCDIR "stylesheets/namedAndRootTemplate.xsl")) + << QString() + << QString(); + + QTest::newRow("Invoke a template, and use/pass parameters.") + << 0 + << QByteArray("defParam overridedDefaultedParam implicitlyRequiredValue\n") + << (QStringList() << QLatin1String("-initial-template") + << QLatin1String("main") + << QLatin1String(SRCDIR "stylesheets/useParameters.xsl") + << QLatin1String("-param") + << QLatin1String("overridedDefaultedParam=overridedDefaultedParam") + << QLatin1String("-param") + << QLatin1String("implicitlyRequiredValue=implicitlyRequiredValue")) + << QString() + << QString(); + + QTest::newRow("Use a simplified stylesheet module") + << 0 + << QByteArray("some text\n") + << (QStringList() << QLatin1String(SRCDIR "stylesheets/simplifiedStylesheetModule.xsl") + << QLatin1String(SRCDIR "stylesheets/simplifiedStylesheetModule.xml")) + << QString() + << QString(); + + QTest::newRow("Not well-formed stylesheet, causes crash in coloring code.") + << 2 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "stylesheets/notWellformed.xsl") + << QLatin1String(SRCDIR "queries/simpleDocument.xml")) + << QString() + << QString(); + + QTest::newRow("Not well-formed instance document, causes crash in coloring code.") + << 2 + << QByteArray() + << (QStringList() << QLatin1String(SRCDIR "stylesheets/bool070.xsl") + << QLatin1String(SRCDIR "stylesheets/bool070.xml")) + << QString() + << QString(); + + // TODO test -is-uris with context + // TODO fail to load focus document when using XSL-T + // TODO fail to load focus document when using XQuery + // TODO focus via FTP or so with xquery + // TODO use URI in focus + // TODO use invalid URI in focus + + // TODO invoke a template which has required params. +} + +QTEST_MAIN(tst_XmlPatterns) + +#include "tst_xmlpatterns.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatterns/xmlpatterns.pro b/tests/auto/xmlpatterns/xmlpatterns.pro new file mode 100644 index 0000000..54dd9aa --- /dev/null +++ b/tests/auto/xmlpatterns/xmlpatterns.pro @@ -0,0 +1,11 @@ +load(qttest_p4) +SOURCES += tst_xmlpatterns.cpp \ + ../qxmlquery/TestFundament.cpp + +wince* { +DEFINES += SRCDIR=\\\"./\\\" +} else:!symbian { +DEFINES += SRCDIR=\\\"$$PWD/\\\" +} + +include (../xmlpatterns.pri) diff --git a/tests/auto/xmlpatternsdiagnosticsts/.gitattributes b/tests/auto/xmlpatternsdiagnosticsts/.gitattributes new file mode 100644 index 0000000..d300954 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/.gitattributes @@ -0,0 +1,6 @@ +TestSuite/DiagnosticsCatalog.xml -crlf +TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq -crlf +TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq -crlf +TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq -crlf +TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq -crlf +TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq -crlf diff --git a/tests/auto/xmlpatternsdiagnosticsts/.gitignore b/tests/auto/xmlpatternsdiagnosticsts/.gitignore new file mode 100644 index 0000000..76d03d1 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/.gitignore @@ -0,0 +1,2 @@ +CandidateBaseline.xml +tst_xmlpatternsdiagnosticsts diff --git a/tests/auto/xmlpatternsdiagnosticsts/Baseline.xml b/tests/auto/xmlpatternsdiagnosticsts/Baseline.xml new file mode 100644 index 0000000..166fbf3 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/Baseline.xml @@ -0,0 +1,2 @@ + +

Patternist is an implementation written in C++ and with the Qt/KDE libraries. It is licensed under GNU LGPL and part of KDE, the K Desktop Environment.

XQuery
\ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml new file mode 100644 index 0000000..5a96441 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml @@ -0,0 +1,1046 @@ + + + + + + + KXQTS Harness Test Suite + This collection of test cases in the XQTS format does not exist + for testing an XPath, XQuery or XSL-T implementation, but to verify + the test harness tool that runs an actual XQTS test suite. Therefore, + some tests intentionally fail in this test suite. + + + + + XQuery 1.0: An XML Query Language + http://www.w3.org/TR/2004/WD-xquery-20041029/ + + + XQuery 1.0 and XPath 2.0 Functions and Operators + http://www.w3.org/TR/2004/WD-xpath-functions-20041029/ + + + XQuery 1.0 and XPath 2.0 Data Model + http://www.w3.org/TR/2004/WD-xpath-datamodel-20041029/ + + + XQuery 1.0 and XPath 2.0 Formal Semantics + http://www.w3.org/TR/2004/WD-xquery-semantics-20040220/ + + + XML Schema Part 2: Datatypes + http://www.w3.org/TR/xmlschema-2/ + + + XML Schema Errata + Current practice is to have one Errata document for all parts of Schema. + http://www.w3.org/2001/05/xmlschema-errata + + + XML Query Use Cases + http://www.w3c.org/TR/xquery-use-cases/ + + + + + + The XML InfoSets should be canonicalized and compared. + + + A 'fragment' refers to an XML based instance which has multiple top-level elements and NO XML declaration. + The comparator for this should simply wrap the entire fragment in a container element and perform XML comparisson. + + + + + Each line of non-whitespace text should match. New-line sequences + may vary and should be neutralized. Due to issues with the XML serialization of certain characters (e.g. '<'), + it is not possible to simply compare the actual and expected results. Rather (as is the case with the 'Fragment' comparator) + the test harness should convert the results into valid XML (by adding a container element) and perform comparisson + on the XML canonicalized versions of the results. + + + + + Only the presence/absence of this file is significant, + not its content. + + + + + Automated comparison is not possible. the output should be + inspected by a human. + + + + + + + + This is the source that is handed in to the processor as the + initial input sequence, setting the "evaluation context" as described in XQuery chapter 2. + + + + + These are sources that may be read by functions such as + fn:document() as the query is evaluated. + + + + + These are schema definitions that may be referenced by sources + or in the query. + + + + + These are dtd definitions that may be referenced by sources + or in the query. + + + + + This is an output (either text or XML) that will contain the + query results. If the processor invocation sequence accepts a filename for results, this name may be + passed, possibly prefixed by a partial directory path to allow storage of the results in a separate + directory tree. + + + + + This is an output (text file tagged .log) that will contain the + captured "console" output for a command-line invocation, or equivalent messages from a harness. The + main goal is to capture error messages that came from the processor. + + + A test lab may choose to capture console output for every test case, in which case the presence + of this element is a signal that the console log of this test contains messages that are significant to + the pass/fail determination. + + + + + + + + A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr. + + + + + A query this is expected to raise a parsing/syntax error at query parse time. Principal input should always be specified, even if the query doesn't have any PathExpr. + + + + + A query this is expected to raise a runtime error at query parse time. Runtime errors in this case include those raised by static typing rules. Principal input should always be specified, even if the query doesn't have any PathExpr. + + + + + + + XQuery Test Suite Catalog + + + Bibliography example with extra comments and PIs. + + + Contains just a "doc" element, no comments/text/PIs. + + + Data about a filesystem represented in XML. + + + Data about a filesystem represented in XML with namespace-qualified names. + + + Small tree with element names in mixed namespaces. + Use @index to identify elements precisely. + + + Customer name/address file with some non-ASCII characters. + + + Like TreeCompass, but with comments and PIs off the root. PI targets vary. + All text nodes must have non-whitespace characters. + + + A "compass" tree that has just one child, of an abnormal name, off the center node. + One attribute each on west and center. + + + A "compass" tree that has just a text node and no child element off the center node. + + + A tree intended to allow many kinds of path expressions. + Need multiple attributes on center, west, and south, plus @mark scattered around. + Mix of text and element children in many places, but east should have only a text node. + All text nodes must have non-whitespace characters. + Top element is far-north. + + + A "compass" tree that has just one "south" element at the top, bearing one "mark" attribute. + + + A "compass" tree that has center elements off the real center node. + Use @mark to distinguish center elements. + "Real" center must have multiple element children, some with duplicate names (south-east). + Repeating attribute names used, including same name on elements of the same name. + Comments and text nodes are strewn about. All text nodes must have non-whitespace characters. + + + A "compass" tree that has several "south" elements, some stacked within each other. + Use "mark" attributes at several levels and on all south elements. + + + A "compass" tree that has no content at all in center or west, no attributes anywhere. + + + Data that fits first example in XQuery 3.11. + + + Data that fits later examples in XQuery 3.11. + + + Simple document with all node kinds + + + Simple document with namespaces + + + Source document for namespace copy modes + + + Data for various NIST tests + + + Data for various NIST tests (abbreviated, unabbreviated syntax) + + + Data for fn:lang tests. + + + Data for various NIST tests + + + Source document for Function Declaration tests + + + Data for the the XML Query XMP use cases + + + Data for the the XML Query XMP use cases + + + Data for the the XML Query XMP use cases + + + Data for the the XML Query XMP use cases + + + Data for the the XML Query TREE use cases + + + Data for the the XML Query SEQ use cases + + + Data for the the XML Query RDB use cases + + + Data for the the XML Query RDB use cases + + + Data for the the XML Query RDB use cases + + + Data for the the XML Query STRING use cases + + + Data for the the XML Query STRING use cases + + + Data for the the XML Query NS use cases + + + Data for the the XML Query PARTS use cases + + + Data for the the XML Query SGML use cases + + + A Schema validated xml file, that contains values for data types. Can be used by any test. + + + A Schema validated xml file, that contains values for some of the order by tests generated by NIST. + + + Data for id and idref related functions. + + + A Schema validated XML file containing certain special types e.g. interleave types, union types, anySimpleType + + + A schema validated XML file containing QName and QName derived types. + + + A Scehma validated xml file with NOTATION elements + + + Data for normalize-space functions + + + Schema for XQTSCatalog + + + A Schema for atomic.xml + + + A Schema for orderData.xml + + + A Schema containing certain special types e.g. interleave types, union types, anySimpleType + + + A schema containing QName and QName derived types + + + A Schema for NOTATION data + + + A schema for simple context tests + + + Library module for "modules-none" query + + + Library module with empty namespace + + + Simple library module + + + Library module with namespace URI set to empty string. + + + Simple library module + + + Library module with colliding definitions + + + Library module with colliding definitions + + + Library module with circular includes + + + Library module with circular includes + + + Library module with interesting context + + + Library module with definitions for various NIST tests. + + + + + + The version of Unicode that is used to construct expressions. + + + The statically-known collations. + + + The implicit timezone. + + + The circumstances in which warnings are raised, and the ways in which warnings are handled. + + + The method by which errors are reported to the external processing environment. + + + Whether the implementation is based on the rules of [XML 1.0] and [XML Names] or the rules of [XML 1.1] and [XML Names 1.1]. One of these sets of rules must be applied consistently by all aspects of the implementation. + + + Any components of the static context or dynamic context that are overwritten or augmented by the implementation. + + + Which of the optional axes are supported by the implementation, if the Full-Axis Feature is not supported. + + + The default handling of empty sequences returned by an ordering key (sortspec) in an order by clause (empty least or empty greatest). + + + The names and semantics of any extension expressions (pragmas) recognized by the implementation. + + + The names and semantics of any option declarations recognized by the implementation. + + + Protocols (if any) by which parameters can be passed to an external function, and the result of the function can returned to the invoking query. + + + The process by which the specific modules to be imported by a module import are identified, if the Module Feature is supported (includes processing of location hints, if any.) + + + Any static typing extensions supported by the implementation, if the Static Typing Feature is supported. + + + The means by which serialization is invoked, if the Serialization Feature is supported. + + + The default values for the byte-order-mark, encoding, media-type, normalization-form, omit-xml-declaration, standalone, and version parameters, if the Serialization Feature is supported. + + + Limits on ranges of values for various data types, as enumerated in 5.3 Data Model Conformance. + + + The destination of the trace output is implementation-defined. See 4 The Trace Function. + + + For xs:integer operations, implementations that support limited-precision integer operations must either raise an error [err:FOAR0002] or provide an implementation-defined mechanism that allows users to choose between raising an error and returning a result that is modulo the largest representable integer value. See 6.2 Operators on Numeric Values. + + + For xs:decimal values the number of digits of precision returned by the numeric operators is implementation-defined. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer. + + + If the number of digits in the result exceeds the number of digits that the implementation supports, the result is truncated or rounded in an implementation-defined manner. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer. + + + It is implementation-defined which version of Unicode is supported by the features defined in this specification, but it is recommended that the most recent version of Unicode be used. See 7.1 String Types. + + + For 7.4.6 fn:normalize-unicode, conforming implementations must support normalization form "NFC" and may support normalization forms "NFD", "NFKC", "NFKD", "FULLY-NORMALIZED". They may also support other normalization forms with implementation-defined semantics. + + + The ability to decompose strings into collation units suitable for substring matching is an implementation-defined property of a collation. See 7.5 Functions Based on Substring Matching. + + + All minimally conforming processors must support year values with a minimum of 4 digits (i.e., YYYY) and a minimum fractional second precision of 1 millisecond or three digits (i.e., s.sss). However, conforming processors may set larger implementation-defined limits on the maximum number of digits they support in these two situations. See 10.1.1 Limits and Precision. + + + Various aspects of the processing provided by 15.5.4 fn:doc are implementation-defined. Implementations may provide external configuration options that allow any aspect of the processing to be controlled by the user. + + + Support for additional user-defined or implementation-defined types is implementation-defined. (See 2.6.1 Representation of Types) + + + Some typed values in the data model are undefined. Attempting to access an undefined property is always an error. Behavior in these cases is implementation-defined and the host language is responsible for determining the result. (See 5 Accessors) + + + For any implementation-defined output method, it is implementation-defined whether sequence normalization process takes place. (See 2 Sequence Normalization) + + + If the namespace URI is non-null for the method serialization parameter, then the parameter specifies an implementation-defined output method. (See 3 Serialization Parameters) + + + If the value of the normalization-form form parameter is not NFC, NFD, NFKC, NFKD, fully-normalized, or none then the meaning of the value and it's effect is implementation-defined. (See 4 Phases of Serialization) + + + The effect of additional serialization parameters on the output of the serializer, where the name of such a parameter must be namespace-qualified, is implementation-defined or implementation-dependent. The extent of this effect on the output must not override the provisions of this specification. (See 3 Serialization Parameters) + + + The effect of providing an option that allows the encoding phase to be skipped, so that the result of serialization is a stream of Unicode characters, is implementation-defined. The serializer is not required to support such an option. (See 4 Phases of Serialization) + + + An serializer may provide an implementation-defined mechanism to place CDATA sections in the result tree. (See 5.1.4 XML Output Method: the cdata-section-elements Parameter) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Failing Tests + These tests should fail -- it's intentional. + + + + + The query is a syntax error, but the test-case requires a pass. + + + + + emptydoc + fail-1.txt + + + + + The query is a dynamic error due to call to fn:error(), but the test-case requires a pass. + + + + + emptydoc + fail-2.txt + + + + + + The query evaluates to a xs:string, but the test-case requires + a parse-error with error code XPST0003. + + + + + emptydoc + XPST0003 + + + + + + The query evaluates to a xs:string, but the test-case requires + a runtime-error with error code FORG0006. + + + + + emptydoc + FORG0006 + + + + + + The query evaluates to a parse error with error code XPST0003, but the + test case required a parse error with code XPST0081. + + + + + emptydoc + XPST0081 + + + + + + The query evaluates to a parse error with error code XPST0003, but the + test case required a runtime error with code FORG0006. + + + + + emptydoc + FORG0006 + + + + + + The query evaluates to a dynamic error with error code FOER0000, but the + test case required a parse error with code FOER0000. + + + + + emptydoc + FOER0000 + + + + + + The query evaluates to a dynamic error with error code FOER0000, but the + test case required a parse error with code FORG0006. + + + + + emptydoc + FORG0006 + + + + + + The query evaluates to an xs:string, but none of the baselines match. + + + + + emptydoc + succeed-9-1.txt + succeed-9-2.txt + succeed-9-3.txt + + + + + + The query evaluates to an xs:string, but the baseline doesn't match. + + + + + emptydoc + succeed-10.txt + + + + + + The query contains a parse error, but none of the baselines match. + + + + + emptydoc + succeed-11-1.txt + succeed-11-2.txt + FOER0000 + + + + + + The query contains a runtime error due to call to fn:error(), but none of the baselines match. + + + + + emptydoc + succeed-12-1.txt + succeed-12-2.txt + FORG0006 + + + + + + The test-case requires a parse error with error code XPST0003, + but the query file does not exist. + + + + + emptydoc + XPST0003 + + + + + + The query evaluates to a xs:string literal, but the specified + baseline file does not exist. + + + + + emptydoc + + fail-DOESNOTEXIST.txt + + + + + An "Ignore" baseline with a query that generates a runtime error. + + emptydoc + + + + + An "Ignore" baseline with a query that generates a parse error. + + emptydoc + + + + + Space is significant. + + emptydoc + fail-3.txt + + + + Test that XML documents that differs on the top level, are flagged(type being runtime-error). + + emptydoc + fail-18.txt + + + + Test that XML documents that differs on the top level, are flagged(type being runtime-error, comparing as Fragment). + + emptydoc + fail-18.txt + + + + Test that XML documents that differs on the top level, are flagged(type being standard, comparing as XML). + + emptydoc + fail-18.txt + + + + Test that XML documents that differs on the top level, are flagged(type being standard, comparing as fragment). + + emptydoc + fail-18.txt + + + + Top elements differing in name, should fail. + + emptydoc + fail-22.txt + + + + Attributes differing with the XML prefix, should fail. + + emptydoc + fail-23.txt + + + + Test that XML documents that differs on the top level, are flagged(type being runtime-error, comparing as Fragment). + + emptydoc + fail-18.txt + + + + + + + Succeeding Tests + These tests should succeed. + + + + A 'success' test where the query, which is a + string literal, evaluates to a string, which must match the baseline. + + + + + emptydoc + succeed-1.txt + + + + + + A 'success' test where multiple output baselines exists. + + + + + emptydoc + + succeed-2-1.txt + succeed-2-2.txt + succeed-2-3.txt + succeed-2-4.txt + succeed-2-5.txt + succeed-2-6.txt + + + + + A 'parse-error' specifying error code XPST0003, + and where the query also is that; a syntax error. + + + + + emptydoc + + XPST0003 + + + + + A 'runtime-error' specifying error code FOER0000, + and where the query, containing a call to fn:error(), also results in that. + + + + + emptydoc + + FOER0000 + + + + + A 'runtime-error' specifying error code XPTY0004, + and where the query, contains an invalid operator mapping. While the test case + is specified as a runtime error, some implementations detects it at compile time, but + should nevertheless flag it as a passed test case(even though it failed at compile time + instead of runtime). + + + + + emptydoc + + XPTY0004 + + + + + The query results in a parse error with error code XPST0003, while the test-case contains + many baselines, one of them the error code XPST0003. + + + + emptydoc + + succeed-6-1.txt + succeed-6-2.txt + XPTY0004 + XPST0003 + + + + + The query results in a runtime error with error code FOER0000, while the test-case contains + many baselines, one of them the error code FOER0000. + + + + + emptydoc + + succeed-7-1.txt + succeed-7-2.txt + XPTY0004 + FOER0000 + + + + A 'standard' test with multiple baselines that caused an assert crash in KXQTS. + + emptydoc + succeed-8.txt + XQST0046 + + + + A test whose comparison method is 'Fragment'. Caused assert in KXQTS. + + bib2 + succeed-9.txt + + + A test which accepts any runtime error code, by specifying "*". + + emptydoc + * + + + A 'standard' test that accept output, a particular error code, plus any error code(yes, it makes no sense). + + emptydoc + succeed-11.txt + XQST0038 + * + + + + An "Ignore" baseline with a query that generates output. + + emptydoc + + + + + The scenario is runtime-error despite it not having an error baseline, and despite that we succeed on a non-error baseline. This could the driver not handle. + + succeed-13.txt + + + + Check that an XML prolog is not considered a processing instruction when comparing. + + succeed-14.txt + + + + + + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt new file mode 100644 index 0000000..dcaa1e1 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt @@ -0,0 +1 @@ +This is the expected output \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt new file mode 100644 index 0000000..638e013 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt @@ -0,0 +1 @@ +This is the expected output(fail-2) \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt new file mode 100644 index 0000000..a06c409 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt @@ -0,0 +1 @@ + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt new file mode 100644 index 0000000..3c7d064 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt @@ -0,0 +1 @@ +312 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt new file mode 100644 index 0000000..9d239ff --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt @@ -0,0 +1 @@ +321 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt new file mode 100644 index 0000000..d800886 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt @@ -0,0 +1 @@ +123 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt new file mode 100644 index 0000000..9d239ff --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt @@ -0,0 +1 @@ +321 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt new file mode 100644 index 0000000..3c7d064 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt @@ -0,0 +1 @@ +312 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt new file mode 100644 index 0000000..565f1b0 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt @@ -0,0 +1 @@ +231 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt new file mode 100644 index 0000000..dd1ec20 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt @@ -0,0 +1 @@ +132 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt new file mode 100644 index 0000000..3c7d064 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt @@ -0,0 +1 @@ +312 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt new file mode 100644 index 0000000..680ad50 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt @@ -0,0 +1 @@ +This XQuery query/XPath expression is a xs:string literal. \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt @@ -0,0 +1 @@ +1 diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt new file mode 100644 index 0000000..09a420c --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt @@ -0,0 +1,3 @@ + + + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt new file mode 100644 index 0000000..b410461 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt @@ -0,0 +1 @@ +2 3 1 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt new file mode 100644 index 0000000..5a03540 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt @@ -0,0 +1 @@ +1 3 2 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt new file mode 100644 index 0000000..354bbaf --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt @@ -0,0 +1 @@ +3 1 2 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt new file mode 100644 index 0000000..0f847fe --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt @@ -0,0 +1 @@ +2 1 3 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt new file mode 100644 index 0000000..703ca85 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt @@ -0,0 +1 @@ +1 2 3 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt new file mode 100644 index 0000000..df610b0 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt @@ -0,0 +1 @@ +3 2 1 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt new file mode 100644 index 0000000..d800886 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt @@ -0,0 +1 @@ +123 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt new file mode 100644 index 0000000..9d239ff --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt @@ -0,0 +1 @@ +321 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt new file mode 100644 index 0000000..9d239ff --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt @@ -0,0 +1 @@ +321 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt new file mode 100644 index 0000000..d800886 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt @@ -0,0 +1 @@ +123 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt new file mode 100644 index 0000000..f32a580 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq new file mode 100644 index 0000000..744f6c2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq @@ -0,0 +1 @@ +"This xs:string literal is not terminated(syntax error) \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq new file mode 100644 index 0000000..7629350 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq @@ -0,0 +1 @@ +"This query is fully valid, and consists of one string literal." \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq new file mode 100644 index 0000000..744f6c2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq @@ -0,0 +1 @@ +"This xs:string literal is not terminated(syntax error) \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq new file mode 100644 index 0000000..6f4fbc4 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq @@ -0,0 +1 @@ +error() \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq new file mode 100644 index 0000000..480eb99 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq @@ -0,0 +1 @@ +"This query is fully valid, and consists of one xs:string literal." \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq new file mode 100644 index 0000000..d824818 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq @@ -0,0 +1,2 @@ +xquery version "1.0"; +fn:error() diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq new file mode 100644 index 0000000..6b0185b --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq @@ -0,0 +1,2 @@ +xquery version "1.0"; +"a parse error diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq new file mode 100644 index 0000000..10a7e70 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq @@ -0,0 +1 @@ + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq new file mode 100644 index 0000000..94cd6cd --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq @@ -0,0 +1 @@ +, diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq new file mode 100644 index 0000000..6f4fbc4 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq @@ -0,0 +1 @@ +error() \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq new file mode 100644 index 0000000..7629350 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq @@ -0,0 +1 @@ +"This query is fully valid, and consists of one string literal." \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq new file mode 100644 index 0000000..7629350 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq @@ -0,0 +1 @@ +"This query is fully valid, and consists of one string literal." \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq new file mode 100644 index 0000000..744f6c2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq @@ -0,0 +1 @@ +"This xs:string literal is not terminated(syntax error) \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq new file mode 100644 index 0000000..744f6c2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq @@ -0,0 +1 @@ +"This xs:string literal is not terminated(syntax error) \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq new file mode 100644 index 0000000..6f4fbc4 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq @@ -0,0 +1 @@ +error() \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq new file mode 100644 index 0000000..6f4fbc4 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq @@ -0,0 +1 @@ +error() \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq new file mode 100644 index 0000000..7629350 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq @@ -0,0 +1 @@ +"This query is fully valid, and consists of one string literal." \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq new file mode 100644 index 0000000..ab4c980 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq @@ -0,0 +1 @@ +"This XQuery query/XPath expression is a xs:string literal." \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq new file mode 100644 index 0000000..529429c --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq @@ -0,0 +1 @@ +"This query yields a type error, XPTY0004." + 1 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq new file mode 100644 index 0000000..90fde74 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq @@ -0,0 +1,3 @@ +xquery version "1.0"; +declare default collation "xspanish"; +1 diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq new file mode 100644 index 0000000..5125f53 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq @@ -0,0 +1,2 @@ +xquery version "1.0"; +"This query evaluates to arbitrary output", 1, 2, 3 diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq new file mode 100644 index 0000000..f33dfa2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq @@ -0,0 +1 @@ +1 diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq new file mode 100644 index 0000000..a9d9741 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq @@ -0,0 +1,2 @@ +, + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq new file mode 100644 index 0000000..ea815e2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq @@ -0,0 +1,2 @@ +unordered{1, 2, 3} + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq new file mode 100644 index 0000000..d050b9e --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq @@ -0,0 +1 @@ +"This xs:string literal is not terminated(syntax error) diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq new file mode 100644 index 0000000..f62b454 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq @@ -0,0 +1 @@ +error() diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq new file mode 100644 index 0000000..648bf79 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq @@ -0,0 +1 @@ +"Can't multiply an xs:string with an xs:integer." * 1 \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq new file mode 100644 index 0000000..744f6c2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq @@ -0,0 +1 @@ +"This xs:string literal is not terminated(syntax error) \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq new file mode 100644 index 0000000..6f4fbc4 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq @@ -0,0 +1 @@ +error() \ No newline at end of file diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq new file mode 100644 index 0000000..13589a4 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq @@ -0,0 +1,2 @@ +declare base-uri "abc"; +ends-with(fn:static-base-uri(), "abc") diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq new file mode 100644 index 0000000..f33dfa2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq @@ -0,0 +1 @@ +1 diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml new file mode 100644 index 0000000..e7c0e60 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml @@ -0,0 +1,40 @@ + + + + + + + TCP/IP Illustrated + StevensW. + Addison-Wesley + 65.95 + + + + Advanced Programming in the Unix environment + StevensW. + Addison-Wesley + 65.95 + + + + Data on the Web + AbiteboulSerge + BunemanPeter + SuciuDan + Morgan Kaufmann Publishers + 39.95 + + + + The Economics of Technology and Content for Digital TV + + GerbargDarcy + CITI + + Kluwer Academic Publishers + 129.95 + + + + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml new file mode 100644 index 0000000..69d62f2 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml @@ -0,0 +1 @@ + diff --git a/tests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh new file mode 100755 index 0000000..b3b093d --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +############################################################################# +## +## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is the build configuration utility of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +set p4Where `p4 where //depot/autotests/4.4/tests/auto/xmlpatternsxqts/XQTS/XQTSCatalog.xsd` +xmllint --xinclude --noout --schema $4 DiagnosticsCatalog.xml diff --git a/tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp b/tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp new file mode 100644 index 0000000..b500f04 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include "tst_suitetest.h" + +/*! + \class tst_XmlPatternsDiagnosticsTS + \internal + \since 4.5 + \brief Test QtXmlPatterns test suite driver in tests/auto/xmlpatternsxqts/lib/. + */ +class tst_XmlPatternsDiagnosticsTS : public tst_SuiteTest +{ + Q_OBJECT +public: + tst_XmlPatternsDiagnosticsTS(); +protected: + virtual void catalogPath(QString &write) const; +}; + +tst_XmlPatternsDiagnosticsTS::tst_XmlPatternsDiagnosticsTS() : tst_SuiteTest(tst_SuiteTest::XQuerySuite, true) +{ +} + +void tst_XmlPatternsDiagnosticsTS::catalogPath(QString &write) const +{ + write = QLatin1String("TestSuite/DiagnosticsCatalog.xml"); +} + +QTEST_MAIN(tst_XmlPatternsDiagnosticsTS) + +#include "tst_xmlpatternsdiagnosticsts.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro new file mode 100644 index 0000000..3e252f6 --- /dev/null +++ b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro @@ -0,0 +1,27 @@ +load(qttest_p4) +SOURCES += tst_xmlpatternsdiagnosticsts.cpp \ + ../qxmlquery/TestFundament.cpp + +include (../xmlpatterns.pri) + +TARGET = tst_xmlpatternsdiagnosticsts + +contains(QT_CONFIG, xmlpatterns) { +HEADERS += ../xmlpatternsxqts/tst_suitetest.h +SOURCES += ../xmlpatternsxqts/tst_suitetest.cpp +LIBS += -l$$XMLPATTERNS_SDK +} + +QT += xml + +INCLUDEPATH += $$(QTSRCDIR)/tests/auto/xmlpatternssdk \ + $$(QTDIR)/include/QtXmlPatterns/private \ + $$(QTSRCDIR)/tests/auto/xmlpatternsxqts \ + ../xmlpatternsxqts \ + ../xmlpatternssdk + +wince*|symbian { + catalog.files = TestSuite Baseline.xml + catalog.path = . + DEPLOYMENT += catalog +} diff --git a/tests/auto/xmlpatternsschema/.gitignore b/tests/auto/xmlpatternsschema/.gitignore new file mode 100644 index 0000000..a37a2b7 --- /dev/null +++ b/tests/auto/xmlpatternsschema/.gitignore @@ -0,0 +1 @@ +tst_xmlpatternsschema diff --git a/tests/auto/xmlpatternsschema/tst_xmlpatternsschema.cpp b/tests/auto/xmlpatternsschema/tst_xmlpatternsschema.cpp new file mode 100644 index 0000000..09e66a8 --- /dev/null +++ b/tests/auto/xmlpatternsschema/tst_xmlpatternsschema.cpp @@ -0,0 +1,1028 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qxsdstatemachine_p.h" +#include "qxsdschematoken_p.h" + +using namespace QPatternist; + +class tst_XMLPatternsSchema : public QObject +{ + Q_OBJECT + + public slots: + void init(); + void cleanup(); + + private slots: + void stateMachineTest1(); + void stateMachineTest2(); + void stateMachineTest3(); + void stateMachineTest4(); + void stateMachineTest5(); + void stateMachineTest6(); + void stateMachineTest7(); + void stateMachineTest8(); + void stateMachineTest9(); + void stateMachineTest10(); + void stateMachineTest11(); + void stateMachineTest12(); + void stateMachineTest13(); + void stateMachineTest14(); + void stateMachineTest15(); + void stateMachineTest16(); + void stateMachineTest17(); + void stateMachineTest18(); + void stateMachineTest19(); + + private: + bool runTest(const QVector &list, XsdStateMachine &machine); +}; + +void tst_XMLPatternsSchema::init() +{ +} + +void tst_XMLPatternsSchema::cleanup() +{ +} + +bool tst_XMLPatternsSchema::runTest(const QVector &list, XsdStateMachine &machine) +{ + machine.reset(); + for (int i = 0; i < list.count(); ++i) { + if (!machine.proceed(list.at(i))) + return false; + } + if (!machine.inEndState()) + return false; + + return true; +} + +void tst_XMLPatternsSchema::stateMachineTest1() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, simpleType?) : attribute + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s1, XsdSchemaToken::SimpleType, s2); + + QVERIFY(machine.inEndState() == true); + QVERIFY(machine.proceed(XsdSchemaToken::Annotation) == true); + QVERIFY(machine.inEndState() == true); + QVERIFY(machine.proceed(XsdSchemaToken::SimpleType) == true); + QVERIFY(machine.inEndState() == true); + QVERIFY(machine.proceed(XsdSchemaToken::SimpleType) == false); + QVERIFY(machine.proceed(XsdSchemaToken::Annotation) == false); + machine.reset(); + QVERIFY(machine.proceed(XsdSchemaToken::SimpleType) == true); + QVERIFY(machine.inEndState() == true); + QVERIFY(machine.proceed(XsdSchemaToken::Annotation) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest2() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)) : element + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s5 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s6 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s2); + machine.addTransition(startState, XsdSchemaToken::ComplexType, s3); + machine.addTransition(startState, XsdSchemaToken::Unique, s4); + machine.addTransition(startState, XsdSchemaToken::Key, s5); + machine.addTransition(startState, XsdSchemaToken::Keyref, s6); + + machine.addTransition(s1, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s1, XsdSchemaToken::ComplexType, s3); + machine.addTransition(s1, XsdSchemaToken::Unique, s4); + machine.addTransition(s1, XsdSchemaToken::Key, s5); + machine.addTransition(s1, XsdSchemaToken::Keyref, s6); + + machine.addTransition(s2, XsdSchemaToken::Unique, s4); + machine.addTransition(s2, XsdSchemaToken::Key, s5); + machine.addTransition(s2, XsdSchemaToken::Keyref, s6); + + machine.addTransition(s3, XsdSchemaToken::Unique, s4); + machine.addTransition(s3, XsdSchemaToken::Key, s5); + machine.addTransition(s3, XsdSchemaToken::Keyref, s6); + + machine.addTransition(s4, XsdSchemaToken::Unique, s4); + machine.addTransition(s4, XsdSchemaToken::Key, s5); + machine.addTransition(s4, XsdSchemaToken::Keyref, s6); + + machine.addTransition(s5, XsdSchemaToken::Unique, s4); + machine.addTransition(s5, XsdSchemaToken::Key, s5); + machine.addTransition(s5, XsdSchemaToken::Keyref, s6); + + machine.addTransition(s6, XsdSchemaToken::Unique, s4); + machine.addTransition(s6, XsdSchemaToken::Key, s5); + machine.addTransition(s6, XsdSchemaToken::Keyref, s6); + + QVector data1, data2, data3; + + data1 << XsdSchemaToken::Annotation + << XsdSchemaToken::SimpleType + << XsdSchemaToken::Unique + << XsdSchemaToken::Keyref; + + data2 << XsdSchemaToken::Annotation + << XsdSchemaToken::SimpleType + << XsdSchemaToken::Annotation + << XsdSchemaToken::Keyref; + + data3 << XsdSchemaToken::Annotation + << XsdSchemaToken::SimpleType + << XsdSchemaToken::SimpleType; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == false); + QVERIFY(runTest(data3, machine) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest3() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)))) : complexType + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s5 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s6 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s7 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s8 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s9 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s10 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleContent, s2); + machine.addTransition(startState, XsdSchemaToken::ComplexContent, s3); + machine.addTransition(startState, XsdSchemaToken::Group, s4); + machine.addTransition(startState, XsdSchemaToken::All, s5); + machine.addTransition(startState, XsdSchemaToken::Choice, s6); + machine.addTransition(startState, XsdSchemaToken::Sequence, s7); + machine.addTransition(startState, XsdSchemaToken::Attribute, s8); + machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s9); + machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s10); + + machine.addTransition(s1, XsdSchemaToken::SimpleContent, s2); + machine.addTransition(s1, XsdSchemaToken::ComplexContent, s3); + machine.addTransition(s1, XsdSchemaToken::Group, s4); + machine.addTransition(s1, XsdSchemaToken::All, s5); + machine.addTransition(s1, XsdSchemaToken::Choice, s6); + machine.addTransition(s1, XsdSchemaToken::Sequence, s7); + machine.addTransition(s1, XsdSchemaToken::Attribute, s8); + machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s9); + machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s10); + + machine.addTransition(s4, XsdSchemaToken::Attribute, s8); + machine.addTransition(s4, XsdSchemaToken::AttributeGroup, s9); + machine.addTransition(s4, XsdSchemaToken::AnyAttribute, s10); + + machine.addTransition(s5, XsdSchemaToken::Attribute, s8); + machine.addTransition(s5, XsdSchemaToken::AttributeGroup, s9); + machine.addTransition(s5, XsdSchemaToken::AnyAttribute, s10); + + machine.addTransition(s6, XsdSchemaToken::Attribute, s8); + machine.addTransition(s6, XsdSchemaToken::AttributeGroup, s9); + machine.addTransition(s6, XsdSchemaToken::AnyAttribute, s10); + + machine.addTransition(s7, XsdSchemaToken::Attribute, s8); + machine.addTransition(s7, XsdSchemaToken::AttributeGroup, s9); + machine.addTransition(s7, XsdSchemaToken::AnyAttribute, s10); + + machine.addTransition(s8, XsdSchemaToken::Attribute, s8); + machine.addTransition(s8, XsdSchemaToken::AttributeGroup, s9); + machine.addTransition(s8, XsdSchemaToken::AnyAttribute, s10); + + QVector data1, data2, data3, data4; + + data1 << XsdSchemaToken::Annotation + << XsdSchemaToken::SimpleContent; + + data2 << XsdSchemaToken::Group + << XsdSchemaToken::Attribute + << XsdSchemaToken::Attribute + << XsdSchemaToken::AnyAttribute; + + data3 << XsdSchemaToken::Group + << XsdSchemaToken::Choice + << XsdSchemaToken::Attribute + << XsdSchemaToken::AnyAttribute; + + data4 << XsdSchemaToken::Annotation + << XsdSchemaToken::Sequence + << XsdSchemaToken::AnyAttribute; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == false); + QVERIFY(runTest(data4, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest4() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, ((attribute | attributeGroup)*, anyAttribute?)) : named attribute group/simple content extension/ + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::Attribute, s2); + machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s4); + + machine.addTransition(s1, XsdSchemaToken::Attribute, s2); + machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s4); + + machine.addTransition(s2, XsdSchemaToken::Attribute, s2); + machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(s2, XsdSchemaToken::AnyAttribute, s4); + + machine.addTransition(s3, XsdSchemaToken::Attribute, s2); + machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(s3, XsdSchemaToken::AnyAttribute, s4); + + QVector data1, data2, data3, data4; + + data1 << XsdSchemaToken::Annotation; + + data2 << XsdSchemaToken::Attribute + << XsdSchemaToken::Attribute + << XsdSchemaToken::Attribute + << XsdSchemaToken::AnyAttribute; + + data3 << XsdSchemaToken::Group + << XsdSchemaToken::Attribute + << XsdSchemaToken::AnyAttribute; + + data4 << XsdSchemaToken::Attribute + << XsdSchemaToken::AnyAttribute + << XsdSchemaToken::Attribute; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == false); + QVERIFY(runTest(data4, machine) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest5() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (all | choice | sequence)?) : group + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::All, s2); + machine.addTransition(startState, XsdSchemaToken::Choice, s3); + machine.addTransition(startState, XsdSchemaToken::Sequence, s4); + + machine.addTransition(s1, XsdSchemaToken::All, s2); + machine.addTransition(s1, XsdSchemaToken::Choice, s3); + machine.addTransition(s1, XsdSchemaToken::Sequence, s4); + + QVector data1, data2, data3, data4, data5, data6, data7, data8, data9; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::All; + data3 << XsdSchemaToken::Annotation << XsdSchemaToken::Choice; + data4 << XsdSchemaToken::Annotation << XsdSchemaToken::Sequence; + data5 << XsdSchemaToken::All; + data6 << XsdSchemaToken::Choice; + data7 << XsdSchemaToken::Sequence; + data8 << XsdSchemaToken::Sequence << XsdSchemaToken::All; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == true); + QVERIFY(runTest(data6, machine) == true); + QVERIFY(runTest(data7, machine) == true); + QVERIFY(runTest(data8, machine) == false); + QVERIFY(runTest(data9, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest6() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, element*) : all + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::Element, s2); + + machine.addTransition(s1, XsdSchemaToken::Element, s2); + + machine.addTransition(s2, XsdSchemaToken::Element, s2); + + QVector data1, data2, data3, data4, data5, data6, data7, data8, data9; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Element; + data3 << XsdSchemaToken::Element; + data4 << XsdSchemaToken::Element << XsdSchemaToken::Sequence; + data5 << XsdSchemaToken::Annotation << XsdSchemaToken::Element << XsdSchemaToken::Annotation; + data6 << XsdSchemaToken::Annotation << XsdSchemaToken::Annotation << XsdSchemaToken::Element; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == false); + QVERIFY(runTest(data5, machine) == false); + QVERIFY(runTest(data6, machine) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest7() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (element | group | choice | sequence | any)*) : choice sequence + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s5 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s6 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::Element, s2); + machine.addTransition(startState, XsdSchemaToken::Group, s3); + machine.addTransition(startState, XsdSchemaToken::Choice, s4); + machine.addTransition(startState, XsdSchemaToken::Sequence, s5); + machine.addTransition(startState, XsdSchemaToken::Any, s6); + + machine.addTransition(s1, XsdSchemaToken::Element, s2); + machine.addTransition(s1, XsdSchemaToken::Group, s3); + machine.addTransition(s1, XsdSchemaToken::Choice, s4); + machine.addTransition(s1, XsdSchemaToken::Sequence, s5); + machine.addTransition(s1, XsdSchemaToken::Any, s6); + + machine.addTransition(s2, XsdSchemaToken::Element, s2); + machine.addTransition(s2, XsdSchemaToken::Group, s3); + machine.addTransition(s2, XsdSchemaToken::Choice, s4); + machine.addTransition(s2, XsdSchemaToken::Sequence, s5); + machine.addTransition(s2, XsdSchemaToken::Any, s6); + + machine.addTransition(s3, XsdSchemaToken::Element, s2); + machine.addTransition(s3, XsdSchemaToken::Group, s3); + machine.addTransition(s3, XsdSchemaToken::Choice, s4); + machine.addTransition(s3, XsdSchemaToken::Sequence, s5); + machine.addTransition(s3, XsdSchemaToken::Any, s6); + + machine.addTransition(s4, XsdSchemaToken::Element, s2); + machine.addTransition(s4, XsdSchemaToken::Group, s3); + machine.addTransition(s4, XsdSchemaToken::Choice, s4); + machine.addTransition(s4, XsdSchemaToken::Sequence, s5); + machine.addTransition(s4, XsdSchemaToken::Any, s6); + + machine.addTransition(s5, XsdSchemaToken::Element, s2); + machine.addTransition(s5, XsdSchemaToken::Group, s3); + machine.addTransition(s5, XsdSchemaToken::Choice, s4); + machine.addTransition(s5, XsdSchemaToken::Sequence, s5); + machine.addTransition(s5, XsdSchemaToken::Any, s6); + + machine.addTransition(s6, XsdSchemaToken::Element, s2); + machine.addTransition(s6, XsdSchemaToken::Group, s3); + machine.addTransition(s6, XsdSchemaToken::Choice, s4); + machine.addTransition(s6, XsdSchemaToken::Sequence, s5); + machine.addTransition(s6, XsdSchemaToken::Any, s6); + + QVector data1, data2, data3, data4, data5, data6, data7, data8, data9; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Element << XsdSchemaToken::Sequence << XsdSchemaToken::Choice; + data3 << XsdSchemaToken::Group; + data4 << XsdSchemaToken::Element << XsdSchemaToken::Sequence << XsdSchemaToken::Annotation; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest8() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?) : any/selector/field/notation/include/import/referred attribute group/anyAttribute/all facets + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + + QVector data1, data2, data3, data4; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Element; + data3 << XsdSchemaToken::Group; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == false); + QVERIFY(runTest(data3, machine) == false); + QVERIFY(runTest(data4, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest9() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (selector, field+)) : unique/key/keyref + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::InternalState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::InternalState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::Selector, s2); + + machine.addTransition(s1, XsdSchemaToken::Selector, s2); + machine.addTransition(s2, XsdSchemaToken::Field, s3); + machine.addTransition(s3, XsdSchemaToken::Field, s3); + + QVector data1, data2, data3, data4, data5; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Selector; + data3 << XsdSchemaToken::Annotation << XsdSchemaToken::Selector << XsdSchemaToken::Field; + data4 << XsdSchemaToken::Selector << XsdSchemaToken::Field; + data5 << XsdSchemaToken::Selector << XsdSchemaToken::Field << XsdSchemaToken::Field; + + QVERIFY(runTest(data1, machine) == false); + QVERIFY(runTest(data2, machine) == false); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest10() +{ + XsdStateMachine machine; + + // setup state machine for (appinfo | documentation)* : annotation + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Appinfo, s1); + machine.addTransition(startState, XsdSchemaToken::Documentation, s2); + + machine.addTransition(s1, XsdSchemaToken::Appinfo, s1); + machine.addTransition(s1, XsdSchemaToken::Documentation, s2); + + machine.addTransition(s2, XsdSchemaToken::Appinfo, s1); + machine.addTransition(s2, XsdSchemaToken::Documentation, s2); + + QVector data1, data2, data3, data4, data5; + + data1 << XsdSchemaToken::Appinfo; + data2 << XsdSchemaToken::Appinfo << XsdSchemaToken::Appinfo; + data3 << XsdSchemaToken::Documentation << XsdSchemaToken::Appinfo << XsdSchemaToken::Documentation; + data4 << XsdSchemaToken::Selector << XsdSchemaToken::Field; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == false); + QVERIFY(runTest(data5, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest11() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (restriction | list | union)) : simpleType + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::InternalState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::Restriction, s2); + machine.addTransition(startState, XsdSchemaToken::List, s3); + machine.addTransition(startState, XsdSchemaToken::Union, s4); + + machine.addTransition(s1, XsdSchemaToken::Restriction, s2); + machine.addTransition(s1, XsdSchemaToken::List, s3); + machine.addTransition(s1, XsdSchemaToken::Union, s4); + + QVector data1, data2, data3, data4, data5, data6, data7, data8; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Restriction; + data3 << XsdSchemaToken::Annotation << XsdSchemaToken::List; + data4 << XsdSchemaToken::Annotation << XsdSchemaToken::Union; + data5 << XsdSchemaToken::Restriction; + data6 << XsdSchemaToken::List; + data7 << XsdSchemaToken::Union; + data8 << XsdSchemaToken::Union << XsdSchemaToken::Union; + + QVERIFY(runTest(data1, machine) == false); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == true); + QVERIFY(runTest(data6, machine) == true); + QVERIFY(runTest(data7, machine) == true); + QVERIFY(runTest(data8, machine) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest12() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*)) : simple type restriction + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s2); + machine.addTransition(startState, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(startState, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(startState, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(startState, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(startState, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(startState, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(startState, XsdSchemaToken::Length, s3); + machine.addTransition(startState, XsdSchemaToken::MinLength, s3); + machine.addTransition(startState, XsdSchemaToken::MaxLength, s3); + machine.addTransition(startState, XsdSchemaToken::Enumeration, s3); + machine.addTransition(startState, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(startState, XsdSchemaToken::Pattern, s3); + + machine.addTransition(s1, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s1, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(s1, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(s1, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(s1, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(s1, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(s1, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(s1, XsdSchemaToken::Length, s3); + machine.addTransition(s1, XsdSchemaToken::MinLength, s3); + machine.addTransition(s1, XsdSchemaToken::MaxLength, s3); + machine.addTransition(s1, XsdSchemaToken::Enumeration, s3); + machine.addTransition(s1, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(s1, XsdSchemaToken::Pattern, s3); + + machine.addTransition(s2, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(s2, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(s2, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(s2, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(s2, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(s2, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(s2, XsdSchemaToken::Length, s3); + machine.addTransition(s2, XsdSchemaToken::MinLength, s3); + machine.addTransition(s2, XsdSchemaToken::MaxLength, s3); + machine.addTransition(s2, XsdSchemaToken::Enumeration, s3); + machine.addTransition(s2, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(s2, XsdSchemaToken::Pattern, s3); + + machine.addTransition(s3, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(s3, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(s3, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(s3, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(s3, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(s3, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(s3, XsdSchemaToken::Length, s3); + machine.addTransition(s3, XsdSchemaToken::MinLength, s3); + machine.addTransition(s3, XsdSchemaToken::MaxLength, s3); + machine.addTransition(s3, XsdSchemaToken::Enumeration, s3); + machine.addTransition(s3, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(s3, XsdSchemaToken::Pattern, s3); + + QVector data1, data2, data3, data4, data5; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Length << XsdSchemaToken::MaxLength; + data3 << XsdSchemaToken::Annotation << XsdSchemaToken::List; + data4 << XsdSchemaToken::SimpleType << XsdSchemaToken::Pattern; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == false); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest13() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, simpleType?) : list + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s2); + + machine.addTransition(s1, XsdSchemaToken::SimpleType, s2); + + QVector data1, data2, data3, data4, data5; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::SimpleType; + data3 << XsdSchemaToken::SimpleType; + data4 << XsdSchemaToken::SimpleType << XsdSchemaToken::SimpleType; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == false); + QVERIFY(runTest(data5, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest14() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, simpleType*) : union + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s2); + + machine.addTransition(s1, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s2, XsdSchemaToken::SimpleType, s2); + + QVector data1, data2, data3, data4, data5, data6; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::SimpleType; + data3 << XsdSchemaToken::SimpleType; + data4 << XsdSchemaToken::SimpleType << XsdSchemaToken::SimpleType; + data6 << XsdSchemaToken::Annotation << XsdSchemaToken::Annotation; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == true); + QVERIFY(runTest(data6, machine) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest15() +{ + XsdStateMachine machine; + + // setup state machine for ((include | import | redefine | annotation)*, (((simpleType | complexType | group | attributeGroup) | element | attribute | notation), annotation*)*) : schema + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Include, s1); + machine.addTransition(startState, XsdSchemaToken::Import, s1); + machine.addTransition(startState, XsdSchemaToken::Redefine, s1); + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s2); + machine.addTransition(startState, XsdSchemaToken::ComplexType, s2); + machine.addTransition(startState, XsdSchemaToken::Group, s2); + machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s2); + machine.addTransition(startState, XsdSchemaToken::Element, s2); + machine.addTransition(startState, XsdSchemaToken::Attribute, s2); + machine.addTransition(startState, XsdSchemaToken::Notation, s2); + + machine.addTransition(s1, XsdSchemaToken::Include, s1); + machine.addTransition(s1, XsdSchemaToken::Import, s1); + machine.addTransition(s1, XsdSchemaToken::Redefine, s1); + machine.addTransition(s1, XsdSchemaToken::Annotation, s1); + machine.addTransition(s1, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s1, XsdSchemaToken::ComplexType, s2); + machine.addTransition(s1, XsdSchemaToken::Group, s2); + machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s2); + machine.addTransition(s1, XsdSchemaToken::Element, s2); + machine.addTransition(s1, XsdSchemaToken::Attribute, s2); + machine.addTransition(s1, XsdSchemaToken::Notation, s2); + + machine.addTransition(s2, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s2, XsdSchemaToken::ComplexType, s2); + machine.addTransition(s2, XsdSchemaToken::Group, s2); + machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s2); + machine.addTransition(s2, XsdSchemaToken::Element, s2); + machine.addTransition(s2, XsdSchemaToken::Attribute, s2); + machine.addTransition(s2, XsdSchemaToken::Notation, s2); + machine.addTransition(s2, XsdSchemaToken::Annotation, s3); + + machine.addTransition(s3, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s3, XsdSchemaToken::ComplexType, s2); + machine.addTransition(s3, XsdSchemaToken::Group, s2); + machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s2); + machine.addTransition(s3, XsdSchemaToken::Element, s2); + machine.addTransition(s3, XsdSchemaToken::Attribute, s2); + machine.addTransition(s3, XsdSchemaToken::Notation, s2); + machine.addTransition(s3, XsdSchemaToken::Annotation, s3); + + QVector data1, data2, data3, data4, data5, data6; + + data1 << XsdSchemaToken::Annotation << XsdSchemaToken::Import << XsdSchemaToken::SimpleType << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::SimpleType; + data3 << XsdSchemaToken::Annotation << XsdSchemaToken::Import << XsdSchemaToken::Include << XsdSchemaToken::Import; + data4 << XsdSchemaToken::SimpleType << XsdSchemaToken::ComplexType << XsdSchemaToken::Annotation << XsdSchemaToken::Attribute; + data5 << XsdSchemaToken::SimpleType << XsdSchemaToken::Include << XsdSchemaToken::Annotation << XsdSchemaToken::Attribute; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == false); + QVERIFY(runTest(data6, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest16() +{ + XsdStateMachine machine; + + // setup state machine for (annotation | (simpleType | complexType | group | attributeGroup))* : redefine + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s1); + machine.addTransition(startState, XsdSchemaToken::ComplexType, s1); + machine.addTransition(startState, XsdSchemaToken::Group, s1); + machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s1); + + machine.addTransition(s1, XsdSchemaToken::Annotation, s1); + machine.addTransition(s1, XsdSchemaToken::SimpleType, s1); + machine.addTransition(s1, XsdSchemaToken::ComplexType, s1); + machine.addTransition(s1, XsdSchemaToken::Group, s1); + machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s1); + + QVector data1, data2, data3, data4, data5, data6; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::SimpleType; + data3 << XsdSchemaToken::SimpleType; + data4 << XsdSchemaToken::SimpleType << XsdSchemaToken::SimpleType; + data6 << XsdSchemaToken::Annotation << XsdSchemaToken::Annotation; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == true); + QVERIFY(runTest(data6, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest17() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (restriction | extension)) : simpleContent + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::InternalState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::Restriction, s2); + machine.addTransition(startState, XsdSchemaToken::Extension, s2); + + machine.addTransition(s1, XsdSchemaToken::Restriction, s2); + machine.addTransition(s1, XsdSchemaToken::Extension, s2); + + QVector data1, data2, data3, data4, data5, data6; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Extension; + data3 << XsdSchemaToken::Restriction; + data4 << XsdSchemaToken::Extension << XsdSchemaToken::Restriction; + data5 << XsdSchemaToken::Annotation << XsdSchemaToken::Annotation; + + QVERIFY(runTest(data1, machine) == false); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == true); + QVERIFY(runTest(data4, machine) == false); + QVERIFY(runTest(data5, machine) == false); + QVERIFY(runTest(data6, machine) == false); +} + +void tst_XMLPatternsSchema::stateMachineTest18() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*)?, ((attribute | attributeGroup)*, anyAttribute?)) : simpleContent restriction + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s5 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::SimpleType, s2); + machine.addTransition(startState, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(startState, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(startState, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(startState, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(startState, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(startState, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(startState, XsdSchemaToken::Length, s3); + machine.addTransition(startState, XsdSchemaToken::MinLength, s3); + machine.addTransition(startState, XsdSchemaToken::MaxLength, s3); + machine.addTransition(startState, XsdSchemaToken::Enumeration, s3); + machine.addTransition(startState, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(startState, XsdSchemaToken::Pattern, s3); + machine.addTransition(startState, XsdSchemaToken::Attribute, s4); + machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s4); + machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s5); + + machine.addTransition(s1, XsdSchemaToken::SimpleType, s2); + machine.addTransition(s1, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(s1, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(s1, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(s1, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(s1, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(s1, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(s1, XsdSchemaToken::Length, s3); + machine.addTransition(s1, XsdSchemaToken::MinLength, s3); + machine.addTransition(s1, XsdSchemaToken::MaxLength, s3); + machine.addTransition(s1, XsdSchemaToken::Enumeration, s3); + machine.addTransition(s1, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(s1, XsdSchemaToken::Pattern, s3); + machine.addTransition(s1, XsdSchemaToken::Attribute, s4); + machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s4); + machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s5); + + machine.addTransition(s2, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(s2, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(s2, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(s2, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(s2, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(s2, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(s2, XsdSchemaToken::Length, s3); + machine.addTransition(s2, XsdSchemaToken::MinLength, s3); + machine.addTransition(s2, XsdSchemaToken::MaxLength, s3); + machine.addTransition(s2, XsdSchemaToken::Enumeration, s3); + machine.addTransition(s2, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(s2, XsdSchemaToken::Pattern, s3); + machine.addTransition(s2, XsdSchemaToken::Attribute, s4); + machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s4); + machine.addTransition(s2, XsdSchemaToken::AnyAttribute, s5); + + machine.addTransition(s3, XsdSchemaToken::MinExclusive, s3); + machine.addTransition(s3, XsdSchemaToken::MinInclusive, s3); + machine.addTransition(s3, XsdSchemaToken::MaxExclusive, s3); + machine.addTransition(s3, XsdSchemaToken::MaxInclusive, s3); + machine.addTransition(s3, XsdSchemaToken::TotalDigits, s3); + machine.addTransition(s3, XsdSchemaToken::FractionDigits, s3); + machine.addTransition(s3, XsdSchemaToken::Length, s3); + machine.addTransition(s3, XsdSchemaToken::MinLength, s3); + machine.addTransition(s3, XsdSchemaToken::MaxLength, s3); + machine.addTransition(s3, XsdSchemaToken::Enumeration, s3); + machine.addTransition(s3, XsdSchemaToken::WhiteSpace, s3); + machine.addTransition(s3, XsdSchemaToken::Pattern, s3); + machine.addTransition(s3, XsdSchemaToken::Attribute, s4); + machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s4); + machine.addTransition(s3, XsdSchemaToken::AnyAttribute, s5); + + machine.addTransition(s4, XsdSchemaToken::Attribute, s4); + machine.addTransition(s4, XsdSchemaToken::AttributeGroup, s4); + machine.addTransition(s4, XsdSchemaToken::AnyAttribute, s5); + + QVector data1, data2, data3, data4, data5, data6; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::SimpleType << XsdSchemaToken::MinExclusive << XsdSchemaToken::MaxExclusive; + data3 << XsdSchemaToken::AnyAttribute << XsdSchemaToken::Attribute; + data4 << XsdSchemaToken::MinExclusive << XsdSchemaToken::TotalDigits << XsdSchemaToken::Enumeration; + data5 << XsdSchemaToken::Annotation << XsdSchemaToken::Annotation; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == false); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == false); + QVERIFY(runTest(data6, machine) == true); +} + +void tst_XMLPatternsSchema::stateMachineTest19() +{ + XsdStateMachine machine; + + // setup state machine for (annotation?, (group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)) : complex content restriction/complex content extension + const XsdStateMachine::StateId startState = machine.addState(XsdStateMachine::StartEndState); + const XsdStateMachine::StateId s1 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s2 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s3 = machine.addState(XsdStateMachine::EndState); + const XsdStateMachine::StateId s4 = machine.addState(XsdStateMachine::EndState); + + machine.addTransition(startState, XsdSchemaToken::Annotation, s1); + machine.addTransition(startState, XsdSchemaToken::Group, s2); + machine.addTransition(startState, XsdSchemaToken::All, s2); + machine.addTransition(startState, XsdSchemaToken::Choice, s2); + machine.addTransition(startState, XsdSchemaToken::Sequence, s2); + machine.addTransition(startState, XsdSchemaToken::Attribute, s3); + machine.addTransition(startState, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(startState, XsdSchemaToken::AnyAttribute, s4); + + machine.addTransition(s1, XsdSchemaToken::Group, s2); + machine.addTransition(s1, XsdSchemaToken::All, s2); + machine.addTransition(s1, XsdSchemaToken::Choice, s2); + machine.addTransition(s1, XsdSchemaToken::Sequence, s2); + machine.addTransition(s1, XsdSchemaToken::Attribute, s3); + machine.addTransition(s1, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(s1, XsdSchemaToken::AnyAttribute, s4); + + machine.addTransition(s2, XsdSchemaToken::Attribute, s3); + machine.addTransition(s2, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(s2, XsdSchemaToken::AnyAttribute, s4); + + machine.addTransition(s3, XsdSchemaToken::Attribute, s3); + machine.addTransition(s3, XsdSchemaToken::AttributeGroup, s3); + machine.addTransition(s3, XsdSchemaToken::AnyAttribute, s4); + + QVector data1, data2, data3, data4, data5, data6; + + data1 << XsdSchemaToken::Annotation; + data2 << XsdSchemaToken::Annotation << XsdSchemaToken::Group; + data3 << XsdSchemaToken::Annotation << XsdSchemaToken::Group << XsdSchemaToken::Sequence; + data4 << XsdSchemaToken::Attribute << XsdSchemaToken::Attribute; + data5 << XsdSchemaToken::Attribute << XsdSchemaToken::Sequence; + data6 << XsdSchemaToken::Annotation << XsdSchemaToken::Annotation; + + QVERIFY(runTest(data1, machine) == true); + QVERIFY(runTest(data2, machine) == true); + QVERIFY(runTest(data3, machine) == false); + QVERIFY(runTest(data4, machine) == true); + QVERIFY(runTest(data5, machine) == false); + QVERIFY(runTest(data6, machine) == false); +} + +QTEST_MAIN(tst_XMLPatternsSchema) +#include "tst_xmlpatternsschema.moc" diff --git a/tests/auto/xmlpatternsschema/xmlpatternsschema.pro b/tests/auto/xmlpatternsschema/xmlpatternsschema.pro new file mode 100644 index 0000000..2ba869a --- /dev/null +++ b/tests/auto/xmlpatternsschema/xmlpatternsschema.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +SOURCES += tst_xmlpatternsschema.cpp \ + +include (../xmlpatterns.pri) + +INCLUDEPATH += $$QT_BUILD_TREE/include/QtXmlPatterns/private diff --git a/tests/auto/xmlpatternsschemats/.gitignore b/tests/auto/xmlpatternsschemats/.gitignore new file mode 100644 index 0000000..5fd11f8 --- /dev/null +++ b/tests/auto/xmlpatternsschemats/.gitignore @@ -0,0 +1,4 @@ +CandidateBaseline.xml +runTests +tst_xmlpatternsschemats +runTests diff --git a/tests/auto/xmlpatternsschemats/Baseline.xml b/tests/auto/xmlpatternsschemats/Baseline.xml new file mode 100644 index 0000000..9576538 --- /dev/null +++ b/tests/auto/xmlpatternsschemats/Baseline.xml @@ -0,0 +1,2 @@ + +

Patternist is an implementation written in C++ and with the Qt/KDE libraries. It is licensed under GNU LGPL and part of KDE, the K Desktop Environment.

XQuery
\ No newline at end of file diff --git a/tests/auto/xmlpatternsschemats/TESTSUITE/.gitignore b/tests/auto/xmlpatternsschemats/TESTSUITE/.gitignore new file mode 100644 index 0000000..35cb85e --- /dev/null +++ b/tests/auto/xmlpatternsschemats/TESTSUITE/.gitignore @@ -0,0 +1,3 @@ +testSuites.xml +xmlschema2006-11-06 +xmlschema2006-11-06-new diff --git a/tests/auto/xmlpatternsschemats/TESTSUITE/unifyCatalog.xsl b/tests/auto/xmlpatternsschemats/TESTSUITE/unifyCatalog.xsl new file mode 100644 index 0000000..325f626 --- /dev/null +++ b/tests/auto/xmlpatternsschemats/TESTSUITE/unifyCatalog.xsl @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh b/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh new file mode 100755 index 0000000..5d29b41 --- /dev/null +++ b/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh @@ -0,0 +1,60 @@ +#!/bin/bash +############################################################################# +## +## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +# This script updates the suite from W3C's server. +# +# NOTE: the files checked out CANNOT be added to Qt's +# repository at the moment, due to legal complications. + +DIRECTORY_NAME="xmlschema2006-11-06" +ARCHIVE_NAME="xsts-2007-06-20.tar.gz" + +rm -Rf $DIRECTORY_NAME + +wget http://www.w3.org/XML/2004/xml-schema-test-suite/xmlschema2006-11-06/$ARCHIVE_NAME +tar -xzf $ARCHIVE_NAME +rm $ARCHIVE_NAME + +CVSROOT=:pserver:anonymous@dev.w3.org:/sources/public cvs login +CVSROOT=:pserver:anonymous@dev.w3.org:/sources/public cvs checkout -d xmlschema2006-11-06-new XML/xml-schema-test-suite/2004-01-14/xmlschema2006-11-06 + +java net.sf.saxon.Transform -xsl:unifyCatalog.xsl $DIRECTORY_NAME/suite.xml > testSuites.xml diff --git a/tests/auto/xmlpatternsschemats/tst_xmlpatternsschemats.cpp b/tests/auto/xmlpatternsschemats/tst_xmlpatternsschemats.cpp new file mode 100644 index 0000000..d946fd0 --- /dev/null +++ b/tests/auto/xmlpatternsschemats/tst_xmlpatternsschemats.cpp @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#ifdef QTEST_XMLPATTERNS + +#include "tst_suitetest.h" + +/*! + \internal + \brief Test QXsdSchemaParser against W3C's XSD test suite. + */ +class tst_XmlPatternsSchemaTS : public tst_SuiteTest +{ + Q_OBJECT +public: + tst_XmlPatternsSchemaTS(); +protected: + virtual void catalogPath(QString &write) const; +}; + +tst_XmlPatternsSchemaTS::tst_XmlPatternsSchemaTS() + : tst_SuiteTest(tst_SuiteTest::XsdSuite) +{ +} + +void tst_XmlPatternsSchemaTS::catalogPath(QString &write) const +{ + write = QLatin1String("TESTSUITE/testSuites.xml"); +} + +QTEST_MAIN(tst_XmlPatternsSchemaTS) + +#include "tst_xmlpatternsschemats.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro b/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro new file mode 100644 index 0000000..f36211e --- /dev/null +++ b/tests/auto/xmlpatternsschemats/xmlpatternsschemats.pro @@ -0,0 +1,27 @@ +load(qttest_p4) +SOURCES += tst_xmlpatternsschemats.cpp \ + ../qxmlquery/TestFundament.cpp + +include (../xmlpatterns.pri) + +contains(QT_CONFIG,xmlpatterns) { +HEADERS += ../xmlpatternsxqts/tst_suitetest.h +SOURCES += ../xmlpatternsxqts/tst_suitetest.cpp +} + +PATTERNIST_SDK = QtXmlPatternsSDK +if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { + symbian: PATTERNIST_SDK = $${PATTERNIST_SDK} + else:win32: PATTERNIST_SDK = $${PATTERNIST_SDK}d + else: PATTERNIST_SDK = $${PATTERNIST_SDK}_debug +} + +LIBS += -l$$PATTERNIST_SDK + +QT += xml + +INCLUDEPATH += $$QT_SOURCE_TREE/tests/auto/xmlpatternssdk/ \ + $$QT_BUILD_TREE/include/QtXmlPatterns/private \ + $$QT_SOURCE_TREE/tests/auto/xmlpatternsxqts \ + ../xmlpatternsxqts \ + ../xmlpatternssdk diff --git a/tests/auto/xmlpatternssdk/ASTItem.cpp b/tests/auto/xmlpatternssdk/ASTItem.cpp new file mode 100644 index 0000000..c866d07 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ASTItem.cpp @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#include "ASTItem.h" + +using namespace QPatternistSDK; + +/** + * This is what the AST rendering is indented with. + */ +static const QLatin1String astIndent(" "); +// STATIC DATA + +ASTItem::ASTItem(ASTItem *p, + const QString &name, + const QString &details, + const QString &staticType, + const QString &reqType) : m_name(name), + m_details(details), + m_reqType(reqType), + m_staticType(staticType), + m_parent(p) +{ +} + +ASTItem::~ASTItem() +{ + qDeleteAll(m_children); +} + +QString ASTItem::toString() const +{ + /* The first ASTItem* is a virtual root node, so skip "this". */ + Q_ASSERT(m_children.count() == 1); + TreeItem *treeChild = m_children.first(); + Q_ASSERT(treeChild); + + ASTItem *astChild = static_cast(treeChild); + + return astChild->toString(QString()); +} + +QString ASTItem::toString(const QString &indent) const +{ + QString retval; + + retval += indent; + retval += m_name; + retval += QLatin1Char('('); + retval += m_details; + retval += QLatin1String(")\n"); + + const TreeItem::List::const_iterator end(m_children.constEnd()); + + for(TreeItem::List::const_iterator it(m_children.constBegin()); it != end; ++it) + { + TreeItem *treeChild = *it; /* Cast away the QPointer with its casting operator. */ + ASTItem *astChild = static_cast(treeChild); + + retval += astChild->toString(indent + astIndent); + } + + return retval; +} + +QVariant ASTItem::data(const Qt::ItemDataRole role, int column) const +{ + if(role != Qt::DisplayRole) + return QVariant(); + + switch(column) + { + case 0: + return m_name; + case 1: + return m_details; + case 2: + return m_staticType; + case 3: + return m_reqType; + default: + { + Q_ASSERT(false); + return QVariant(); + } + } +} + +int ASTItem::columnCount() const +{ + return 4; +} + +TreeItem::List ASTItem::children() const +{ + return m_children; +} + +void ASTItem::appendChild(TreeItem *item) +{ + m_children.append(item); +} + +TreeItem *ASTItem::child(const unsigned int rowP) const +{ + return m_children.value(rowP); +} + +unsigned int ASTItem::childCount() const +{ + return m_children.count(); +} + +TreeItem *ASTItem::parent() const +{ + return m_parent; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ASTItem.h b/tests/auto/xmlpatternssdk/ASTItem.h new file mode 100644 index 0000000..7c43212 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ASTItem.h @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ASTItem_H +#define PatternistSDK_ASTItem_H + +#include +#include + +#include "TreeItem.h" +#include "Global.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Is a node in a ASTItem tree; each ASTItem contains + * debug information about an QPatternist::Expression. + * + * ASTItem, by implementing TreeItem, leverages debug data about QPatternist::Expression + * instances into Qt's model/view framework. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT ASTItem : public TreeItem + { + public: + virtual ~ASTItem(); + ASTItem(ASTItem *parent, + const QString &name, + const QString &details = QString(), + const QString &staticType = QString(), + const QString &reqType = QString()); + + virtual void appendChild(TreeItem *item); + virtual TreeItem *child(const unsigned int row) const; + virtual unsigned int childCount() const; + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + virtual TreeItem::List children() const; + virtual TreeItem *parent() const; + int columnCount() const; + + /** + * Returns a string representation of this AST node, recursively including + * children. For example, the query 1 eq number() would result in the string: + * +@verbatim +ValueComparison(eq) + xs:integer(0) + FunctionCall(fn:number) + ContextItem +@endverbatim + */ + QString toString() const; + + private: + QString toString(const QString &indent) const; + + const QString m_name; + const QString m_details; + const QString m_reqType; + const QString m_staticType; + TreeItem::List m_children; + TreeItem *m_parent; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/DebugExpressionFactory.cpp b/tests/auto/xmlpatternssdk/DebugExpressionFactory.cpp new file mode 100644 index 0000000..9b307cf --- /dev/null +++ b/tests/auto/xmlpatternssdk/DebugExpressionFactory.cpp @@ -0,0 +1,264 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +#include "qfunctionfactorycollection_p.h" + +#include "ASTItem.h" +#include "ExpressionInfo.h" +#include "ExpressionNamer.h" +#include "Global.h" + +#include "DebugExpressionFactory.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +static const QPatternist::ExpressionVisitor::Ptr namer(new ExpressionNamer()); + +QStringList DebugExpressionFactory::availableFunctionSignatures() +{ + const QPatternist::FunctionFactory::Ptr factory(QPatternist::FunctionFactoryCollection::xpath20Factory(Global::namePool())); + const QPatternist::FunctionSignature::Hash signs(factory->functionSignatures()); + const QPatternist::FunctionSignature::Hash::const_iterator end(signs.constEnd()); + QPatternist::FunctionSignature::Hash::const_iterator it(signs.constBegin()); + QStringList retval; + + while(it != end) + { + retval << it.value()->displayName(Global::namePool()); + ++it; + } + + return retval; +} + +ASTItem *DebugExpressionFactory::buildASTTree(const QPatternist::Expression::Ptr &expr, + ASTItem *parent, + const QPatternist::SequenceType::Ptr &reqType) +{ + Q_ASSERT(expr); + const QPatternist::ExpressionVisitorResult::Ptr exprInfo(expr->accept(namer)); + Q_ASSERT(exprInfo); + const ExpressionInfo *const constExprInfo = static_cast(exprInfo.data()); + const QString name(constExprInfo->first); + const QString details(constExprInfo->second); + const QString rType(reqType ? reqType->displayName(Global::namePool()) : QLatin1String("Not specified")); + + /* ---------- Handle its staticType() -------- */ + const QPatternist::SequenceType::Ptr type(expr->staticType()); + QString seqType; + + if(type) + seqType = type->displayName(Global::namePool()); + else + seqType = QLatin1String("no type, null pointer returned"); + /* ------------------------------------------- */ + + ASTItem *const node = new ASTItem(parent, name, details, seqType, rType); + + /* ------------ Handle child nodes ----------- */ + const QPatternist::Expression::List children(expr->operands()); + QPatternist::Expression::List::const_iterator it(children.constBegin()); + const QPatternist::Expression::List::const_iterator end(children.constEnd()); + + const QPatternist::SequenceType::List reqTypes(expr->expectedOperandTypes()); + const QPatternist::SequenceType::List::const_iterator typeEnd(reqTypes.constEnd()); + QPatternist::SequenceType::List::const_iterator typeIt(reqTypes.constBegin()); + QPatternist::SequenceType::Ptr t; + + for(; it != end; ++it) + { + if(typeIt != typeEnd) + { + t = *typeIt; + ++typeIt; + } + + node->appendChild(buildASTTree(*it, node, t)); + } + /* ------------------------------------------- */ + + return node; +} + +QPatternist::Expression::Ptr +DebugExpressionFactory::createExpression(QIODevice *const expr, + const QPatternist::StaticContext::Ptr &context, + const QXmlQuery::QueryLanguage lang, + const QPatternist::SequenceType::Ptr &requiredType, + const QUrl &baseURI, + const QXmlName &initialTemplateName) +{ + /* Create the root node. */ + m_ast = new ASTItem(0, QString()); + + return ExpressionFactory::createExpression(expr, context, lang, requiredType, baseURI, initialTemplateName); +} + +void DebugExpressionFactory::processTreePass(const QPatternist::Expression::Ptr &expr, + const CompilationStage stage) +{ + ASTItem *newChild = 0; + + switch(stage) + { + case QueryBodyInitial: + { + newChild = new ASTItem(m_ast, QLatin1String("Initial Build")); + break; + } + case QueryBodyTypeCheck: + { + newChild = new ASTItem(m_ast, QLatin1String("Type Check")); + break; + } + case QueryBodyCompression: + { + newChild = new ASTItem(m_ast, QLatin1String("Compression")); + break; + } + case UserFunctionTypeCheck: + { + newChild = new ASTItem(m_ast, QLatin1String("User Function Type Check")); + break; + } + case UserFunctionCompression: + { + newChild = new ASTItem(m_ast, QLatin1String("User Function Compression")); + break; + } + case GlobalVariableTypeCheck: + { + newChild = new ASTItem(m_ast, QLatin1String("Global Variable Type Check")); + break; + } + } + + Q_ASSERT(newChild); + m_ast->appendChild(newChild); + newChild->appendChild(buildASTTree(expr, newChild, QPatternist::SequenceType::Ptr())); +} + +void DebugExpressionFactory::processTemplateRule(const Expression::Ptr &body, + const TemplatePattern::Ptr &pattern, + const QXmlName &mode, + const TemplateCompilationStage stage) +{ + const char * title; + + switch(stage) + { + case TemplateInitial: + { + title = "Initial Build"; + break; + } + case TemplateTypeCheck: + { + title = "Type Check"; + break; + } + case TemplateCompress: + { + title = "Compression"; + break; + } + } + + const QString modeName(Global::namePool()->displayName(mode)); + Q_ASSERT(title); + ASTItem *const newChild = new ASTItem(m_ast, QLatin1String("T-Rule ") + + QLatin1String(title) + + QLatin1String(" mode: ") + + modeName + + QLatin1String(" priority: ") + + QString::number(pattern->priority())); + m_ast->appendChild(newChild); + + newChild->appendChild(buildASTTree(pattern->matchPattern(), newChild, QPatternist::SequenceType::Ptr())); + newChild->appendChild(buildASTTree(body, newChild, QPatternist::SequenceType::Ptr())); +} + +void DebugExpressionFactory::processNamedTemplate(const QXmlName &name, + const Expression::Ptr &body, + const TemplateCompilationStage stage) +{ + const char * title; + + switch(stage) + { + case TemplateInitial: + { + title = "Named Template Initial Build"; + break; + } + case TemplateTypeCheck: + { + title = "Named Template Type Check"; + break; + } + case TemplateCompress: + { + title = "Named Template Compression"; + break; + } + } + + Q_ASSERT(title); + ASTItem *const newChild = new ASTItem(m_ast, QLatin1String(title) + + QLatin1String(": ") + + Global::namePool()->displayName(name)); + + m_ast->appendChild(newChild); + newChild->appendChild(buildASTTree(body, newChild, QPatternist::SequenceType::Ptr())); +} + +ASTItem *DebugExpressionFactory::astTree() const +{ + return m_ast; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/DebugExpressionFactory.h b/tests/auto/xmlpatternssdk/DebugExpressionFactory.h new file mode 100644 index 0000000..558f096 --- /dev/null +++ b/tests/auto/xmlpatternssdk/DebugExpressionFactory.h @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_DebugExpressionFactory_H +#define PatternistSDK_DebugExpressionFactory_H + +#include "Global.h" +#include "qexpressionfactory_p.h" +#include "qfunctionfactory_p.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class ASTItem; + + /** + * @short Is a QPatternist::ExpressionFactory, with the + * difference that it provides the hooks for building from a tree of + * debug data from the compiled expression. + * + * This tree can be retrieved via astTree(). The astTree() function + * returns the AST built the last time createExpression() was called. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT DebugExpressionFactory : public QPatternist::ExpressionFactory + { + public: + DebugExpressionFactory() : m_ast(0) + { + } + + typedef QExplicitlySharedDataPointer Ptr; + /** + * Identical to ExpressionFactory::createExpression() with the difference + * that it builds an ASTItem tree which can be accessed via astTree(). + */ + virtual QPatternist::Expression::Ptr createExpression(QIODevice *const expr, + const QPatternist::StaticContext::Ptr &context, + const QXmlQuery::QueryLanguage lang, + const QPatternist::SequenceType::Ptr &requiredType, + const QUrl &queryURI, + const QXmlName &initialTemplateName); + + /** + * @returns an ASTItem tree built for the last created expression, + * via createExpression(). + */ + virtual ASTItem *astTree() const; + + /** + * @returns a list containing string representations of all available + * functions in Patternist. Each QString in the returned QStringList + * is a function synopsis for human consumption. + */ + static QStringList availableFunctionSignatures(); + + protected: + /** + * Performs the ASTItem tree building. + */ + virtual void processTreePass(const QPatternist::Expression::Ptr &tree, + const CompilationStage stage); + + void processTemplateRule(const QPatternist::Expression::Ptr &body, + const QPatternist::TemplatePattern::Ptr &pattern, + const QXmlName &mode, + const TemplateCompilationStage stage); + + void processNamedTemplate(const QXmlName &name, + const QPatternist::Expression::Ptr &body, + const TemplateCompilationStage stage); + private: + static ASTItem *buildASTTree(const QPatternist::Expression::Ptr &expr, + ASTItem *const parent, + const QPatternist::SequenceType::Ptr &reqType); + ASTItem *m_ast; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ErrorHandler.cpp b/tests/auto/xmlpatternssdk/ErrorHandler.cpp new file mode 100644 index 0000000..e7b08dd --- /dev/null +++ b/tests/auto/xmlpatternssdk/ErrorHandler.cpp @@ -0,0 +1,166 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "ErrorHandler.h" + +using namespace QPatternistSDK; + +ErrorHandler *ErrorHandler::handler = 0; + +void qMessageHandler(QtMsgType type, const char *description) +{ + if(type == QtDebugMsg) + { + std::fprintf(stderr, "%s\n", description); + return; + } + + QtMsgType t; + + switch(type) + { + case QtWarningMsg: + { + t = QtWarningMsg; + break; + } + case QtCriticalMsg: + { + t = QtFatalMsg; + break; + } + case QtFatalMsg: + { + /* We can't swallow Q_ASSERTs, we need to fail the hard way here. + * But maybe not: when run from "patternistrunsingle" it could be an idea + * to actually try to record it(but nevertheless fail somehow) such + * that it gets reported. */ + std::fprintf(stderr, "Fatal error: %s\n", description); + t = QtFatalMsg; /* Dummy, to silence a bogus compiler warning. */ + return; + } + case QtDebugMsg: /* This enum is handled above in the if-clause. */ + /* Fallthrough. */ + default: + { + Q_ASSERT(false); + return; + } + } + + Q_ASSERT(ErrorHandler::handler); + /* This message is hacky. Ideally, we should do it the same way + * ReportContext::error() constructs messages, but this is just testing + * code. */ + ErrorHandler::handler->message(t, QLatin1String("

") + QPatternist::escape(QLatin1String(description)) + QLatin1String("

")); +} + +void ErrorHandler::installQtMessageHandler(ErrorHandler *const h) +{ + handler = h; + + if(h) + qInstallMsgHandler(qMessageHandler); + else + qInstallMsgHandler(0); +} + +void ErrorHandler::handleMessage(QtMsgType type, + const QString &description, + const QUrl &identifier, + const QSourceLocation &) +{ + /* Don't use pDebug() in this function, it results in infinite + * recursion. Talking from experience.. */ + + Message msg; + msg.setType(type); + msg.setIdentifier(identifier); + + /* Let's remove all the XHTML markup. */ + QBuffer buffer; + buffer.setData(description.toLatin1()); + buffer.open(QIODevice::ReadOnly); + + QXmlQuery query; + query.bindVariable(QLatin1String("desc"), &buffer); + query.setQuery(QLatin1String("string(doc($desc))")); + + QStringList result; + const bool success = query.evaluateTo(&result); + + if(!description.startsWith(QLatin1String("\"Test-suite harness error:"))) + { + const QString msg(QString::fromLatin1("Invalid description: %1").arg(description)); + QVERIFY2(success, qPrintable(msg)); + + if(!success) + QTextStream(stderr) << msg; + } + + + if(!result.isEmpty()) + msg.setDescription(result.first()); + + m_messages.append(msg); +} + +ErrorHandler::Message::List ErrorHandler::messages() const +{ + return m_messages; +} + +void ErrorHandler::reset() +{ + m_messages.clear(); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ErrorHandler.h b/tests/auto/xmlpatternssdk/ErrorHandler.h new file mode 100644 index 0000000..27395aa --- /dev/null +++ b/tests/auto/xmlpatternssdk/ErrorHandler.h @@ -0,0 +1,149 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ErrorHandler_H +#define PatternistSDK_ErrorHandler_H + +#include "Global.h" +#include "qabstractmessagehandler.h" + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +template class QList; + +namespace QPatternistSDK +{ + /** + * @short A MessageHandler which + * accumulates all its received ErrorHandler::Message instances + * in a list, retrievable via messages(). + * + * Thus, ErrorHandler does not report errors, but collects them + * and allows easy access to them. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT ErrorHandler : public QAbstractMessageHandler + { + public: + class Message + { + public: + typedef QList List; + + QString description() const + { + return m_description; + } + + void setDescription(const QString &desc) + { + m_description = desc; + } + + void setIdentifier(const QUrl &newId) + { + m_identifier = newId; + } + + QUrl identifier() const + { + return m_identifier; + } + + QtMsgType type() const + { + return m_type; + } + + void setType(const QtMsgType t) + { + m_type = t; + } + + private: + QUrl m_identifier; + QtMsgType m_type; + QString m_description; + }; + + /** + * Clears all accumulated errors. + */ + void reset(); + + Message::List messages() const; + + /** + * Calling this function causes all Qt's internal debug messages to be + * sent to @p handler. If @p handler is @c null, Qt's default message + * handler is re-installed. In other words, via an internal proxy function, + * it installs @p handler as Qt's message handler. + * + * If @p handler is heap allocated, it will be leaked. + * + * @see qInstallMsgHandler() + */ + static void installQtMessageHandler(ErrorHandler *const handler); + + static ErrorHandler *handler; + + protected: + virtual void handleMessage(QtMsgType type, + const QString &description, + const QUrl &identifier = QUrl(), + const QSourceLocation &sourceLocation = QSourceLocation()); + + private: + ErrorHandler::Message::List m_messages; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ErrorItem.cpp b/tests/auto/xmlpatternssdk/ErrorItem.cpp new file mode 100644 index 0000000..df5d266 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ErrorItem.cpp @@ -0,0 +1,142 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#include "qreportcontext_p.h" +#include "qcommonnamespaces_p.h" + +#include "ErrorItem.h" + +using namespace QPatternistSDK; + +QString ErrorItem::toString(const QtMsgType type) +{ + switch(type) + { + case QtWarningMsg: + return QLatin1String("Warning"); + case QtFatalMsg: + return QLatin1String("Error"); + default: + { + Q_ASSERT(false); + return QString(); + } + } +} + +ErrorItem::ErrorItem(const ErrorHandler::Message &error, + ErrorItem *p) : m_message(error), + m_parent(p) +{ +} + +ErrorItem::~ErrorItem() +{ + qDeleteAll(m_children); +} + +int ErrorItem::columnCount() const +{ + return 3; +} + +QVariant ErrorItem::data(const Qt::ItemDataRole role, int column) const +{ + if(role != Qt::DisplayRole) + return QVariant(); + + switch(column) + { + case 0: + return toString(m_message.type()); + case 1: + { + if(!m_message.type()) /* It's a warning, likely. */ + return QString(); + + QString ns; + const QString code(QPatternist::ReportContext::codeFromURI(m_message.identifier().toString(), ns)); + + if(ns == QPatternist::CommonNamespaces::XPERR) + return code; + else /* Do the full version. */ + return m_message.type(); + } + case 2: + return m_message.description(); + default: + { + Q_ASSERT(false); + return QVariant(); + } + } +} + +TreeItem::List ErrorItem::children() const +{ + return m_children; +} + +void ErrorItem::appendChild(TreeItem *item) +{ + m_children.append(item); +} + +TreeItem *ErrorItem::child(const unsigned int rowP) const +{ + return m_children.value(rowP); +} + +unsigned int ErrorItem::childCount() const +{ + return m_children.count(); +} + +TreeItem *ErrorItem::parent() const +{ + return m_parent; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ErrorItem.h b/tests/auto/xmlpatternssdk/ErrorItem.h new file mode 100644 index 0000000..b8ae05c --- /dev/null +++ b/tests/auto/xmlpatternssdk/ErrorItem.h @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ErrorItem_H +#define PatternistSDK_ErrorItem_H + +#include + +#include "ErrorHandler.h" +#include "Global.h" +#include "TreeItem.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Delegates a ErrorHandler::Message through the interface + * exposed by TreeItem, such that errors from DOM related code + * can be displayed/used in Qt's model/view framework. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT ErrorItem : public TreeItem + { + public: + ErrorItem(const ErrorHandler::Message &error, ErrorItem *parent); + virtual ~ErrorItem(); + + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + + virtual void appendChild(TreeItem *item); + virtual TreeItem *child(const unsigned int row) const; + virtual unsigned int childCount() const; + virtual TreeItem::List children() const; + virtual TreeItem *parent() const; + int columnCount() const; + + private: + static QString toString(const QtMsgType sev); + + const ErrorHandler::Message m_message; + ErrorItem * m_parent; + TreeItem::List m_children; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ExitCode.h b/tests/auto/xmlpatternssdk/ExitCode.h new file mode 100644 index 0000000..c284ac7 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ExitCode.h @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ExitCode_H +#define PatternistSDK_ExitCode_H + +#include "Global.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Houses program exit codes for PatternistSDK utilities. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT ExitCode + { + public: + /** + * Exit codes for programs part of PatternistSDK. The values for the enums are specified + * to make it easily understandable what number a symbol corresponds to. + */ + enum Code + { + Success = 0, + InvalidArgCount = 1, + InvalidArgs = 2, + + /** + * Used in @c patternistrunsuite + */ + InvalidCatalogFile = 3, + FileNotExists = 4, + OpenError = 5, + WriteError = 6, + + /** + * Used in the test program used for comparing files on the byte level. + */ + NotEqual = 7, + UnevenTestCount = 8, + InternalError = 9, + Regression = 10 + }; + + private: + /** + * This constructor is private and has no implementation, because this + * class is not supposed to be instantiated. + */ + inline ExitCode(); + + Q_DISABLE_COPY(ExitCode) + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ExpressionInfo.cpp b/tests/auto/xmlpatternssdk/ExpressionInfo.cpp new file mode 100644 index 0000000..92fc8e0 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ExpressionInfo.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "ExpressionInfo.h" + +using namespace QPatternistSDK; + +ExpressionInfo::ExpressionInfo(const QString &name, + const QString &details) : QPair(name, details) +{ +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/ExpressionInfo.h b/tests/auto/xmlpatternssdk/ExpressionInfo.h new file mode 100644 index 0000000..eb56d17 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ExpressionInfo.h @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ExpressionInfo_H +#define PatternistSDK_ExpressionInfo_H + +#include "Global.h" +#include "qexpressiondispatch_p.h" + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Houses debug information about an QPatternist::Expression instance. + * + * An Expression's name, typically its class name, can be retrieved + * via the member variable first, and additional data, for example its string + * value or operator, can be retrieved via the member variable second. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT ExpressionInfo : public QPatternist::ExpressionVisitorResult + , public QPair + { + public: + ExpressionInfo(const QString &name, const QString &details); + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ExpressionNamer.cpp b/tests/auto/xmlpatternssdk/ExpressionNamer.cpp new file mode 100644 index 0000000..045b77c --- /dev/null +++ b/tests/auto/xmlpatternssdk/ExpressionNamer.cpp @@ -0,0 +1,316 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qabstractfloat_p.h" +#include "qandexpression_p.h" +#include "qanyuri_p.h" +#include "qapplytemplate_p.h" +#include "qargumentreference_p.h" +#include "qarithmeticexpression_p.h" +#include "qatomicstring_p.h" +#include "qatomizer_p.h" +#include "qattributeconstructor_p.h" +#include "qattributenamevalidator_p.h" +#include "qaxisstep_p.h" +#include "qbase64binary_p.h" +#include "qboolean_p.h" +#include "qcardinalityverifier_p.h" +#include "qcastableas_p.h" +#include "qcastas_p.h" +#include "qcombinenodes_p.h" +#include "qcontextitem_p.h" +#include "qdate_p.h" +#include "qdecimal_p.h" +#include "qdynamiccontextstore_p.h" +#include "qelementconstructor_p.h" +#include "qemptysequence_p.h" +#include "qevaluationcache_p.h" +#include "qexpressionsequence_p.h" +#include "qexpressionvariablereference_p.h" +#include "qfirstitempredicate_p.h" +#include "qforclause_p.h" +#include "qfunctioncall_p.h" +#include "qgday_p.h" +#include "qgeneralcomparison_p.h" +#include "qgenericpredicate_p.h" +#include "qgmonthday_p.h" +#include "qgmonth_p.h" +#include "qgyearmonth_p.h" +#include "qgyear_p.h" +#include "qhexbinary_p.h" +#include "qifthenclause_p.h" +#include "qinstanceof_p.h" +#include "qinteger_p.h" +#include "qitem_p.h" +#include "qitemverifier_p.h" +#include "qliteral_p.h" +#include "qnamespaceconstructor_p.h" +#include "qncnameconstructor_p.h" +#include "qnodecomparison_p.h" +#include "qorexpression_p.h" +#include "qpath_p.h" +#include "qpositionalvariablereference_p.h" +#include "qqnameconstructor_p.h" +#include "qqnamevalue_p.h" +#include "qquantifiedexpression_p.h" +#include "qrangeexpression_p.h" +#include "qrangevariablereference_p.h" +#include "qschemadatetime_p.h" +#include "qschematime_p.h" +#include "qsimplecontentconstructor_p.h" +#include "qtreatas_p.h" +#include "qtruthpredicate_p.h" +#include "quntypedatomicconverter_p.h" +#include "quntypedatomic_p.h" +#include "quserfunctioncallsite_p.h" +#include "qvalidationerror_p.h" +#include "qvaluecomparison_p.h" + +#include "ExpressionInfo.h" +#include "Global.h" + +#include "ExpressionNamer.h" + +using namespace QPatternistSDK; + +/* Simple ones, they have no additional data. */ +#define implClass(cls) \ +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::cls *) const \ +{ \ + return QPatternist::ExpressionVisitorResult::Ptr \ + (new ExpressionInfo(QLatin1String(#cls), QString())); \ +} + +implClass(AndExpression) +implClass(ArgumentConverter) +implClass(Atomizer) +implClass(AttributeConstructor) +implClass(AttributeNameValidator) +implClass(CallTemplate) +implClass(CardinalityVerifier) +implClass(CollationChecker) +implClass(CommentConstructor) +implClass(ComputedNamespaceConstructor) +implClass(ContextItem) +implClass(CopyOf) +implClass(CurrentItemStore) +implClass(DocumentConstructor) +implClass(DynamicContextStore) +implClass(EBVExtractor) +implClass(ElementConstructor) +implClass(EmptySequence) +implClass(ExpressionSequence) +implClass(ExternalVariableReference) +implClass(FirstItemPredicate) +implClass(ForClause) +implClass(GenericPredicate) +implClass(IfThenClause) +implClass(ItemVerifier) +implClass(LetClause) +implClass(LiteralSequence) +implClass(NCNameConstructor) +implClass(NodeSortExpression) +implClass(OrderBy) +implClass(OrExpression) +implClass(ParentNodeAxis) +implClass(ProcessingInstructionConstructor) +implClass(QNameConstructor) +implClass(RangeExpression) +implClass(ReturnOrderBy) +implClass(SimpleContentConstructor) +implClass(StaticBaseURIStore) +implClass(StaticCompatibilityStore) +implClass(TemplateParameterReference) +implClass(TextNodeConstructor) +implClass(TreatAs) +implClass(TruthPredicate) +implClass(UnresolvedVariableReference) +implClass(UntypedAtomicConverter) +implClass(UserFunctionCallsite) +implClass(ValidationError) +#undef implClass + +/** Variable references. */ +#define implVarRef(name) \ +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::name *i) const \ +{ \ + return QPatternist::ExpressionVisitorResult::Ptr \ + (new ExpressionInfo(QLatin1String(#name), \ + QString(QLatin1String("Slot: %1")).arg(i->slot()))); \ +} +implVarRef(RangeVariableReference) +implVarRef(ArgumentReference) +implVarRef(ExpressionVariableReference) +implVarRef(PositionalVariableReference) +#undef implVarRef + +/* Type related classes which have a targetType() function. */ +#define implTypeClass(cls) \ +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::cls *i) const \ +{ \ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String(#cls), \ + i->targetType()->displayName(Global::namePool()))); \ +} + +implTypeClass(InstanceOf) +implTypeClass(CastableAs) +#undef implTypeClass + +/* Type related classes which have a targetType() function. */ +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::CastAs *i) const +{ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String("CastAs"), + i->targetSequenceType()->displayName(Global::namePool()))); +} + +/* Classes which represent operators. */ +#define implOPClass(cls, compClass) \ +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::cls *i) const \ +{ \ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String(#cls), \ + QPatternist::compClass::displayName(i->operatorID()))); \ +} + +implOPClass(ArithmeticExpression, AtomicMathematician) +implOPClass(NodeComparison, NodeComparison) +implOPClass(QuantifiedExpression, QuantifiedExpression) +implOPClass(CombineNodes, CombineNodes) +#undef implOPClass + +/* Classes which represent operators. */ +#define implCompClass(cls, type) \ +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::cls *i) const \ +{ \ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String(#cls), \ + QPatternist::AtomicComparator::displayName(i->operatorID(), \ + QPatternist::AtomicComparator::type))); \ +} + +implCompClass(GeneralComparison, AsGeneralComparison) +implCompClass(ValueComparison, AsValueComparison) +#undef implCompClass + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::FunctionCall *i) const +{ + return QPatternist::ExpressionVisitorResult::Ptr + (new ExpressionInfo(QLatin1String("FunctionCall"), + Global::namePool()->displayName(i->signature()->name()))); +} + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::Literal *i) const +{ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo( + i->item().type()->displayName(Global::namePool()), + i->item().stringValue())); +} + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::AxisStep *i) const +{ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String("AxisStep"), + QPatternist::AxisStep::axisName(i->axis()) + + QLatin1String("::") + + i->nodeTest()->displayName(Global::namePool()))); + +} + + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::EvaluationCache *i) const +{ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String("EvaluationCache"), + QLatin1String("Slot: ") + QString::number(i->slot()))); + +} + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::EvaluationCache *i) const +{ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String("EvaluationCache"), + QLatin1String("Slot: ") + QString::number(i->slot()))); + +} + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::NamespaceConstructor *i) const +{ + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String("NamespaceConstructor"), + Global::namePool()->stringForPrefix(i->namespaceBinding().prefix()) + + QLatin1Char('=') + + Global::namePool()->stringForNamespace(i->namespaceBinding().namespaceURI()))); + +} + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::Path *path) const +{ + + QPatternist::Path::Kind k = path->kind(); + QString type; + + switch(k) + { + case QPatternist::Path::XSLTForEach: + { + type = QLatin1String("XSLTForEach"); + break; + } + case QPatternist::Path::RegularPath: + { + type = QLatin1String("RegularPath"); + break; + } + case QPatternist::Path::ForApplyTemplate: + { + type = QLatin1String("ForApplyTemplate"); + break; + } + } + + return QPatternist::ExpressionVisitorResult::Ptr(new ExpressionInfo(QLatin1String("Path"), type)); +} + +QPatternist::ExpressionVisitorResult::Ptr ExpressionNamer::visit(const QPatternist::ApplyTemplate *path) const +{ + const QPatternist::TemplateMode::Ptr mode(path->mode()); + return QPatternist::ExpressionVisitorResult::Ptr + (new ExpressionInfo(QLatin1String("ApplyTemplate"), mode ? Global::namePool()->displayName(mode->name()) : QString::fromLatin1("#current"))); +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/ExpressionNamer.h b/tests/auto/xmlpatternssdk/ExpressionNamer.h new file mode 100644 index 0000000..6cdbed5 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ExpressionNamer.h @@ -0,0 +1,281 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ExpressionNamer_H +#define PatternistSDK_ExpressionNamer_H + +#include "Global.h" +#include "qexpressiondispatch_p.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Extracts debug information from a QPatternist::Expression tree. + * + * This data is the name of the AST node(typically the class name), + * and additional data such as the value, type of operator, and so forth. The result + * is returned(from visit()), is an ExpressionInfo instance. + * + * @see ExpressionInfo + * @see ASTItem + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT ExpressionNamer : public QPatternist::ExpressionVisitor + { + public: + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::AndExpression *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ApplyTemplate *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ArgumentReference *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ArithmeticExpression *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::Atomizer *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::AttributeConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::AttributeNameValidator *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CallTemplate *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CardinalityVerifier *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CastAs *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CastableAs *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CollationChecker *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CombineNodes *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ComputedNamespaceConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CommentConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ContextItem *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CopyOf *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::CurrentItemStore *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::DocumentConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::DynamicContextStore *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::EBVExtractor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ElementConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::EmptySequence *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ExpressionSequence *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ExpressionVariableReference *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ExternalVariableReference *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::EvaluationCache *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::EvaluationCache *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::FirstItemPredicate *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ForClause *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::FunctionCall *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::GeneralComparison *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::GenericPredicate *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::IfThenClause *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::InstanceOf *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ItemVerifier *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::LetClause *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::Literal *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::LiteralSequence *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::NCNameConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::NodeComparison *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::NodeSortExpression *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::OrderBy *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::OrExpression *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ParentNodeAxis *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::Path *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::PositionalVariableReference *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ProcessingInstructionConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::QNameConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::QuantifiedExpression *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::RangeExpression *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::RangeVariableReference *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ReturnOrderBy *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::SimpleContentConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::StaticBaseURIStore *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::StaticCompatibilityStore *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::AxisStep *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::TemplateParameterReference *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::TextNodeConstructor *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::TreatAs *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::TruthPredicate *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::UntypedAtomicConverter *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::UnresolvedVariableReference *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ArgumentConverter *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::UserFunctionCallsite *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ValidationError *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::ValueComparison *) const; + + virtual QPatternist::ExpressionVisitorResult::Ptr + visit(const QPatternist::NamespaceConstructor *) const; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ExternalSourceLoader.cpp b/tests/auto/xmlpatternssdk/ExternalSourceLoader.cpp new file mode 100644 index 0000000..929ad4e --- /dev/null +++ b/tests/auto/xmlpatternssdk/ExternalSourceLoader.cpp @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +#include "Global.h" + +#include "qcommonsequencetypes_p.h" +#include "qdebug_p.h" +#include "qatomicstring_p.h" + +#include "ExternalSourceLoader.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +ExternalSourceLoader::ExternalSourceLoader(const VariableMap &varMap, + const QPatternist::ResourceLoader::Ptr &r) : m_variableMap(varMap) + , m_resourceLoader(r) + , m_query(Global::namePoolAsPublic()) +{ + Q_ASSERT(m_resourceLoader); +} + +QPatternist::SequenceType::Ptr +ExternalSourceLoader::announceExternalVariable(const QXmlName name, + const QPatternist::SequenceType::Ptr &declaredType) +{ + pDebug() << "ExternalSourceLoader::announceExternalVariable()"; + Q_ASSERT(!name.isNull()); + Q_ASSERT(declaredType); + Q_UNUSED(declaredType); /* Needed when bulding in release mode. */ + + if(name.namespaceURI() == QPatternist::StandardNamespaces::empty) + { + const VariableValue variable(m_variableMap.value(Global::namePool()->stringForLocalName(name.localName()))); + + if(variable.first.isEmpty()) + return QPatternist::SequenceType::Ptr(); + else + { + /* If announceDocument() can't load a document for uriForVar, it will return + * null, which we will too, which is fine, since we can't supply a value for + * this variable then. */ + if(variable.second == Document) + return m_resourceLoader->announceDocument(variable.first, QPatternist::ResourceLoader::WillUse); + else if(variable.second == URI) + { + return QPatternist::CommonSequenceTypes::ExactlyOneString; + } + else + { + /* The type is Query, and we don't pre-load + * them. No particular reason, just not worth it. */ + return QPatternist::CommonSequenceTypes::ZeroOrMoreItems; + } + } + } + else + return QPatternist::SequenceType::Ptr(); +} + +QPatternist::Item +ExternalSourceLoader::evaluateSingleton(const QXmlName name, + const QPatternist::DynamicContext::Ptr &context) +{ + Q_ASSERT(!name.isNull()); + const VariableValue variable(m_variableMap.value(Global::namePool()->stringForLocalName(name.localName()))); + + if(variable.second == Document) + { + Q_ASSERT_X(QFile::exists(variable.first.toLocalFile()), Q_FUNC_INFO, + qPrintable(QString::fromLatin1("The file %1 doesn't exist").arg(variable.first.toLocalFile()))); + Q_ASSERT_X(m_resourceLoader->openDocument(variable.first, context), Q_FUNC_INFO, + "We're supposed to have the value. If not, an error should have been issued at query compile time."); + + return m_resourceLoader->openDocument(variable.first, context); + } + else if(variable.second == Query) + { + /* Well, here we open the file and execute it. */ + m_query.setQuery(QUrl::fromLocalFile(variable.first.toLocalFile())); + Q_ASSERT(m_query.isValid()); + + QXmlResultItems result; + m_query.evaluateTo(&result); + + return QPatternist::Item::fromPublic(result.next()); + } + else + { + Q_ASSERT(variable.second == URI); + return QPatternist::AtomicString::fromValue(variable.first.toString()); + } +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/ExternalSourceLoader.h b/tests/auto/xmlpatternssdk/ExternalSourceLoader.h new file mode 100644 index 0000000..09da363 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ExternalSourceLoader.h @@ -0,0 +1,137 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ExternalSourceLoader_H +#define PatternistSDK_ExternalSourceLoader_H + +#include +#include +#include + +#include "qdynamiccontext_p.h" +#include "qresourceloader_p.h" +#include "qexternalvariableloader_p.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Handles external variables in XQTS queries, such as $input-context, + * by loading appropriate XML source files. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT ExternalSourceLoader : public QPatternist::ExternalVariableLoader + { + public: + enum TargetOfURI + { + /** + * Identifies @c input-file. + */ + Document, + + /** + * Identifies @c input-URI. + */ + URI, + + /** + * Identifies @c input-query. + */ + Query + }; + + /** + * The first is the complete, absolute, final URI to the file to be loaded, + * and the second is the type of source found at that URI. + */ + typedef QPair VariableValue; + + /** + * In the XQTSCatalog.xml each source file in each test is referred to + * by a key, which can be fully looked up in the @c sources element. This QHash + * maps the keys to absolute URIs pointing to the source file. + */ + typedef QHash SourceMap; + + /** + * The first value is the variable name, and the second is the URI identifying + * the XML source file that's supposed to be loaded as a document. + * + * This is one for every test case, except for @c rdb-queries-results-q5, + * @c rdb-queries-results-q17 and @c rdb-queries-results-q18(at least in XQTS 1.0). + */ + typedef QHash VariableMap; + + ExternalSourceLoader(const VariableMap &varMap, + const QPatternist::ResourceLoader::Ptr &resourceLoader); + + virtual QPatternist::SequenceType::Ptr + announceExternalVariable(const QXmlName name, + const QPatternist::SequenceType::Ptr &declaredType); + + virtual QPatternist::Item + evaluateSingleton(const QXmlName name, + const QPatternist::DynamicContext::Ptr &context); + + VariableMap variableMap() const + { + return m_variableMap; + } + + private: + const VariableMap m_variableMap; + const QPatternist::ResourceLoader::Ptr m_resourceLoader; + QXmlQuery m_query; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/Global.cpp b/tests/auto/xmlpatternssdk/Global.cpp new file mode 100644 index 0000000..a1c31ed --- /dev/null +++ b/tests/auto/xmlpatternssdk/Global.cpp @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "Global.h" + +using namespace QPatternistSDK; + +const QString Global::xqtsCatalogNS (QLatin1String("http://www.w3.org/2005/02/query-test-XQTSCatalog")); +const QString Global::xqtsResultNS (QLatin1String("http://www.w3.org/2005/02/query-test-XQTSResult")); +const QString Global::xsltsCatalogNS (QLatin1String("http://www.w3.org/2005/05/xslt20-test-catalog")); +const QString Global::organizationName (QLatin1String("Patternist Team")); +const qint16 Global::versionNumber (0x01); + +static QXmlNamePool s_namePool; + +QPatternist::NamePool::Ptr Global::namePool() +{ + return s_namePool.d; +} + +QXmlNamePool Global::namePoolAsPublic() +{ + return s_namePool; +} + +bool Global::readBoolean(const QString &value) +{ + const QString normd(value.simplified()); + + if(normd == QLatin1String("true") || + normd == QLatin1String("1")) + return true; + else if(normd.isEmpty() || + normd == QLatin1String("false") || + normd == QLatin1String("0")) + return false; + + Q_ASSERT_X(false, Q_FUNC_INFO, + "The lexical representation of xs:boolean was invalid"); + return false; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/Global.h b/tests/auto/xmlpatternssdk/Global.h new file mode 100644 index 0000000..30c0edf --- /dev/null +++ b/tests/auto/xmlpatternssdk/Global.h @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_Global_H +#define PatternistSDK_Global_H + +#include + +#include "private/qitem_p.h" +#include "private/qnamepool_p.h" + +#if defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) +# ifdef Q_PATTERNISTSDK_BUILDING + #define Q_PATTERNISTSDK_EXPORT __declspec(dllexport) + #else + #define Q_PATTERNISTSDK_EXPORT __declspec(dllimport) + #endif +#else + #define Q_PATTERNISTSDK_EXPORT +#endif + +/** + * @short Contains testing utilities for Patternist, interfacing W3C's XQuery Test Suite. + * + * @see
XML Query Test Suite + * @author Frans Englich + */ +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Contains global constants. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT Global + { + public: + + /** + * The namespace which the XQTS test case catalog(specified by Catalog.xsd) + * is in. The namespace is: http://www.w3.org/2005/02/query-test-XQTSCatalog + */ + static const QString xqtsCatalogNS; + + /** + * The namespace which the XQTS test results collection(specified by XQTSResult.xsd) + * is in. The namespace is: http://www.w3.org/2005/02/query-test-XQTSResult + */ + static const QString xqtsResultNS; + + /** + * The organization which created PatternistSDK. It say something + * in the direction of "Patternist Team", and is used for QSettings and the like. + */ + static const QString organizationName; + + /** + * The namespace which W3C's XSL-T test suite resides in. + */ + static const QString xsltsCatalogNS; + + /** + * The version of PatternistSDK. The value has currently no other + * meaning than that larger means older. This version information is supplied to + * QMainWindow::restoreState() and QMainWindow::saveState(). + */ + static const qint16 versionNumber; + + /** + * Parses the lexical space of @c xs:boolean, + * with the exception that the empty string is considered @c false. + */ + static bool readBoolean(const QString &lexicalSpace); + + static QPatternist::NamePool::Ptr namePool(); + static QXmlNamePool namePoolAsPublic(); + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ResultThreader.cpp b/tests/auto/xmlpatternssdk/ResultThreader.cpp new file mode 100644 index 0000000..2758906 --- /dev/null +++ b/tests/auto/xmlpatternssdk/ResultThreader.cpp @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "ResultThreader.h" + +using namespace QPatternistSDK; + +ResultThreader::ResultThreader(QEventLoop &ev, + QFile *file, + const Type t, + QObject *p) : QThread(p) + , m_file(file) + , m_type(t) + , m_eventLoop(ev) +{ + Q_ASSERT_X(p, Q_FUNC_INFO, "Should have a parent"); + Q_ASSERT_X(file, Q_FUNC_INFO, "Should have a valid file"); + Q_ASSERT(m_type == Baseline || m_type == Result); +} + +void ResultThreader::run() +{ + QXmlSimpleReader reader; + reader.setContentHandler(this); + + QXmlInputSource source(m_file); + reader.parse(source); + m_file->close(); +} + +ResultThreader::Type ResultThreader::type() const +{ + return m_type; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/ResultThreader.h b/tests/auto/xmlpatternssdk/ResultThreader.h new file mode 100644 index 0000000..53ec70c --- /dev/null +++ b/tests/auto/xmlpatternssdk/ResultThreader.h @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_ResultThreader_H +#define PatternistSDK_ResultThreader_H + +#include +#include +#include + +#include "TestResultHandler.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QEventLoop; + +namespace QPatternistSDK +{ + /** + * @short Reads XML in the @c XQTSResult.xsd format, as a thread, allowing + * multiple parses to be done simultaneously. + * + * @author Frans Englich + * @ingroup PatternistSDK + */ + class Q_PATTERNISTSDK_EXPORT ResultThreader : public QThread + , public TestResultHandler + { + public: + enum Type + { + Baseline = 1, + Result + }; + + /** + * Creates a ResultThreader that will read @p file when run() is called. + */ + ResultThreader(QEventLoop &ev, + QFile *file, + const Type type, + QObject *parent); + + /** + * Parses the file passed in this class's constructor with this ResultHandlerTH::Item::LisT + * as the QXmlContentHandler, and returns. + */ + virtual void run(); + + /** + * @note Do not reimplement this function. + * @returns whether this ResultThreader handles the baseline or the result. + */ + Type type() const; + + private: + Q_DISABLE_COPY(ResultThreader) + + QFile *const m_file; + const Type m_type; + QEventLoop & m_eventLoop; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestBaseLine.cpp b/tests/auto/xmlpatternssdk/TestBaseLine.cpp new file mode 100644 index 0000000..c54fad3 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestBaseLine.cpp @@ -0,0 +1,511 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qdebug_p.h" +#include "XMLWriter.h" + +#include "TestBaseLine.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +Q_GLOBAL_STATIC_WITH_ARGS(QRegExp, errorRegExp, (QLatin1String("[A-Z]{4}[0-9]{4}"))) + +TestBaseLine::TestBaseLine(const Type t) : m_type(t) +{ + Q_ASSERT(errorRegExp()->isValid()); +} + +TestResult::Status TestBaseLine::scan(const QString &serialized, + const TestBaseLine::List &lines) +{ + Q_ASSERT_X(lines.count() >= 1, Q_FUNC_INFO, + "At least one base line must be passed, otherwise there's nothing " + "to compare to."); + + const TestBaseLine::List::const_iterator end(lines.constEnd()); + TestBaseLine::List::const_iterator it(lines.constBegin()); + for(; it != end; ++it) + { + const TestResult::Status retval((*it)->verify(serialized)); + + if(retval == TestResult::Pass || retval == TestResult::NotTested) + return retval; + } + + return TestResult::Fail; +} + +TestResult::Status TestBaseLine::scanErrors(const ErrorHandler::Message::List &errors, + const TestBaseLine::List &lines) +{ + pDebug() << "TestBaseLine::scanErrors()"; + + /* 1. Find the first error in @p errors that's a Patternist + * error(not warning and not from Qt) and extract the error code. */ + QString errorCode; + + const ErrorHandler::Message::List::const_iterator end(errors.constEnd()); + ErrorHandler::Message::List::const_iterator it(errors.constBegin()); + for(; it != end; ++it) + { + if((*it).type() != QtFatalMsg) + continue; + + errorCode = QUrl((*it).identifier()).fragment(); + + pDebug() << "ERR:" << (*it).description(); + /* This is hackish. We have no way of determining whether a Message + * is actually issued from Patternist, so we try to narrow it down like this. */ + if(errorRegExp()->exactMatch(errorCode)) + break; /* It's an error code. */ + else + errorCode.clear(); + } + + pDebug() << "Got error code: " << errorCode; + /* 2. Loop through @p lines, and for the first base line + * which is of type ExpectedError and which matches @p errorCode + * return Pass, otherwise Fail. */ + const TestBaseLine::List::const_iterator blend(lines.constEnd()); + TestBaseLine::List::const_iterator blit(lines.constBegin()); + for(; blit != blend; ++blit) + { + const Type t = (*blit)->type(); + + if(t == TestBaseLine::ExpectedError) + { + const QString d((*blit)->details()); + if(d == errorCode || d == QChar::fromLatin1('*')) + return TestResult::Pass; + } + } + + return TestResult::Fail; +} + +void TestBaseLine::toXML(XMLWriter &receiver) const +{ + switch(m_type) + { + case XML: /* Fallthrough. */ + case Fragment: /* Fallthrough. */ + case SchemaIsValid: /* Fallthrough. */ + case Text: + { + QXmlAttributes inspectAtts; + inspectAtts.append(QLatin1String("role"), QString(), + QLatin1String("role"), QLatin1String("principal")); + inspectAtts.append(QLatin1String("compare"), QString(), + QLatin1String("compare"), displayName(m_type)); + receiver.startElement(QLatin1String("output-file"), inspectAtts); + receiver.characters(m_details); + receiver.endElement(QLatin1String("output-file")); + return; + } + case Ignore: + { + Q_ASSERT_X(false, Q_FUNC_INFO, "Serializing 'Ignore' is not implemented."); + return; + } + case Inspect: + { + QXmlAttributes inspectAtts; + inspectAtts.append(QLatin1String("role"), QString(), + QLatin1String("role"), QLatin1String("principal")); + inspectAtts.append(QLatin1String("compare"), QString(), + QLatin1String("compare"), QLatin1String("Inspect")); + receiver.startElement(QLatin1String("output-file"), inspectAtts); + receiver.characters(m_details); + receiver.endElement(QLatin1String("output-file")); + return; + } + case ExpectedError: + { + receiver.startElement(QLatin1String("expected-error")); + receiver.characters(m_details); + receiver.endElement(QLatin1String("expected-error")); + return; + } + } +} + +bool TestBaseLine::isChildrenDeepEqual(const QDomNodeList &cl1, const QDomNodeList &cl2) +{ + const unsigned int len = cl1.length(); + + if(len == cl2.length()) + { + for(unsigned int i = 0; i < len; ++i) + { + if(!isDeepEqual(cl1.at(i), cl2.at(i))) + return false; + } + + return true; + } + else + return false; +} + +bool TestBaseLine::isAttributesEqual(const QDomNamedNodeMap &cl1, const QDomNamedNodeMap &cl2) +{ + const unsigned int len = cl1.length(); + pDebug() << "LEN:" << len; + + if(len == cl2.length()) + { + for(unsigned int i1 = 0; i1 < len; ++i1) + { + const QDomNode attr1(cl1.item(i1)); + Q_ASSERT(!attr1.isNull()); + + /* This is set if attr1 cannot be found at all in cl2. */ + bool earlyExit = false; + + for(unsigned int i2 = 0; i2 < len; ++i2) + { + const QDomNode attr2(cl2.item(i2)); + Q_ASSERT(!attr2.isNull()); + pDebug() << "ATTR1:" << attr1.localName() << attr1.namespaceURI() << attr1.prefix() << attr1.nodeName(); + pDebug() << "ATTR2:" << attr2.localName() << attr2.namespaceURI() << attr2.prefix() << attr2.nodeName(); + + if(attr1.localName() == attr2.localName() && + attr1.namespaceURI() == attr2.namespaceURI() && + attr1.prefix() == attr2.prefix() && + attr1.nodeName() == attr2.nodeName() && /* Yes, needed in addition to all the other. */ + attr1.nodeValue() == attr2.nodeValue()) + { + earlyExit = true; + break; + } + } + + if(!earlyExit) + { + /* An attribute was found that doesn't exist in the other list so exit. */ + return false; + } + } + + return true; + } + else + return false; +} + +bool TestBaseLine::isDeepEqual(const QDomNode &n1, const QDomNode &n2) +{ + if(n1.nodeType() != n2.nodeType()) + return false; + + switch(n1.nodeType()) + { + case QDomNode::CommentNode: + /* Fallthrough. */ + case QDomNode::TextNode: + { + return static_cast(n1).data() == + static_cast(n2).data(); + } + case QDomNode::ProcessingInstructionNode: + { + return n1.nodeName() == n2.nodeName() && + n1.nodeValue() == n2.nodeValue(); + } + case QDomNode::DocumentNode: + return isChildrenDeepEqual(n1.childNodes(), n2.childNodes()); + case QDomNode::ElementNode: + { + return n1.localName() == n2.localName() && + n1.namespaceURI() == n2.namespaceURI() && + n1.nodeName() == n2.nodeName() && /* Yes, this one is needed in addition to localName(). */ + isAttributesEqual(n1.attributes(), n2.attributes()) && + isChildrenDeepEqual(n1.childNodes(), n2.childNodes()); + } + /* Fallthrough all these. */ + case QDomNode::EntityReferenceNode: + case QDomNode::CDATASectionNode: + case QDomNode::EntityNode: + case QDomNode::DocumentTypeNode: + case QDomNode::DocumentFragmentNode: + case QDomNode::NotationNode: + case QDomNode::BaseNode: + case QDomNode::CharacterDataNode: + { + Q_ASSERT_X(false, Q_FUNC_INFO, + "An unsupported node type was encountered."); + return false; + } + case QDomNode::AttributeNode: + { + Q_ASSERT_X(false, Q_FUNC_INFO, + "This should never happen. QDom doesn't allow us to compare DOM attributes " + "properly."); + return false; + } + default: + { + Q_ASSERT_X(false, Q_FUNC_INFO, "Unhandled QDom::NodeType value."); + return false; + } + } +} + +TestResult::Status TestBaseLine::verify(const QString &serializedInput) const +{ + switch(m_type) + { + case SchemaIsValid: + /* Fall through. */ + case Text: + { + if(serializedInput == details()) + return TestResult::Pass; + else + return TestResult::Fail; + } + case Fragment: + /* Fall through. */ + case XML: + { + /* Read the baseline and the serialized input into two QDomDocuments, and compare + * them deeply. We wrap fragments in a root node such that it is well-formed XML. + */ + + QDomDocument output; + { + /* The reason we put things into a QByteArray and then parse it through QXmlSimpleReader, is that + * QDomDocument does whitespace stripping when calling setContent(QString). In other words, + * this workarounds a bug. */ + + QXmlInputSource source; + source.setData((m_type == XML ? serializedInput : QLatin1String("") + + serializedInput + + QLatin1String("")).toUtf8()); + + QString outputReadingError; + + QXmlSimpleReader reader; + reader.setFeature(QLatin1String("http://xml.org/sax/features/namespace-prefixes"), true); + + const bool success = output.setContent(&source, + &reader, + &outputReadingError); + + if(!success) + return TestResult::Fail; + + Q_ASSERT(success); + } + + QDomDocument baseline; + { + QXmlInputSource source; + source.setData((m_type == XML ? details() : QLatin1String("") + + details() + + QLatin1String("")).toUtf8()); + QString baselineReadingError; + + QXmlSimpleReader reader; + reader.setFeature(QLatin1String("http://xml.org/sax/features/namespace-prefixes"), true); + + const bool success = baseline.setContent(&source, + &reader, + &baselineReadingError); + + if(!success) + return TestResult::Fail; + + /* This piece of code workaround a bug in QDom, which treats XML prologs as processing + * instructions and make them available in the tree as so. */ + if(m_type == XML) + { + /* $doc/r/node() */ + const QDomNodeList children(baseline.childNodes()); + const int len = children.length(); + + for(int i = 0; i < len; ++i) + { + const QDomNode &child = children.at(i); + if(child.isProcessingInstruction() && child.nodeName() == QLatin1String("xml")) + { + baseline.removeChild(child); + break; + } + } + } + + Q_ASSERT_X(baselineReadingError.isNull(), Q_FUNC_INFO, + qPrintable((QLatin1String("Reading the baseline failed: ") + baselineReadingError))); + } + + if(isDeepEqual(output, baseline)) + return TestResult::Pass; + else + { + pDebug() << "FAILURE:" << output.toString() << "is NOT IDENTICAL to(baseline):" << baseline.toString(); + return TestResult::Fail; + } + } + case Ignore: + return TestResult::Pass; + case Inspect: + return TestResult::NotTested; + case ExpectedError: + { + /* This function is only called for Text/XML/Fragment tests. */ + return TestResult::Fail; + } + } + Q_ASSERT(false); + return TestResult::Fail; +} + +TestBaseLine::Type TestBaseLine::identifierFromString(const QString &string) +{ + /* "html-output: Using an ad hoc tool, it must assert that the document obeys the HTML + * Output Method as defined in the Serialization specification and section + * 20 of the XSLT 2.0 specification." We treat it as XML for now, same with + * xhtml-output. */ + if(string.compare(QLatin1String("XML"), Qt::CaseInsensitive) == 0 || + string == QLatin1String("html-output") || + string == QLatin1String("xml-output") || + string == QLatin1String("xhtml-output")) + return XML; + else if(string == QLatin1String("Fragment") || string == QLatin1String("xml-frag")) + return Fragment; + else if(string.compare(QLatin1String("Text"), Qt::CaseInsensitive) == 0) + return Text; + else if(string == QLatin1String("Ignore")) + return Ignore; + else if(string.compare(QLatin1String("Inspect"), Qt::CaseInsensitive) == 0) + return Inspect; + else + { + Q_ASSERT_X(false, Q_FUNC_INFO, + qPrintable(QString::fromLatin1("Invalid string representation for a comparation type: %1").arg(string))); + + return Ignore; /* Silence GCC. */ + } +} + +QString TestBaseLine::displayName(const Type id) +{ + switch(id) + { + case XML: + return QLatin1String("XML"); + case Fragment: + return QLatin1String("Fragment"); + case Text: + return QLatin1String("Text"); + case Ignore: + return QLatin1String("Ignore"); + case Inspect: + return QLatin1String("Inspect"); + case ExpectedError: + return QLatin1String("ExpectedError"); + case SchemaIsValid: + return QLatin1String("SchemaIsValid"); + } + + Q_ASSERT(false); + return QString(); +} + +QString TestBaseLine::details() const +{ + if(m_type == Ignore) /* We're an error code. */ + return QString(); + if(m_type == ExpectedError) /* We're an error code. */ + return m_details; + if(m_type == SchemaIsValid) /* We're a schema validation information . */ + return m_details; + + if(m_details.isEmpty()) + return m_details; + + /* m_details is a file name, we open it and return the result. */ + QFile file(QUrl(m_details).toLocalFile()); + + QString retval; + if(!file.exists()) + retval = QString::fromLatin1("%1 does not exist.").arg(file.fileName()); + else if(!QFileInfo(file.fileName()).isFile()) + retval = QString::fromLatin1("%1 is not a file, cannot display it.").arg(file.fileName()); + else if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) + retval = QString::fromLatin1("Could not open %1. Likely a permission error.").arg(file.fileName()); + + if(retval.isNull()) + { + /* Scary, we assume the query/baseline is in UTF-8. */ + return QString::fromUtf8(file.readAll()); + } + else + { + /* We had a file error. */ + retval.prepend(QLatin1String("Test-suite harness error: ")); + qCritical() << retval; + return retval; + } +} + +TestBaseLine::Type TestBaseLine::type() const +{ + return m_type; +} + +void TestBaseLine::setDetails(const QString &detailsP) +{ + m_details = detailsP; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestBaseLine.h b/tests/auto/xmlpatternssdk/TestBaseLine.h new file mode 100644 index 0000000..b48ab49 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestBaseLine.h @@ -0,0 +1,212 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestBaseLine_H +#define PatternistSDK_TestBaseLine_H + +#include + +#include "Global.h" +#include "TestResult.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QDomNamedNodeMap; +class QDomNode; +class QDomNodeList; +template class QList; + +namespace QPatternistSDK +{ + /** + * @short Represents an expected test result for a test case. + * + * TestBaseLine represents a valid outcome for a test case, + * the "base line". A XQTS test case can have many different valid + * base lines, and one TestBaseLine instance represents on of them. + * + * Of highest interest, TestBaseLine have the function scan() and + * scanErrors(), which allows serialized output to be + * compared to the base line. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestBaseLine + { + public: + typedef QList List; + + /** + * Identifies what kind of comparator to use. The documentation + * for each enumerator is copied from + * Guidelines + * for Running the XML Query Test Suite + */ + enum Type + { + /** + * The test harness must canonicalize both, the actual result + * and the expected result according to the "Canonical XML" recommendation [2], + * which refers to a number of open-source implementations. Byte-comparison can + * then be applied to the resulting XML documents. If the test harness does + * this process in a different manner, it must be documented. + */ + XML, + + /** + * For XML fragments, the same root node must be created for both, + * implementation result and test suite result. The resulting XML + * can be compared using XML comparison. + */ + Fragment, + + /** + * Text (that has been produced by XML serialization) is compared + * using byte-comparison. + */ + Text, + + /** + * No comparison needs to be applied; the result is always @c true if + * the implementation successfully executes the test case. + */ + Ignore, + + /** + * A human is required to make the call about correctness of the result + * according to the description in the test case. + */ + Inspect, + + /** + * The expected result of the test case is an error, identified as an + * eight-character error code (e.g., XPST0003). The result of a test is + * @c true, if the implementation raises an error. However, raising an error + * because an implementation does not support the feature is not + * considered a correct result. + */ + ExpectedError, + + /** + * A special comparison for the schema validation tests. The details + * can only be 'true' or 'false' depending on whether it is a valid + * schema or not. + */ + SchemaIsValid + }; + + /** + * Takes a string identifying a comparator either in the XSL-T or the + * XQuery test suite, and returns an enum value for it. + * + * If the value is unknown, the code asserts. + */ + static Type identifierFromString(const QString &string); + + /** + * @returns a display name for @p id. For example, if Inspect was passed, "Inspect" + * would be returned. + */ + static QString displayName(const Type id); + + /** + * Compares @p items(typically the result of an evaluation) against + * the base lines @p lines. + * + * @returns the status of the first base line which passes, + * otherwise TestResult::Fail. + */ + static TestResult::Status scan(const QString &serialized, + const TestBaseLine::List &lines); + + static TestResult::Status scanErrors(const ErrorHandler::Message::List &errors, + const TestBaseLine::List &lines); + + /** + * Constructs a TestBaseLine of type @p type. + */ + TestBaseLine(const Type type); + + /** + * What @p details contains depends on the type(). If the type() is ExpectedError, + * @p details contains the relevant error code. If the type() is one which compares + * result against a base line, it is a filename locating the baseline. + */ + void setDetails(const QString &details); + + Type type() const; + + QString details() const; + + void toXML(XMLWriter &receiver) const; + + protected: + TestResult::Status verify(const QString &serializedInput) const; + + private: + static bool isDeepEqual(const QDomNode &n1, const QDomNode &n2); + + /** + * @returns @c true if the nodes in @p cl1 are equal to @p cl2, by calling isDeepEqual() + * for each pair. + */ + static bool isChildrenDeepEqual(const QDomNodeList &cl1, const QDomNodeList &cl2); + + /** + * Considers @p cl1 and @p cl2 to be lists containing attributes. The list are equal + * if they contain attributes by same value and name, but regardless of order. + */ + static bool isAttributesEqual(const QDomNamedNodeMap &cl1, const QDomNamedNodeMap &cl2); + const Type m_type; + QString m_details; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestCase.cpp b/tests/auto/xmlpatternssdk/TestCase.cpp new file mode 100644 index 0000000..49656ac --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestCase.cpp @@ -0,0 +1,439 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include "DebugExpressionFactory.h" +#include "ExternalSourceLoader.h" +#include "Global.h" +#include "TestSuite.h" +#include "XMLWriter.h" + +#include "TestCase.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +// STATIC DATA +static const DebugExpressionFactory::Ptr s_exprFact(new DebugExpressionFactory()); + +TestCase::TestCase() : m_result(0) +{ +} + +TestCase::~TestCase() +{ + delete m_result; +} + +TestResult::List TestCase::execute(const ExecutionStage stage, + TestSuite *) +{ + if(name() == QLatin1String("Constr-cont-document-3")) + { + TestResult::List result; + result.append(createTestResult(TestResult::Fail, QLatin1String("Skipped this test, because we loop infinitely on it."))); + return result; + } + else if(name() == QLatin1String("Axes089")) + { + TestResult::List result; + result.append(createTestResult(TestResult::Fail, QLatin1String("Skipped this test, we crash on it."))); + return result; + } + + qDebug() << "Running test case: " << name(); + + return execute(stage); + + Q_ASSERT(false); + return TestResult::List(); +} + +TestResult *TestCase::createTestResult(const TestResult::Status status, + const QString &comment) const +{ + TestResult *const result = new TestResult(name(), + status, + 0 /* We don't have an AST. */, + ErrorHandler::Message::List(), + QPatternist::Item::List(), + QString()); + result->setComment(comment); + return result; +} + +TestResult::List TestCase::execute(const ExecutionStage stage) +{ + ErrorHandler errHandler; + ErrorHandler::installQtMessageHandler(&errHandler); + + pDebug() << "TestCase::execute()"; + delete m_result; + + QXmlQuery query(language(), Global::namePoolAsPublic()); + + query.d->setExpressionFactory(s_exprFact); + query.setInitialTemplateName(initialTemplateName()); + + QXmlQuery openDoc(query.namePool()); + + if(contextItemSource().isValid()) + { + openDoc.setQuery(QString::fromLatin1("doc('") + contextItemSource().toString() + QLatin1String("')")); + Q_ASSERT(openDoc.isValid()); + QXmlResultItems result; + + openDoc.evaluateTo(&result); + const QXmlItem item(result.next()); + Q_ASSERT(!item.isNull()); + query.setFocus(item); + } + + TestResult::List retval; + + const Scenario scen(scenario()); + TestResult::Status resultStatus = TestResult::Unknown; + + bool ok = false; + const QString queryString(sourceCode(ok)); + + if(!ok) + { + /* Loading the query file failed, or similar. */ + resultStatus = TestResult::Fail; + + m_result = new TestResult(name(), resultStatus, s_exprFact->astTree(), + errHandler.messages(), QPatternist::Item::List(), QString()); + retval.append(m_result); + ErrorHandler::installQtMessageHandler(0); + changed(this); + return retval; + } + + query.setMessageHandler(&errHandler); + QXmlNamePool namePool(query.namePool()); + + /* Bind variables. */ + QPatternist::ExternalVariableLoader::Ptr loader(externalVariableLoader()); + if(loader) + { + Q_ASSERT(loader); + const ExternalSourceLoader::VariableMap vMap(static_cast(loader.data())->variableMap()); + const QStringList variables(vMap.keys()); + + for(int i = 0; i < variables.count(); ++i) + { + const QXmlName name(namePool, variables.at(i)); + const QXmlItem val(QPatternist::Item::toPublic(loader->evaluateSingleton(name, QPatternist::DynamicContext::Ptr()))); + query.bindVariable(name, val); + } + } + + /* We pass in the testCasePath(), such that the base URI is correct fort + * XSL-T stylesheets. */ + query.setQuery(queryString, testCasePath()); + + if(!query.isValid()) + { + pDebug() << "Got compilation exception."; + resultStatus = TestBaseLine::scanErrors(errHandler.messages(), baseLines()); + + Q_ASSERT(resultStatus != TestResult::Unknown); + m_result = new TestResult(name(), resultStatus, s_exprFact->astTree(), + errHandler.messages(), QPatternist::Item::List(), QString()); + retval.append(m_result); + ErrorHandler::installQtMessageHandler(0); + changed(this); + return retval; + } + + if(stage == CompileOnly) + { + m_result = new TestResult(name(), TestResult::Fail, s_exprFact->astTree(), + errHandler.messages(), QPatternist::Item::List(), QString()); + retval.append(m_result); + return retval; + } + + Q_ASSERT(stage == CompileAndRun); + + if(scen == ParseError) /* We're supposed to have received an error + at this point. */ + { + m_result = new TestResult(name(), TestResult::Fail, s_exprFact->astTree(), + errHandler.messages(), QPatternist::Item::List(), QString()); + ErrorHandler::installQtMessageHandler(0); + retval.append(m_result); + changed(this); + return retval; + } + + QPatternist::Item::List itemList; + + QByteArray output; + QBuffer buffer(&output); + buffer.open(QIODevice::WriteOnly); + + QXmlSerializer serializer(query, &buffer); + + pDebug() << "-------------------------- evaluateToPushCallback() ---------------------------- "; + const bool success = query.evaluateTo(&serializer); + pDebug() << "------------------------------------------------------------------------------------ "; + + buffer.close(); + + const QString serialized(QString::fromUtf8(output.constData(), output.size())); + + if(!success) + { + resultStatus = TestBaseLine::scanErrors(errHandler.messages(), baseLines()); + + Q_ASSERT(resultStatus != TestResult::Unknown); + m_result = new TestResult(name(), resultStatus, s_exprFact->astTree(), + errHandler.messages(), QPatternist::Item::List(), serialized); + retval.append(m_result); + ErrorHandler::installQtMessageHandler(0); + changed(this); + return retval; + } + + /* It's a regular test. */ + Q_ASSERT(scen == Standard || scen == RuntimeError); + + resultStatus = TestBaseLine::scan(serialized, baseLines()); + Q_ASSERT(resultStatus != TestResult::Unknown); + + /* Check that errHandler()->messages() at most only contains + * warnings, since it shouldn't have errors at this point. */ + const ErrorHandler::Message::List errors (errHandler.messages()); + const ErrorHandler::Message::List::const_iterator end(errors.constEnd()); + ErrorHandler::Message::List::const_iterator it(errors.constBegin()); + + for(; it != end; ++it) + { + const QtMsgType type = (*it).type(); + if(type == QtFatalMsg) + { + m_result = new TestResult(name(), TestResult::Fail, s_exprFact->astTree(), + errHandler.messages(), itemList, serialized); + retval.append(m_result); + ErrorHandler::installQtMessageHandler(0); + changed(this); + return retval; + } + } + + m_result = new TestResult(name(), resultStatus, s_exprFact->astTree(), + errHandler.messages(), itemList, serialized); + retval.append(m_result); + ErrorHandler::installQtMessageHandler(0); + changed(this); + return retval; +} + +TestCase::Scenario TestCase::scenarioFromString(const QString &string) +{ + if(string == QLatin1String("standard")) + return Standard; + else if(string == QLatin1String("parse-error")) + return ParseError; + else if(string == QLatin1String("runtime-error")) + return RuntimeError; + else if(string == QLatin1String("trivial")) + return Trivial; + else + { + Q_ASSERT_X(false, Q_FUNC_INFO, + qPrintable(QString::fromLatin1("Invalid string representation for the scenario-enum: %1").arg(string))); + return ParseError; /* Silence GCC. */ + } +} + +void TestCase::toXML(XMLWriter &receiver) const +{ + /* */ + QXmlAttributes test_caseAtts; + test_caseAtts.append(QLatin1String("is-XPath2"), QString(), + QLatin1String("is-XPath2"), isXPath() ? QLatin1String("true") + : QLatin1String("false")); + test_caseAtts.append(QLatin1String("name"), QString(), QLatin1String("name"), name()); + test_caseAtts.append(QLatin1String("creator"), QString(), QLatin1String("creator"), creator()); + QString scen; + switch(scenario()) + { + case Standard: + { + scen = QLatin1String("standard"); + break; + } + case ParseError: + { + scen = QLatin1String("parse-error"); + break; + } + case RuntimeError: + { + scen = QLatin1String("runtime-error"); + break; + } + case Trivial: + { + scen = QLatin1String("trivial"); + break; + } + default: /* includes 'AnyError' */ + Q_ASSERT(false); + } + test_caseAtts.append(QLatin1String("scenario"), QString(), QLatin1String("scenario"), scen); + test_caseAtts.append(QLatin1String(QLatin1String("FilePath")), QString(), + QLatin1String("FilePath"), QString()); + receiver.startElement(QLatin1String("test-case"), test_caseAtts); + + /* */ + receiver.startElement(QLatin1String("description"), test_caseAtts); + receiver.characters(description()); + + /* */ + receiver.endElement(QLatin1String("description")); + + /* */ + QXmlAttributes queryAtts; + queryAtts.append(QLatin1String("date"), QString(), QLatin1String("date"), /* This date is a dummy. */ + QDate::currentDate().toString(Qt::ISODate)); + queryAtts.append(QLatin1String("name"), QString(), QLatin1String("name"), testCasePath().toString()); + receiver.startElement(QLatin1String("query"), queryAtts); + + /* */ + receiver.endElement(QLatin1String("query")); + + /* Note: this is invalid, we don't add spec-citation. */ + TestBaseLine::List bls(baseLines()); + const TestBaseLine::List::const_iterator end(bls.constEnd()); + TestBaseLine::List::const_iterator it(bls.constBegin()); + + for(; it != end; ++it) + (*it)->toXML(receiver); + + /* */ + receiver.endElement(QLatin1String("test-case")); +} + +QString TestCase::displayName(const Scenario scen) +{ + switch(scen) + { + case Standard: + return QLatin1String("Standard"); + case ParseError: + return QLatin1String("Parse Error"); + case RuntimeError: + return QLatin1String("Runtime Error"); + case Trivial: + return QLatin1String("Trivial"); + case AnyError: + { + Q_ASSERT(false); + return QString(); + } + } + + Q_ASSERT(false); + return QString(); +} + +TestItem::ResultSummary TestCase::resultSummary() const +{ + if(m_result) + return ResultSummary(m_result->status() == TestResult::Pass ? 1 : 0, + 1); + + return ResultSummary(0, 1); +} + +void TestCase::appendChild(TreeItem *) +{ + Q_ASSERT_X(false, Q_FUNC_INFO, "Makes no sense to call appendChild() for TestCase."); +} + +TreeItem *TestCase::child(const unsigned int) const +{ + return 0; /* Silence GCC */ +} + +TreeItem::List TestCase::children() const +{ + return TreeItem::List(); +} + +unsigned int TestCase::childCount() const +{ + return 0; +} + +TestResult *TestCase::testResult() const +{ + return m_result; +} + +bool TestCase::isFinalNode() const +{ + return true; +} + +QXmlQuery::QueryLanguage TestCase::language() const +{ + return QXmlQuery::XQuery10; +} + +QXmlName TestCase::initialTemplateName() const +{ + return QXmlName(); +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/TestCase.h b/tests/auto/xmlpatternssdk/TestCase.h new file mode 100644 index 0000000..c7aee25 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestCase.h @@ -0,0 +1,256 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestCase_H +#define PatternistSDK_TestCase_H + +#include + +#include "qexternalvariableloader_p.h" + +#include "ErrorHandler.h" +#include "TestBaseLine.h" +#include "Global.h" + +#include "TestItem.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QDate; +class QString; +class QUrl; + +namespace QPatternistSDK +{ + class XMLWriter; + + /** + * @short A generic abstract base class for test cases. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestCase : public TestItem + { + public: + /** + * Corresponds to the simpleType test:scenarios-enum + */ + enum Scenario + { + /** + * The test case should evaluate normally and that the output + * should match the supplied base line. + */ + Standard = 1, + + /** + * The test case should result in a static error, a parser error. + */ + ParseError = 2, + + /** + * The test case should result in a dynamic error, a runtime error. + */ + RuntimeError = 4, + + Trivial = 8, + + /** + * ParseError and RuntimeError OR'd. + */ + AnyError = RuntimeError | ParseError + + }; + + TestCase(); + virtual ~TestCase(); + + /** + * Executes the test, and returns the result. The returned list + * will always contain exactly one TestResult. + * + * @p stage is ignored when running out-of-process. + */ + virtual TestResult::List execute(const ExecutionStage stage, + TestSuite *ts); + + /** + * Determines the corresponding Scenario enumerator from the string + * representation @p string. + * + * The following mappings are in effect: + * @arg @c Standard "standard" + * @arg @c ParseError "parse-error" + * @arg @c RuntimeError "runtime-error" + */ + static Scenario scenarioFromString(const QString &string); + + /** + * @return always @c true + */ + virtual bool isFinalNode() const; + + /** + * Calling this function makes no sense, so it always + * performs an Q_ASSERT check. + */ + virtual void appendChild(TreeItem *); + + /** + * Calling this function makes no sense, so it always + * performs an Q_ASSERT check. + */ + virtual TreeItem *child(const unsigned int) const; + + /** + * @return always zero + */ + virtual unsigned int childCount() const; + + /** + * @return always an empty list. + */ + virtual TreeItem::List children() const; + + /** + * A description of the test case for human consumption. + */ + virtual QString description() const = 0; + + /** + * The title of the test. This can be the identifier of the test, for example. + */ + virtual QString title() const = 0; + + /** + * Whether this test case only make use of XPath features. + * + * @returns @c false if the test case exercises any XQuery feature + * which is not available in XPath 2.0. + */ + virtual bool isXPath() const = 0; + + /** + * The full name of the creator of the test case. For example, "Frans Englich". + */ + virtual QString creator() const = 0; + + /** + * The date of when the test case was created or last modified. + */ + virtual QDate lastModified() const = 0; + + /** + * The test's source code. That is, the XPath/XQuery code for the test. + * + * @param ok the function sets this value to @c false if loading the query + * failed, and returns a description of the error for human consumption. If + * everything went ok, @p ok is set to @c true, and the query is returned. + */ + virtual QString sourceCode(bool &ok) const = 0; + + /** + * The path to the file containing the code of the test case. + */ + virtual QUrl testCasePath() const = 0; + + /** + * The test case's identifier. For example, "Literals001". + */ + virtual QString name() const = 0; + + /** + * What kind of test this is. For example, whether the test case + * should result in a parser error or should evaluate without errors. + * + * The vast common case is that one Scenario is returned; the bit signifiance + * is for the TestCase sub-class UserTestCase. + */ + virtual Scenario scenario() const = 0; + + static QString displayName(const Scenario scen); + + /** + * @returns the valid test baselines for this test case. If only + * one outcome is valid, the returned list only contains + * that baseline. + */ + virtual TestBaseLine::List baseLines() const = 0; + + virtual TestResult *testResult() const; + + virtual ResultSummary resultSummary() const; + + void toXML(XMLWriter &receiver) const; + + virtual QPatternist::ExternalVariableLoader::Ptr externalVariableLoader() const = 0; + + /** + * @short The XML document that should be used as focus. If none should + * be used, and hence the focus be undefined, a default constructed + * QUrl is returned. + */ + virtual QUrl contextItemSource() const = 0; + + /** + * Returns by default QXmlQuery::XQuery10. + */ + virtual QXmlQuery::QueryLanguage language() const; + + virtual QXmlName initialTemplateName() const; + private: + TestResult::List execute(const ExecutionStage stage); + TestResult *createTestResult(const TestResult::Status status, + const QString &comment) const; + + QPointer m_result; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestContainer.cpp b/tests/auto/xmlpatternssdk/TestContainer.cpp new file mode 100644 index 0000000..3141f9d --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestContainer.cpp @@ -0,0 +1,151 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#include "TestContainer.h" + +using namespace QPatternistSDK; + +TestContainer::TestContainer() : m_deleteChildren(true) +{ +} + +TestContainer::~TestContainer() +{ + if(m_deleteChildren) + qDeleteAll(m_children); +} + +TestResult::List TestContainer::execute(const ExecutionStage stage, + TestSuite *ts) +{ + Q_ASSERT(ts); + const unsigned int c = m_children.count(); + TestResult::List result; + + for(unsigned int i = 0; i != c; ++i) + result += static_cast(child(i))->execute(stage, ts); + + return result; +} + +TestItem::ResultSummary TestContainer::resultSummary() const +{ + const int c = childCount(); + int total = 0; + int pass = 0; + + for(int i = 0; i != c; ++i) + { + TestItem *t = static_cast(child(i)); + const ResultSummary sum(t->resultSummary()); + pass += sum.first; + total += sum.second; + } + + return ResultSummary(pass, total); +} + +TreeItem::List TestContainer::children() const +{ + return m_children; +} + +void TestContainer::appendChild(TreeItem *item) +{ + /* When one of our children changes, we changes. */ + connect(item, SIGNAL(changed(TreeItem *)), SIGNAL(changed(TreeItem *))); + m_children.append(item); +} + +TreeItem *TestContainer::child(const unsigned int rowP) const +{ + return m_children.value(rowP); +} + +unsigned int TestContainer::childCount() const +{ + return m_children.count(); +} + +void TestContainer::setTitle(const QString &titleP) +{ + m_title = titleP; +} + +QString TestContainer::title() const +{ + return m_title; +} + +bool TestContainer::isFinalNode() const +{ + return false; +} + +int TestContainer::columnCount() const +{ + return 4; +} + +QString TestContainer::description() const +{ + return m_description; +} + +void TestContainer::setDescription(const QString &desc) +{ + m_description = desc; +} + +void TestContainer::setDeleteChildren(const bool val) +{ + m_deleteChildren = val; +} + +void TestContainer::removeLast() +{ + m_children.removeLast(); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestContainer.h b/tests/auto/xmlpatternssdk/TestContainer.h new file mode 100644 index 0000000..981c2e9 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestContainer.h @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestContainer_H +#define PatternistSDK_TestContainer_H + +#include "Global.h" +#include "TestItem.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short an abstract base class, containing + * an appropriate implementation of TestItem for sub-classes + * which can contain other TestItem instances. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestContainer : public TestItem + { + public: + virtual ~TestContainer(); + virtual void appendChild(TreeItem *item); + virtual TreeItem *child(const unsigned int row) const; + virtual unsigned int childCount() const; + + /** + * @returns the TestResults of this TestContainer's children. + */ + virtual TestResult::List execute(const ExecutionStage stage, + TestSuite *ts); + + QString title() const; + void setTitle(const QString &title); + + virtual TreeItem::List children() const; + + /** + * @return always 2 + */ + virtual int columnCount() const; + + virtual bool isFinalNode() const; + + virtual ResultSummary resultSummary() const; + virtual QString description() const; + virtual void setDescription(const QString &desc); + + /** + * Determines whether TestContainer will delete its children upon + * destruction. By default, it will. + */ + void setDeleteChildren(const bool val); + + /** + * Removes the last appended child. + */ + void removeLast(); + + protected: + /** + * Constructor, protected. TestContainer is an abstract class, + * and is not ment to be instantiated, but sub classed. + */ + TestContainer(); + + private: + TreeItem::List m_children; + QString m_title; + QString m_description; + bool m_deleteChildren; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestGroup.cpp b/tests/auto/xmlpatternssdk/TestGroup.cpp new file mode 100644 index 0000000..e34292b --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestGroup.cpp @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#include "TestGroup.h" + +using namespace QPatternistSDK; + +TestGroup::TestGroup(TreeItem *p) : m_parent(p) +{ +} + +QVariant TestGroup::data(const Qt::ItemDataRole role, int column) const +{ + if(role != Qt::DisplayRole && role != Qt::BackgroundRole && role != Qt::ToolTipRole) + return QVariant(); + + /* In ResultSummary, the first is the amount of passes and the second is the total. */ + const ResultSummary sum(resultSummary()); + const int failures = sum.second - sum.first; + + switch(role) + { + case Qt::DisplayRole: + { + + switch(column) + { + case 0: + return title(); + case 1: + /* Passes. */ + return QString::number(sum.first); + case 2: + /* Failures. */ + return QString::number(failures); + case 3: + /* Total. */ + return QString::number(sum.second); + default: + { + Q_ASSERT(false); + return QString(); + } + } + } + case Qt::BackgroundRole: + { + switch(column) + { + case 1: + { + if(sum.first) + { + /* Pass. */ + return Qt::green; + } + else + return QVariant(); + } + case 2: + { + if(failures) + { + /* Failure. */ + return Qt::red; + } + else + return QVariant(); + } + default: + return QVariant(); + } + } + case Qt::ToolTipRole: + { + return description(); + } + default: + { + Q_ASSERT_X(false, Q_FUNC_INFO, "This shouldn't be reached"); + return QVariant(); + } + } +} + +void TestGroup::setNote(const QString &n) +{ + m_note = n; +} + +QString TestGroup::note() const +{ + return m_note; +} + +TreeItem *TestGroup::parent() const +{ + return m_parent; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestGroup.h b/tests/auto/xmlpatternssdk/TestGroup.h new file mode 100644 index 0000000..00a3daf --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestGroup.h @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestGroup_H +#define PatternistSDK_TestGroup_H + +#include + +#include "TestContainer.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Groups test groups and test cases into a group. + * + * TestGroup corresponds to the @c test-group element in XQTSCatalog.xsd. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestGroup : public TestContainer + { + public: + TestGroup(TreeItem *parent); + + /** + * @returns the parent of this group. Is either another group, or + * the TestSuite instance governing this tree. + */ + virtual TreeItem *parent() const; + + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + + QString note() const; + + void setName(const QString &name); + void setNote(const QString ¬e); + + private: + QString m_name; + QString m_note; + TreeItem *m_parent; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestItem.h b/tests/auto/xmlpatternssdk/TestItem.h new file mode 100644 index 0000000..2d559a7 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestItem.h @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestItem_H +#define PatternistSDK_TestItem_H + +#include "TestResult.h" +#include "TreeItem.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +template struct QPair; + +namespace QPatternistSDK +{ + class XMLWriter; + class TestSuite; + + /** + * @short base class for all classes which + * represent an element in an XQuery Test Suite catalog. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestItem : public TreeItem + { + public: + + /** + * Determines how far an test case execution should go. + */ + enum ExecutionStage + { + /** + * The query will not be run. It will only go through the (whole) compilation stage. + */ + CompileOnly = 1, + + /** + * The query will be compiled and run, as ordinary. + */ + CompileAndRun + }; + + /** + * Represents a summary of test results for a collection + * of tests. QPair::first contains the amount of + * passed tests; QPair::second contains the count of + * all tests. For example TestCase::summary() returns + * ResultSummary(0, 1) or ResultSummary(1, 1) depending + * on whether the TestCase have succeeded or not. + */ + typedef QPair ResultSummary; + + /** + * Executes the test case(s) this TestItem represents, + * and return the TestResult. For example, the TestGroup + * returns the result of its children concatenated, while + * TestCase always returns a list containing one + * TestResult(what it evaluated to). + */ + virtual TestResult::List execute(const ExecutionStage stage, + TestSuite *ts) = 0; + + /** + * @todo Rename this function. Perhaps create a type() hierarchy + * instead. + */ + virtual bool isFinalNode() const = 0; + + /** + * @returns a ResultSummary for this TestItem. + */ + virtual ResultSummary resultSummary() const = 0; + + /** + * Serializes into the corresponding elements attributes + * specified in XQTSCatalog.xsd. + * + * @note Sub-classes must assume the XQTSCatalog namespace + * is the default namespace, and not add any namespace declarations. + */ + //virtual void toXML(XMLWriter &receiver) const = 0; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestResult.cpp b/tests/auto/xmlpatternssdk/TestResult.cpp new file mode 100644 index 0000000..37603e7 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestResult.cpp @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#include "qdebug_p.h" +#include "Global.h" +#include "XMLWriter.h" + +#include "TestResult.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +QString TestResult::displayName(const TestResult::Status stat) +{ + switch(stat) + { + case Pass: + return QLatin1String("pass"); + case Fail: + return QLatin1String("fail"); + case NotTested: + return QLatin1String("not tested"); + case Unknown: + Q_ASSERT(false); + } + + Q_ASSERT(false); + return QString(); +} + +TestResult::Status TestResult::statusFromString(const QString &string) +{ + if(string == QLatin1String("pass")) + return Pass; + else if(string == QLatin1String("fail")) + return Fail; + else if(string == QLatin1String("not tested")) + return NotTested; + else + { + Q_ASSERT(false); + return Fail; + } +} + +TestResult::TestResult(const QString &n, + const Status s, + ASTItem *tree, + const ErrorHandler::Message::List &ers, + const QPatternist::Item::List &itemsP, + const QString &serialized) : m_status(s), + m_messages(ers), + m_astTree(tree), + m_testName(n), + m_items(itemsP), + m_asSerialized(serialized) +{ + Q_ASSERT(!n.isEmpty()); + Q_ASSERT(s != 0); +} + +TestResult::~TestResult() +{ + delete m_astTree; +} + +void TestResult::toXML(XMLWriter &receiver) const +{ + QXmlAttributes atts; + atts.append(QLatin1String("name"), QString(), QLatin1String("name"), m_testName); + atts.append(QLatin1String("result"), QString(), QLatin1String("result"), displayName(m_status)); + + if(!m_comment.isEmpty()) + atts.append(QLatin1String("comment"), QString(), QLatin1String("comment"), m_comment); + + receiver.startElement(QLatin1String("test-case"), atts); + receiver.endElement(QLatin1String("test-case")); +} + +void TestResult::setComment(const QString &comm) +{ + m_comment = comm; +} + +TestResult::Status TestResult::status() const +{ + return m_status; +} + +QString TestResult::comment() const +{ + return m_comment; +} + +ASTItem *TestResult::astTree() const +{ + return m_astTree; +} + +ErrorHandler::Message::List TestResult::messages() const +{ + return m_messages; +} + +QPatternist::Item::List TestResult::items() const +{ + return m_items; +} + +QString TestResult::asSerialized() const +{ + pDebug() << "asSerialized: " << m_asSerialized; + return m_asSerialized; +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/TestResult.h b/tests/auto/xmlpatternssdk/TestResult.h new file mode 100644 index 0000000..96b4610 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestResult.h @@ -0,0 +1,179 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestResult_H +#define PatternistSDK_TestResult_H + +#include +#include +#include +#include + +#include +#include "ErrorHandler.h" + +#include "ASTItem.h" + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class ASTItem; + class XMLWriter; + + /** + * @short represents the result produced by running a test case. + * + * This information TestResult houses is: + * + * - The result status() of the run. Whether the test case succeeded or not, for example. + * - The astTree() which reflects the compiled test case + * - The messages issued when compiling and running the test case, retrievable via messages() + * - The data -- XPath Data Model items() -- the test case evaluated to, if any. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestResult : public QObject + { + Q_OBJECT + + public: + enum Status + { + /** + * Used when the status is unknown. + */ + Unknown = 0, + + /** + * The test case passed. + */ + Pass, + + /** + * The test case failed. + */ + Fail, + + /** + * The test was not run. Similar to "SKIP". + */ + NotTested + }; + + /** + * A list of TestResult instances. + */ + typedef QList > List; + + /** + * Constructs a TestResult. + * + * @param testName the name of the test. For example, @c Literal-001. + * @param astTree may be @c null, signalling no AST being available, or point to one. + * @param status the result status of running the test-case. Whether the test-case + * passed or failed, and so forth. + * @param errors the errors and warnings that were reported while running the test-case + * @param items the XDM items that were outputted, if any + * @param serialized the output when serialized + */ + TestResult(const QString &testName, + const Status status, + ASTItem *astTree, + const ErrorHandler::Message::List &errors, + const QPatternist::Item::List &items, + const QString &serialized); + + virtual ~TestResult(); + + Status status() const; + + QString comment() const; + void setComment(const QString &comment); + + QPatternist::Item::List items() const; + + ErrorHandler::Message::List messages() const; + + /** + * Serializes itself to @p receiver, into a test-case element, + * as per @c XQTSResult.xsd. + */ + void toXML(XMLWriter &receiver) const; + + ASTItem *astTree() const; + + /** + * @returns a string representation for @p status, as per the anonymous + * type inside the type test-case, in @c XQTSResult.xsd. For example, if @p status + * is NotTested, is "not tested" returned. + */ + static QString displayName(const TestResult::Status status); + + static Status statusFromString(const QString &string); + + /** + * @returns the output of this test result(if any) as when + * being serialized. + */ + QString asSerialized() const; + + private: + const Status m_status; + QString m_comment; + const ErrorHandler::Message::List m_messages; + QPointer m_astTree; + QString m_testName; + const QPatternist::Item::List m_items; + const QString m_asSerialized; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestResultHandler.cpp b/tests/auto/xmlpatternssdk/TestResultHandler.cpp new file mode 100644 index 0000000..95aaf1e --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestResultHandler.cpp @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "Global.h" + +#include "TestResultHandler.h" + +using namespace QPatternistSDK; + +TestResultHandler::TestResultHandler() +{ + /* Fifteen thousand. When finished, we squeeze them. */ + m_result.reserve(15000); + m_comments.reserve(1000); /* Comments are only used for stuff that crash, more or less. */ +} + +bool TestResultHandler::startElement(const QString &namespaceURI, + const QString &localName, + const QString &, + const QXmlAttributes &atts) +{ + /* We only care about 'test-case', ignore everything else. */ + if(localName != QLatin1String("test-case") || + namespaceURI != Global::xqtsResultNS) + return true; + + /* The 'comments' attribute is optional. */ + Q_ASSERT_X(atts.count() == 2 || atts.count() == 3, Q_FUNC_INFO, + "The input appears to not conform to XQTSResult.xsd"); + + Q_ASSERT_X(!m_result.contains(atts.value(QLatin1String("name"))), + Q_FUNC_INFO, + qPrintable(QString::fromLatin1("A test result for test case %1 has " + "already been read(duplicate entry it seems).").arg(atts.value(QLatin1String("name"))))); + + m_result.insert(atts.value(0), TestResult::statusFromString(atts.value(QLatin1String("result")))); + + return true; +} + +bool TestResultHandler::endDocument() +{ + m_result.squeeze(); + m_comments.squeeze(); + return true; +} + +TestResultHandler::Hash TestResultHandler::result() const +{ + return m_result; +} + +TestResultHandler::CommentHash TestResultHandler::comments() const +{ + return m_comments; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestResultHandler.h b/tests/auto/xmlpatternssdk/TestResultHandler.h new file mode 100644 index 0000000..87f7b61 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestResultHandler.h @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestResultHandler_H +#define PatternistSDK_TestResultHandler_H + +#include +#include +#include + +#include "TestResult.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Reads XML in the @c XQTSResult.xsd format, and provides access to + * the reported results. + * + * @author Frans Englich + * @ingroup PatternistSDK + */ + class Q_PATTERNISTSDK_EXPORT TestResultHandler : public QXmlDefaultHandler + { + public: + /** + * A hash where the key is the class's name, that is test-case/@@name, + * and the value the test's result status. + */ + typedef QHash Hash; + + /** + * A hash mapping test-case names to their' comments. + */ + typedef QHash CommentHash; + + /** + * Creates a TestResultHandler that will read @p file when run() is called. + */ + TestResultHandler(); + + /** + * Performs finalization. + */ + virtual bool endDocument(); + + /** + * Reads the test-case element and its attributes, everything else is ignored. + */ + virtual bool startElement(const QString &namespaceURI, + const QString &localName, + const QString &qName, + const QXmlAttributes &atts); + /** + * @note Do not reimplement this function. + * @returns the result obtained from reading the XML file. + */ + Hash result() const; + + CommentHash comments() const; + + private: + Q_DISABLE_COPY(TestResultHandler) + Hash m_result; + CommentHash m_comments; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestSuite.cpp b/tests/auto/xmlpatternssdk/TestSuite.cpp new file mode 100644 index 0000000..8b8856a --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestSuite.cpp @@ -0,0 +1,269 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +#include "Global.h" +#include "TestSuiteHandler.h" +#include "TestSuiteResult.h" +#include "XMLWriter.h" +#include "XSLTTestSuiteHandler.h" +#include "XSDTestSuiteHandler.h" +#include "qdebug_p.h" + +#include "TestSuite.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +TestSuite::TestSuite() +{ +} + +QVariant TestSuite::data(const Qt::ItemDataRole role, int column) const +{ + if(role != Qt::DisplayRole) + return QVariant(); + + switch(column) + { + case 0: + return title(); + case 1: + return QString(); + default: + { + Q_ASSERT(false); + return QString(); + } + } +} + +TestSuiteResult *TestSuite::runSuite() +{ + const QDate date(QDate::currentDate()); + TestResult::List result(execute(CompileAndRun, this)); + + return new TestSuiteResult(version(), date, result); +} + +TestSuite *TestSuite::openCatalog(const QUrl &catalogURI, + QString &errorMsg, + const bool useExclusionList, + SuiteType suiteType) +{ + pDebug() << "Opening catalog:" << catalogURI.toString(); + QFile ts(catalogURI.toLocalFile()); + Q_ASSERT(catalogURI.isValid()); + + if(!ts.exists()) + { + errorMsg = QString::fromLatin1("The test suite catalog \"%1\" could not be found.\n") + .arg(ts.fileName()); + return 0; + } + + const QFileInfo info(ts); + + if(!info.isReadable()) + { + errorMsg = QString::fromLatin1("Cannot read the test suite catalog.\n"); + return 0; + } + else if(!info.isFile()) + { + errorMsg = QString::fromLatin1("The specified test suite catalog \"%1\" is not a file. " + "The test suite catalog must be a file, it cannot be " + "a directory, for example.\n") + .arg(ts.fileName()); + return 0; + } + else if(!ts.open(QIODevice::ReadOnly | QIODevice::Text)) + { + errorMsg = QString::fromLatin1("Failed to open the test suite catalog, \"%1\".\n") + .arg(ts.fileName()); + return 0; + } + + return openCatalog(&ts, errorMsg, catalogURI, useExclusionList, suiteType); +} + +TestSuite *TestSuite::openCatalog(QIODevice *input, + QString &errorMsg, + const QUrl &fileName, + const bool useExclusionList, + SuiteType suiteType) +{ + Q_ASSERT(input); + + QXmlSimpleReader reader; + typedef QPatternist::AutoPtr HandlerPtr; + + HandlerPtr loader; + + switch (suiteType) { + case XQuerySuite: loader = HandlerPtr(new TestSuiteHandler(fileName, useExclusionList)); break; + case XsltSuite: loader = HandlerPtr(new XSLTTestSuiteHandler(fileName)); break; + case XsdSuite: loader = HandlerPtr(new XSDTestSuiteHandler(fileName)); break; + default: Q_ASSERT(false); break; + } + + reader.setContentHandler(loader.data()); + + QXmlInputSource source(input); + + if(!reader.parse(source)) + { + errorMsg = QString::fromLatin1("Couldn't parse %1").arg(fileName.toString()); + return 0; + } + + TestSuite *suite = 0; + switch (suiteType) { + case XQuerySuite: suite = static_cast(loader.data())->testSuite(); break; + case XsltSuite: suite = static_cast(loader.data())->testSuite(); break; + case XsdSuite: suite = static_cast(loader.data())->testSuite(); break; + default: Q_ASSERT(false); break; + } + + if(suite) + return suite; + + errorMsg = QString::fromLatin1("Failed to load \"%1\". " + "It appears to have no test-suite element.\n").arg(fileName.toString()); + return 0; +} + +void TestSuite::toXML(XMLWriter &receiver, TestCase *const tc) const +{ + // TODO startElement() endElement() calls can be simplified. + + Q_ASSERT(tc); + + receiver.startDocument(); + /* */ + QXmlAttributes test_suiteAtts; + test_suiteAtts.append(QLatin1String("CatalogDesignDate"), QString(), + QLatin1String("CatalogDesignDate"), m_designDate.toString(Qt::ISODate)); + test_suiteAtts.append(QLatin1String("version"), QString(), + QLatin1String("version"), m_version); + test_suiteAtts.append(QLatin1String("SourceOffsetPath"), QString(), + QLatin1String("SourceOffsetPath"), QString()); + test_suiteAtts.append(QLatin1String("ResultOffsetPath"), QString(), + QLatin1String("ResultOffsetPath"), QString()); + test_suiteAtts.append(QLatin1String("XQueryQueryOffsetPath"), QString(), + QLatin1String("XQueryQueryOffsetPath"), QString()); + test_suiteAtts.append(QLatin1String("QueryXQueryOffsetPath"), QString(), + QLatin1String("QueryXQueryOffsetPath"), QString()); + test_suiteAtts.append(QLatin1String("XQueryFileExtension"), QString(), + QLatin1String("XQueryFileExtension"), QString()); + test_suiteAtts.append(QLatin1String("XQueryXFileExtension"), QString(), + QLatin1String("XQueryXFileExtension"), QString()); + + receiver.startPrefixMapping(QString(), Global::xqtsCatalogNS); + receiver.startElement(QLatin1String("test-suite"), test_suiteAtts); + receiver.endPrefixMapping(QString()); + + /* */ + QXmlAttributes test_groupAtts; + test_groupAtts.append(QLatin1String("GeneratedGroupByPatternistSDKRunSuite"), QString(), + QLatin1String("GeneratedGroupByPatternistSDKRunSuite"), QString()); + receiver.startElement(QLatin1String("test-group"), test_groupAtts); + + /* */ + receiver.startElement(QLatin1String("GroupInfo"), test_groupAtts); + + /* */ + receiver.startElement(QLatin1String("title"), test_groupAtts); + receiver.characters(QLatin1String("Contains the test case generated by PatternistSDKRunSuite.")); + + /* */ + receiver.endElement(QLatin1String("title")); + + /* */ + receiver.startElement(QLatin1String("description"), test_groupAtts); + /* */ + receiver.endElement(QLatin1String("description")); + + /* */ + receiver.endElement(QLatin1String("GroupInfo")); + + /* */ + tc->toXML(receiver); + /* */ + + /* */ + receiver.endElement(QLatin1String("test-group")); + + /* */ + receiver.endElement(QLatin1String("test-suite")); +} + +QString TestSuite::version() const +{ + return m_version; +} + +QDate TestSuite::designDate() const +{ + return m_designDate; +} + +void TestSuite::setVersion(const QString &ver) +{ + m_version = ver; +} + +void TestSuite::setDesignDate(const QDate &date) +{ + m_designDate = date; +} + +TestContainer *TestSuite::parent() const +{ + return 0; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestSuite.h b/tests/auto/xmlpatternssdk/TestSuite.h new file mode 100644 index 0000000..746f26b --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestSuite.h @@ -0,0 +1,160 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestSuite_H +#define PatternistSDK_TestSuite_H + +#include +#include + +#include "TestContainer.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QIODevice; +class QUrl; +class QVariant; + +namespace QPatternistSDK +{ + class TestCase; + class TestSuiteResult; + + /** + * @short Represents a test suite in the W3C XML Query Test Suite format. + * + * TestSuite contains the test suite's test cases and meta data. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestSuite : public TestContainer + { + public: + /** + * Describes the type of test suite. + */ + enum SuiteType + { + XQuerySuite, ///< The test suite for XQuery + XsltSuite, ///< The test suite for XSLT + XsdSuite ///< The test suite for XML Schema + }; + + TestSuite(); + + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + + /** + * The version of the catalog test suite. For example, "0.8.0". + */ + QString version() const; + + /** + * When the catalog was designed, last modified. + */ + QDate designDate() const; + + void setVersion(const QString &version); + void setDesignDate(const QDate &version); + + /** + * @return always @c null + */ + virtual TestContainer *parent() const; + + /** + * Creates and returns a pointer to a TestSuite instance, which + * was instantiated from the XQuery Test Suite catalog file @p catalogFile. + * + * If loading went wrong, @c null is returned and @p errorMsg is set with a + * human readable message string. However, @p catalogFile is not validated; + * if the XML file is not valid against the XQTS task force's W3C XML Schema, the + * behavior and result for this function is undefined. + * + * This function blocks. Currently is only local files supported. + */ + static TestSuite *openCatalog(const QUrl &catalogFile, + QString &errorMsg, + const bool useExclusionList, + SuiteType type); + + void toXML(XMLWriter &receiver, TestCase *const tc) const; + + /** + * Evaluates all the test cases in this TestSuite, and returns + * it all in a TestSuiteResult. + */ + TestSuiteResult *runSuite(); + + private: + /** + * Essentially similar to open(const QUrl &, QString &errorMsg), + * with the difference that it takes directly a QIODevice as input, + * as opposed to a file name locating the catalog file to read. + * + * @param input the test suite catalog + * @param fileName this URI is used for resolving relative paths inside + * the catalog file into absolute. + * @param errorMsg if an error occurs, this QString is set to contain the message. + * Whether an error occurred can therefore be determined by checking if this variable + * still is @c null after the call + * @param useExclusionList whether the excludeTestGroups.txt file should be used + * to exclude test groups for this catalog + */ + static TestSuite *openCatalog(QIODevice *input, + QString &errorMsg, + const QUrl &fileName, + const bool useExclusionList, + SuiteType type); + QString m_version; + QDate m_designDate; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp b/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp new file mode 100644 index 0000000..65cb99b --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestSuiteHandler.cpp @@ -0,0 +1,312 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qacceltreeresourceloader_p.h" +#include "qnetworkaccessdelegator_p.h" + +#include "Global.h" +#include "TestBaseLine.h" +#include "TestGroup.h" + +#include "TestSuiteHandler.h" + +using namespace QPatternistSDK; + +QNetworkAccessManager s_networkManager; + +TestSuiteHandler::TestSuiteHandler(const QUrl &catalogFile, + const bool useEList) : m_ts(0) + , m_container(0) + , m_tc(0) + , m_baseLine(0) + , m_catalogFile(catalogFile) + , m_exclusionList(readExclusionList(useEList)) + , m_isExcluding(false) +{ + Q_ASSERT(!m_catalogFile.isRelative()); +} + +QStringList TestSuiteHandler::readExclusionList(const bool useExclusionList) const +{ + if(!useExclusionList) + return QStringList(); + + QStringList avoid; + + /* These test groups are for features we don't support. + * + * Originally these were stored in a text file pulled in with Qt resources, but + * it was not possible to get it to link on some HP-UX and Intel-icc platforms. */ + + avoid << "SchemaImport"; // The schema import feature + avoid << "SchemaValidation"; // The validate expression(requires schema import) + avoid << "StaticTyping"; // Pessimistic static typing checking + avoid << "TrivialEmbedding"; // XQueryX inside XQuery + avoid << "XMark"; // We're currently too buggy for running these tests. + + return avoid; +} + +bool TestSuiteHandler::startElement(const QString &namespaceURI, + const QString &localName, + const QString &/*qName*/, + const QXmlAttributes &atts) +{ + if(namespaceURI != Global::xqtsCatalogNS) + return true; + else if(m_isExcluding) + { + if(localName == QLatin1String("test-group")) + { + m_testGroupName.push(atts.value(QLatin1String("name"))); + return true; + } + else + return true; + } + + /* The elements are handled roughly in the order of highest occurrence in the catalog file. */ + if(localName == QLatin1String("test-case")) + { + XQTSTestCase *const c = new XQTSTestCase( + TestCase::scenarioFromString(atts.value(QLatin1String("scenario"))), m_container); + + c->setName(atts.value(QLatin1String("name"))); + c->setCreator(atts.value(QLatin1String("Creator"))); + c->setIsXPath(Global::readBoolean(atts.value(QLatin1String("is-XPath2")))); + c->setLastModified(QDate::fromString(atts.value(QLatin1String("version-drop")), Qt::ISODate)); + Q_ASSERT(c->lastModified().isNull() || c->lastModified().isValid()); + + m_currentQueryPath = m_queryOffset.resolved(QUrl(atts.value(QLatin1String("FilePath")))); + m_currentBaselinePath = m_baselineOffset.resolved(QUrl(atts.value(QLatin1String("FilePath")))); + + m_container->appendChild(c); + m_tc = c; + } + else if(localName == QLatin1String("query")) + { + m_tc->setQueryPath(m_currentQueryPath.resolved(atts.value(QLatin1String("name")) + + m_xqueryFileExtension)); + } + else if(localName == QLatin1String("input-file") || + localName == QLatin1String("input-URI")) + { + m_currentInputVariable = atts.value(QLatin1String("variable")); + } + else if(localName == QLatin1String("output-file")) + { + m_baseLine = new TestBaseLine(TestBaseLine::identifierFromString(atts.value(QLatin1String("compare")))); + } + else if(localName == QLatin1String("expected-error")) + { + m_baseLine = new TestBaseLine(TestBaseLine::ExpectedError); + } + else if(localName == QLatin1String("test-group")) + { + m_testGroupName.push(atts.value(QLatin1String("name"))); + + if(m_exclusionList.contains(m_testGroupName.top())) + { + /* Ok, this group is supposed to be excluded, we don't + * insert it into the tree. */ + m_isExcluding = true; + return true; + } + else + { + Q_ASSERT(m_container); + TestGroup *const newGroup = new TestGroup(m_container); + m_container->appendChild(newGroup); + m_container = newGroup; + } + } + else if(localName == QLatin1String("source")) + { + m_sourceMap.insert(atts.value(QLatin1String("ID")), + m_sourceOffset.resolved(QUrl(atts.value(QLatin1String("FileName"))))); + } + else if(localName == QLatin1String("test-suite")) + { + m_ts = new TestSuite(); + m_ts->setVersion(atts.value(QLatin1String("version"))); + m_ts->setDesignDate(QDate::fromString(atts.value(QLatin1String("CatalogDesignDate")), Qt::ISODate)); + Q_ASSERT(m_ts->designDate().isValid()); + m_container = m_ts; + + m_xqueryFileExtension = atts.value(QLatin1String("XQueryFileExtension")); + m_queryOffset = m_catalogFile.resolved(atts.value(QLatin1String("XQueryQueryOffsetPath"))); + m_baselineOffset = m_catalogFile.resolved(atts.value(QLatin1String("ResultOffsetPath"))); + m_sourceOffset = m_catalogFile.resolved(atts.value(QLatin1String("SourceOffsetPath"))); + } + else if(localName == QLatin1String("input-query")) + { + m_tcSourceInputs.insert(atts.value(QLatin1String("variable")), + ExternalSourceLoader::VariableValue(m_currentQueryPath.resolved(atts.value(QLatin1String("name")) + m_xqueryFileExtension), + ExternalSourceLoader::Query)); + } + + return true; +} + +bool TestSuiteHandler::endElement(const QString &namespaceURI, + const QString &localName, + const QString &/*qName*/) +{ + if(namespaceURI != Global::xqtsCatalogNS) + return true; + + if(m_isExcluding) + { + if(localName == QLatin1String("test-group")) + { + const QString myName(m_testGroupName.pop()); + + if(m_exclusionList.contains(myName)) + { + /* This test-group is being excluded and now we're exiting from it. */ + m_isExcluding = false; + } + } + + return true; + } + + /* The elements are handled roughly in the order of highest occurrence in the catalog file. */ + if(localName == QLatin1String("description")) + { + if(m_tc) + { + /* We're inside a , so the belongs + * to the test-case. */ + m_tc->setDescription(m_ch.simplified()); + } + else + m_container->setDescription(m_ch.simplified()); + } + else if(localName == QLatin1String("test-case")) + { + Q_ASSERT(m_tc->baseLines().count() >= 1); + Q_ASSERT(m_resourceLoader); + m_tc->setExternalVariableLoader(QPatternist::ExternalVariableLoader::Ptr + (new ExternalSourceLoader(m_tcSourceInputs, + m_resourceLoader))); + m_tcSourceInputs.clear(); + + if(!m_contextItemSource.isEmpty()) + { + m_tc->setContextItemSource(QUrl(m_sourceMap.value(m_contextItemSource))); + m_contextItemSource.clear(); + } + + m_tc = 0; + } + else if(localName == QLatin1String("output-file")) + { + m_baseLine->setDetails(m_currentBaselinePath.resolved(m_ch).toString()); + m_tc->addBaseLine(m_baseLine); + } + else if(localName == QLatin1String("input-file")) + { + m_tcSourceInputs.insert(m_currentInputVariable, ExternalSourceLoader::VariableValue(m_sourceMap.value(m_ch), + ExternalSourceLoader::Document)); + } + else if(localName == QLatin1String("expected-error")) + { + m_baseLine->setDetails(m_ch); + m_tc->addBaseLine(m_baseLine); + } + else if(localName == QLatin1String("title")) + { + /* A bit dangerous, the only element with name title in the vocabulary + * is the the child of GroupInfo */ + m_container->setTitle(m_ch.simplified()); + } + else if(localName == QLatin1String("test-group")) + { + m_testGroupName.pop(); + Q_ASSERT(m_container); + m_container = static_cast(m_container->parent()); + Q_ASSERT(m_container); + } + else if(localName == QLatin1String("test-suite")) + { + Q_ASSERT(m_container); + m_container = static_cast(m_container->parent()); + } + else if(localName == QLatin1String("sources")) + { + const QPatternist::NetworkAccessDelegator::Ptr networkDelegator(new QPatternist::NetworkAccessDelegator(&s_networkManager, &s_networkManager)); + + m_resourceLoader = QPatternist::ResourceLoader::Ptr(new QPatternist::AccelTreeResourceLoader(Global::namePool(), + networkDelegator)); + + const ExternalSourceLoader::SourceMap::const_iterator end(m_sourceMap.constEnd()); + ExternalSourceLoader::SourceMap::const_iterator it(m_sourceMap.constBegin()); + + for(; it != end; ++it) + m_resourceLoader->announceDocument(it.value(), QPatternist::ResourceLoader::WillUse); + } + else if(localName == QLatin1String("input-URI")) + { + m_tcSourceInputs.insert(m_currentInputVariable, ExternalSourceLoader::VariableValue(m_sourceMap.value(m_ch), + ExternalSourceLoader::URI)); + } + else if(localName == QLatin1String("contextItem")) + m_contextItemSource = m_ch; + + return true; +} + +bool TestSuiteHandler::characters(const QString &ch) +{ + m_ch = ch; + return true; +} + +TestSuite *TestSuiteHandler::testSuite() const +{ + return m_ts; +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/TestSuiteHandler.h b/tests/auto/xmlpatternssdk/TestSuiteHandler.h new file mode 100644 index 0000000..a189cf9 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestSuiteHandler.h @@ -0,0 +1,169 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestSuiteHandler_H +#define PatternistSDK_TestSuiteHandler_H + +#include +#include +#include + +#include "ExternalSourceLoader.h" +#include "TestSuite.h" +#include "XQTSTestCase.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class TestBaseLine; + + /** + * @short Creates a TestSuite from the XQuery Test Suite catalog, + * represented as a SAX stream. + * + * The created TestSuite can be retrieved via testSuite(). + * + * @note TestSuiteHandler assumes the XML is valid by having been validated + * against the W3C XML Schema. It have no safety checks for that the XML format + * is correct but is hard coded for it. Thus, the behavior is undefined if + * the XML is invalid. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestSuiteHandler : public QXmlDefaultHandler + { + public: + /** + * @param catalogFile the URI for the catalog file being parsed. This + * URI is used for creating absolute URIs for files mentioned in + * the catalog with relative URIs. + * @param useExclusionList whether excludeTestGroups.txt should be used to ignore + * test groups when loading + */ + TestSuiteHandler(const QUrl &catalogFile, + const bool useExclusionList); + virtual bool characters(const QString &ch); + + virtual bool endElement(const QString &namespaceURI, + const QString &localName, + const QString &qName); + virtual bool startElement(const QString &namespaceURI, + const QString &localName, + const QString &qName, + const QXmlAttributes &atts); + + virtual TestSuite *testSuite() const; + + private: + QStringList readExclusionList(const bool useExclusionList) const; + + TestSuite * m_ts; + TestContainer * m_container; + XQTSTestCase * m_tc; + TestBaseLine * m_baseLine; + QString m_ch; + const QUrl m_catalogFile; + + /** + * The extension of XQuery files. For example, ".xq" + */ + QString m_xqueryFileExtension; + + /** + * The base URI for where the XQuery query files are found. + * It is absolute, resolved against catalogFile. + */ + QUrl m_queryOffset; + + QUrl m_baselineOffset; + QUrl m_sourceOffset; + QUrl m_currentQueryPath; + QUrl m_currentBaselinePath; + + /** + * In the XQTSCatalog.xml, each source file in each test is referred to + * by a key, which can be fully looked up in the @c sources element. This QHash + * maps the keys to absolute URIs pointing to the source files. + */ + ExternalSourceLoader::SourceMap m_sourceMap; + + ExternalSourceLoader::VariableMap m_tcSourceInputs; + + QPatternist::ResourceLoader::Ptr m_resourceLoader; + + /** + * The current value of input-file/\@variable/. + */ + QString m_currentInputVariable; + + /** + * The names of the test groups we're excluding. + */ + const QStringList m_exclusionList; + + /** + * This is set when we're inside a test-group that we're excluding. + */ + bool m_isExcluding; + + /** + * The names of the test groups. + */ + QStack m_testGroupName; + + /** + * Holds the content of the current input-URI element. + */ + QString m_inputURI; + QString m_contextItemSource; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TestSuiteResult.cpp b/tests/auto/xmlpatternssdk/TestSuiteResult.cpp new file mode 100644 index 0000000..b4df16d --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestSuiteResult.cpp @@ -0,0 +1,173 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "Global.h" +#include "XMLWriter.h" + +#include "TestSuiteResult.h" + +using namespace QPatternistSDK; + +TestSuiteResult::TestSuiteResult(const QString &testSuiteVersion, + const QDate &runDate, + const TestResult::List &results) : m_testSuiteVersion(testSuiteVersion), + m_runDate(runDate), + m_results(results) +{ +} + +TestSuiteResult::~TestSuiteResult() +{ + qDeleteAll(m_results); +} + +void TestSuiteResult::toXML(XMLWriter &receiver) const +{ + /* If this data needs to be configurable in someway(say, another + * XML format is supported), then break out the info into getters(alternatively, combined + * with setters, or that the class is subclassed), and access the getters instead. + */ + const QString organizationName (QLatin1String("K Desktop Environment(KDE)")); + const QString organizationWebsite (QLatin1String("http://www.kde.org/")); + const QString submittorName (QLatin1String("Frans Englich")); + const QString submittorEmail (QLatin1String("frans.englich@nokia.com")); + const QString implementationVersion (QLatin1String("0.1")); + const QString implementationName (QLatin1String("Patternist")); + const QString implementationDescription (QLatin1String( + "Patternist is an implementation written in C++ " + "and with the Qt/KDE libraries. " + "It is licensed under GNU LGPL and part of KDE, " + "the K Desktop Environment.")); + + /* Not currently serialized: + * - + * - + * - + */ + + receiver.startDocument(); + /* */ + receiver.startPrefixMapping(QString(), Global::xqtsResultNS); + receiver.startElement(QLatin1String("test-suite-result")); + receiver.endPrefixMapping(QString()); + + /* */ + QXmlAttributes implementationAtts; + implementationAtts.append(QLatin1String("name"), QString(), + QLatin1String("name"), implementationName); + implementationAtts.append(QLatin1String("version"), QString(), + QLatin1String("version"), implementationVersion); + receiver.startElement(QLatin1String("implementation"), implementationAtts); + + /* */ + QXmlAttributes organizationAtts; + organizationAtts.append(QLatin1String("name"), QString(), + QLatin1String("name"), organizationName); + organizationAtts.append(QLatin1String("website"), QString(), + QLatin1String("website"), organizationWebsite); + receiver.startElement(QLatin1String("organization"), organizationAtts); + + /* */ + receiver.endElement(QLatin1String("organization")); + + /* */ + QXmlAttributes submittorAtts; + submittorAtts.append(QLatin1String("name"), QString(), QLatin1String("name"), submittorName); + submittorAtts.append(QLatin1String("email"), QString(), QLatin1String("email"), submittorEmail); + receiver.startElement(QLatin1String("submittor"), submittorAtts); + + /* */ + receiver.endElement(QLatin1String("submittor")); + + /* */ + receiver.startElement(QLatin1String("description")); + + /*

*/ + receiver.startElement(QLatin1String("p")); + receiver.characters(implementationDescription); + + /*

*/ + receiver.endElement(QLatin1String("p")); + /*
*/ + receiver.endElement(QLatin1String("description")); + + /*
*/ + receiver.endElement(QLatin1String("implementation")); + + /* */ + receiver.startElement(QLatin1String("syntax")); + receiver.characters(QLatin1String(QLatin1String("XQuery"))); + + /* */ + receiver.endElement(QLatin1String("syntax")); + + /* */ + QXmlAttributes test_runAtts; + test_runAtts.append(QLatin1String("dateRun"), QString(), QLatin1String("dateRun"), m_runDate.toString(QLatin1String("yyyy-MM-dd"))); + receiver.startElement(QLatin1String("test-run"), test_runAtts); + + /* */ + QXmlAttributes test_suiteAtts; + test_suiteAtts.append(QLatin1String("version"), QString(), QLatin1String("version"), m_testSuiteVersion); + receiver.startElement(QLatin1String("test-suite"), test_suiteAtts); + + /* */ + receiver.endElement(QLatin1String("test-suite")); + + /* */ + receiver.endElement(QLatin1String("test-run")); + + /* Serialize the TestResults: tons of test-case elements. */ + const TestResult::List::const_iterator end(m_results.constEnd()); + TestResult::List::const_iterator it(m_results.constBegin()); + + for(; it != end; ++it) + (*it)->toXML(receiver); + + /*
*/ + receiver.endElement(QLatin1String("test-suite-result")); + receiver.endDocument(); +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/TestSuiteResult.h b/tests/auto/xmlpatternssdk/TestSuiteResult.h new file mode 100644 index 0000000..474190e --- /dev/null +++ b/tests/auto/xmlpatternssdk/TestSuiteResult.h @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestSuiteResult_H +#define PatternistSDK_TestSuiteResult_H + +#include +#include + +#include "TestResult.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short A collection of TestResult instances. + * + * A TestSuiteResult gathers all TestResult instances, and provides + * the toXML() function which serializes it all into a XQuery Test Suite + * result file, conforming to XQTSResult.xsd. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TestSuiteResult + { + public: + ~TestSuiteResult(); + + TestSuiteResult(const QString &testSuiteVersion, + const QDate &runDate, + const TestResult::List &results); + + /** + * Serializes the test results this TestSuiteResult represents, + * into XQTS test-suite-result document, conformant to XQTSCatalog.xsd. + */ + void toXML(XMLWriter &receiver) const; + + private: + const QString m_testSuiteVersion; + const QDate m_runDate; + const TestResult::List m_results; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TreeItem.cpp b/tests/auto/xmlpatternssdk/TreeItem.cpp new file mode 100644 index 0000000..016aefc --- /dev/null +++ b/tests/auto/xmlpatternssdk/TreeItem.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "TestContainer.h" + +#include "TreeItem.h" + +using namespace QPatternistSDK; + +int TreeItem::row() const +{ + const TreeItem *const p = parent(); + + if(p) + { + /* The const_cast makes it possible for QPointer's constructor + * to implicitly kick in. */ + return p->children().indexOf(const_cast(this)); + } + else + return -1; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TreeItem.h b/tests/auto/xmlpatternssdk/TreeItem.h new file mode 100644 index 0000000..f4e67f8 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TreeItem.h @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TreeItem_H +#define PatternistSDK_TreeItem_H + +#include + +#include "Global.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QVariant; +template class QList; +template class QPointer; + +namespace QPatternistSDK +{ + /** + * @short TreeItem is a node in a hierachial structure and is used together + * with TreeModel. + * + * TreeItem is abstract base class. Instances of sub-classes of TreeItem + * can be used with TreeModel in order to use hierarchial data in Qt's + * model/view framework. + * + * TreeItem is a QObject in order to be able to be used with QPointer. + * + * @author Frans Englich + * @see TreeModel + * @ingroup PatternistSDK + */ + class Q_PATTERNISTSDK_EXPORT TreeItem : public QObject + { + Q_OBJECT + public: + typedef QList > List; + + virtual ~TreeItem() {} + virtual void appendChild(TreeItem *item) = 0; + virtual TreeItem *child(const unsigned int row) const = 0; + virtual unsigned int childCount() const = 0; + virtual TreeItem *parent() const = 0; + + virtual TreeItem::List children() const = 0; + virtual int columnCount() const = 0; + + /** + * Determines the position among the children of + * this TreeItem's parent. This is done by introspecting the result + * of children(). + */ + int row() const; + + virtual QVariant data(const Qt::ItemDataRole role, int column) const = 0; + + Q_SIGNALS: + /** + * Emitted whenever this item changed. This is used for keeping + * views in synchronization with the item model which houses + * this item. + * + * @param item the item which changed. That is, this TreeItem. + */ + void changed(TreeItem *item); + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TreeModel.cpp b/tests/auto/xmlpatternssdk/TreeModel.cpp new file mode 100644 index 0000000..b54f0a8 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TreeModel.cpp @@ -0,0 +1,184 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "TestContainer.h" + +#include "TreeModel.h" + +using namespace QPatternistSDK; + +TreeModel::TreeModel(const QStringList columnData, + QObject *p) : QAbstractItemModel(p), + m_root(0), + m_columnData(columnData) +{ +} + +TreeModel::~TreeModel() +{ +} + +QVariant TreeModel::data(const QModelIndex &idx, int role) const +{ + if(!idx.isValid()) + return QVariant(); + + TreeItem *item = static_cast(idx.internalPointer()); + Q_ASSERT(item); + + return item->data(static_cast(role), idx.column()); +} + +QVariant TreeModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if(orientation == Qt::Horizontal && role == Qt::DisplayRole) + return m_columnData.value(section); + + return QVariant(); +} + +void TreeModel::childChanged(TreeItem *item) +{ + if (item) { + const QModelIndex index = createIndex(item->row(), 0, item); + dataChanged(index, index); + } else { + layoutChanged(); + } +} + +QModelIndex TreeModel::index(int row, int column, const QModelIndex &p) const +{ + const int c = columnCount(p); + + if(row < 0 || column < 0 || column >= c) + return QModelIndex(); + + TreeItem *parentItem; + + if(p.isValid()) + parentItem = static_cast(p.internalPointer()); + else + parentItem = m_root; + + if(!parentItem) + return QModelIndex(); + + TreeItem *childItem = parentItem->child(row); + + if(childItem) + return createIndex(row, column, childItem); + else + return QModelIndex(); +} + +QModelIndex TreeModel::parent(const QModelIndex &idx) const +{ + if(!idx.isValid()) + return QModelIndex(); + + TreeItem *childItem = static_cast(idx.internalPointer()); + Q_ASSERT(childItem); + TreeItem *parentItem = childItem->parent(); + + if(!parentItem || parentItem == m_root) + return QModelIndex(); + + Q_ASSERT(parentItem); + return createIndex(parentItem->row(), 0, parentItem); +} + +Qt::ItemFlags TreeModel::flags(const QModelIndex &idx) const +{ + /* Not sure about this code. */ + if(!idx.isValid()) + return Qt::ItemFlags(); + + return Qt::ItemIsEnabled | Qt::ItemIsSelectable; +} + +int TreeModel::rowCount(const QModelIndex &p) const +{ + if(p.column() > 0) + return 0; + + const TreeItem *parentItem; + + if(p.isValid()) + parentItem = static_cast(p.internalPointer()); + else + { + if(m_root) + parentItem = m_root; + else + return 0; + } + + return parentItem->childCount(); +} + +int TreeModel::columnCount(const QModelIndex &p) const +{ + if(p.isValid()) + return static_cast(p.internalPointer())->columnCount(); + else + return m_columnData.count(); +} + +TreeItem *TreeModel::root() const +{ + return m_root; +} + +void TreeModel::setRoot(TreeItem *r) +{ + TreeItem *const oldRoot = m_root; + m_root = r; + + if(m_root) + connect(r, SIGNAL(changed(TreeItem *)), SLOT(childChanged(TreeItem *))); + reset(); /* Notify views that we have radically changed. */ + delete oldRoot; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/TreeModel.h b/tests/auto/xmlpatternssdk/TreeModel.h new file mode 100644 index 0000000..b1220e4 --- /dev/null +++ b/tests/auto/xmlpatternssdk/TreeModel.h @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TreeModel_H +#define PatternistSDK_TreeModel_H + +#include +#include +#include +#include + +#include "Global.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class TreeItem; + + /** + * @short TreeItem is a generic QAbstractItemModel tailored for + * representing hierarchial data. + * + * TreeModel is an item model in Qt's model/view framework. Its + * data consists of TreeItem instances. + * + * @see TreeItem + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT TreeModel : public QAbstractItemModel + { + Q_OBJECT + public: + TreeModel(const QStringList columnData, QObject *parent); + virtual ~TreeModel(); + + virtual QVariant data(const QModelIndex &index, int role) const; + virtual Qt::ItemFlags flags(const QModelIndex &index) const; + virtual QVariant headerData(int section, + Qt::Orientation orientation, + int role = Qt::DisplayRole) const; + virtual QModelIndex index(int row, + int column, + const QModelIndex &parent = QModelIndex()) const; + virtual QModelIndex parent(const QModelIndex &index) const; + virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; + virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; + + TreeItem *root() const; + /** + * Sets @p root to the new root, and deletes the old. + */ + void setRoot(TreeItem *root); + + protected Q_SLOTS: + void childChanged(TreeItem *child); + + private: + QPointer m_root; + const QStringList m_columnData; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/Worker.cpp b/tests/auto/xmlpatternssdk/Worker.cpp new file mode 100644 index 0000000..02c21f8 --- /dev/null +++ b/tests/auto/xmlpatternssdk/Worker.cpp @@ -0,0 +1,258 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +#include "ExitCode.h" + +#include "Worker.h" + +using namespace QPatternistSDK; + +const char *const Worker::m_indent = " "; + +Worker::Worker(QEventLoop &ev, + const QFileInfo &baseline, + const QFileInfo &result) : m_finishedCount(0) + , m_baselineFile(baseline) + , m_resultFile(result) + , m_eventLoop(ev) +{ +} + +void Worker::list(QTextStream &out, const QString &msg, QStringList &list) +{ + Q_ASSERT(!msg.isEmpty()); + + if(list.isEmpty()) + return; + + list.sort(); /* Make it pretty, and easy to read. */ + + out << msg << ":\n"; + + const QStringList::const_iterator end(list.constEnd()); + QStringList::const_iterator it(list.constBegin()); + + for(; it != end; ++it) + out << m_indent << qPrintable(*it) << '\n'; +} + +static inline int count(const ResultThreader::Hash &list, const TestResult::Status stat) +{ + const ResultThreader::Hash::const_iterator end(list.constEnd()); + ResultThreader::Hash::const_iterator it(list.constBegin()); + int result = 0; + + for(; it != end; ++it) + { + if(it.value() == stat) + ++result; + } + + return result; +} + +void Worker::threadFinished() +{ + ++m_finishedCount; + Q_ASSERT(m_finishedCount == 1 || m_finishedCount == 2); + + const ResultThreader *const handler = static_cast(sender()); + Q_ASSERT(handler); + + switch(handler->type()) + { + case ResultThreader::Baseline: + { + m_baseline = handler->result(); + break; + } + case ResultThreader::Result: + m_result = handler->result(); + } + + if(m_finishedCount == 1) /* One thread's missing. */ + return; + + /* Ok, both threads have now finished, and we got their results in m_result and m_baseline. */ + + /* No matter how this function exits, we want to delete this Worker. */ + deleteLater(); + + ResultThreader::Hash::const_iterator itA(m_result.constBegin()); + ResultThreader::Hash::const_iterator itB(m_baseline.constBegin()); + const ResultThreader::Hash::const_iterator endA(m_result.constEnd()); + const ResultThreader::Hash::const_iterator endB(m_baseline.constEnd()); + const int baselineCount = m_baseline.count(); + const int resultCount = m_result.count(); + + /* If you want useful output, change the QTextStream to use stderr. */ + //QTextStream err(stderr); + QByteArray out; + QTextStream err(&out); + + if(resultCount < baselineCount) + { + err << qPrintable(QString(QLatin1String("WARNING: Test result contains %1 reports, " + "but the baseline contains %2, a DECREASE " + "of %3 tests.\n")) + .arg(resultCount) + .arg(baselineCount) + .arg(resultCount - baselineCount)); + } + else if(resultCount > baselineCount) + { + err << qPrintable(QString(QLatin1String("NOTE: The number of tests run is more than what " + "the baseline specifies. Run was %1 test cases, the " + "baseline specifies %2; an increase of %3 tests.\n")) + .arg(resultCount) + .arg(baselineCount) + .arg(resultCount - baselineCount)); + } + + for(; itA != endA; ++itA) + { + const TestResult::Status result = itA.value(); + const TestResult::Status baseline = m_baseline.value(itA.key()); + + if(result == baseline) /* We have no change. */ + { + if(result == TestResult::NotTested) + m_notTested.append(itA.key()); + else + continue; + } + else if(baseline == TestResult::Pass && result == TestResult::Fail) + m_unexpectedFailures.append(itA.key()); + else if(baseline == TestResult::Fail && result == TestResult::Pass) + m_unexpectedPasses.append(itA.key()); + } + + list(err, QLatin1String("Not tested"), m_notTested); + list(err, QLatin1String("Unexpected failures"), m_unexpectedFailures); + list(err, QLatin1String("Unexpected passes"), m_unexpectedPasses); + + err << "SUMMARY:\n"; + typedef QPair Info; + typedef QList InfoList; + InfoList info; + + const int totFail = count(m_result, TestResult::Fail); + const int totPass = count(m_result, TestResult::Pass); + const int total = resultCount; + const int notTested = m_notTested.count(); + const int percentage = int((static_cast(totPass) / total) * 100); + + Q_ASSERT_X(percentage >= 0 && percentage <= 100, Q_FUNC_INFO, + qPrintable(QString(QLatin1String("Percentage was: %1")).arg(percentage))); + + info.append(Info(QLatin1String("Total"), total)); + info.append(Info(QLatin1String("Failures"), totFail)); + info.append(Info(QLatin1String("Passes"), totPass)); + info.append(Info(QLatin1String("Not tested"), notTested)); + info.append(Info(QLatin1String("Pass percentage(%)"), percentage)); + info.append(Info(QLatin1String("Unexpected failures"), m_unexpectedFailures.count())); + info.append(Info(QLatin1String("Unexpected passes"), m_unexpectedPasses.count())); + + const InfoList::const_iterator end(info.constEnd()); + InfoList::const_iterator it(info.constBegin()); + + /* List the statistics nicely in a row with padded columns. */ + for(; it != end; ++it) + { + const QString result((((*it).first) + QLatin1Char(':')).leftJustified(22, QLatin1Char(' '))); + err << m_indent << qPrintable(result) << (*it).second << '\n'; + } + + if(!m_unexpectedFailures.isEmpty()) + { + err << "FAILURE: Regressions discovered, baseline was not updated.\n"; + err.flush(); + QTextStream(stderr) << out; + m_eventLoop.exit(ExitCode::Regression); + return; + } + else if(m_unexpectedPasses.isEmpty() && baselineCount == resultCount) + { + err << "Result was identical to the baseline, baseline was not updated.\n"; + m_eventLoop.exit(ExitCode::Success); + return; + } + + /* Ok, we got unexpected successes and no regressions: let's update the baseline. */ + + QFile resultFile(m_resultFile.absoluteFilePath()); + + /* Remove the old file, otherwise QFile::copy() will fail. */ + QDir baselineDir(m_baselineFile.absolutePath()); + baselineDir.remove(m_baselineFile.fileName()); + + if(resultFile.copy(m_baselineFile.absoluteFilePath())) + { + /* Give a detailed message of what's going on. */ + if(resultCount > baselineCount) + err << "More tests was run than specified in the baseline, updating the baseline.\n"; + else + err << "Improvement, the baseline was updated.\n"; + + /* We actually flag this as an error, because the new baseline must be submitted. */ + err.flush(); + QTextStream(stderr) << out; + m_eventLoop.exit(ExitCode::Regression); + return; + } + else + { + err << qPrintable(QString(QLatin1String("Encountered error when updating " + "the baseline: %1\n")) + .arg(resultFile.errorString())); + err.flush(); + QTextStream(stderr) << out; + m_eventLoop.exit(ExitCode::WriteError); + return; + } +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/Worker.h b/tests/auto/xmlpatternssdk/Worker.h new file mode 100644 index 0000000..31c5c1b --- /dev/null +++ b/tests/auto/xmlpatternssdk/Worker.h @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_Worker_H +#define PatternistSDK_Worker_H + +#include +#include +#include +#include + +#include "ResultThreader.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QEventLoop; + +namespace QPatternistSDK +{ + /** + * @short Gets notified when the ResultThreader threads are + * finished, and output summaries and adjusts a baseline. + * + * @author Frans Englich + * @ingroup PatternistSDK + */ + class Q_PATTERNISTSDK_EXPORT Worker : public QObject + { + Q_OBJECT + public: + Worker(QEventLoop &e, + const QFileInfo &baseline, + const QFileInfo &result); + + public Q_SLOTS: + void threadFinished(); + + private: + static inline void list(QTextStream &out, const QString &msg, QStringList &list); + + qint8 m_finishedCount; + const QFileInfo m_baselineFile; + const QFileInfo m_resultFile; + ResultThreader::Hash m_result; + ResultThreader::Hash m_baseline; + ResultThreader::Hash m_summary; + QStringList m_unexpectedPasses; + QStringList m_unexpectedFailures; + QStringList m_notTested; + QEventLoop & m_eventLoop; + static const char *const m_indent; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/XMLWriter.cpp b/tests/auto/xmlpatternssdk/XMLWriter.cpp new file mode 100644 index 0000000..b13db10 --- /dev/null +++ b/tests/auto/xmlpatternssdk/XMLWriter.cpp @@ -0,0 +1,669 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include "XMLWriter.h" + +/* Issues: + * - Switch to Qt's d-pointer semantics, if in Qt. + * - Remove namespace(PatternistSDK), and change name, if in Qt. + * - Is it really necessary to pass the tag name to endElement()? + * - Could it be of interest to let the user control the encoding? Are those cases common + * enough to justify support in Qt? Using anything but UTF-8 or UTF-16 + * means asking for trouble, from an interoperability perspective. + */ + +/* Design rationalis, comments: + * + * - The class is called XMLWriter to harvest familarity by being consistent with + * Java's XMLWriter class. If XMLWriter is moved to Qt, the name QXmlWriter is perhaps suitable. + * - The class does not handle indentation because the "do one thing well"-principle is + * in use. XMLWriter should be fast and not assume a certain idea of indentation. Indentation + * should be implemented in a standalone QXmlContentHandler that performs the indentation and + * "has a" QXmlContentHandler which it in addition calls, and by that proxying/piping another + * QXmlContentHandler(which most likely is an XMLWriter). Thus, achieving a modularized, + * flexibly approach to indentation. A reason is also that indentation is very subjective. + * The indenter class should probably be called XMLIndenter/QXmlIndenter. + * - It could be of interest to implement QXmlDTDHandler such that it would be possible to serialize + * DTDs. Must be done before BC becomes significant. + * - I think the most valuable of this class is its Q_ASSERT tests. Many programmers have severe problems + * producing XML, and the tests helps them catching their mistakes. They therefore promote + * interoperability. Do not remove them. If any are wrong, fix them instead. + */ + +using namespace QPatternistSDK; + +/** + * A namespace binding, prefix/namespace URI. + */ +typedef QPair NSBinding; +typedef QList NSBindingList; + +#ifdef QT_NO_DEBUG +# define DEBUG_CODE(code) +#else +# define DEBUG_CODE(code) code +#endif + +class XMLWriter::Private +{ +public: + inline Private(QIODevice *devP) : insideCDATA(false), + addModificationNote(false), + dev(devP) + { + hasContentStack.push(true); + } + +#ifdef QT_NO_DEBUG + inline void validateQName(const QString &) const + { + } + + inline void verifyNS(const QString &) const + { + } +#else + /** + * Simple test of that @p name is an acceptable QName. + */ + inline void validateQName(const QString &name) + { + Q_ASSERT_X(!name.isEmpty(), Q_FUNC_INFO, + "An XML name cannot be empty."); + Q_ASSERT_X(!name.endsWith(QLatin1Char(':')), Q_FUNC_INFO, + "An XML name cannot end with a colon(QLatin1Char(':'))."); + Q_ASSERT_X(!name.contains(QRegExp(QLatin1String("[ \t\n]"))), Q_FUNC_INFO, + "An XML name cannot contain whitespace."); + } + + /** + * Ensures that the prefix of @p qName is declared. + */ + inline void verifyNS(const QString &qName) const + { + const QString prefix(qName.left(qName.indexOf(QLatin1Char(':')))); + + if(qName.contains(QLatin1Char(':')) && prefix != QLatin1String("xml")) + { + bool foundPrefix = false; + const QStack::const_iterator end(namespaceTracker.constEnd()); + QStack::const_iterator it(namespaceTracker.constBegin()); + + for(; it != end; ++it) + { + const NSBindingList::const_iterator lend((*it).constEnd()); + NSBindingList::const_iterator lit((*it).constBegin()); + + for(; lit != lend; ++it) + { + if((*lit).first == prefix) + { + foundPrefix = true; + break; + } + } + if(foundPrefix) + break; + } + + Q_ASSERT_X(foundPrefix, "XMLWriter::startElement()", + qPrintable(QString::fromLatin1("The prefix %1 is not declared. All prefixes " + "except 'xml' must be declared.").arg(prefix))); + } + } +#endif + + inline QString escapeElementContent(const QString &ch) + { + const int l = ch.length(); + QString retval; + + for(int i = 0; i != l; ++i) + { + const QChar c(ch.at(i)); + + if(c == QLatin1Char(QLatin1Char('&'))) + retval += QLatin1String("&"); + else if(c == QLatin1Char(QLatin1Char('<'))) + retval += QLatin1String("<"); + else + retval += c; + } + + return retval; + } + + inline QString escapeAttributeContent(const QString &ch) + { + const int l = ch.length(); + QString retval; + + for(int i = 0; i != l; ++i) + { + const QChar c(ch.at(i)); + + /* We don't have to escape '\'' because we use '\"' as attribute delimiter. */ + if(c == QLatin1Char('&')) + retval += QLatin1String("&"); + else if(c == QLatin1Char('<')) + retval += QLatin1String("<"); + else if(c == QLatin1Char('"')) + retval += QLatin1String("""); + else + retval += c; + } + + return retval; + } + + inline QString escapeCDATAContent(const QString &ch) + { + const int l = ch.length(); + QString retval; + qint8 atEnd = 0; + + for(int i = 0; i != l; ++i) + { + const QChar c(ch.at(i)); + + /* Escape '>' if in "]]>" */ + if(c == QLatin1Char(']')) + { + if(atEnd == 0 || atEnd == 1) + ++atEnd; + else + atEnd = 0; + + retval += QLatin1Char(']'); + } + else if(c == QLatin1Char('>')) + { + if(atEnd == 2) + retval += QLatin1String(">"); + else + { + atEnd = 0; + retval += QLatin1Char('>'); + } + } + else + retval += c; + } + + return retval; + } + + /** + * We wrap dev in this function such that we can deploy the Q_ASSERT_X + * macro in each place it's used. + */ + inline QIODevice *device() const + { + Q_ASSERT_X(dev, Q_FUNC_INFO, + "No device specified for XMLWriter; one must be specified with " + "setDevice() or via the constructor before XMLWriter can be used."); + return dev; + } + + /** + * @returns true on success, otherwise false + */ + inline bool serialize(const QString &data) + { + const QByteArray utf8(data.toUtf8()); + + return device()->write(utf8) == utf8.size(); + } + + /** + * @returns true on success, otherwise false + */ + inline bool serialize(const char data) + { + return device()->putChar(data); + } + + /** + * @returns true on success, otherwise false + */ + inline bool serialize(const char *data) + { + return device()->write(data) == qstrlen(data); + } + + inline bool hasElementContent() const + { + return hasContentStack.top(); + } + + inline void handleElement() + { + if(!hasElementContent()) + serialize('>'); + + /* This element is content for the parent. */ + hasContentStack.top() = true; + } + + NSBindingList namespaces; + bool insideCDATA; + bool addModificationNote; + QString msg; + QIODevice *dev; + QStack hasContentStack; + QString errorString; + DEBUG_CODE(QStack tags;) + DEBUG_CODE(QStack namespaceTracker;) +}; + +/** + * Reduces complexity. The empty else clause is for avoiding mess when macro + * is used in the 'then' branch of an if clause, which is followed by an else clause. + */ +#define serialize(string) if(!d->serialize(string)) \ + { \ + d->errorString = d->device()->errorString(); \ + return false; \ + } \ + else do {} while (false) + +XMLWriter::XMLWriter(QIODevice *outStream) : d(new Private(outStream)) +{ +} + +XMLWriter::~XMLWriter() +{ + delete d; +} + +bool XMLWriter::startDocument() +{ + if(!device()->isOpen() && !device()->open(QIODevice::WriteOnly)) + return false; + + if(d->addModificationNote) + { + if(d->msg.isNull()) + { + d->msg = QString::fromLatin1("NOTE: This file was automatically generated " + "by %1 at %2. All changes to this file will be lost.") + .arg(QCoreApplication::instance()->applicationName(), + QDateTime::currentDateTime().toString()); + } + if(!comment(d->msg)) + return false; + + serialize('\n'); + } + + serialize(QLatin1String("\n")); + + return true; +} + +bool XMLWriter::startElement(const QString &/*namespaceURI*/, + const QString &/*localName*/, + const QString &qName, + const QXmlAttributes &atts) +{ + return startElement(qName, atts); +} + +bool XMLWriter::startElement(const QString &qName, + const QXmlAttributes &atts) +{ + Q_ASSERT_X(!d->insideCDATA, Q_FUNC_INFO, + "Only characters() can be received when inside CDATA."); + Q_ASSERT_X(!qName.startsWith(QLatin1String("xmlns")), Q_FUNC_INFO, + "startElement should not be used for declaring prefixes, " + "use startPrefixMapping() for that."); + + d->validateQName(qName); + d->verifyNS(qName); + + d->handleElement(); + + serialize('<'); + serialize(qName); + + DEBUG_CODE(d->tags.push(qName)); + DEBUG_CODE(d->namespaceTracker.push(d->namespaces)); + + /* Add namespace declarations. */ + const NSBindingList::const_iterator end(d->namespaces.constEnd()); + NSBindingList::const_iterator it(d->namespaces.constBegin()); + + for(; it != end; ++it) + { + if((*it).first.isEmpty()) + serialize(" xmlns="); + else + { + serialize(" xmlns:"); + serialize((*it).first); + serialize('='); + } + + serialize('"'); + serialize(d->escapeElementContent((*it).second)); + serialize('"'); + } + d->namespaces.clear(); + + const int c = atts.count(); + + /* Serialize attributes. */ + for(int i = 0; i != c; ++i) + { + d->validateQName(atts.qName(i)); + d->verifyNS(atts.qName(i)); + + serialize(' '); + serialize(atts.qName(i)); + serialize("=\""); + serialize(d->escapeAttributeContent(atts.value(i))); + serialize('"'); + } + + d->hasContentStack.push(false); + return true; +} + +bool XMLWriter::endElement(const QString &/*namespaceURI*/, + const QString &/*localName*/, + const QString &qName) +{ + return endElement(qName); +} + +bool XMLWriter::endElement(const QString &qName) +{ + Q_ASSERT_X(!d->insideCDATA, Q_FUNC_INFO, + "Only characters() can be received when inside CDATA."); + Q_ASSERT_X(d->tags.pop() == qName, Q_FUNC_INFO, + "The element tags are not balanced, the produced XML is invalid."); + + DEBUG_CODE(d->namespaceTracker.pop()); + + /* "this" element is content for our parent, so ensure hasElementContent is true. */ + + if(d->hasElementContent()) + { + serialize(QLatin1String("'); + } + else + serialize(QLatin1String("/>")); + + d->hasContentStack.pop(); + + return true; +} + +bool XMLWriter::startPrefixMapping(const QString &prefix, const QString &uri) +{ + Q_ASSERT_X(!d->insideCDATA, Q_FUNC_INFO, + "Only characters() can be received when inside CDATA."); + Q_ASSERT_X(prefix.toLower() != QLatin1String("xml") || + (prefix.toLower() == QLatin1String("xml") && + (uri == QLatin1String("http://www.w3.org/TR/REC-xml-names/") || + uri.isEmpty())), + Q_FUNC_INFO, + "The prefix 'xml' can only be bound to the namespace " + "\"http://www.w3.org/TR/REC-xml-names/\"."); + Q_ASSERT_X(prefix.toLower() != QLatin1String("xml") && + uri != QLatin1String("http://www.w3.org/TR/REC-xml-names/"), + Q_FUNC_INFO, + "The namespace \"http://www.w3.org/TR/REC-xml-names/\" can only be bound to the " + "\"xml\" prefix."); + + d->namespaces.append(qMakePair(prefix, uri)); + return true; +} + +bool XMLWriter::processingInstruction(const QString &target, + const QString &data) +{ + Q_ASSERT_X(target.toLower() != QLatin1String("xml"), Q_FUNC_INFO, + "A processing instruction cannot have the name xml in any " + "capitalization, because it is reserved."); + Q_ASSERT_X(!data.contains(QLatin1String("?>")), Q_FUNC_INFO, + "The content of a processing instruction cannot contain the string \"?>\"."); + Q_ASSERT_X(!d->insideCDATA, "XMLWriter::processingInstruction()", + "Only characters() can be received when inside CDATA."); + + d->handleElement(); + + serialize(QLatin1String("")); + return true; +} + +bool XMLWriter::characters(const QString &ch) +{ + Q_ASSERT_X(d->tags.count() >= 1, Q_FUNC_INFO, + "Text nodes can only appear inside elements(no elements sent)."); + d->handleElement(); + + if(d->insideCDATA) + serialize(d->escapeCDATAContent(ch)); + else + serialize(d->escapeElementContent(ch)); + + return true; +} + +bool XMLWriter::comment(const QString &ch) +{ + Q_ASSERT_X(!d->insideCDATA, Q_FUNC_INFO, + "Only characters() can be received when inside CDATA."); + Q_ASSERT_X(!ch.contains(QLatin1String("--")), Q_FUNC_INFO, + "XML comments may not contain double-hyphens(\"--\")."); + Q_ASSERT_X(!ch.endsWith(QLatin1Char('-')), Q_FUNC_INFO, + "XML comments cannot end with a hyphen, \"-\"(add a space, for example)."); + /* A comment starting with "")); + + return true; +} + +bool XMLWriter::startCDATA() +{ + Q_ASSERT_X(d->insideCDATA, Q_FUNC_INFO, + "startCDATA() has already been called."); + Q_ASSERT_X(d->tags.count() >= 1, Q_FUNC_INFO, + "CDATA sections can only appear inside elements(no elements sent)."); + d->insideCDATA = true; + serialize(QLatin1String("insideCDATA = false; + serialize("]]>"); + return true; +} + +bool XMLWriter::startDTD(const QString &name, + const QString &publicId, + const QString &systemId) +{ + Q_ASSERT_X(!d->insideCDATA, Q_FUNC_INFO, + "Only characters() can be received when inside CDATA."); + Q_ASSERT_X(!name.isEmpty(), Q_FUNC_INFO, + "The DOCTYPE name cannot be empty."); + Q_ASSERT_X(d->tags.isEmpty() && d->namespaces.isEmpty(), Q_FUNC_INFO, + "No content such as namespace declarations or elements can be serialized " + "before the DOCTYPE declaration, the XML is invalid."); + Q_ASSERT_X(!publicId.contains(QLatin1Char('"')), Q_FUNC_INFO, + "The PUBLIC ID cannot contain quotes('\"')."); + Q_ASSERT_X(!systemId.contains(QLatin1Char('"')), Q_FUNC_INFO, + "The SYSTEM ID cannot contain quotes('\"')."); + + serialize(QLatin1String("tags.isEmpty() && d->namespaces.isEmpty(), Q_FUNC_INFO, + "Content such as namespace declarations or elements cannot occur inside " + "the DOCTYPE declaration, the XML is invalid."); + serialize(QLatin1String(">\n")); + return true; +} + +bool XMLWriter::startEntity(const QString &) +{ + return true; +} + +bool XMLWriter::endEntity(const QString &) +{ + return true; +} + +void XMLWriter::setMessage(const QString &msg) +{ + d->msg = msg; +} + +QString XMLWriter::modificationMessage() const +{ + return d->msg; +} + +bool XMLWriter::endDocument() +{ + Q_ASSERT_X(d->tags.isEmpty(), Q_FUNC_INFO, + "endDocument() called before all elements were closed with endElement()."); + d->device()->close(); + return true; +} + +QString XMLWriter::errorString() const +{ + return d->errorString; +} + +bool XMLWriter::ignorableWhitespace(const QString &ch) +{ + return characters(ch); +} + +bool XMLWriter::endPrefixMapping(const QString &) +{ + /* Again, should we do something with this? */ + return true; +} + +bool XMLWriter::skippedEntity(const QString &) +{ + return true; +} + +void XMLWriter::setDocumentLocator(QXmlLocator *) +{ +} + +QIODevice *XMLWriter::device() const +{ + return d->dev; +} + +void XMLWriter::setDevice(QIODevice *dev) +{ + d->dev = dev; +} + +void XMLWriter::setAddMessage(const bool toggle) +{ + d->addModificationNote = toggle; +} + +bool XMLWriter::addModificationMessage() const +{ + return d->addModificationNote; +} + +#undef serialize +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/XMLWriter.h b/tests/auto/xmlpatternssdk/XMLWriter.h new file mode 100644 index 0000000..dd7b548 --- /dev/null +++ b/tests/auto/xmlpatternssdk/XMLWriter.h @@ -0,0 +1,403 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_XMLWriter_H +#define PatternistSDK_XMLWriter_H + +#include "Global.h" + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QIODevice; + +namespace QPatternistSDK +{ + /** + * @short Serializes a stream of SAX events into XML, sent to a QIODevice. + * + * XMLWriter is a fast and simple XML serializer which takes care of + * all the low level details of well-formedness and character escaping, allowing + * the user to focus on higher level issues and increasing the chances of producing + * valid, interoperable XML. + * + * The content XMLWriter produces is sent to a QIODevice, which is either + * specified in XMLWriter's constructor or via setDevice(). If writing to + * the device fails, the content functions such as startElement() returns @c false. + * + * XMLWriter sub-classes QXmlContentHandler meaning it can serialize content + * from any code that produces SAX events. The class can also be used manually, + * by calling startElement(), endCDATA(), and so forth. + * + * XMLWriter cannot be used to serialize multiple documents. One instance per + * document must be used. + * + * XMLWriter takes care of escaping content into character references as necessary. Thus, + * it should not be done manually. In fact, it would most likely + * result in invalid XML or an unintended result. XMLWriter always serializes into UTF-8. + * + * When compiled in debug mode, XMLWriter contains several tests that helps + * ensuring that XMLWriter produces valid XML. Some of these tests ensures that: + * + * - The @c xmlns and @c xml prefixes are used properly + * - Content of comments and processing instructions is valid + * - Element, attribute and DOCTYPE names are sensible + * - Elements are properly nested and balanced + * - To some extent that things occur in the proper order. For example, that + * the document type definition isn't added inside an element + * - That namespaces prefixes are declared + * + * Not triggering XMLWriter's tests does not guarantee valid XML is produced, + * but they do help catching common mistakes and some of the corner cases in the + * specifications. When XMLWriter is compiled in release mode, these tests are not enabled + * and the error handling in effect is concerning writing to the QIODevice. + * + * Often it is of interest to add a note at the beginning of the file communicating + * it is auto-generated. setMessage() and setAddMessage() provides + * a convenient way of doing that. + * + * Namespace declarations are added with startPrefixMapping(), not by sending attributes + * with name xmlns:* to startElement(). + * + * @see HOWTO Avoid Being + * Called a Bozo When Producing XML + * @see Extensible Markup + * Language (XML) 1.0 (Third Edition) + * @see Namespaces in XML + * @todo Replace this class with QXmlStreamWriter + * @author Frans Englich + * @ingroup PatternistSDK + */ + class Q_PATTERNISTSDK_EXPORT XMLWriter : public QXmlContentHandler + , public QXmlLexicalHandler + { + public: + /** + * Creates a XMLWriter which serializes its received events + * to @p outStream. + * + * @note XMLWriter does not claim ownership of @p outStream. Thus, + * @p outStream may not be destroyed as long as + * this XMLWriter instance uses it. + */ + XMLWriter(QIODevice *outStream = 0); + + virtual ~XMLWriter(); + + /** + * @returns @c true if opening the output device succeeds, otherwise @c false + */ + virtual bool startDocument(); + + /** + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool characters(const QString &ch); + + /** + * Starts an element with name @p qName and attributes @p atts. The prefix + * in @p qName must first be declared with startPrefixMapping(), if it has one. + * + * A call to startElement() must always at some point be balanced with a call + * to endElement(). + * + * To declare namespaces, don't put attributes with name xmlns:* in @p atts, + * but use startPrefixMapping(). + */ + virtual bool startElement(const QString &qName, const QXmlAttributes &atts = QXmlAttributes()); + + /** + * + * Behaves essentially as startElement(const QString &qName, const QXmlAttributes &atts). This + * function is used in conjunction with other SAX classes. + * + * The call: + * + * @code + * startElement(QString(), QString(), qName, atts); + * @endcode + * + * is equivalent to: + * + * @code + * startElement(qName, atts); + * @endcode + * + * @p namespaceURI and @p localName are not used. This function is + * used in conjunction with other SAX classes. + * + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool startElement(const QString &namespaceURI, + const QString &localName, + const QString &qName, + const QXmlAttributes &atts); + + /** + * Signals the end of an element with name @p qName. @p qName must + * be supplied. + * + * Calls to startElement() and endElement() must always be balanced. + * + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool endElement(const QString &qName); + + /** + * Behaves essentially as endElement(const QString &qName). This function + * is used when XMLWriter is used in SAX code. + * + * @p namespaceURI and @p localName are not used. + * + * The call: + * + * @code + * endElement(QString(), QString(), qName); + * @endcode + * + * is equivalent to: + * + * @code + * endElement(qName); + * @endcode + * + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool endElement(const QString &namespaceURI, + const QString &localName, + const QString &qName); + + /** + * A description of an error if it occurred. This is typically + * QIODevice::errorString(). If no error has occurred, an empty + * string is returned. + */ + virtual QString errorString() const; + + /** + * Starts a CDATA section. Content sent with characters() will not be escaped + * except for ">" if occurring in "]]>". + * + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool startCDATA(); + + /** + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool endCDATA(); + + /** + * Creates a document type definition. + * + * For example, the code snippet: + * + * @code + * writer.startDTD("html", "-//W3C//DTD XHTML 1.0 Strict//EN", + * "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); + * writer.endDTD(); + * @endcode + * + * would create: + * @verbatim + +@endverbatim + * + * @note A system identifier must always be specified, but a public identifier may + * be left out. + * + * A call to startDTD() must be followed by a call to endDTD(). + */ + virtual bool startDTD(const QString &name, + const QString &publicId, + const QString &systemId); + + /** + * Apart from closing the DTD, an new line is also added at end. + */ + virtual bool endDTD(); + + /** + * Creates a processing instruction by name @p target, and content + * @p data. + * + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool processingInstruction(const QString &target, + const QString &data); + + /** + * Declares a namespace which maps @p prefix to @p namespaceURI. For example, the call: + * + * @code + * startPrefixMapping("xhtml", "http://www.w3.org/1999/xhtml"); + * @endcode + * + * would result in: + * + * @code + * xmlns="http://www.w3.org/1999/xhtml" + * @endcode + */ + virtual bool startPrefixMapping(const QString &prefix, + const QString &namespaceURI); + + /** + * Creates a comment with content @p ch. @p ch is escaped, there's + * no need to do it manually. For example, calling comment() with @p ch + * set to "my comment", results in "" in the output. + * + * @note if @p ch contains double hyphen("--"), the produced XML will + * not be well formed. + * + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool comment(const QString &ch); + + virtual bool startEntity(const QString &name); + virtual bool endEntity(const QString &name); + + /** + * Sets the message which is added as a comment if addModificationMessage() + * is set to @c true. If no message is specified and addModificationMessage() + * is set to @c true, a default message is used. + * + * @see modificationMessage(), setAddMessage() + */ + virtual void setMessage(const QString &msg); + + /** + * The message that is added at the beginning of the XML events + * in a comment node. If no modificationMessage is set via modificationMessage(), + * and addModificationMessage is set to @c true, this message will be used: + * "NOTE: This file was automatically generated by [the application name] at + * [the current date time]. All changes to this file will be lost." + * + * @see setMessage() + */ + virtual QString modificationMessage() const; + + /** + * Closes the QIODevice XMLWriter writes to. + */ + virtual bool endDocument(); + + /** + * Serializes @p ch as if it was sent to characters(). + * + * @returns @c false if failure occurs in writing to the QIODevice, otherwise + * @c true + */ + virtual bool ignorableWhitespace(const QString &ch); + + /** + * This function is not used by XMLWriter, but is implemented + * in order to satisfy QXmlContentHandler's interface. + */ + virtual bool endPrefixMapping(const QString &prefix); + + /** + * This function is not used by XMLWriter, but is implemented + * in order to satisfy QXmlContentHandler's interface. + */ + virtual bool skippedEntity(const QString &name); + + /** + * This function is not used by XMLWriter, but is implemented + * in order to satisfy QXmlContentHandler's interface. + */ + virtual void setDocumentLocator(QXmlLocator *); + + /** + * @returns the device XMLWriter writes its output to. + * XMLWriter does not own the device. + */ + virtual QIODevice *device() const; + + /** + * Sets the QIODevice XMLWriter writes to, to @p device. A device must be specified + * either via this function or in the constructor before XMLWriter is used. + * + * XMLWriter does not claim ownership of @p device. + */ + virtual void setDevice(QIODevice *device); + + /** + * Determines whether the modification message should be inserted as a comment + * before the document element. The message returned by modificationMessage() is used. + * + * If @p toggle is @c true, the message will be added, otherwise not. + */ + virtual void setAddMessage(const bool toggle); + + /** + * Tells whether a modification message will be added. + * + * @see setAddMessage(), modificationMessage() + */ + virtual bool addModificationMessage() const; + + private: + Q_DISABLE_COPY(XMLWriter) + + class Private; + Private *d; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/XQTSTestCase.cpp b/tests/auto/xmlpatternssdk/XQTSTestCase.cpp new file mode 100644 index 0000000..c793d71 --- /dev/null +++ b/tests/auto/xmlpatternssdk/XQTSTestCase.cpp @@ -0,0 +1,286 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +#include "XQTSTestCase.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +XQTSTestCase::XQTSTestCase(const Scenario scen, + TreeItem *p, + const QXmlQuery::QueryLanguage lang) : m_isXPath(false) + , m_scenario(scen) + , m_parent(p) + , m_lang(lang) +{ +} + +XQTSTestCase::~XQTSTestCase() +{ + qDeleteAll(m_baseLines); +} + +QVariant XQTSTestCase::data(const Qt::ItemDataRole role, int column) const +{ + if(role == Qt::DisplayRole) + { + if(column == 0) + return title(); + + const TestResult *const tr = testResult(); + if(!tr) + { + if(column == 1) + return TestResult::displayName(TestResult::NotTested); + else + return QString(); + } + const TestResult::Status status = tr->status(); + + switch(column) + { + case 1: + return status == TestResult::Pass ? QString(QChar::fromLatin1('1')) + : QString(QChar::fromLatin1('0')); + case 2: + return status == TestResult::Fail ? QString(QChar::fromLatin1('1')) + : QString(QChar::fromLatin1('0')); + default: + return QString(); + } + } + + if(role != Qt::BackgroundRole) + return QVariant(); + + const TestResult *const tr = testResult(); + + if(!tr) + { + if(column == 0) + return Qt::yellow; + else + return QVariant(); + } + + const TestResult::Status status = tr->status(); + + if(status == TestResult::NotTested || status == TestResult::Unknown) + return Qt::yellow; + + switch(column) + { + case 1: + return status == TestResult::Pass ? Qt::green : QVariant(); + case 2: + return status == TestResult::Fail ? Qt::red : QVariant(); + default: + return QVariant(); + } +} + +QString XQTSTestCase::sourceCode(bool &ok) const +{ + QFile file(m_queryPath.toLocalFile()); + + QString err; + + if(!file.exists()) + err = QString::fromLatin1("Error: %1 does not exist.").arg(file.fileName()); + else if(!QFileInfo(file.fileName()).isFile()) + err = QString::fromLatin1("Error: %1 is not a file, cannot display it.").arg(file.fileName()); + else if(!file.open(QIODevice::ReadOnly)) + err = QString::fromLatin1("Error: Could not open %1. Likely a permission error.") + .arg(file.fileName()); + + if(err.isNull()) /* No errors. */ + { + ok = true; + /* Scary, we assume the query is stored in UTF-8. */ + return QString::fromUtf8(file.readAll()); + } + else + { + ok = false; + return err; + } +} + +int XQTSTestCase::columnCount() const +{ + return 2; +} + +void XQTSTestCase::addBaseLine(TestBaseLine *line) +{ + m_baseLines.append(line); +} + +QString XQTSTestCase::name() const +{ + return m_name; +} + +QString XQTSTestCase::creator() const +{ + return m_creator; +} + +QString XQTSTestCase::description() const +{ + return m_description; +} + +QDate XQTSTestCase::lastModified() const +{ + return m_lastModified; +} + +bool XQTSTestCase::isXPath() const +{ + return m_isXPath; +} + +TestCase::Scenario XQTSTestCase::scenario() const +{ + return m_scenario; +} + +void XQTSTestCase::setName(const QString &n) +{ + m_name = n; +} + +void XQTSTestCase::setCreator(const QString &ctor) +{ + m_creator = ctor; +} + +void XQTSTestCase::setDescription(const QString &descriptionP) +{ + m_description = descriptionP; +} + +void XQTSTestCase::setLastModified(const QDate &date) +{ + m_lastModified = date; +} + +void XQTSTestCase::setIsXPath(const bool isXPathP) +{ + m_isXPath = isXPathP; +} + +void XQTSTestCase::setQueryPath(const QUrl &uri) +{ + m_queryPath = uri; +} + +TreeItem *XQTSTestCase::parent() const +{ + return m_parent; +} + +QString XQTSTestCase::title() const +{ + return m_name; +} + +TestBaseLine::List XQTSTestCase::baseLines() const +{ + Q_ASSERT_X(!m_baseLines.isEmpty(), Q_FUNC_INFO, + qPrintable(QString::fromLatin1("The test %1 has no base lines, it should have at least one.").arg(name()))); + return m_baseLines; +} + +QUrl XQTSTestCase::testCasePath() const +{ + return m_queryPath; +} + +void XQTSTestCase::setExternalVariableLoader(const QPatternist::ExternalVariableLoader::Ptr &loader) +{ + m_externalVariableLoader = loader; +} + +QPatternist::ExternalVariableLoader::Ptr XQTSTestCase::externalVariableLoader() const +{ + return m_externalVariableLoader; +} + +void XQTSTestCase::setContextItemSource(const QUrl &uri) +{ + m_contextItemSource = uri; +} + +QUrl XQTSTestCase::contextItemSource() const +{ + return m_contextItemSource; +} + +QXmlQuery::QueryLanguage XQTSTestCase::language() const +{ + return m_lang; +} + +void XQTSTestCase::setParent(TreeItem *const p) +{ + m_parent = p; +} + +void XQTSTestCase::setInitialTemplateName(const QXmlName &name) +{ + m_initialTemplateName = name; +} + +QXmlName XQTSTestCase::initialTemplateName() const +{ + return m_initialTemplateName; +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/XQTSTestCase.h b/tests/auto/xmlpatternssdk/XQTSTestCase.h new file mode 100644 index 0000000..edb4d63 --- /dev/null +++ b/tests/auto/xmlpatternssdk/XQTSTestCase.h @@ -0,0 +1,149 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_XQTSTestCase_H +#define PatternistSDK_XQTSTestCase_H + +#include +#include +#include + +#include "qexternalvariableloader_p.h" + +#include "TestBaseLine.h" +#include "TestCase.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Represents a test case in a test suite in the XML Query Test Suite. + * + * TestCase is a memory representation of a test case, and maps + * to the @c test-case element in the XQuery Test Suite test + * case catalog. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT XQTSTestCase : public TestCase + { + public: + XQTSTestCase(const Scenario scen, TreeItem *parent, + const QXmlQuery::QueryLanguage lang = QXmlQuery::XQuery10); + virtual ~XQTSTestCase(); + + /** + * The identifier, the name of the test. For example, "Literals034". + * The name of a test case must be unique. + */ + virtual QString name() const; + virtual QString creator() const; + virtual QString description() const; + /** + * @returns the query inside the file, specified by testCasePath(). Loading + * of the file is not cached in order to avoid complications. + * @param ok is set to @c false if loading the query file fails + */ + virtual QString sourceCode(bool &ok) const; + virtual QUrl testCasePath() const; + virtual QDate lastModified() const; + + bool isXPath() const; + + /** + * What kind of test case this is, what kind of scenario it takes part + * of. For example, whether the test case should evaluate normally or fail. + */ + Scenario scenario() const; + + void setCreator(const QString &creator); + void setLastModified(const QDate &date); + void setDescription(const QString &description); + void setIsXPath(const bool isXPath); + void setName(const QString &name); + void setQueryPath(const QUrl &uri); + void setContextItemSource(const QUrl &uri); + void addBaseLine(TestBaseLine *lines); + void setInitialTemplateName(const QXmlName &name); + + virtual TreeItem *parent() const; + + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + + virtual QString title() const; + virtual TestBaseLine::List baseLines() const; + + virtual int columnCount() const; + + void setExternalVariableLoader(const QPatternist::ExternalVariableLoader::Ptr &loader); + virtual QPatternist::ExternalVariableLoader::Ptr externalVariableLoader() const; + virtual QUrl contextItemSource() const; + virtual QXmlQuery::QueryLanguage language() const; + void setParent(TreeItem *const parent); + virtual QXmlName initialTemplateName() const; + + private: + QString m_name; + QString m_creator; + QString m_description; + QUrl m_queryPath; + bool m_isXPath; + QDate m_lastModified; + const Scenario m_scenario; + TreeItem * m_parent; + TestBaseLine::List m_baseLines; + QPatternist::ExternalVariableLoader::Ptr m_externalVariableLoader; + QUrl m_contextItemSource; + QXmlQuery::QueryLanguage m_lang; + QXmlName m_initialTemplateName; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/XSDTSTestCase.cpp b/tests/auto/xmlpatternssdk/XSDTSTestCase.cpp new file mode 100644 index 0000000..c51ad7a --- /dev/null +++ b/tests/auto/xmlpatternssdk/XSDTSTestCase.cpp @@ -0,0 +1,375 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the autotests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +#include "XSDTSTestCase.h" + +#include "qxmlschema.h" +#include "qxmlschemavalidator.h" + +using namespace QPatternistSDK; +using namespace QPatternist; + +XSDTSTestCase::XSDTSTestCase(const Scenario scen, TreeItem *p, TestType testType) + : m_scenario(scen) + , m_parent(p) + , m_testType(testType) +{ +} + +XSDTSTestCase::~XSDTSTestCase() +{ + qDeleteAll(m_baseLines); +} + +TestResult::List XSDTSTestCase::execute(const ExecutionStage, TestSuite*) +{ + ErrorHandler errHandler; + ErrorHandler::installQtMessageHandler(&errHandler); + + TestResult::List retval; + TestResult::Status resultStatus = TestResult::Unknown; + QString serialized; + + if (m_testType == SchemaTest) { + executeSchemaTest(resultStatus, serialized, &errHandler); + } else { + executeInstanceTest(resultStatus, serialized, &errHandler); + } + + resultStatus = TestBaseLine::scan(serialized, baseLines()); + Q_ASSERT(resultStatus != TestResult::Unknown); + + m_result = new TestResult(name(), resultStatus, 0, errHandler.messages(), + QPatternist::Item::List(), serialized); + retval.append(m_result); + ErrorHandler::installQtMessageHandler(0); + changed(this); + return retval; +} + +void XSDTSTestCase::executeSchemaTest(TestResult::Status &resultStatus, QString &serialized, QAbstractMessageHandler *handler) +{ + QFile file(m_schemaUri.path()); + if (!file.open(QIODevice::ReadOnly)) { + resultStatus = TestResult::Fail; + serialized = QString(); + return; + } + + QXmlSchema schema; + schema.setMessageHandler(handler); + schema.load(&file, m_schemaUri); + + if (schema.isValid()) { + resultStatus = TestResult::Pass; + serialized = QString::fromLatin1("true"); + } else { + resultStatus = TestResult::Pass; + serialized = QString::fromLatin1("false"); + } +} + +void XSDTSTestCase::executeInstanceTest(TestResult::Status &resultStatus, QString &serialized, QAbstractMessageHandler *handler) +{ + QFile instanceFile(m_instanceUri.path()); + if (!instanceFile.open(QIODevice::ReadOnly)) { + resultStatus = TestResult::Fail; + serialized = QString(); + return; + } + + QXmlSchema schema; + if (m_schemaUri.isValid()) { + QFile file(m_schemaUri.path()); + if (!file.open(QIODevice::ReadOnly)) { + resultStatus = TestResult::Fail; + serialized = QString(); + return; + } + + schema.setMessageHandler(handler); + schema.load(&file, m_schemaUri); + + if (!schema.isValid()) { + resultStatus = TestResult::Pass; + serialized = QString::fromLatin1("false"); + return; + } + } + + QXmlSchemaValidator validator(schema); + validator.setMessageHandler(handler); + + qDebug("check %s", qPrintable(m_instanceUri.path())); + if (validator.validate(&instanceFile, m_instanceUri)) { + resultStatus = TestResult::Pass; + serialized = QString::fromLatin1("true"); + } else { + resultStatus = TestResult::Pass; + serialized = QString::fromLatin1("false"); + } +} + +QVariant XSDTSTestCase::data(const Qt::ItemDataRole role, int column) const +{ + if(role == Qt::DisplayRole) + { + if(column == 0) + return title(); + + const TestResult *const tr = testResult(); + if(!tr) + { + if(column == 1) + return TestResult::displayName(TestResult::NotTested); + else + return QString(); + } + const TestResult::Status status = tr->status(); + + switch(column) + { + case 1: + return status == TestResult::Pass ? QString(QChar::fromLatin1('1')) + : QString(QChar::fromLatin1('0')); + case 2: + return status == TestResult::Fail ? QString(QChar::fromLatin1('1')) + : QString(QChar::fromLatin1('0')); + default: + return QString(); + } + } + + if(role != Qt::BackgroundRole) + return QVariant(); + + const TestResult *const tr = testResult(); + + if(!tr) + { + if(column == 0) + return Qt::yellow; + else + return QVariant(); + } + + const TestResult::Status status = tr->status(); + + if(status == TestResult::NotTested || status == TestResult::Unknown) + return Qt::yellow; + + switch(column) + { + case 1: + return status == TestResult::Pass ? Qt::green : QVariant(); + case 2: + return status == TestResult::Fail ? Qt::red : QVariant(); + default: + return QVariant(); + } +} + +QString XSDTSTestCase::sourceCode(bool &ok) const +{ + QFile file((m_testType == SchemaTest ? m_schemaUri : m_instanceUri).toLocalFile()); + + QString err; + + if(!file.exists()) + err = QString::fromLatin1("Error: %1 does not exist.").arg(file.fileName()); + else if(!QFileInfo(file.fileName()).isFile()) + err = QString::fromLatin1("Error: %1 is not a file, cannot display it.").arg(file.fileName()); + else if(!file.open(QIODevice::ReadOnly)) + err = QString::fromLatin1("Error: Could not open %1. Likely a permission error.") + .arg(file.fileName()); + + if(err.isNull()) /* No errors. */ + { + ok = true; + /* Scary, we assume the query is stored in UTF-8. */ + return QString::fromUtf8(file.readAll()); + } + else + { + ok = false; + return err; + } +} + +int XSDTSTestCase::columnCount() const +{ + return 2; +} + +void XSDTSTestCase::addBaseLine(TestBaseLine *line) +{ + m_baseLines.append(line); +} + +QString XSDTSTestCase::name() const +{ + return m_name; +} + +QString XSDTSTestCase::creator() const +{ + return m_creator; +} + +QString XSDTSTestCase::description() const +{ + return m_description; +} + +QDate XSDTSTestCase::lastModified() const +{ + return m_lastModified; +} + +bool XSDTSTestCase::isXPath() const +{ + return false; +} + +TestCase::Scenario XSDTSTestCase::scenario() const +{ + return m_scenario; +} + +void XSDTSTestCase::setName(const QString &n) +{ + m_name = n; +} + +void XSDTSTestCase::setCreator(const QString &ctor) +{ + m_creator = ctor; +} + +void XSDTSTestCase::setDescription(const QString &descriptionP) +{ + m_description = descriptionP; +} + +void XSDTSTestCase::setLastModified(const QDate &date) +{ + m_lastModified = date; +} + +void XSDTSTestCase::setSchemaUri(const QUrl &uri) +{ + m_schemaUri = uri; +} + +void XSDTSTestCase::setInstanceUri(const QUrl &uri) +{ + m_instanceUri = uri; +} + +TreeItem *XSDTSTestCase::parent() const +{ + return m_parent; +} + +QString XSDTSTestCase::title() const +{ + return m_name; +} + +TestBaseLine::List XSDTSTestCase::baseLines() const +{ + Q_ASSERT_X(!m_baseLines.isEmpty(), Q_FUNC_INFO, + qPrintable(QString::fromLatin1("The test %1 has no base lines, it should have at least one.").arg(name()))); + return m_baseLines; +} + +QUrl XSDTSTestCase::schemaUri() const +{ + return m_schemaUri; +} + +QUrl XSDTSTestCase::instanceUri() const +{ + return m_instanceUri; +} + +void XSDTSTestCase::setContextItemSource(const QUrl &uri) +{ + m_contextItemSource = uri; +} + +QUrl XSDTSTestCase::contextItemSource() const +{ + return m_contextItemSource; +} + +void XSDTSTestCase::setParent(TreeItem *const p) +{ + m_parent = p; +} + +QPatternist::ExternalVariableLoader::Ptr XSDTSTestCase::externalVariableLoader() const +{ + return QPatternist::ExternalVariableLoader::Ptr(); +} + +TestResult *XSDTSTestCase::testResult() const +{ + return m_result; +} + +TestItem::ResultSummary XSDTSTestCase::resultSummary() const +{ + if(m_result) + return ResultSummary(m_result->status() == TestResult::Pass ? 1 : 0, + 1); + + return ResultSummary(0, 1); +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/XSDTSTestCase.h b/tests/auto/xmlpatternssdk/XSDTSTestCase.h new file mode 100644 index 0000000..cf37577 --- /dev/null +++ b/tests/auto/xmlpatternssdk/XSDTSTestCase.h @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the autotests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_XSDTSTestCase_H +#define PatternistSDK_XSDTSTestCase_H + +#include +#include +#include + +#include "TestBaseLine.h" +#include "TestCase.h" + +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Represents a test case in a test suite in the XML Query Test Suite. + * + * TestCase is a memory representation of a test case, and maps + * to the @c test-case element in the XQuery Test Suite test + * case catalog. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT XSDTSTestCase : public TestCase + { + public: + enum TestType + { + SchemaTest, + InstanceTest + }; + + XSDTSTestCase(const Scenario scen, TreeItem *parent, TestType testType); + virtual ~XSDTSTestCase(); + + /** + * Executes the test, and returns the result. The returned list + * will always contain exactly one TestResult. + * + * @p stage is ignored when running out-of-process. + */ + virtual TestResult::List execute(const ExecutionStage stage, + TestSuite *ts); + /** + * The identifier, the name of the test. For example, "Literals034". + * The name of a test case must be unique. + */ + virtual QString name() const; + virtual QString creator() const; + virtual QString description() const; + /** + * @returns the query inside the file, specified by testCasePath(). Loading + * of the file is not cached in order to avoid complications. + * @param ok is set to @c false if loading the query file fails + */ + virtual QString sourceCode(bool &ok) const; + virtual QUrl schemaUri() const; + virtual QUrl instanceUri() const; + virtual QUrl testCasePath() const {return QUrl();} + virtual QDate lastModified() const; + + bool isXPath() const; + + /** + * What kind of test case this is, what kind of scenario it takes part + * of. For example, whether the test case should evaluate normally or fail. + */ + Scenario scenario() const; + + void setCreator(const QString &creator); + void setLastModified(const QDate &date); + void setDescription(const QString &description); + void setName(const QString &name); + void setSchemaUri(const QUrl &uri); + void setInstanceUri(const QUrl &uri); + void setTestCasePath(const QUrl & /* uri */) {} + void setContextItemSource(const QUrl &uri); + void addBaseLine(TestBaseLine *lines); + + virtual TreeItem *parent() const; + + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + + virtual QString title() const; + virtual TestBaseLine::List baseLines() const; + + virtual int columnCount() const; + + virtual QUrl contextItemSource() const; + void setParent(TreeItem *const parent); + virtual QPatternist::ExternalVariableLoader::Ptr externalVariableLoader() const; + virtual TestResult *testResult() const; + virtual ResultSummary resultSummary() const; + + private: + void executeSchemaTest(TestResult::Status &resultStatus, QString &serialized, QAbstractMessageHandler *handler); + void executeInstanceTest(TestResult::Status &resultStatus, QString &serialized, QAbstractMessageHandler *handler); + + QString m_name; + QString m_creator; + QString m_description; + QUrl m_schemaUri; + QUrl m_instanceUri; + QDate m_lastModified; + const Scenario m_scenario; + TreeItem * m_parent; + TestBaseLine::List m_baseLines; + QUrl m_contextItemSource; + TestType m_testType; + QPointer m_result; + }; +} + +QT_END_NAMESPACE +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/XSDTestSuiteHandler.cpp b/tests/auto/xmlpatternssdk/XSDTestSuiteHandler.cpp new file mode 100644 index 0000000..028d88c --- /dev/null +++ b/tests/auto/xmlpatternssdk/XSDTestSuiteHandler.cpp @@ -0,0 +1,910 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the autotests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qacceltreeresourceloader_p.h" +#include "qnetworkaccessdelegator_p.h" + +#include "Global.h" +#include "TestBaseLine.h" +#include "TestGroup.h" + +#include "XSDTestSuiteHandler.h" +#include "XSDTSTestCase.h" + +using namespace QPatternistSDK; + +extern QNetworkAccessManager s_networkManager; + +XSDTestSuiteHandler::XSDTestSuiteHandler(const QUrl &catalogFile) : m_ts(0) + , m_catalogFile(catalogFile) + , m_inSchemaTest(false) + , m_inInstanceTest(false) + , m_inTestGroup(false) + , m_inDescription(false) + , m_schemaBlacklisted(false) + , m_counter(0) +{ + Q_ASSERT(!m_catalogFile.isRelative()); + m_ts = new TestSuite(); + m_topLevelGroup = new TestGroup(m_ts); + m_topLevelGroup->setTitle("XML Schema Test Suite"); + m_ts->appendChild(m_topLevelGroup); + + // exclude these test cases, as they break our current state machine + m_blackList << QLatin1String("addB099") + << QLatin1String("addB118") + << QLatin1String("elemJ003") + << QLatin1String("elemJ011") + << QLatin1String("elemZ004") + << QLatin1String("elemZ020") + << QLatin1String("groupH021v") + << QLatin1String("groupJ009v") + << QLatin1String("name00101m2") + << QLatin1String("schL5") + << QLatin1String("ste110") + << QLatin1String("stZ007") + << QLatin1String("stZ047") + << QLatin1String("stZ055") + << QLatin1String("addB049") + << QLatin1String("addB068") + << QLatin1String("addB078") + << QLatin1String("addB078A") + << QLatin1String("addB078B") + << QLatin1String("addB167") + << QLatin1String("addB191") + << QLatin1String("isDefault060_2") + << QLatin1String("isDefault069") + << QLatin1String("annotB025") + << QLatin1String("base64Binary_enumeration003_1321") + << QLatin1String("anyURI_a001_1336") + << QLatin1String("anyURI_a001_1336") + << QLatin1String("anyURI_a003_1338") + << QLatin1String("anyURI_a004_1339") + << QLatin1String("anyURI_b004_1354") + << QLatin1String("anyURI_b004_1354") + << QLatin1String("anyURI_b006_1356") + << QLatin1String("QName_length001_1357") + << QLatin1String("QName_length003_1359") + << QLatin1String("QName_minLength003_1362") + << QLatin1String("QName_maxLength001_1364") + << QLatin1String("NOTATION_length001_1372") + << QLatin1String("NOTATION_length003_1374") + << QLatin1String("NOTATION_minLength003_1377") + << QLatin1String("NOTATION_maxLength001_1379") + << QLatin1String("hexBinary003_2069") + << QLatin1String("QName009_2092") + << QLatin1String("dtZ107447_a_2245") + << QLatin1String("elemE001") + << QLatin1String("elemE002") + << QLatin1String("elemE003") + << QLatin1String("elemE004") + << QLatin1String("elemE005") + << QLatin1String("elemT026") + << QLatin1String("elemT027") + << QLatin1String("elemT028") + << QLatin1String("elemT029") + << QLatin1String("elemT054") + << QLatin1String("elemT055") + << QLatin1String("elemT056") + << QLatin1String("elemT057") + << QLatin1String("elemZ006") + << QLatin1String("elemZ007") + << QLatin1String("elemZ026") + << QLatin1String("elemZ027_c") + << QLatin1String("elemZ028c") + << QLatin1String("elemZ028d") + << QLatin1String("elemZ028f1") + << QLatin1String("elemZ028f1") + << QLatin1String("elemZ028f2") + << QLatin1String("elemZ028f2") + << QLatin1String("elemZ028f3") + << QLatin1String("elemZ028f3") + << QLatin1String("elemZ031") + << QLatin1String("errF001") + << QLatin1String("idC019") + << QLatin1String("idL100") + << QLatin1String("idZ011") + << QLatin1String("idZ015") + << QLatin1String("mgO013") + << QLatin1String("particlesA012") + << QLatin1String("particlesA013") + << QLatin1String("particlesA014") + << QLatin1String("particlesA015") + << QLatin1String("particlesHa161") + << QLatin1String("particlesHb008") + << QLatin1String("particlesHb011") + << QLatin1String("particlesIe003") + << QLatin1String("particlesIg003") + << QLatin1String("particlesIg004") + << QLatin1String("particlesJb003") + << QLatin1String("particlesJd003") + << QLatin1String("particlesJf003") + << QLatin1String("particlesJk003") + << QLatin1String("particlesOb001") + << QLatin1String("particlesOb002") + << QLatin1String("particlesOb004") + << QLatin1String("particlesOb008") + << QLatin1String("particlesOb009") + << QLatin1String("particlesOb013") + << QLatin1String("particlesOb018") + << QLatin1String("particlesQ005") + << QLatin1String("particlesS002") + << QLatin1String("particlesT002") + << QLatin1String("particlesT009") + << QLatin1String("particlesT014") + << QLatin1String("particlesV001") + << QLatin1String("particlesV002") + << QLatin1String("particlesV020") + << QLatin1String("particlesZ001") + << QLatin1String("particlesZ005") + << QLatin1String("particlesZ007") + << QLatin1String("particlesZ023") + << QLatin1String("particlesZ024") + << QLatin1String("particlesZ026") + << QLatin1String("particlesZ028") + << QLatin1String("particlesZ033_c") + << QLatin1String("particlesZ033_d") + << QLatin1String("particlesZ033_e") + << QLatin1String("particlesZ033_f") + << QLatin1String("particlesZ033_g") + << QLatin1String("particlesZ034_a1") + << QLatin1String("particlesZ034_a2") + << QLatin1String("particlesZ034_a3") + << QLatin1String("particlesZ034_b") + << QLatin1String("particlesZ035_a") + << QLatin1String("particlesZ035_b") + << QLatin1String("particlesZ036_a") + << QLatin1String("particlesZ036_b1") + << QLatin1String("particlesZ036_b2") + << QLatin1String("particlesZ036_c") +/* + << QLatin1String("reC65") + << QLatin1String("reC66") + << QLatin1String("reC67") + << QLatin1String("reC68") + << QLatin1String("reF58") + << QLatin1String("reG50") + << QLatin1String("reJ11") + << QLatin1String("reJ13") + << QLatin1String("reJ19") + << QLatin1String("reJ21") + << QLatin1String("reJ23") + << QLatin1String("reJ25") + << QLatin1String("reJ29") + << QLatin1String("reJ31") + << QLatin1String("reJ33") + << QLatin1String("reJ35") + << QLatin1String("reJ61") + << QLatin1String("reJ69") + << QLatin1String("reJ75") + << QLatin1String("reJ77") + << QLatin1String("reL98") + << QLatin1String("reL99") + << QLatin1String("reM98") + << QLatin1String("reN99") + << QLatin1String("reS21") + << QLatin1String("reS42") + << QLatin1String("reT63") + << QLatin1String("reT84") + << QLatin1String("reDG2") + << QLatin1String("RegexTest_9") + << QLatin1String("RegexTest_11") + << QLatin1String("RegexTest_14") + << QLatin1String("RegexTest_15") + << QLatin1String("RegexTest_16") + << QLatin1String("RegexTest_17") + << QLatin1String("RegexTest_23") + << QLatin1String("RegexTest_24") + << QLatin1String("RegexTest_25") + << QLatin1String("RegexTest_26") + << QLatin1String("RegexTest_27") + << QLatin1String("RegexTest_28") + << QLatin1String("RegexTest_30") + << QLatin1String("RegexTest_30") + << QLatin1String("RegexTest_33") + << QLatin1String("RegexTest_34") + << QLatin1String("RegexTest_34") + << QLatin1String("RegexTest_43") + << QLatin1String("RegexTest_44") + << QLatin1String("RegexTest_45") + << QLatin1String("RegexTest_46") + << QLatin1String("RegexTest_47") + << QLatin1String("RegexTest_48") + << QLatin1String("RegexTest_49") + << QLatin1String("RegexTest_50") + << QLatin1String("RegexTest_51") + << QLatin1String("RegexTest_52") + << QLatin1String("RegexTest_53") + << QLatin1String("RegexTest_54") + << QLatin1String("RegexTest_55") + << QLatin1String("RegexTest_56") + << QLatin1String("RegexTest_57") + << QLatin1String("RegexTest_57") + << QLatin1String("RegexTest_58") + << QLatin1String("RegexTest_58") + << QLatin1String("RegexTest_65") + << QLatin1String("RegexTest_113") + << QLatin1String("RegexTest_116") + << QLatin1String("RegexTest_119") + << QLatin1String("RegexTest_120") + << QLatin1String("RegexTest_121") + << QLatin1String("RegexTest_141") + << QLatin1String("RegexTest_142") + << QLatin1String("RegexTest_143") + << QLatin1String("RegexTest_145") + << QLatin1String("RegexTest_146") + << QLatin1String("RegexTest_147") + << QLatin1String("RegexTest_148") + << QLatin1String("RegexTest_149") + << QLatin1String("RegexTest_150") + << QLatin1String("RegexTest_151") + << QLatin1String("RegexTest_152") + << QLatin1String("RegexTest_154") + << QLatin1String("RegexTest_155") + << QLatin1String("RegexTest_156") + << QLatin1String("RegexTest_157") + << QLatin1String("RegexTest_158") + << QLatin1String("RegexTest_163") + << QLatin1String("RegexTest_164") + << QLatin1String("RegexTest_165") + << QLatin1String("RegexTest_166") + << QLatin1String("RegexTest_167") + << QLatin1String("RegexTest_168") + << QLatin1String("RegexTest_169") + << QLatin1String("RegexTest_170") + << QLatin1String("RegexTest_171") + << QLatin1String("RegexTest_172") + << QLatin1String("RegexTest_173") + << QLatin1String("RegexTest_174") + << QLatin1String("RegexTest_178") + << QLatin1String("RegexTest_194") + << QLatin1String("RegexTest_194") + << QLatin1String("RegexTest_195") + << QLatin1String("RegexTest_195") + << QLatin1String("RegexTest_196") + << QLatin1String("RegexTest_196") + << QLatin1String("RegexTest_197") + << QLatin1String("RegexTest_198") + << QLatin1String("RegexTest_199") + << QLatin1String("RegexTest_200") + << QLatin1String("RegexTest_200") + << QLatin1String("RegexTest_201") + << QLatin1String("RegexTest_201") + << QLatin1String("RegexTest_202") + << QLatin1String("RegexTest_202") + << QLatin1String("RegexTest_203") + << QLatin1String("RegexTest_204") + << QLatin1String("RegexTest_205") + << QLatin1String("RegexTest_206") + << QLatin1String("RegexTest_207") + << QLatin1String("RegexTest_208") + << QLatin1String("RegexTest_209") + << QLatin1String("RegexTest_209") + << QLatin1String("RegexTest_210") + << QLatin1String("RegexTest_210") + << QLatin1String("RegexTest_211") + << QLatin1String("RegexTest_211") + << QLatin1String("RegexTest_212") + << QLatin1String("RegexTest_213") + << QLatin1String("RegexTest_214") + << QLatin1String("RegexTest_215") + << QLatin1String("RegexTest_216") + << QLatin1String("RegexTest_217") + << QLatin1String("RegexTest_218") + << QLatin1String("RegexTest_220") + << QLatin1String("RegexTest_221") + << QLatin1String("RegexTest_222") + << QLatin1String("RegexTest_226") + << QLatin1String("RegexTest_230") + << QLatin1String("RegexTest_232") + << QLatin1String("RegexTest_233") + << QLatin1String("RegexTest_294") + << QLatin1String("RegexTest_294") + << QLatin1String("RegexTest_295") + << QLatin1String("RegexTest_295") + << QLatin1String("RegexTest_299") + << QLatin1String("RegexTest_300") + << QLatin1String("RegexTest_301") + << QLatin1String("RegexTest_302") + << QLatin1String("RegexTest_303") + << QLatin1String("RegexTest_304") + << QLatin1String("RegexTest_305") + << QLatin1String("RegexTest_306") + << QLatin1String("RegexTest_307") + << QLatin1String("RegexTest_308") + << QLatin1String("RegexTest_309") + << QLatin1String("RegexTest_310") + << QLatin1String("RegexTest_311") + << QLatin1String("RegexTest_312") + << QLatin1String("RegexTest_313") + << QLatin1String("RegexTest_314") + << QLatin1String("RegexTest_315") + << QLatin1String("RegexTest_315") + << QLatin1String("RegexTest_316") + << QLatin1String("RegexTest_316") + << QLatin1String("RegexTest_317") + << QLatin1String("RegexTest_317") + << QLatin1String("RegexTest_440") + << QLatin1String("RegexTest_441") + << QLatin1String("RegexTest_442") + << QLatin1String("RegexTest_443") + << QLatin1String("RegexTest_448") + << QLatin1String("RegexTest_449") + << QLatin1String("RegexTest_450") + << QLatin1String("RegexTest_451") + << QLatin1String("RegexTest_458") + << QLatin1String("RegexTest_464") + << QLatin1String("RegexTest_464") + << QLatin1String("RegexTest_465") + << QLatin1String("RegexTest_469") + << QLatin1String("RegexTest_470") + << QLatin1String("RegexTest_471") + << QLatin1String("RegexTest_472") + << QLatin1String("RegexTest_473") + << QLatin1String("RegexTest_477") + << QLatin1String("RegexTest_478") + << QLatin1String("RegexTest_478") + << QLatin1String("RegexTest_479") + << QLatin1String("RegexTest_480") + << QLatin1String("RegexTest_481") + << QLatin1String("RegexTest_482") + << QLatin1String("RegexTest_482") + << QLatin1String("RegexTest_483") + << QLatin1String("RegexTest_483") + << QLatin1String("RegexTest_484") + << QLatin1String("RegexTest_487") + << QLatin1String("RegexTest_516") + << QLatin1String("RegexTest_516") + << QLatin1String("RegexTest_517") + << QLatin1String("RegexTest_517") + << QLatin1String("RegexTest_518") + << QLatin1String("RegexTest_518") + << QLatin1String("RegexTest_519") + << QLatin1String("RegexTest_519") + << QLatin1String("RegexTest_521") + << QLatin1String("RegexTest_523") + << QLatin1String("RegexTest_524") + << QLatin1String("RegexTest_524") + << QLatin1String("RegexTest_586") + << QLatin1String("RegexTest_587") + << QLatin1String("RegexTest_592") + << QLatin1String("RegexTest_593") + << QLatin1String("RegexTest_594") + << QLatin1String("RegexTest_595") + << QLatin1String("RegexTest_596") + << QLatin1String("RegexTest_597") + << QLatin1String("RegexTest_598") + << QLatin1String("RegexTest_599") + << QLatin1String("RegexTest_600") + << QLatin1String("RegexTest_601") + << QLatin1String("RegexTest_602") + << QLatin1String("RegexTest_603") + << QLatin1String("RegexTest_604") + << QLatin1String("RegexTest_605") + << QLatin1String("RegexTest_648") + << QLatin1String("RegexTest_655") + << QLatin1String("RegexTest_688") + << QLatin1String("RegexTest_696") + << QLatin1String("RegexTest_697") + << QLatin1String("RegexTest_698") + << QLatin1String("RegexTest_700") + << QLatin1String("RegexTest_701") + << QLatin1String("RegexTest_702") + << QLatin1String("RegexTest_703") + << QLatin1String("RegexTest_704") + << QLatin1String("RegexTest_705") + << QLatin1String("RegexTest_706") + << QLatin1String("RegexTest_707") + << QLatin1String("RegexTest_717") + << QLatin1String("RegexTest_718") + << QLatin1String("RegexTest_719") + << QLatin1String("RegexTest_724") + << QLatin1String("RegexTest_725") + << QLatin1String("RegexTest_726") + << QLatin1String("RegexTest_727") + << QLatin1String("RegexTest_728") + << QLatin1String("RegexTest_729") + << QLatin1String("RegexTest_730") + << QLatin1String("RegexTest_731") + << QLatin1String("RegexTest_732") + << QLatin1String("RegexTest_733") + << QLatin1String("RegexTest_743") + << QLatin1String("RegexTest_755") + << QLatin1String("RegexTest_756") + << QLatin1String("RegexTest_761") + << QLatin1String("RegexTest_762") + << QLatin1String("RegexTest_781") + << QLatin1String("RegexTest_782") + << QLatin1String("RegexTest_783") + << QLatin1String("RegexTest_790") + << QLatin1String("RegexTest_791") + << QLatin1String("RegexTest_824") + << QLatin1String("RegexTest_826") + << QLatin1String("RegexTest_827") + << QLatin1String("RegexTest_836") + << QLatin1String("RegexTest_837") + << QLatin1String("RegexTest_841") + << QLatin1String("RegexTest_842") + << QLatin1String("RegexTest_843") + << QLatin1String("RegexTest_844") + << QLatin1String("RegexTest_845") + << QLatin1String("RegexTest_846") + << QLatin1String("RegexTest_847") + << QLatin1String("RegexTest_848") + << QLatin1String("RegexTest_851") + << QLatin1String("RegexTest_852") + << QLatin1String("RegexTest_853") + << QLatin1String("RegexTest_854") + << QLatin1String("RegexTest_855") + << QLatin1String("RegexTest_856") + << QLatin1String("RegexTest_857") + << QLatin1String("RegexTest_861") + << QLatin1String("RegexTest_862") + << QLatin1String("RegexTest_863") + << QLatin1String("RegexTest_864") + << QLatin1String("RegexTest_865") + << QLatin1String("RegexTest_866") + << QLatin1String("RegexTest_870") + << QLatin1String("RegexTest_879") + << QLatin1String("RegexTest_880") + << QLatin1String("RegexTest_888") + << QLatin1String("RegexTest_889") + << QLatin1String("RegexTest_890") + << QLatin1String("RegexTest_891") + << QLatin1String("RegexTest_892") + << QLatin1String("RegexTest_893") + << QLatin1String("RegexTest_894") + << QLatin1String("RegexTest_895") + << QLatin1String("RegexTest_896") + << QLatin1String("RegexTest_897") + << QLatin1String("RegexTest_898") + << QLatin1String("RegexTest_899") + << QLatin1String("RegexTest_900") + << QLatin1String("RegexTest_901") + << QLatin1String("RegexTest_902") + << QLatin1String("RegexTest_903") + << QLatin1String("RegexTest_904") + << QLatin1String("RegexTest_905") + << QLatin1String("RegexTest_906") + << QLatin1String("RegexTest_907") + << QLatin1String("RegexTest_908") + << QLatin1String("RegexTest_909") + << QLatin1String("RegexTest_910") + << QLatin1String("RegexTest_911") + << QLatin1String("RegexTest_912") + << QLatin1String("RegexTest_913") + << QLatin1String("RegexTest_914") + << QLatin1String("RegexTest_915") + << QLatin1String("RegexTest_916") + << QLatin1String("RegexTest_917") + << QLatin1String("RegexTest_918") + << QLatin1String("RegexTest_919") + << QLatin1String("RegexTest_920") + << QLatin1String("RegexTest_921") + << QLatin1String("RegexTest_922") + << QLatin1String("RegexTest_923") + << QLatin1String("RegexTest_924") + << QLatin1String("RegexTest_925") + << QLatin1String("RegexTest_926") + << QLatin1String("RegexTest_928") + << QLatin1String("RegexTest_929") + << QLatin1String("RegexTest_930") + << QLatin1String("RegexTest_936") + << QLatin1String("RegexTest_937") + << QLatin1String("RegexTest_938") + << QLatin1String("RegexTest_939") + << QLatin1String("RegexTest_940") + << QLatin1String("RegexTest_941") + << QLatin1String("RegexTest_942") + << QLatin1String("RegexTest_943") + << QLatin1String("RegexTest_944") + << QLatin1String("RegexTest_945") + << QLatin1String("RegexTest_946") + << QLatin1String("RegexTest_949") + << QLatin1String("RegexTest_950") + << QLatin1String("RegexTest_951") + << QLatin1String("RegexTest_952") + << QLatin1String("RegexTest_953") + << QLatin1String("RegexTest_954") + << QLatin1String("RegexTest_955") + << QLatin1String("RegexTest_956") + << QLatin1String("RegexTest_957") + << QLatin1String("RegexTest_958") + << QLatin1String("RegexTest_959") + << QLatin1String("RegexTest_960") + << QLatin1String("RegexTest_961") + << QLatin1String("RegexTest_962") + << QLatin1String("RegexTest_963") + << QLatin1String("RegexTest_964") + << QLatin1String("RegexTest_976") + << QLatin1String("RegexTest_977") + << QLatin1String("RegexTest_988") + << QLatin1String("RegexTest_989") + << QLatin1String("RegexTest_990") + << QLatin1String("RegexTest_991") + << QLatin1String("RegexTest_994") + << QLatin1String("RegexTest_995") + << QLatin1String("RegexTest_996") + << QLatin1String("RegexTest_997") + << QLatin1String("RegexTest_1000") + << QLatin1String("RegexTest_1001") + << QLatin1String("RegexTest_1002") + << QLatin1String("RegexTest_1003") + << QLatin1String("RegexTest_1004") + << QLatin1String("RegexTest_1007") + << QLatin1String("RegexTest_1008") + << QLatin1String("RegexTest_1009") + << QLatin1String("RegexTest_1010") + << QLatin1String("RegexTest_1011") + << QLatin1String("RegexTest_1012") + << QLatin1String("RegexTest_1013") + << QLatin1String("RegexTest_1014") + << QLatin1String("RegexTest_1015") + << QLatin1String("RegexTest_1016") + << QLatin1String("RegexTest_1017") + << QLatin1String("RegexTest_1018") + << QLatin1String("RegexTest_1019") + << QLatin1String("RegexTest_1070") + << QLatin1String("RegexTest_1071") + << QLatin1String("RegexTest_1076") + << QLatin1String("RegexTest_1077") + << QLatin1String("RegexTest_1078") + << QLatin1String("RegexTest_1079") + << QLatin1String("RegexTest_1080") + << QLatin1String("RegexTest_1081") + << QLatin1String("RegexTest_1082") + << QLatin1String("RegexTest_1083") + << QLatin1String("RegexTest_1084") + << QLatin1String("RegexTest_1085") + << QLatin1String("RegexTest_1086") + << QLatin1String("RegexTest_1087") + << QLatin1String("RegexTest_1088") + << QLatin1String("RegexTest_1089") + << QLatin1String("RegexTest_1132") + << QLatin1String("RegexTest_1139") + << QLatin1String("RegexTest_1172") + << QLatin1String("RegexTest_1180") + << QLatin1String("RegexTest_1181") + << QLatin1String("RegexTest_1182") + << QLatin1String("RegexTest_1184") + << QLatin1String("RegexTest_1185") + << QLatin1String("RegexTest_1186") + << QLatin1String("RegexTest_1187") + << QLatin1String("RegexTest_1188") + << QLatin1String("RegexTest_1189") + << QLatin1String("RegexTest_1190") + << QLatin1String("RegexTest_1191") + << QLatin1String("RegexTest_1201") + << QLatin1String("RegexTest_1202") + << QLatin1String("RegexTest_1203") + << QLatin1String("RegexTest_1208") + << QLatin1String("RegexTest_1209") + << QLatin1String("RegexTest_1210") + << QLatin1String("RegexTest_1211") + << QLatin1String("RegexTest_1212") + << QLatin1String("RegexTest_1213") + << QLatin1String("RegexTest_1214") + << QLatin1String("RegexTest_1215") + << QLatin1String("RegexTest_1216") + << QLatin1String("RegexTest_1217") + << QLatin1String("RegexTest_1227") + << QLatin1String("RegexTest_1239") + << QLatin1String("RegexTest_1240") + << QLatin1String("RegexTest_1245") + << QLatin1String("RegexTest_1246") + << QLatin1String("RegexTest_1265") + << QLatin1String("RegexTest_1266") + << QLatin1String("RegexTest_1267") + << QLatin1String("RegexTest_1274") + << QLatin1String("RegexTest_1275") + << QLatin1String("RegexTest_1308") + << QLatin1String("RegexTest_1310") + << QLatin1String("RegexTest_1311") + << QLatin1String("RegexTest_1320") + << QLatin1String("RegexTest_1321") + << QLatin1String("RegexTest_1322") + << QLatin1String("RegexTest_1323") + << QLatin1String("RegexTest_1324") + << QLatin1String("RegexTest_1325") + << QLatin1String("RegexTest_1326") + << QLatin1String("RegexTest_1327") + << QLatin1String("RegexTest_1328") + << QLatin1String("RegexTest_1329") + << QLatin1String("RegexTest_1330") + << QLatin1String("RegexTest_1331") + << QLatin1String("RegexTest_1332") + << QLatin1String("RegexTest_1335") + << QLatin1String("RegexTest_1336") + << QLatin1String("RegexTest_1337") + << QLatin1String("RegexTest_1338") + << QLatin1String("RegexTest_1339") + << QLatin1String("RegexTest_1340") + << QLatin1String("RegexTest_1341") + << QLatin1String("RegexTest_1345") + << QLatin1String("RegexTest_1346") + << QLatin1String("RegexTest_1347") + << QLatin1String("RegexTest_1348") + << QLatin1String("RegexTest_1349") + << QLatin1String("RegexTest_1350") + << QLatin1String("RegexTest_1354") + << QLatin1String("RegexTest_1363") + << QLatin1String("RegexTest_1364") + << QLatin1String("RegexTest_1365") + << QLatin1String("RegexTest_1372") + << QLatin1String("RegexTest_1373") + << QLatin1String("RegexTest_1374") + << QLatin1String("RegexTest_1375") + << QLatin1String("RegexTest_1376") + << QLatin1String("RegexTest_1377") + << QLatin1String("RegexTest_1378") + << QLatin1String("RegexTest_1379") + << QLatin1String("RegexTest_1380") + << QLatin1String("RegexTest_1381") + << QLatin1String("RegexTest_1382") + << QLatin1String("RegexTest_1383") + << QLatin1String("RegexTest_1384") + << QLatin1String("RegexTest_1385") + << QLatin1String("RegexTest_1386") + << QLatin1String("RegexTest_1387") + << QLatin1String("RegexTest_1388") + << QLatin1String("RegexTest_1389") + << QLatin1String("RegexTest_1390") + << QLatin1String("RegexTest_1391") + << QLatin1String("RegexTest_1392") + << QLatin1String("RegexTest_1393") + << QLatin1String("RegexTest_1394") + << QLatin1String("RegexTest_1395") + << QLatin1String("RegexTest_1396") + << QLatin1String("RegexTest_1397") + << QLatin1String("RegexTest_1398") + << QLatin1String("RegexTest_1399") + << QLatin1String("RegexTest_1400") + << QLatin1String("RegexTest_1401") + << QLatin1String("RegexTest_1402") + << QLatin1String("RegexTest_1403") + << QLatin1String("RegexTest_1404") + << QLatin1String("RegexTest_1405") + << QLatin1String("RegexTest_1406") + << QLatin1String("RegexTest_1407") + << QLatin1String("RegexTest_1408") + << QLatin1String("RegexTest_1409") + << QLatin1String("RegexTest_1410") + << QLatin1String("RegexTest_1412") + << QLatin1String("RegexTest_1413") + << QLatin1String("RegexTest_1414") + << QLatin1String("RegexTest_1420") + << QLatin1String("RegexTest_1421") + << QLatin1String("RegexTest_1422") + << QLatin1String("RegexTest_1423") + << QLatin1String("RegexTest_1424") + << QLatin1String("RegexTest_1425") + << QLatin1String("RegexTest_1426") + << QLatin1String("RegexTest_1427") + << QLatin1String("RegexTest_1428") + << QLatin1String("RegexTest_1429") + << QLatin1String("RegexTest_1430") + << QLatin1String("RegexTest_1433") + << QLatin1String("RegexTest_1434") + << QLatin1String("RegexTest_1435") + << QLatin1String("RegexTest_1436") + << QLatin1String("RegexTest_1437") + << QLatin1String("RegexTest_1438") + << QLatin1String("RegexTest_1439") + << QLatin1String("RegexTest_1440") + << QLatin1String("RegexTest_1441") + << QLatin1String("RegexTest_1442") + << QLatin1String("RegexTest_1443") + << QLatin1String("RegexTest_1444") + << QLatin1String("RegexTest_1445") + << QLatin1String("RegexTest_1446") + << QLatin1String("RegexTest_1447") + << QLatin1String("RegexTest_1448") + << QLatin1String("RegexTest_1451") + << QLatin1String("RegexTest_1452") + << QLatin1String("RegexTest_1453") + << QLatin1String("RegexTest_1454") + << QLatin1String("RegexTest_1455") + << QLatin1String("RegexTest_1456") + << QLatin1String("RegexTest_1472") + << QLatin1String("RegexTest_1473") + << QLatin1String("RegexTest_1474") + << QLatin1String("RegexTest_1475") + << QLatin1String("RegexTest_1478") + << QLatin1String("RegexTest_1479") + << QLatin1String("RegexTest_1480") + << QLatin1String("RegexTest_1481") + << QLatin1String("RegexTest_1484") + << QLatin1String("RegexTest_1485") + << QLatin1String("RegexTest_1486") + << QLatin1String("RegexTest_1487") + << QLatin1String("RegexTest_1488") + << QLatin1String("RegexTest_1491") + << QLatin1String("RegexTest_1492") + << QLatin1String("RegexTest_1493") + << QLatin1String("RegexTest_1494") + << QLatin1String("RegexTest_1495") + << QLatin1String("RegexTest_1496") + << QLatin1String("RegexTest_1497") + << QLatin1String("RegexTest_1498") + << QLatin1String("RegexTest_1499") + << QLatin1String("RegexTest_1500") + << QLatin1String("RegexTest_1501") + << QLatin1String("RegexTest_1502") + << QLatin1String("RegexTest_1503") + << QLatin1String("RegexTest_1543") + << QLatin1String("RegexTest_1544") + << QLatin1String("reZ001") +*/ + << QLatin1String("schA2") + << QLatin1String("schA5") + << QLatin1String("schA7") + << QLatin1String("schD8") + << QLatin1String("schG3") + << QLatin1String("schG6") + << QLatin1String("schG9") + << QLatin1String("schG11") + << QLatin1String("schG12") + << QLatin1String("schU1") + << QLatin1String("schU3") + << QLatin1String("schU4") + << QLatin1String("schU5") + << QLatin1String("schZ004") + << QLatin1String("schZ005") + << QLatin1String("schZ012_a") + << QLatin1String("stZ041") + << QLatin1String("wildZ010"); +} + +bool XSDTestSuiteHandler::startElement(const QString &namespaceURI, + const QString &localName, + const QString &/*qName*/, + const QXmlAttributes &atts) +{ + if(namespaceURI != QString::fromLatin1("http://www.w3.org/XML/2004/xml-schema-test-suite/")) + return true; + + if (localName == QLatin1String("testSet")) { + m_currentTestSet = new TestGroup(m_topLevelGroup); + Q_ASSERT(m_currentTestSet); + m_currentTestSet->setTitle(atts.value("name")); + m_topLevelGroup->appendChild(m_currentTestSet); + } else if (localName == QLatin1String("testGroup")) { + m_currentTestGroup = new TestGroup(m_currentTestSet); + Q_ASSERT(m_currentTestGroup); + m_currentTestGroup->setTitle(atts.value("name")); + m_currentTestSet->appendChild(m_currentTestGroup); + m_inTestGroup = true; + } else if (localName == QLatin1String("schemaTest")) { + if (m_blackList.contains(atts.value("name"))) { + m_currentTestCase = 0; + m_schemaBlacklisted = true; + return true; + } + m_schemaBlacklisted = false; + + m_currentTestCase = new XSDTSTestCase(TestCase::Standard, m_currentTestGroup, XSDTSTestCase::SchemaTest); + Q_ASSERT(m_currentTestCase); + m_counter++; + m_currentTestCase->setName(QString::number(m_counter) + atts.value("name")); + m_currentTestGroup->appendChild(m_currentTestCase); + m_currentTestCase->setParent(m_currentTestGroup); + + m_inSchemaTest = true; + } else if (localName == QLatin1String("instanceTest")) { + if (m_schemaBlacklisted) { + m_currentTestCase = 0; + return true; + } + + m_currentTestCase = new XSDTSTestCase(TestCase::Standard, m_currentTestGroup, XSDTSTestCase::InstanceTest); + Q_ASSERT(m_currentTestCase); + m_counter++; + m_currentTestCase->setName(QString::number(m_counter) + atts.value("name")); + m_currentTestGroup->appendChild(m_currentTestCase); + + m_inInstanceTest = true; + } else if (localName == QLatin1String("schemaDocument") || localName == QLatin1String("instanceDocument")) { + if (m_inSchemaTest) { + m_currentTestCase->setSchemaUri(QUrl(atts.value("xlink:href"))); + if (m_currentSchemaLink.isEmpty()) // we only use the first schema document for validation + m_currentSchemaLink = atts.value("xlink:href"); + } + if (m_inInstanceTest) { + m_currentTestCase->setInstanceUri(QUrl(atts.value("xlink:href"))); + m_currentTestCase->setSchemaUri(QUrl(m_currentSchemaLink)); + } + } else if (localName == QLatin1String("expected") && (m_inSchemaTest || m_inInstanceTest)) { + TestBaseLine *baseLine = new TestBaseLine(TestBaseLine::SchemaIsValid); + if (atts.value("validity") == QLatin1String("valid")) { + baseLine->setDetails(QLatin1String("true")); + m_currentTestCase->setName(m_currentTestCase->name() + QLatin1String(" tokoe:valid")); + } else { + baseLine->setDetails(QLatin1String("false")); + m_currentTestCase->setName(m_currentTestCase->name() + QLatin1String(" tokoe:invalid")); + } + + m_currentTestCase->addBaseLine(baseLine); + } else if (localName == QLatin1String("documentation") && m_inTestGroup) { + m_inDescription = true; + } + + return true; +} + +bool XSDTestSuiteHandler::endElement(const QString &/*namespaceURI*/, + const QString &localName, + const QString &/*qName*/) +{ + if (localName == QLatin1String("testGroup")) { + m_inTestGroup = false; + m_currentTestGroup->setDescription(m_documentation); + m_documentation.clear(); + m_currentSchemaLink.clear(); + + if (m_currentTestGroup->childCount() == 0) + m_currentTestSet->removeLast(); + } else if (localName == QLatin1String("schemaTest")) + m_inSchemaTest = false; + else if (localName == QLatin1String("instanceTest")) + m_inInstanceTest = false; + else if (localName == QLatin1String("documentation")) + m_inDescription = false; + + return true; +} + +bool XSDTestSuiteHandler::characters(const QString &ch) +{ + if (m_inDescription) + m_documentation += ch; + + return true; +} + +TestSuite *XSDTestSuiteHandler::testSuite() const +{ + return m_ts; +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/XSDTestSuiteHandler.h b/tests/auto/xmlpatternssdk/XSDTestSuiteHandler.h new file mode 100644 index 0000000..21a54eb --- /dev/null +++ b/tests/auto/xmlpatternssdk/XSDTestSuiteHandler.h @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the autotests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_XSDTestSuiteHandler_H +#define PatternistSDK_XSDTestSuiteHandler_H + +#include +#include + +#include "ExternalSourceLoader.h" +#include "TestSuite.h" +#include "XQTSTestCase.h" + +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class TestBaseLine; + class TestGroup; + class XSDTSTestCase; + + /** + * @short Creates a TestSuite from the XSD Test Suite. + * + * The created TestSuite can be retrieved via testSuite(). + * + * @note XSDTestSuiteHandler assumes the XML is valid by having been validated + * against the W3C XML Schema. It has no safety checks for that the XML format + * is correct but is hard coded for it. Thus, the behavior is undefined if + * the XML is invalid. + * + * @ingroup PatternistSDK + * @author Tobias Koenig + */ + class Q_PATTERNISTSDK_EXPORT XSDTestSuiteHandler : public QXmlDefaultHandler + { + public: + /** + * @param catalogFile the URI for the catalog file being parsed. This + * URI is used for creating absolute URIs for files mentioned in + * the catalog with relative URIs. + * @param useExclusionList whether excludeTestGroups.txt should be used to ignore + * test groups when loading + */ + XSDTestSuiteHandler(const QUrl &catalogFile); + virtual bool characters(const QString &ch); + + virtual bool endElement(const QString &namespaceURI, + const QString &localName, + const QString &qName); + virtual bool startElement(const QString &namespaceURI, + const QString &localName, + const QString &qName, + const QXmlAttributes &atts); + + virtual TestSuite *testSuite() const; + + private: + TestSuite* m_ts; + const QUrl m_catalogFile; + + TestGroup* m_topLevelGroup; + TestGroup* m_currentTestSet; + TestGroup* m_currentTestGroup; + XSDTSTestCase* m_currentTestCase; + bool m_inSchemaTest; + bool m_inInstanceTest; + bool m_inTestGroup; + bool m_inDescription; + bool m_schemaBlacklisted; + QString m_documentation; + QString m_currentSchemaLink; + int m_counter; + QSet m_blackList; + }; +} + +QT_END_NAMESPACE +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp b/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp new file mode 100644 index 0000000..b6b38d0 --- /dev/null +++ b/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.cpp @@ -0,0 +1,234 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qacceltreeresourceloader_p.h" +#include "qnetworkaccessdelegator_p.h" + +#include "Global.h" +#include "TestBaseLine.h" +#include "TestGroup.h" + +#include "XSLTTestSuiteHandler.h" + +using namespace QPatternistSDK; + +extern QNetworkAccessManager s_networkManager; + +XSLTTestSuiteHandler::XSLTTestSuiteHandler(const QUrl &catalogFile) : m_ts(0) + , m_tc(0) + , m_baseLine(0) + , m_catalogFile(catalogFile) + , m_removeTestcase(false) +{ + const QPatternist::NetworkAccessDelegator::Ptr networkDelegator(new QPatternist::NetworkAccessDelegator(&s_networkManager, &s_networkManager)); + + m_resourceLoader = QPatternist::ResourceLoader::Ptr(new QPatternist::AccelTreeResourceLoader(Global::namePool(), + networkDelegator)); + Q_ASSERT(!m_catalogFile.isRelative()); +} + +bool XSLTTestSuiteHandler::startElement(const QString &namespaceURI, + const QString &localName, + const QString &/*qName*/, + const QXmlAttributes &atts) + { + if(namespaceURI != Global::xsltsCatalogNS) + return true; + + /* The elements are handled roughly in the order of highest occurrence in the catalog file. */ + if(localName == QLatin1String("testcase")) + { + /* We pass m_ts temporarily, and change it later. */ + m_tc = new XQTSTestCase(TestCase::Standard, 0, QXmlQuery::XSLT20); + + m_currentQueryPath = m_queryOffset.resolved(QUrl(atts.value(QLatin1String("FilePath")))); + m_currentBaselinePath = m_baselineOffset.resolved(QUrl(atts.value(QLatin1String("FilePath")))); + } + else if(localName == QLatin1String("stylesheet")) + m_tc->setQueryPath(m_currentQueryPath.resolved(atts.value(QLatin1String("file")))); + else if(localName == QLatin1String("error")) + { + m_baseLine = new TestBaseLine(TestBaseLine::ExpectedError); + m_baseLine->setDetails(atts.value(QLatin1String("error-id"))); + m_tc->addBaseLine(m_baseLine); + } + else if(localName == QLatin1String("testcases")) + { + m_ts = new TestSuite(); + m_ts->setVersion(atts.value(QLatin1String("testSuiteVersion"))); + + m_queryOffset = m_catalogFile.resolved(atts.value(QLatin1String("InputOffsetPath"))); + m_baselineOffset = m_catalogFile.resolved(atts.value(QLatin1String("ResultOffsetPath"))); + m_sourceOffset = m_catalogFile.resolved(atts.value(QLatin1String("InputOffsetPath"))); + } + else if(localName == QLatin1String("source-document")) + { + if(atts.value(QLatin1String("role")) == QLatin1String("principal")) + m_tc->setContextItemSource(m_sourceOffset.resolved(QUrl(atts.value(QLatin1String("file"))))); + } + else if(localName == QLatin1String("result-document")) + { + m_baseLine = new TestBaseLine(TestBaseLine::identifierFromString(atts.value(QLatin1String("type")))); + m_baseLine->setDetails(m_currentBaselinePath.resolved(atts.value(QLatin1String("file"))).toString()); + m_tc->addBaseLine(m_baseLine); + } + else if(localName == QLatin1String("discretionary-feature")) + { + const QString feature(atts.value(QLatin1String("name"))); + + m_removeTestcase = feature == QLatin1String("schema_aware") || + feature == QLatin1String("namespace_axis") || + feature == QLatin1String("disabling_output_escaping") || + feature == QLatin1String("XML_1.1"); + } + else if(localName == QLatin1String("discretionary-choice")) + { + m_baseLine = new TestBaseLine(TestBaseLine::ExpectedError); + m_baseLine->setDetails(atts.value(QLatin1String("name"))); + m_tc->addBaseLine(m_baseLine); + const QString feature(atts.value(QLatin1String("name"))); + + m_removeTestcase = feature == QLatin1String("schema_aware") || + feature == QLatin1String("namespace_axis") || + feature == QLatin1String("disabling_output_escaping") || + feature == QLatin1String("XML_1.1"); + } + else if(localName == QLatin1String("entry-named-template")) + { + const QString name(atts.value(QLatin1String("qname"))); + + if(!name.contains(QLatin1Char(':'))) + { + // TODO do namespace processing + const QXmlName complete(Global::namePool()->allocateQName(QString(), name)); + + m_tc->setInitialTemplateName(complete); + } + } + + return true; +} + +TestGroup *XSLTTestSuiteHandler::containerFor(const QString &name) +{ + TestGroup *& c = m_containers[name]; + + if(!c) + { + c = new TestGroup(m_ts); + c->setTitle(name); + Q_ASSERT(c); + m_ts->appendChild(c); + } + + return c; +} + +bool XSLTTestSuiteHandler::endElement(const QString &namespaceURI, + const QString &localName, + const QString &/*qName*/) +{ + if(namespaceURI != Global::xsltsCatalogNS) + return true; + + /* The elements are handled roughly in the order of highest occurrence in the catalog file. */ + if(localName == QLatin1String("description")) + { + if(m_tc) + { + /* We're inside a , so the belongs + * to the testcase. */ + m_tc->setDescription(m_ch.simplified()); + } + } + else if(localName == QLatin1String("testcase")) + { + Q_ASSERT(m_tc->baseLines().count() >= 1); + Q_ASSERT(m_resourceLoader); + // TODO can this be removed? + m_tc->setExternalVariableLoader(QPatternist::ExternalVariableLoader::Ptr + (new ExternalSourceLoader(m_tcSourceInputs, + m_resourceLoader))); + m_tcSourceInputs.clear(); + + if(!m_removeTestcase) + { + /* + TestContainer *const container = containerFor(m_currentCategory); + delete m_tc; + container->removeLast(); + */ + TestContainer *const container = containerFor(m_currentCategory); + m_tc->setParent(container); + Q_ASSERT(m_tc); + container->appendChild(m_tc); + } + + m_tc = 0; + m_removeTestcase = false; + } + else if(localName == QLatin1String("name")) + m_tc->setName(m_ch); + else if(localName == QLatin1String("creator")) + m_tc->setCreator(m_ch); + else if(localName == QLatin1String("contextItem")) + m_contextItemSource = m_ch; + else if(localName == QLatin1String("category")) + m_currentCategory = m_ch; + + return true; +} + +bool XSLTTestSuiteHandler::characters(const QString &ch) +{ + m_ch = ch; + return true; +} + +TestSuite *XSLTTestSuiteHandler::testSuite() const +{ + return m_ts; +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.h b/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.h new file mode 100644 index 0000000..d5d82a2 --- /dev/null +++ b/tests/auto/xmlpatternssdk/XSLTTestSuiteHandler.h @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_XSLTTestSuiteHandler_H +#define PatternistSDK_XSLTTestSuiteHandler_H + +#include +#include +#include + +#include "ExternalSourceLoader.h" +#include "TestSuite.h" +#include "XQTSTestCase.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class TestBaseLine; + class TestGroup; + + /** + * @short Creates a TestSuite from the XQuery Test Suite catalog. + * + * The created TestSuite can be retrieved via testSuite(). + * + * @note XSLTTestSuiteHandler assumes the XML is valid by having been validated + * against the W3C XML Schema. It has no safety checks for that the XML format + * is correct but is hard coded for it. Thus, the behavior is undefined if + * the XML is invalid. + * + * @see http://www.w3.org/XML/Group/xslt20-test/TestSuiteStagingArea/catalog.html + * @see http://www.w3.org/XML/Group/xslt20-test/Documentation/XSLT2Test.htm + * @ingroup PatternistSDK + * @author Frans Englich + */ + class Q_PATTERNISTSDK_EXPORT XSLTTestSuiteHandler : public QXmlDefaultHandler + { + public: + /** + * @param catalogFile the URI for the catalog file being parsed. This + * URI is used for creating absolute URIs for files mentioned in + * the catalog with relative URIs. + * @param useExclusionList whether excludeTestGroups.txt should be used to ignore + * test groups when loading + */ + XSLTTestSuiteHandler(const QUrl &catalogFile); + virtual bool characters(const QString &ch); + + virtual bool endElement(const QString &namespaceURI, + const QString &localName, + const QString &qName); + virtual bool startElement(const QString &namespaceURI, + const QString &localName, + const QString &qName, + const QXmlAttributes &atts); + + virtual TestSuite *testSuite() const; + + private: + TestGroup *containerFor(const QString &name); + + QHash m_containers; + + TestSuite * m_ts; + XQTSTestCase * m_tc; + TestBaseLine * m_baseLine; + QString m_ch; + const QUrl m_catalogFile; + + /** + * The base URI for where the XQuery query files are found. + * It is absolute, resolved against catalogFile. + */ + QUrl m_queryOffset; + + QUrl m_baselineOffset; + QUrl m_sourceOffset; + QUrl m_currentQueryPath; + QUrl m_currentBaselinePath; + + /** + * In the XQTSCatalog.xml, each source file in each test is referred to + * by a key, which can be fully looked up in the @c sources element. This QHash + * maps the keys to absolute URIs pointing to the source files. + */ + ExternalSourceLoader::SourceMap m_sourceMap; + + ExternalSourceLoader::VariableMap m_tcSourceInputs; + + QPatternist::ResourceLoader::Ptr m_resourceLoader; + + /** + * The current value of input-file/\@variable. + */ + QString m_currentInputVariable; + + /** + * The names of the test groups. + */ + QStack m_testGroupName; + + /** + * Holds the content of the current input-URI element. + */ + QString m_inputURI; + QString m_contextItemSource; + QString m_currentCategory; + bool m_removeTestcase; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/docs/XMLIndenterExample.cpp b/tests/auto/xmlpatternssdk/docs/XMLIndenterExample.cpp new file mode 100644 index 0000000..9df47c3 --- /dev/null +++ b/tests/auto/xmlpatternssdk/docs/XMLIndenterExample.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +QByteArray result; +QBuffer returnBuffer(&result); +XMLWriter writer(&returnBuffer); + +writer.startDocument(); + +writer.startDTD(QLatin1String("html"), QLatin1String("-//W3C//DTD XHTML 1.0 Strict//EN"), + QLatin1String("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd")); +writer.endDTD(); + +writer.startPrefixMapping(QString(), QLatin1String("http://www.w3.org/1999/xhtml")); + +writer.startElement(QLatin1String("html"), QXmlAttributes()); +writer.startElement(QLatin1String("body"), QXmlAttributes()); +writer.startElement(QLatin1String("p"), QXmlAttributes()); + +writer.characters(QLatin1String("Hello World!")); + +writer.endElement(QLatin1String("p")); +writer.endElement(QLatin1String("body")); +writer.endElement(QLatin1String("html")); + +writer.endDocument(); diff --git a/tests/auto/xmlpatternssdk/docs/XMLIndenterExampleResult.xml b/tests/auto/xmlpatternssdk/docs/XMLIndenterExampleResult.xml new file mode 100644 index 0000000..c5e7312 --- /dev/null +++ b/tests/auto/xmlpatternssdk/docs/XMLIndenterExampleResult.xml @@ -0,0 +1,3 @@ + + +

Hello World!

diff --git a/tests/auto/xmlpatternssdk/docs/XMLWriterExample.cpp b/tests/auto/xmlpatternssdk/docs/XMLWriterExample.cpp new file mode 100644 index 0000000..9df47c3 --- /dev/null +++ b/tests/auto/xmlpatternssdk/docs/XMLWriterExample.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +QByteArray result; +QBuffer returnBuffer(&result); +XMLWriter writer(&returnBuffer); + +writer.startDocument(); + +writer.startDTD(QLatin1String("html"), QLatin1String("-//W3C//DTD XHTML 1.0 Strict//EN"), + QLatin1String("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd")); +writer.endDTD(); + +writer.startPrefixMapping(QString(), QLatin1String("http://www.w3.org/1999/xhtml")); + +writer.startElement(QLatin1String("html"), QXmlAttributes()); +writer.startElement(QLatin1String("body"), QXmlAttributes()); +writer.startElement(QLatin1String("p"), QXmlAttributes()); + +writer.characters(QLatin1String("Hello World!")); + +writer.endElement(QLatin1String("p")); +writer.endElement(QLatin1String("body")); +writer.endElement(QLatin1String("html")); + +writer.endDocument(); diff --git a/tests/auto/xmlpatternssdk/docs/XMLWriterExampleResult.xml b/tests/auto/xmlpatternssdk/docs/XMLWriterExampleResult.xml new file mode 100644 index 0000000..c5e7312 --- /dev/null +++ b/tests/auto/xmlpatternssdk/docs/XMLWriterExampleResult.xml @@ -0,0 +1,3 @@ + + +

Hello World!

diff --git a/tests/auto/xmlpatternssdk/tests/XMLWriterTest.cpp b/tests/auto/xmlpatternssdk/tests/XMLWriterTest.cpp new file mode 100644 index 0000000..37a4814 --- /dev/null +++ b/tests/auto/xmlpatternssdk/tests/XMLWriterTest.cpp @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "XMLWriter.h" + +#include "XMLWriterTest.h" +#include "XMLWriterTest.moc" + +using namespace QPatternistSDK; + +QTEST_MAIN(XMLWriterTest) + +void XMLWriterTest::serialize() +{ + QFETCH(QString, input); + QFETCH(QString, expectedResult); + + QByteArray result; + QBuffer returnBuffer(&result); + + XMLWriter writer(&returnBuffer); + + QXmlInputSource inputSource; + inputSource.setData(input); + + QXmlSimpleReader reader; + reader.setContentHandler(&writer); + + const bool parseSuccess = reader.parse(inputSource); + Q_ASSERT_X(parseSuccess, Q_FUNC_INFO, + "XMLWriter reported an error while serializing the input."); + + QCOMPARE(QString::fromLatin1(result), expectedResult); +} + +void XMLWriterTest::serialize_data() +{ + QTest::addColumn("input"); + QTest::addColumn("expectedResult"); + + /* ------------------- Elements ------------------- */ + QTest::newRow("Only an document element") + << "" + << "\n"; + + QTest::newRow("Document element containing a short closed element") + << "" + << "\n"; + QTest::newRow("Complex nested elements") + << "" + << "\n"; + /* ------------------------------------------------- */ + + /* ---------------- Element Content ---------------- */ + QTest::newRow("Element content with simple content") + << "content" + << "\ncontent"; + + QTest::newRow("Element content with tricky to escape content") + << ">>&'\"''/>" + << "\n>>&'\"''/>"; + /* ------------------------------------------------- */ + + /* ----------- Processing Instructions ------------- */ + QTest::newRow("Simple processing instruction.") + << "" + << "\n"; + /* ------------------------------------------------- */ + + /* --------------- 'xml' attributes ---------------- */ + QTest::newRow("Simple xml:space attribute.") + << "content" + << "\ncontent"; + + QTest::newRow("Many 'xml' attributes.") + << "content" + << "\n" + "content"; + /* ------------------------------------------------- */ + + /* ------------ namespace declarations ------------- */ + QTest::newRow("One simple namespace declaration.") + << "" + << "\n" + ""; + + QTest::newRow("Two simple namespace declarations.") + << "" + << "\n" + ""; + + QTest::newRow("A simple default namespace.") + << "" + << "\n" + ""; + /* ------------------------------------------------- */ + + /* -------- namespace declarations in use ---------- */ + QTest::newRow("Simple use of a namespace declaration.") + << "" + << "\n" + ""; + /* ------------------------------------------------- */ +} + +void XMLWriterTest::cdata() +{ + /* + QTest::newRow("Simple CDATA") + << "" + << "\n"; + + QTest::newRow("Complex CDATA") + << ">&'\";&987;]]>" + << "\n>&'\";&123;]]>"; + */ +} + +void XMLWriterTest::comments() +{ + /* + QTest::newRow("Simple comment") + << "" + << "\n"; + QTest::newRow("Comment") + << "" + << "\n"; + */ +} + +void XMLWriterTest::doxygenExample() +{ +#include "../docs/XMLWriterExample.cpp" + + /* When changing, remember to update the Doxygen in XMLWriter.h */ + const QByteArray expectedResult( + "\n" + "\n" + "

Hello World!

" + ); + + QCOMPARE(QString::fromLatin1(result), QString::fromLatin1(expectedResult)); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/tests/XMLWriterTest.h b/tests/auto/xmlpatternssdk/tests/XMLWriterTest.h new file mode 100644 index 0000000..7479a77 --- /dev/null +++ b/tests/auto/xmlpatternssdk/tests/XMLWriterTest.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_XMLWriterTest_H +#define PatternistSDK_XMLWriterTest_H + +#include + +QT_BEGIN_HEADER + +namespace QPatternistSDK +{ + /** + * @short QTestLib test for XMLWriter. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class XMLWriterTest : public QObject + { + Q_OBJECT + private Q_SLOTS: + void serialize(); + void serialize_data(); + void comments(); + void cdata(); + + /** + * Ensure the example compiles, and that it does + * what it claims to. + */ + void doxygenExample(); + }; +} + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternssdk/xmlpatternssdk.pro b/tests/auto/xmlpatternssdk/xmlpatternssdk.pro new file mode 100644 index 0000000..6204f01 --- /dev/null +++ b/tests/auto/xmlpatternssdk/xmlpatternssdk.pro @@ -0,0 +1,88 @@ +include (../xmlpatterns.pri) + +TARGET = $$XMLPATTERNS_SDK +TEMPLATE = lib +DEFINES += Q_PATTERNISTSDK_BUILDING + +# lib_bundle ensures we get a framework on OS X, a library bundle. +CONFIG += resources + +mac { + CONFIG += absolute_library_soname + target.path=$$[QT_INSTALL_LIBS] + INSTALLS += target +} + +symbian { + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = All -Tcb + MMP_RULES += EXPORTUNFROZEN +} + +# We add gui, because xmlpatterns.pri pull it out. +QT += xmlpatterns xml network testlib gui + +DESTDIR = $$QT_BUILD_TREE/lib +!wince*:DLLDESTDIR = $$QT_BUILD_TREE/bin + +# syncqt doesn't copy headers in tools/ so let's manually ensure +# it works with shadow builds and source builds. +INCLUDEPATH += $$QT_BUILD_TREE/include/QtXmlPatterns/private \ + $$QT_SOURCE_TREE/include/QtXmlPatterns/private \ + $$QT_SOURCE_TREE/tools/xmlpatterns + +HEADERS = ASTItem.h \ + DebugExpressionFactory.h \ + ErrorHandler.h \ + ErrorItem.h \ + ExitCode.h \ + ExpressionInfo.h \ + ExpressionNamer.h \ + ExternalSourceLoader.h \ + Global.h \ + ResultThreader.h \ + TestBaseLine.h \ + TestCase.h \ + TestContainer.h \ + TestGroup.h \ + TestItem.h \ + TestResult.h \ + TestResultHandler.h \ + TestSuite.h \ + TestSuiteHandler.h \ + TestSuiteResult.h \ + TreeItem.h \ + TreeModel.h \ + Worker.h \ + XMLWriter.h \ + XQTSTestCase.h \ + XSDTestSuiteHandler.h \ + XSDTSTestCase.h \ + XSLTTestSuiteHandler.h + +SOURCES = ASTItem.cpp \ + DebugExpressionFactory.cpp \ + ErrorHandler.cpp \ + ErrorItem.cpp \ + ExpressionInfo.cpp \ + ExpressionNamer.cpp \ + ExternalSourceLoader.cpp \ + Global.cpp \ + ResultThreader.cpp \ + TestBaseLine.cpp \ + TestCase.cpp \ + TestContainer.cpp \ + TestGroup.cpp \ + TestResult.cpp \ + TestResultHandler.cpp \ + TestSuite.cpp \ + TestSuiteHandler.cpp \ + TestSuiteResult.cpp \ + TreeItem.cpp \ + TreeModel.cpp \ + Worker.cpp \ + XMLWriter.cpp \ + XQTSTestCase.cpp \ + XSDTestSuiteHandler.cpp \ + XSDTSTestCase.cpp \ + XSLTTestSuiteHandler.cpp diff --git a/tests/auto/xmlpatternsvalidator/files/complex-type-including-anonymous-type.xsd b/tests/auto/xmlpatternsvalidator/files/complex-type-including-anonymous-type.xsd new file mode 100644 index 0000000..da765b4 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/complex-type-including-anonymous-type.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml new file mode 100644 index 0000000..b17739a --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xml @@ -0,0 +1 @@ +2009-12-16T23:14:10.823218Z diff --git a/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd new file mode 100644 index 0000000..55557f1 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/dateTime-with-microseconds.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd new file mode 100644 index 0000000..60f3e4f --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-datatype.xsd @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd new file mode 100644 index 0000000..e6da433 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-a.xsd @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd new file mode 100644 index 0000000..88be377 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-b.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd new file mode 100644 index 0000000..88be377 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-import-c.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd new file mode 100644 index 0000000..02ca5c5 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-a.xsd @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd new file mode 100644 index 0000000..efaba74 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-b.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd new file mode 100644 index 0000000..efaba74 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-include-c.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd new file mode 100644 index 0000000..4f0804c --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-a.xsd @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd new file mode 100644 index 0000000..019a127 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-b.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd new file mode 100644 index 0000000..019a127 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/indirect-redefine-c.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/instance.xml b/tests/auto/xmlpatternsvalidator/files/instance.xml new file mode 100644 index 0000000..544ff8c --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/instance.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/tests/auto/xmlpatternsvalidator/files/invalid_schema.xsd b/tests/auto/xmlpatternsvalidator/files/invalid_schema.xsd new file mode 100644 index 0000000..99e3525 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/invalid_schema.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/other_valid_schema.xsd b/tests/auto/xmlpatternsvalidator/files/other_valid_schema.xsd new file mode 100644 index 0000000..850ed92 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/other_valid_schema.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsvalidator/files/sa_invalid_instance.xml b/tests/auto/xmlpatternsvalidator/files/sa_invalid_instance.xml new file mode 100644 index 0000000..1804e88 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/sa_invalid_instance.xml @@ -0,0 +1,3 @@ + + + diff --git a/tests/auto/xmlpatternsvalidator/files/sa_valid_instance.xml b/tests/auto/xmlpatternsvalidator/files/sa_valid_instance.xml new file mode 100644 index 0000000..47c980e --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/sa_valid_instance.xml @@ -0,0 +1,3 @@ + + + diff --git a/tests/auto/xmlpatternsvalidator/files/valid_schema.xsd b/tests/auto/xmlpatternsvalidator/files/valid_schema.xsd new file mode 100644 index 0000000..a1b765a --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/valid_schema.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp new file mode 100644 index 0000000..c839859 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp @@ -0,0 +1,234 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#ifdef QTEST_XMLPATTERNS + +#include "../qxmlquery/TestFundament.h" +#include "../network-settings.h" + +/*! + \class tst_XmlPatterns + \internal + \since 4.6 + \brief Tests the command line interface, \c xmlpatternsvalidator, for the XML validation code. + */ +class tst_XmlPatternsValidator : public QObject + , private TestFundament +{ + Q_OBJECT + +public: + tst_XmlPatternsValidator(); + +private Q_SLOTS: + void initTestCase(); + void xsdSupport(); + void xsdSupport_data() const; + +private: + const QString m_command; + bool m_dontRun; +}; + +tst_XmlPatternsValidator::tst_XmlPatternsValidator() + : m_command(QLatin1String("xmlpatternsvalidator")) + , m_dontRun(false) +{ +} + +void tst_XmlPatternsValidator::initTestCase() +{ + QProcess process; + process.start(m_command); + + if(!process.waitForFinished()) + { + m_dontRun = true; + QEXPECT_FAIL("", "The command line tool is not in the path, most likely because Qt " + "has been partically built, such as only the sub-src rule. No tests will be run.", Abort); + QVERIFY(false); + } +} + +void tst_XmlPatternsValidator::xsdSupport() +{ + if(m_dontRun) + QSKIP("The command line utility is not in the path.", SkipAll); + +#ifdef Q_OS_WINCE + QSKIP("WinCE: This test uses unsupported WinCE functionality", SkipAll); +#endif + + QFETCH(int, expectedExitCode); + QFETCH(QStringList, arguments); + QFETCH(QString, cwd); + + QProcess process; + + if(!cwd.isEmpty()) + process.setWorkingDirectory(inputFile(cwd)); + + process.start(m_command, arguments); + + QVERIFY(process.waitForFinished()); + QCOMPARE(process.exitStatus(), QProcess::NormalExit); + + if(process.exitCode() != expectedExitCode) + QTextStream(stderr) << "foo:" << process.readAllStandardError(); + + QCOMPARE(process.exitCode(), expectedExitCode); +} + +void tst_XmlPatternsValidator::xsdSupport_data() const +{ +#ifdef Q_OS_WINCE + return; +#endif + + QTest::addColumn("expectedExitCode"); + QTest::addColumn("arguments"); + QTest::addColumn("cwd"); + + QTest::newRow("No arguments") + << 2 + << QStringList() + << QString(); + + QTest::newRow("A valid schema") + << 0 + << QStringList(QLatin1String("files/valid_schema.xsd")) + << QString(); + + QTest::newRow("An invalid schema") + << 1 + << QStringList(QLatin1String("files/invalid_schema.xsd")) + << QString(); + + QTest::newRow("An instance and valid schema") + << 0 + << (QStringList() << QLatin1String("files/instance.xml") + << QLatin1String("files/valid_schema.xsd")) + << QString(); + + QTest::newRow("An instance and invalid schema") + << 1 + << (QStringList() << QLatin1String("files/instance.xml") + << QLatin1String("files/invalid_schema.xsd")) + << QString(); + + QTest::newRow("An instance and not matching schema") + << 1 + << (QStringList() << QLatin1String("files/instance.xml") + << QLatin1String("files/other_valid_schema.xsd")) + << QString(); + + QTest::newRow("Two instance documents") + << 1 + << (QStringList() << QLatin1String("files/instance.xml") + << QLatin1String("files/instance.xml")) + << QString(); + + QTest::newRow("Three instance documents") + << 2 + << (QStringList() << QLatin1String("files/instance.xml") + << QLatin1String("files/instance.xml") + << QLatin1String("files/instance.xml")) + << QString(); + + QTest::newRow("Two schema documents") + << 1 + << (QStringList() << QLatin1String("files/valid_schema.xsd") + << QLatin1String("files/valid_schema.xsd")) + << QString(); + + QTest::newRow("A schema aware valid instance document") + << 0 + << (QStringList() << QLatin1String("files/sa_valid_instance.xml")) + << QString(); + + QTest::newRow("A schema aware invalid instance document") + << 1 + << (QStringList() << QLatin1String("files/sa_invalid_instance.xml")) + << QString(); + + QTest::newRow("A non-schema aware instance document") + << 1 + << (QStringList() << QLatin1String("files/instance.xml")) + << QString(); + + QTest::newRow("QTBUG-8394 A schema with an indirectly included type") + << 0 + << (QStringList() << QLatin1String("files/indirect-include-a.xsd")) + << QString(); + + QTest::newRow("QTBUG-8394 A schema with an indirectly imported type") + << 0 + << (QStringList() << QLatin1String("files/indirect-import-a.xsd")) + << QString(); + + QTest::newRow("QTBUG-8394 A schema with an indirectly redefined type") + << 0 + << (QStringList() << QLatin1String("files/indirect-redefine-a.xsd")) + << QString(); + + QTest::newRow("QTBUG-8920 A schema with a complex type that indirectly includes an anonymous type") + << 0 + << (QStringList() << QLatin1String("files/complex-type-including-anonymous-type.xsd")) + << QString(); + + QTest::newRow("QTBUG-11559 A schema and instance with a dateTime containing microseconds") + << 0 + << (QStringList() << QLatin1String("files/dateTime-with-microseconds.xml") + << QLatin1String("files/dateTime-with-microseconds.xsd")) + << QString(); +} + +QTEST_MAIN(tst_XmlPatternsValidator) + +#include "tst_xmlpatternsvalidator.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsvalidator/xmlpatternsvalidator.pro b/tests/auto/xmlpatternsvalidator/xmlpatternsvalidator.pro new file mode 100644 index 0000000..7091840 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/xmlpatternsvalidator.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_xmlpatternsvalidator.cpp \ + ../qxmlquery/TestFundament.cpp + +include (../xmlpatterns.pri) diff --git a/tests/auto/xmlpatternsview/.gitignore b/tests/auto/xmlpatternsview/.gitignore new file mode 100644 index 0000000..31f60b1 --- /dev/null +++ b/tests/auto/xmlpatternsview/.gitignore @@ -0,0 +1 @@ +tst_xmlpatternsview diff --git a/tests/auto/xmlpatternsview/tst_xmlpatternsview.cpp b/tests/auto/xmlpatternsview/tst_xmlpatternsview.cpp new file mode 100644 index 0000000..5127a7d --- /dev/null +++ b/tests/auto/xmlpatternsview/tst_xmlpatternsview.cpp @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +/*! + \class tst_XmlPatternsView + \internal + \since 4.5 + \brief This test tests nothing, it only exists in order to have a place + for the xmlpatternsview utility. + + tests/auto/xmlpatternsview doesn't test anything, it only exists to house the + xmlpatternsview debugging utility inside the Qt directory. + */ +class tst_XmlPatternsView : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void run() const; +}; + +void tst_XmlPatternsView::run() const +{ +} + +QTEST_MAIN(tst_XmlPatternsView) + +#include "tst_xmlpatternsview.moc" +#else //QTEST_XMLPATTERNS +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/xmlpatternsview/view/FunctionSignaturesView.cpp b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.cpp new file mode 100644 index 0000000..8cf7454 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "DebugExpressionFactory.h" + +#include "FunctionSignaturesView.h" + +using namespace QPatternistSDK; + +FunctionSignaturesView::FunctionSignaturesView(QWidget *const p) + : QDockWidget(QLatin1String("Function Signatures View"), p) +{ + setObjectName(QLatin1String("FunctionSignaturesView")); + setWidget(new QWidget()); + setupUi(widget()); + + signatureList->addItems(DebugExpressionFactory::availableFunctionSignatures()); + signatureList->sortItems(); + countInfo->setText(QString::fromLatin1("Count: %1").arg(signatureList->count())); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h new file mode 100644 index 0000000..3d0a52d --- /dev/null +++ b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_FunctionSignaturesView_H +#define PatternistSDK_FunctionSignaturesView_H + +#include + +#include "ui_ui_FunctionSignaturesView.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short a window which displays all available functions in + * the XQuery/XPath implementation. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class FunctionSignaturesView : public QDockWidget, + public Ui_FunctionSignaturesViewCentralWidget + { + public: + FunctionSignaturesView(QWidget *const parent); + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/MainWindow.cpp b/tests/auto/xmlpatternsview/view/MainWindow.cpp new file mode 100644 index 0000000..449ba3a --- /dev/null +++ b/tests/auto/xmlpatternsview/view/MainWindow.cpp @@ -0,0 +1,508 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ASTItem.h" +#include "FunctionSignaturesView.h" +#include "Global.h" +#include "TestCaseView.h" +#include "TestResultView.h" +#include "TestSuite.h" +#include "TreeModel.h" +#include "TreeSortFilter.h" +#include "UserTestCase.h" + +#include "MainWindow.h" + +using namespace QPatternistSDK; + +MainWindow::MainWindow() : m_userTC(new UserTestCase()), + m_currentTC(0) +{ + setupUi(this); + + /* I want to do this in Designer.. */ + testSuiteView->header()->setSortIndicator(0, Qt::AscendingOrder); + testSuiteView->header()->setSortIndicatorShown(true); + testSuiteView->header()->setClickable(true); + + setupActions(); + + QStringList suiteHeaders; + suiteHeaders << QLatin1String("Name") + << QLatin1String("Pass") + << QLatin1String("Fail") + << QLatin1String("Total"); + + TreeSortFilter *const proxy = new TreeSortFilter(this); + connect(searchInput, SIGNAL(textChanged(const QString &)), + proxy, SLOT(setFilterFixedString(const QString &))); + + proxy->setSourceModel(new TreeModel(suiteHeaders, this)); + testSuiteView->setModel(proxy); + + /* --------- Test Result View ---------- */ + testResultView = new TestResultView(this); + testResultView->setAllowedAreas(Qt::AllDockWidgetAreas); + addDockWidget(Qt::RightDockWidgetArea, testResultView); + /* ----------------------------------- */ + + /* --------- Test Case View ---------- */ + testCaseView = new TestCaseView(this); + testCaseView->setAllowedAreas(Qt::AllDockWidgetAreas); + addDockWidget(Qt::LeftDockWidgetArea, testCaseView); + + connect(this, SIGNAL(testCaseSelected(TestCase *const)), + testCaseView, SLOT(displayTestCase(TestCase *const))); + connect(this, SIGNAL(testCaseSelected(TestCase *const)), + testResultView, SLOT(displayTestResult(TestCase *const))); + connect(focusURI, SIGNAL(textChanged(const QString &)), + m_userTC, SLOT(focusDocumentChanged(const QString &))); + /* ----------------------------------- */ + + /* ----- Function Signature View ----- */ + functionView = new FunctionSignaturesView(this); + functionView->setAllowedAreas(Qt::AllDockWidgetAreas); + addDockWidget(Qt::RightDockWidgetArea, functionView); + /* ----------------------------------- */ + + /* Appears here, because the menu uses actions in the QDockWidgets. */ + setupMenu(); + + readSettings(); + + /* Connect this after readSettings(), otherwise readSettings() triggers writeSettings(). */ + connect(sourceTab, SIGNAL(currentChanged(int)), + SLOT(writeSettings())); + connect(testSuiteView, SIGNAL(clicked(const QModelIndex &)), + SLOT(writeSettings())); + connect(sourceInput, SIGNAL(textChanged()), + SLOT(writeSettings())); +} + +MainWindow::~MainWindow() +{ + delete m_userTC; +} + +QModelIndex MainWindow::sourceIndex(const QModelIndex &proxyIndex) const +{ + return static_cast(testSuiteView->model())->mapToSource(proxyIndex); +} + +TreeModel *MainWindow::sourceModel() const +{ + const TreeSortFilter *const proxy = static_cast(testSuiteView->model()); + return static_cast(proxy->sourceModel()); +} + +void MainWindow::on_testSuiteView_clicked(const QModelIndex &index) +{ + if(index.isValid()) + { + TestItem *const node = static_cast(sourceIndex(index).internalPointer()); + Q_ASSERT(node); + + if(node->isFinalNode()) + { + m_currentTC = static_cast(node); + testCaseSelected(m_currentTC); + return; + } + } + + /* In all other cases: */ + m_currentTC = 0; + testCaseSelected(0); +} + +void MainWindow::on_sourceInput_textChanged() +{ + m_userTC->setSourceCode(sourceInput->toPlainText()); +} + +void MainWindow::on_actionOpen_triggered() +{ + const QString fileName(QFileDialog::getOpenFileName(this, + QLatin1String("Open Test Suite Catalog"), + m_previousOpenedCatalog.toLocalFile(), + QLatin1String("Test Suite Catalog file (*.xml)"))); + + /* "If the user presses Cancel, it returns a null string." */ + if(fileName.isNull()) + return; + + m_currentSuiteType = TestSuite::XQuerySuite; + openCatalog(QUrl::fromLocalFile(fileName), true, TestSuite::XQuerySuite); +} + +void MainWindow::on_actionOpenXSLTSCatalog_triggered() +{ + const QString fileName(QFileDialog::getOpenFileName(this, + QLatin1String("Open Test Suite Catalog"), + m_previousOpenedCatalog.toLocalFile(), + QLatin1String("Test Suite Catalog file (*.xml)"))); + + /* "If the user presses Cancel, it returns a null string." */ + if(fileName.isNull()) + return; + + m_currentSuiteType = TestSuite::XsltSuite; + openCatalog(QUrl::fromLocalFile(fileName), true, TestSuite::XsltSuite); +} + +void MainWindow::on_actionOpenXSDTSCatalog_triggered() +{ + const QString fileName(QFileDialog::getOpenFileName(this, + QLatin1String("Open Test Suite Catalog"), + m_previousOpenedCatalog.toLocalFile(), + QLatin1String("Test Suite Catalog file (*.xml)"))); + + /* "If the user presses Cancel, it returns a null string." */ + if(fileName.isNull()) + return; + + m_currentSuiteType = TestSuite::XsdSuite; + openCatalog(QUrl::fromLocalFile(fileName), true, TestSuite::XsdSuite); +} + +void MainWindow::openCatalog(const QUrl &fileName, + const bool reportError, + const TestSuite::SuiteType suiteType) +{ + setCurrentFile(fileName); + m_previousOpenedCatalog = fileName; + + QString errorMsg; + TestSuite *const loadedSuite = TestSuite::openCatalog(fileName, errorMsg, false, suiteType); + + if(!loadedSuite) + { + if(reportError) + { + QMessageBox::information(this, QLatin1String("Failed to load catalog file"), + errorMsg, QMessageBox::Ok); + } + + return; + } + + TreeModel *const prevModel = sourceModel(); + prevModel->setRoot(loadedSuite); + m_currentTC = 0; + + testCaseCount->setText(QString::number(loadedSuite->resultSummary().second)); + /* Switch to the tab containing the loaded test suite. */ + sourceTab->setCurrentIndex(0); + + setWindowTitle(QCoreApplication::applicationName() + + QLatin1String(" -- ") + + QFileInfo(fileName.toLocalFile()).fileName()); + + /* @p reportError is set when not auto-loading on startup, and + * we only want to save when the user opens from the GUI. */ + if(reportError) + writeSettings(); +} + +void MainWindow::on_sourceTab_currentChanged(int index) +{ + if(index == 1) + { + m_currentTC = m_userTC; + testCaseSelected(m_userTC); + } + else + on_testSuiteView_clicked(testSuiteView->currentIndex()); +} + +void MainWindow::on_actionExecute_triggered() +{ + Q_ASSERT(testCaseView); + TestSuite *const ts = static_cast(sourceModel()->root()); + + const TestItem::ExecutionStage stage = compileOnly->isChecked() ? TestItem::CompileOnly + : TestItem::CompileAndRun; + + m_userTC->setLanguage(isXSLT20->isChecked() ? QXmlQuery::XSLT20 : QXmlQuery::XQuery10); + + if(m_currentTC) + { + const TestResult::List rlist(m_currentTC->execute(stage, ts)); + Q_ASSERT(rlist.count() == 1); + const TestResult *const result = rlist.first(); + Q_ASSERT(result); + testResultView->displayTestResult(result); + } + else + { + const QModelIndexList indexes = testSuiteView->selectionModel()->selectedIndexes(); + for (int i = 0; i < indexes.count(); ++i) { + const QModelIndex source(sourceIndex(indexes.at(i))); + + TestItem *const ti = static_cast(source.internalPointer()); + if(!ti) + return; + + /* ti is a TestGroup. It now executes its children, changed(TreeItem *) signals is + * emitted which the view receives, and thus updates. */ + ti->execute(stage, ts); + } + } +} + +void MainWindow::readSettings() +{ + QSettings settings; + + settings.beginGroup(QLatin1String("MainWindow")); + restoreState(settings.value(QLatin1String("state")).toByteArray(), Global::versionNumber); + resize(settings.value(QLatin1String("size"), QSize(400, 400)).toSize()); + move(settings.value(QLatin1String("pos"), QPoint(200, 200)).toPoint()); + m_previousOpenedCatalog = settings.value(QLatin1String("PreviousOpenedCatalogFile")).toUrl(); + focusURI->setText(settings.value(QLatin1String("focusURI")).toString()); + isXSLT20->setChecked(settings.value(QLatin1String("isXSLT20")).toBool()); + compileOnly->setChecked(settings.value(QLatin1String("compileOnly")).toBool()); + m_currentSuiteType = (TestSuite::SuiteType)settings.value(QLatin1String("PreviousSuiteType"), isXSLT20->isChecked() ? TestSuite::XsltSuite : TestSuite::XQuerySuite).toInt(); + + /* Open the previously opened catalog. */ + if(!m_previousOpenedCatalog.isEmpty()) + { + openCatalog(m_previousOpenedCatalog, false, m_currentSuiteType); + } + + sourceInput->setPlainText(settings.value(QLatin1String("sourceInput")).toString()); + testResultView->resultViewSelection->setCurrentIndex( + settings.value(QLatin1String("ResultViewMethod"), 0).toInt()); + testResultView->outputStack->setCurrentIndex(settings.value( + QLatin1String("ResultViewMethod"), 0).toInt()); + + /* Restore the selected test case/group. */ + const QStringList rows(settings.value(QLatin1String("SelectedTestSuiteRow"), + QString()) + .toString().split(QLatin1Char(','))); + + if(!rows.isEmpty()) /* Ok, we have a selection. */ + { + QAbstractItemModel *const model = testSuiteView->model(); + Q_ASSERT(model); + QModelIndex p; + + for(int i = rows.count() - 1; i >= 0; --i) + { + const QModelIndex childIndex(model->index(rows.at(i).toInt(), 0 , p)); + + if(childIndex.isValid()) + { + testSuiteView->scrollTo(p); /* Work around for Qt issue #87575. */ + p = childIndex; + } + } + + testSuiteView->scrollTo(p); /* Scrolls to it. */ + testSuiteView->setCurrentIndex(p); /* Selects it. */ + on_testSuiteView_clicked(p); /* Loads the test case in the Test Case View. */ + } + + /* Do it here. In this way the user-entered test case gets selected, if that tab + * was previously used. */ + sourceTab->setCurrentIndex(settings.value(QLatin1String("SelectedTab"), 0).toInt()); + on_sourceTab_currentChanged(sourceTab->currentIndex()); + + settings.endGroup(); +} + +void MainWindow::writeSettings() +{ + QSettings settings; + + settings.beginGroup(QLatin1String("MainWindow")); + settings.setValue(QLatin1String("state"), saveState(Global::versionNumber)); + settings.setValue(QLatin1String("pos"), pos()); + settings.setValue(QLatin1String("size"), size()); + settings.setValue(QLatin1String("sourceInput"), sourceInput->toPlainText()); + settings.setValue(QLatin1String("PreviousOpenedCatalogFile"), m_previousOpenedCatalog); + settings.setValue(QLatin1String("PreviousSuiteType"), m_currentSuiteType); + settings.setValue(QLatin1String("SelectedTab"), sourceTab->currentIndex()); + settings.setValue(QLatin1String("ResultViewMethod"), + testResultView->resultViewSelection->currentIndex()); + settings.setValue(QLatin1String("focusURI"), + focusURI->text()); + settings.setValue(QLatin1String("isXSLT20"), + isXSLT20->isChecked()); + settings.setValue(QLatin1String("compileOnly"), + compileOnly->isChecked()); + + /* Store the selected test case/group. */ + QModelIndex selected(sourceIndex(testSuiteView->currentIndex())); + if(selected.isValid()) + { + QString result; + + do + { + result.append(QString::number(selected.row())); + selected = selected.parent(); + + if(selected.isValid()) + result.append(QLatin1Char(',')); + else + break; + } + while(true); + + settings.setValue(QLatin1String("SelectedTestSuiteRow"), result); + } + + settings.endGroup(); +} + +void MainWindow::setCurrentFile(const QUrl &f) +{ + const QString fileName(f.toLocalFile()); + QSettings settings; + settings.beginGroup(QLatin1String("MainWindow")); + QStringList files(settings.value(QLatin1String("RecentFileList")).toStringList()); + + files.removeAll(fileName); + files.prepend(fileName); + while(files.size() > MaximumRecentFiles) + files.removeLast(); + + settings.setValue(QLatin1String("RecentFileList"), files); + settings.endGroup(); + + updateRecentFileActions(); +} + +void MainWindow::updateRecentFileActions() +{ + QSettings settings; + settings.beginGroup(QLatin1String("MainWindow")); + const QStringList files(settings.value(QLatin1String("RecentFileList")).toStringList()); + settings.endGroup(); + + const int numRecentFiles = qMin(files.size(), static_cast(MaximumRecentFiles)); + + for(int i = 0; i < numRecentFiles; ++i) + { + const QString text(QString::fromLatin1("&%1 %2").arg(i + 1).arg(QFileInfo(files[i]).filePath())); + m_recentFileActs[i]->setText(text); + m_recentFileActs[i]->setData(QUrl::fromLocalFile(files[i])); + m_recentFileActs[i]->setVisible(true); + } + + for(int j = numRecentFiles; j < MaximumRecentFiles; ++j) + m_recentFileActs[j]->setVisible(false); +} + +void MainWindow::openRecentFile() +{ + const QAction *const action = qobject_cast(sender()); + if(action) + openCatalog(action->data().toUrl(), true, TestSuite::XQuerySuite); +} + +void MainWindow::closeEvent(QCloseEvent *ev) +{ + writeSettings(); + ev->accept(); +} + +void MainWindow::setupActions() +{ + connect(actionQuit, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); + + for(int i = 0; i < MaximumRecentFiles; ++i) + { + m_recentFileActs[i] = new QAction(this); + m_recentFileActs[i]->setVisible(false); + connect(m_recentFileActs[i], SIGNAL(triggered()), + this, SLOT(openRecentFile())); + } +} + +void MainWindow::setupMenu() +{ + QMenu *const menFile = findChild(QLatin1String("menuFile")); + Q_ASSERT(menFile); + QAction *const actOpen = findChild(QLatin1String("actionExecute")); + Q_ASSERT(actOpen); + QMenu *const recent = new QMenu(QLatin1String("O&pen Recent"), this); + + menFile->insertMenu(actOpen, recent); + menFile->insertSeparator(actOpen); + + for(int i = 0; i < MaximumRecentFiles; ++i) + recent->addAction(m_recentFileActs[i]); + + updateRecentFileActions(); + + QMenu *const menWindows = findChild(QLatin1String("menuWindows")); + Q_ASSERT(menWindows); + + menWindows->addAction(testCaseView->toggleViewAction()); + menWindows->addAction(testResultView->toggleViewAction()); + menWindows->addAction(functionView->toggleViewAction()); +} + +void MainWindow::on_actionRestart_triggered() +{ + if(QProcess::startDetached(QCoreApplication::applicationFilePath())) + QApplication::closeAllWindows(); + else + { + QTextStream err(stderr); + err << "Failed to start " << qPrintable(QCoreApplication::applicationFilePath()) << endl; + } +} + + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/MainWindow.h b/tests/auto/xmlpatternsview/view/MainWindow.h new file mode 100644 index 0000000..ff19349 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/MainWindow.h @@ -0,0 +1,178 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_MainWindow_H +#define PatternistSDK_MainWindow_H + +#include +#include + +#include "ui_ui_MainWindow.h" +#include "DebugExpressionFactory.h" +#include "TestSuite.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class FunctionSignaturesView; + class TestCase; + class TestCaseView; + class TestResultView; + class TreeModel; + class UserTestCase; + + /** + * @short The main window of the PatternistSDKView application. + * + * MainWindow is heavily influenced by Qt's examples covering recent files, + * main window usage, QSettings, and other central parts. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class MainWindow : public QMainWindow, + private Ui_MainWindow + { + Q_OBJECT + public: + MainWindow(); + virtual ~MainWindow(); + + /** + * Takes care of saving QSettings. + */ + virtual void closeEvent(QCloseEvent *event); + + Q_SIGNALS: + /** + * Emitted whenever a test case is selected. The test case + * selected is @p tc. If something that wasn't a test case + * was selected, such as a test group or that a new test suite was + * opened, @p tc is @c null. + */ + void testCaseSelected(TestCase *const tc); + + private Q_SLOTS: + /** + * The Open action calls this slot. It is responsible + * for opening a test suite catalog file. + */ + void on_actionOpen_triggered(); + + void on_actionOpenXSLTSCatalog_triggered(); + + void on_actionOpenXSDTSCatalog_triggered(); + + /** + * Executes the selected test case or test group. + */ + void on_actionExecute_triggered(); + + /** + * @param file the name of the catalog to open. + * @param reportError whether the user should be notified about a loading error. If @c true, + * an informative message box will be displayed, if any errors occurred. + */ + void openCatalog(const QUrl &file, const bool reportError, + const TestSuite::SuiteType suitType); + + void openRecentFile(); + + void on_testSuiteView_clicked(const QModelIndex &index); + + void on_sourceTab_currentChanged(int index); + void on_sourceInput_textChanged(); + + /** + * Restarts the program by executing restartApplication.sh loaded as a QResource file, + * combined with shutting down this instance. + */ + void on_actionRestart_triggered(); + + void writeSettings(); + + private: + /** + * Saves typing a long line. + * + * @returns the source model the index in the proxy @p proxyIndex corresponds to. + */ + inline QModelIndex sourceIndex(const QModelIndex &proxyIndex) const; + + /** + * Saves typing a long line. + * + * @returns the source model for the test suite view, by walking through the + * proxy model. + */ + inline TreeModel *sourceModel() const; + + void setupMenu(); + void setupActions(); + void readSettings(); + void setCurrentFile(const QUrl &fileName); + void updateRecentFileActions(); + + UserTestCase *const m_userTC; + + enum {MaximumRecentFiles = 5}; + QAction * m_recentFileActs[MaximumRecentFiles]; + + /** + * The current selected test case. + */ + TestCase * m_currentTC; + QUrl m_previousOpenedCatalog; + TestCaseView * testCaseView; + TestResultView * testResultView; + FunctionSignaturesView * functionView; + TestSuite::SuiteType m_currentSuiteType; + }; +} +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/TestCaseView.cpp b/tests/auto/xmlpatternsview/view/TestCaseView.cpp new file mode 100644 index 0000000..d85d6b4 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/TestCaseView.cpp @@ -0,0 +1,179 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#include "UserTestCase.h" +#include "ui_ui_BaseLinePage.h" + +#include "TestCaseView.h" + +using namespace QPatternistSDK; + +/** + * Removes all tabs in @p widget, and deletes its page widgets. + */ +static void clearTabWidget(QTabWidget *const widget) +{ + Q_ASSERT(widget); + + /* Very annoying, we can't cache count(). */ + /* Idea: QTabWidget::clear(bool deletePageWidgets = false); */ + while(widget->count() != 0) + { + delete widget->widget(0); + widget->removeTab(0); + } + + Q_ASSERT(widget->count() == 0); +} + +TestCaseView::TestCaseView(QWidget *const p) : QDockWidget(QLatin1String("Test Case View"), p) +{ + setObjectName(QLatin1String("TestCaseView")); + setWidget(new QWidget()); + setupUi(widget()); + displayNone(); + clearTabWidget(baselinesTabs); +} + +void TestCaseView::displayNone() +{ + stackedWidget->setCurrentIndex(1); +} + +void TestCaseView::displayTestCase(TestCase *const tc) +{ + if(!tc) + { + displayNone(); + return; + } + + name->setText(tc->title()); + description->setText(tc->description()); + isXPath->setText(tc->isXPath() ? QLatin1String("yes") : QLatin1String("no")); + author->setText(tc->creator()); + type->setText(TestCase::displayName(tc->scenario())); + if(tc->lastModified().isNull()) + lastModified->setText(QLatin1String("Not specified.")); + else + lastModified->setText(tc->lastModified().toString()); + + if(tc->contextItemSource().isValid()) + focusDocument->setText(tc->contextItemSource().toLocalFile()); + + /* Not used. */ + bool ok = false; + + const QString sourceCode(tc->sourceCode(ok)); + + if(sourceCode.isEmpty()) + sourceEdit->setPlainText(QLatin1String("No source code available.")); + else + sourceEdit->setPlainText(sourceCode); + + stackedWidget->setCurrentIndex(0); + + displayBaseLines(tc); +} + +void TestCaseView::displayBaseLines(const TestCase *const tc) +{ + clearTabWidget(baselinesTabs); + Q_ASSERT(tc); + const TestBaseLine::List bs(tc->baseLines()); + const TestBaseLine::List::const_iterator end(bs.constEnd()); + TestBaseLine::List::const_iterator it(bs.constBegin()); + + for(; it != end; ++it) + { + const TestBaseLine *const bl = *it; + Q_ASSERT(bl); + const TestBaseLine::Type t = bl->type(); + + QString title(TestBaseLine::displayName(t)); + const QString details(bl->details()); + + QWidget *const currPage = new QWidget(); + Ui::BaseLinePage setupPage; + setupPage.setupUi(currPage); + + /* Make this title a bit better: "ExpectedError: XPTY0004", for example. */ + switch(t) + { + case TestBaseLine::ExpectedError: + { + title += (QLatin1String(": ") + details); + /* Fallthrough. */ + } + case TestBaseLine::Ignore: + { + setupPage.contentEdit->setEnabled(false); + break; + } + default: + { + setupPage.contentEdit->setPlainText(details); + break; + } + } + + baselinesTabs->addTab(currPage, title); + } + + int tabIndex = baselinesTabs->count(); /* The tab we're about to add. */ + baselinesTabs->addTab(new QWidget(), QLatin1String("AST Baseline")); + baselinesTabs->setTabToolTip(tabIndex, + QLatin1String("Expected AST baselines are not yet implemented.")); + baselinesTabs->setTabEnabled(tabIndex, false); + + ++tabIndex; /* Again, the tab we're about to add. */ + baselinesTabs->addTab(new QWidget(), QLatin1String("Message Baseline")); + baselinesTabs->setTabToolTip(tabIndex, + QLatin1String("Expected Message baselines are not yet implemented.")); + baselinesTabs->setTabEnabled(tabIndex, false); + + baselinesTabs->setCurrentIndex(0); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/TestCaseView.h b/tests/auto/xmlpatternsview/view/TestCaseView.h new file mode 100644 index 0000000..197e2ec --- /dev/null +++ b/tests/auto/xmlpatternsview/view/TestCaseView.h @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestCaseView_H +#define PatternistSDK_TestCaseView_H + +#include + +#include "ui_ui_TestCaseView.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class TestCase; + + /** + * @short Displays a test case. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class TestCaseView : public QDockWidget, + public Ui_TestCaseViewCentralWidget + { + Q_OBJECT + public: + /** + * Creates a TestCaseView. Calls displayNone(), in order to reset its view. + */ + TestCaseView(QWidget *const parent); + + public Q_SLOTS: + void displayTestCase(TestCase *const); + + private: + void displayBaseLines(const TestCase *const); + + /** + * Displays a generic message that no test case is selected. + */ + void displayNone(); + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/TestResultView.cpp b/tests/auto/xmlpatternsview/view/TestResultView.cpp new file mode 100644 index 0000000..6c685a2 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/TestResultView.cpp @@ -0,0 +1,163 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "ASTItem.h" +#include "ErrorItem.h" +#include "TestCase.h" +#include "TestResult.h" +#include "TreeModel.h" +#include "XDTItemItem.h" + +#include "TestResultView.h" + +using namespace QPatternistSDK; + +TestResultView::TestResultView(QWidget *const p) : QDockWidget(QLatin1String("Test Result View"), p) +{ + Q_ASSERT(p); + setObjectName(QLatin1String("TestResultView")); + setWidget(new QWidget()); + setupUi(widget()); + + QStringList astColumns; + astColumns << QLatin1String("Node Name") + << QLatin1String("Details") + << QLatin1String("Static Type") + << QLatin1String("Required Type"); + astView->setModel(new TreeModel(astColumns, this)); + + QStringList itemColumns; + itemColumns << QLatin1String("#") + << QLatin1String("Value") + << QLatin1String("Type"); + itemListResult->setModel(new TreeModel(itemColumns, this)); + + QStringList errColumns; + errColumns << QLatin1String("Severity") + << QLatin1String("Error Code") + << QLatin1String("Message"); + messageOutput->setModel(new TreeModel(errColumns, this)); + messageOutput->horizontalHeader()->setStretchLastSection(true); +} + +void TestResultView::displayTestResult(const TestResult *const result) +{ + if(!result) + { + displayNone(); + return; + } + + /* ------- the Test Status Label --------- */ + resultStatus->setText(result->status() ? TestResult::displayName(result->status()) + : QLatin1String("Not Applicable")); + /* --------------------------------------- */ + + /* ------------ the AST View ------------- */ + ASTItem *astTree = result->astTree(); + static_cast(astView->model())->setRoot(astTree); + /* --------------------------------------- */ + + /* ------- the Error code/msg View ------- */ + ErrorItem *msgRoot = new ErrorItem(ErrorHandler::Message(), 0); + + const ErrorHandler::Message::List msgs(result->messages()); + ErrorHandler::Message::List::const_iterator it(msgs.constBegin()); + const ErrorHandler::Message::List::const_iterator end(msgs.constEnd()); + + for(; it != end; ++it) + msgRoot->appendChild(new ErrorItem(*it, msgRoot)); + + TreeModel *etm = static_cast(messageOutput->model()); + etm->setRoot(msgRoot); + /* --------------------------------------- */ + + const QPatternist::Item::List items(result->items()); + /* ----- the Serialized Output View ------ */ + serializedResult->setPlainText(result->asSerialized()); + /* --------------------------------------- */ + + /* ------ the Item List Output View ------ */ + XDTItemItem *itemRoot = new XDTItemItem(QPatternist::Item(), 0); + QPatternist::Item item; + + QPatternist::Item::List::const_iterator itemIt(items.constBegin()); + const QPatternist::Item::List::const_iterator itemsEnd(items.constEnd()); + + for(; itemIt != itemsEnd; ++itemIt) + itemRoot->appendChild(new XDTItemItem(*itemIt, itemRoot)); + + TreeModel *itm = static_cast(itemListResult->model()); + itm->setRoot(itemRoot); + /* --------------------------------------- */ +} + +void TestResultView::displayTestResult(TestCase *const tc) +{ + if(tc) + displayTestResult(tc->testResult()); + else + displayNone(); +} + +void TestResultView::displayNone() +{ + TreeModel *tm; + + tm = static_cast(astView->model()); + Q_ASSERT(tm); + tm->setRoot(0); + + tm = static_cast(messageOutput->model()); + Q_ASSERT(tm); + tm->setRoot(0); + + tm = static_cast(itemListResult->model()); + Q_ASSERT(tm); + tm->setRoot(0); + + serializedResult->clear(); + resultStatus->clear(); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/TestResultView.h b/tests/auto/xmlpatternsview/view/TestResultView.h new file mode 100644 index 0000000..83f3f5f --- /dev/null +++ b/tests/auto/xmlpatternsview/view/TestResultView.h @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TestResultView_H +#define PatternistSDK_TestResultView_H + +#include + +#include "ui_ui_TestResultView.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + class TestCase; + class TestResult; + + /** + * @short Displays the result of running a test case. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class TestResultView : public QDockWidget, + public Ui_TestResultViewCentralWidget + { + Q_OBJECT + public: + TestResultView(QWidget *const parent); + + void displayTestResult(const TestResult *const result); + + public Q_SLOTS: + void displayTestResult(TestCase *const result); + + private: + void displayNone(); + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/TreeSortFilter.cpp b/tests/auto/xmlpatternsview/view/TreeSortFilter.cpp new file mode 100644 index 0000000..d28bb97 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/TreeSortFilter.cpp @@ -0,0 +1,122 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "TreeSortFilter.h" + +using namespace QPatternistSDK; + +TreeSortFilter::TreeSortFilter(QObject *p) : QSortFilterProxyModel(p) +{ + Q_ASSERT(p); +} + +bool TreeSortFilter::lessThan(const QModelIndex &left, + const QModelIndex &right) const +{ + const QVariant leftData(sourceModel()->data(left)); + const QVariant rightData(sourceModel()->data(right)); + + return numericLessThan(leftData.toString(), rightData.toString()); +} + +bool TreeSortFilter::numericLessThan(const QString &l, const QString &r) const +{ + QString ls(l); + QString rs(r); + const int len = (l.length() > r.length() ? r.length() : l.length()); + + for(int i = 0;i < len; ++i) + { + const QChar li(l.at(i)); + const QChar ri(r.at(i)); + + if(li >= QLatin1Char('0') && + li <= QLatin1Char('9') && + ri >= QLatin1Char('0') && + ri <= QLatin1Char('9')) + { + ls = l.mid(i); + rs = r.mid(i); + break; + } + else if(li != ri) + break; + } + + const int ld = ls.toInt(); + const int rd = rs.toInt(); + + if(ld == rd) + return ls.localeAwareCompare(rs) < 0; + else + return ld < rd; +} + +bool TreeSortFilter::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const +{ + if(filterRegExp().isEmpty()) + return true; + + QModelIndex current(sourceModel()->index(sourceRow, filterKeyColumn(), sourceParent)); + + if(sourceModel()->hasChildren(current)) + { + bool atLeastOneValidChild = false; + int i = 0; + while(!atLeastOneValidChild) + { + const QModelIndex child(current.child(i, current.column())); + if(!child.isValid()) + // No valid child + break; + + atLeastOneValidChild = filterAcceptsRow(i, current); + i++; + } + return atLeastOneValidChild; + } + + return sourceModel()->data(current).toString().contains(filterRegExp()); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/TreeSortFilter.h b/tests/auto/xmlpatternsview/view/TreeSortFilter.h new file mode 100644 index 0000000..d7e7b55 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/TreeSortFilter.h @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_TreeSortFilter_H +#define PatternistSDK_TreeSortFilter_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short A sort & filter model for hierarchical item models. + * + * Features: + * - When sorting, numbers are treated as a whole instead of on a + * character-per-character basis. For example, @c myFile-10 is sorted after @c myFile-9. + * - When filtering, it behaves as usually is expected when the item model is hierarchical. That is, + * an item is shown if it matches or any of its children matches. + * + * @image html TreeSortFilter.png "TreeSortFilter in action on a QTreeView." + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class TreeSortFilter : public QSortFilterProxyModel + { + public: + /** + * Creates a TreeSortFilter. + * + * @param parent the parent. Must not be @c null. + */ + TreeSortFilter(QObject *parent); + + protected: + /** + * Compares @p left and @p right. They are treated as QStrings. + */ + virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const; + + /** + * Overridden to implement filtering. + */ + virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + + private: + inline bool numericLessThan(const QString &l, const QString &r) const; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/UserTestCase.cpp b/tests/auto/xmlpatternsview/view/UserTestCase.cpp new file mode 100644 index 0000000..98da59d --- /dev/null +++ b/tests/auto/xmlpatternsview/view/UserTestCase.cpp @@ -0,0 +1,159 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +#include "TestResult.h" + +#include "UserTestCase.h" + +using namespace QPatternistSDK; + +UserTestCase::UserTestCase() : m_lang(QXmlQuery::XQuery10) +{ +} + +QVariant UserTestCase::data(const Qt::ItemDataRole role, int /*column*/) const +{ + if(role != Qt::DisplayRole) + return QVariant(); + + return title(); +} + +QString UserTestCase::creator() const +{ + return QString(QLatin1String("The user of %1.")) + .arg(QCoreApplication::instance()->applicationName()); +} + +QString UserTestCase::name() const +{ + return QString(QLatin1String("X-KDE-%1-UserCreated")) + .arg(QCoreApplication::instance()->applicationName()); +} + +QString UserTestCase::description() const +{ + return QLatin1String("No description available; the test case is not part of " + "a test suite, but entered manually in the source code window."); +} + +QString UserTestCase::title() const +{ + return QLatin1String("User Specified Test"); +} + +TestCase::Scenario UserTestCase::scenario() const +{ + return Standard; +} + +TestBaseLine::List UserTestCase::baseLines() const +{ + TestBaseLine::List retval; + + TestBaseLine *const bl = new TestBaseLine(TestBaseLine::Ignore); + retval.append(bl); + + return retval; +} + +void UserTestCase::setSourceCode(const QString &code) +{ + m_sourceCode = code; +} + +QString UserTestCase::sourceCode(bool &ok) const +{ + ok = true; + return m_sourceCode; +} + +QDate UserTestCase::lastModified() const +{ + return QDate(); +} + +bool UserTestCase::isXPath() const +{ + return true; +} + +TreeItem *UserTestCase::parent() const +{ + return 0; +} + +int UserTestCase::columnCount() const +{ + return 1; +} + +QUrl UserTestCase::testCasePath() const +{ + return QUrl::fromLocalFile(QCoreApplication::applicationDirPath()); +} + +QPatternist::ExternalVariableLoader::Ptr UserTestCase::externalVariableLoader() const +{ + /* We don't have any bindings for the query that the user writes. */ + return QPatternist::ExternalVariableLoader::Ptr(); +} + +QUrl UserTestCase::contextItemSource() const +{ + return m_contextSource; +} + +void UserTestCase::focusDocumentChanged(const QString &code) +{ + const QUrl focusDoc(code); + if(focusDoc.isValid()) + m_contextSource = focusDoc; +} + +// vim: et:ts=4:sw=4:sts=4 + diff --git a/tests/auto/xmlpatternsview/view/UserTestCase.h b/tests/auto/xmlpatternsview/view/UserTestCase.h new file mode 100644 index 0000000..5501efe --- /dev/null +++ b/tests/auto/xmlpatternsview/view/UserTestCase.h @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_UserTestCase_H +#define PatternistSDK_UserTestCase_H + +#include + +#include "TestCase.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Displays a test case entered manually by the user. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class UserTestCase : public TestCase + { + Q_OBJECT + public: + UserTestCase(); + virtual QString creator() const; + virtual QString description() const; + virtual QDate lastModified() const; + + /** + * @returns the query the user has entered in the editor. + * @param ok is always set to @c true + */ + virtual QString sourceCode(bool &ok) const; + virtual bool isXPath() const; + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + virtual QString title() const; + virtual QString name() const; + /** + * Performs an assert crash. + */ + virtual QUrl testCasePath() const; + virtual TreeItem *parent() const; + virtual int columnCount() const; + + virtual Scenario scenario() const; + + /** + * @returns always a default constructed QUrl. + */ + virtual QUrl contextItemSource() const; + + /** + * @return an empty list. + */ + virtual TestBaseLine::List baseLines() const; + + void setLanguage(const QXmlQuery::QueryLanguage lang) + { + m_lang = lang; + } + + virtual QPatternist::ExternalVariableLoader::Ptr externalVariableLoader() const; + + virtual QXmlQuery::QueryLanguage language() const + { + return m_lang; + } + + public Q_SLOTS: + void setSourceCode(const QString &code); + void focusDocumentChanged(const QString &code); + + private: + QString m_sourceCode; + QXmlQuery::QueryLanguage m_lang; + QUrl m_contextSource; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/XDTItemItem.cpp b/tests/auto/xmlpatternsview/view/XDTItemItem.cpp new file mode 100644 index 0000000..b4c565d --- /dev/null +++ b/tests/auto/xmlpatternsview/view/XDTItemItem.cpp @@ -0,0 +1,119 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#include "Global.h" + +#include "qitem_p.h" +#include "qreportcontext_p.h" + +#include "XDTItemItem.h" + +using namespace QPatternistSDK; + +XDTItemItem::XDTItemItem(const QPatternist::Item &item, + XDTItemItem *p) : m_item(item), + m_parent(p) +{ +} + +XDTItemItem::~XDTItemItem() +{ + qDeleteAll(m_children); +} + +int XDTItemItem::columnCount() const +{ + return 3; +} + +QVariant XDTItemItem::data(const Qt::ItemDataRole role, int column) const +{ + Q_ASSERT(m_item); + if(role != Qt::DisplayRole) + return QVariant(); + + switch(column) + { + case 0: + /* + 1: We don't want the index; the XDT counts from 1. */ + return row() + 1; + case 1: + return m_item.stringValue(); + case 2: + return m_item.type()->displayName(Global::namePool()); + default: + { + Q_ASSERT(false); + return QString(); + } + } +} + +TreeItem::List XDTItemItem::children() const +{ + return m_children; +} + +void XDTItemItem::appendChild(TreeItem *item) +{ + m_children.append(item); +} + +TreeItem *XDTItemItem::child(const unsigned int rowP) const +{ + return m_children.value(rowP); +} + +unsigned int XDTItemItem::childCount() const +{ + return m_children.count(); +} + +TreeItem *XDTItemItem::parent() const +{ + return m_parent; +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/XDTItemItem.h b/tests/auto/xmlpatternsview/view/XDTItemItem.h new file mode 100644 index 0000000..751ffab --- /dev/null +++ b/tests/auto/xmlpatternsview/view/XDTItemItem.h @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PatternistSDK_XDTItemItem_H +#define PatternistSDK_XDTItemItem_H + +#include +#include "qitem_p.h" + +#include "TreeItem.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +namespace QPatternistSDK +{ + /** + * @short Proxies an QPatternist::Item through the TreeItem + * interface such that Patternist data can be used in Qt's model/view + * framework. + * + * @ingroup PatternistSDK + * @author Frans Englich + */ + class XDTItemItem : public TreeItem + { + public: + XDTItemItem(const QPatternist::Item &item, + XDTItemItem *parent); + virtual ~XDTItemItem(); + + virtual QVariant data(const Qt::ItemDataRole role, int column) const; + + virtual void appendChild(TreeItem *item); + virtual TreeItem *child(const unsigned int row) const; + virtual unsigned int childCount() const; + virtual TreeItem::List children() const; + virtual TreeItem *parent() const; + int columnCount() const; + + private: + const QPatternist::Item m_item; + XDTItemItem *m_parent; + TreeItem::List m_children; + }; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/main.cpp b/tests/auto/xmlpatternsview/view/main.cpp new file mode 100644 index 0000000..e323482 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "Global.h" +#include "MainWindow.h" +#include "TestSuiteHandler.h" + +using namespace QPatternistSDK; + +int main(int argc, char *argv[]) +{ + const QApplication app(argc, argv); + app.setOrganizationName(Global::organizationName); + app.setApplicationName(QLatin1String("PatternistSDKView")); + + MainWindow *const mainWindow = new MainWindow(); + mainWindow->show(); + + return app.exec(); +} + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsview/view/ui_BaseLinePage.ui b/tests/auto/xmlpatternsview/view/ui_BaseLinePage.ui new file mode 100644 index 0000000..9d42b80 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/ui_BaseLinePage.ui @@ -0,0 +1,48 @@ + + + + + BaseLinePage + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 9 + + + 6 + + + + + + Fixed [Sony] + 9 + 50 + false + false + false + false + + + + true + + + + + + + + + diff --git a/tests/auto/xmlpatternsview/view/ui_FunctionSignaturesView.ui b/tests/auto/xmlpatternsview/view/ui_FunctionSignaturesView.ui new file mode 100644 index 0000000..1990800 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/ui_FunctionSignaturesView.ui @@ -0,0 +1,70 @@ + + + + + FunctionSignaturesViewCentralWidget + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 8 + + + 6 + + + + + The following function signatures are available: + + + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Count: + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsview/view/ui_MainWindow.ui b/tests/auto/xmlpatternsview/view/ui_MainWindow.ui new file mode 100644 index 0000000..0240350 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/ui_MainWindow.ui @@ -0,0 +1,319 @@ + + + MainWindow + + + + 0 + 0 + 402 + 827 + + + + QtXmlPatterns View + + + + + + + 1 + + + + &Test Suite + + + + 6 + + + 9 + + + + + 6 + + + 0 + + + + + S&earch: + + + searchInput + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + true + + + QAbstractItemView::ExtendedSelection + + + + + + + + &Source Code + + + + 6 + + + 9 + + + + + + Fixed [Sony] + 14 + 50 + false + false + false + false + + + + false + + + + + + + + + + + + + 6 + + + 0 + + + + + 6 + + + 0 + + + + + Is XSL-T 2.0 + + + + + + + When enabled, the query will not be run, only compiled. + + + Compile &Only + + + + + + + + + 6 + + + 0 + + + + + 6 + + + 0 + + + + + Test Case Count: + + + + + + + The Count + + + + + + + + + Qt::Vertical + + + QSizePolicy::Minimum + + + + 20 + 40 + + + + + + + + + + + + + + Focus document(URI): + + + + + + + + + + + + + + + + 0 + 0 + 402 + 26 + + + + + &File + + + + + + + + + + + + &Windows + + + + + + + + &Open XQTS Catalog... + + + Opens a Test Suite Catalog in the format specified by W3C's XQuery Test Suite Task Force. XQTS's catalog is called XQTSCatalog.xml. The format is specified in XQTSCatalog.xsd + + + Ctrl+O + + + + + Open Recent + + + + + Execute Test + + + Executes the selected test, or the tests in the selected group. + + + Ctrl+E + + + + + Restart + + + Restarts this program by shutting down and starting up again, such that changes in libraries are used. + + + Ctrl+R + + + + + Quit + + + Simply shuts down the program. + + + Ctrl+Q + + + + + O&pen XSLTS Catalog... + + + Ctrl+L + + + + + O&pen XSDTS Catalog... + + + Ctrl+S + + + + + + diff --git a/tests/auto/xmlpatternsview/view/ui_TestCaseView.ui b/tests/auto/xmlpatternsview/view/ui_TestCaseView.ui new file mode 100644 index 0000000..7b6e9a8 --- /dev/null +++ b/tests/auto/xmlpatternsview/view/ui_TestCaseView.ui @@ -0,0 +1,224 @@ + + + TestCaseViewCentralWidget + + + + 0 + 0 + 472 + 724 + + + + Form + + + + + + 0 + + + + + + + + 0 + 0 + + + + + Sans Serif + 15 + 50 + false + false + false + false + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">test name</span></p></body></html> + + + Qt::RichText + + + false + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">description</p></body></html> + + + true + + + 14 + + + + + + + Qt::Vertical + + + + Source Code + + + + 6 + + + 8 + + + + + + Fixed [Sony] + 9 + 50 + false + false + false + false + + + + true + + + + + + + + 1 + + + + Tab 1 + + + + + Tab 2 + + + + + + + + + + + Type: + + + + + + + type + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Is XPath Only Test:</p></body></html> + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">is xpath only</p></body></html> + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Author:</p></body></html> + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">author</p></body></html> + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Last Modified:</p></body></html> + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">last modified</p></body></html> + + + + + + + Focus document: + + + + + + + true + + + + + + + + + + + 6 + + + 8 + + + + + No test case is selected. + +This dock widget displays information about a test case, when selected in the tree view. + + + true + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsview/view/ui_TestResultView.ui b/tests/auto/xmlpatternsview/view/ui_TestResultView.ui new file mode 100644 index 0000000..bed70ac --- /dev/null +++ b/tests/auto/xmlpatternsview/view/ui_TestResultView.ui @@ -0,0 +1,239 @@ + + + TestResultViewCentralWidget + + + + 0 + 0 + 458 + 571 + + + + Form + + + + + + 6 + + + 0 + + + + + Result Status: + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + Abstract Syntax Tree + + + + 6 + + + 8 + + + + + true + + + + + + + + Qt::Vertical + + + + Output + + + + 6 + + + 8 + + + + + 1 + + + + + 6 + + + 8 + + + + + + Fixed [Sony] + 9 + 50 + false + false + false + false + + + + true + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Fixed [Sony]'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + + + + + + + + + 6 + + + 8 + + + + + true + + + + + + + + + + + 6 + + + 0 + + + + + View as: + + + resultViewSelection + + + + + + + true + + + + + + + XQuery/XSL-T Serialization + + + + + Item List + + + + + + + + + + + Messages + + + + 6 + + + 8 + + + + + true + + + + + + + + + + + + + + resultViewSelection + activated(int) + outputStack + setCurrentIndex(int) + + + 427 + 345 + + + 426 + 214 + + + + + diff --git a/tests/auto/xmlpatternsview/view/view.pro b/tests/auto/xmlpatternsview/view/view.pro new file mode 100644 index 0000000..f9d36ee --- /dev/null +++ b/tests/auto/xmlpatternsview/view/view.pro @@ -0,0 +1,35 @@ +TARGET = xmlpatternsview +TEMPLATE = app +DESTDIR = $$QT_BUILD_TREE/bin + +include (../../xmlpatterns.pri) + +# We add gui here, since xmlpatterns.pri pull it out. +QT += xmlpatterns xml gui + +LIBS += -l$$XMLPATTERNS_SDK + +HEADERS = FunctionSignaturesView.h \ + MainWindow.h \ + TestCaseView.h \ + TestResultView.h \ + TreeSortFilter.h \ + UserTestCase.h \ + XDTItemItem.h + +SOURCES = FunctionSignaturesView.cpp \ + main.cpp \ + MainWindow.cpp \ + TestCaseView.cpp \ + TestResultView.cpp \ + TreeSortFilter.cpp \ + UserTestCase.cpp \ + XDTItemItem.cpp + +FORMS = ui_BaseLinePage.ui \ + ui_MainWindow.ui \ + ui_TestCaseView.ui \ + ui_TestResultView.ui \ + ui_FunctionSignaturesView.ui + +INCLUDEPATH += $$QT_SOURCE_TREE/tests/auto/xmlpatternsxqts/lib/ $$QT_BUILD_TREE/include/QtXmlPatterns/private diff --git a/tests/auto/xmlpatternsview/xmlpatternsview.pro b/tests/auto/xmlpatternsview/xmlpatternsview.pro new file mode 100644 index 0000000..5ab0f0e --- /dev/null +++ b/tests/auto/xmlpatternsview/xmlpatternsview.pro @@ -0,0 +1,12 @@ +load(qttest_p4) +SOURCES += tst_xmlpatternsview.cpp + +include (../xmlpatterns.pri) + +TARGET = tst_xmlpatternsview + +wince*: { + viewexe.files = $$QT_BUILD_TREE/xmlpatternsview.exe + viewexe.path = . + DEPLOYMENT += viewexe +} diff --git a/tests/auto/xmlpatternsxqts/.gitattributes b/tests/auto/xmlpatternsxqts/.gitattributes new file mode 100644 index 0000000..11fab7e --- /dev/null +++ b/tests/auto/xmlpatternsxqts/.gitattributes @@ -0,0 +1 @@ +summarizeBaseline.xsl -crlf diff --git a/tests/auto/xmlpatternsxqts/.gitignore b/tests/auto/xmlpatternsxqts/.gitignore new file mode 100644 index 0000000..1c2add2 --- /dev/null +++ b/tests/auto/xmlpatternsxqts/.gitignore @@ -0,0 +1,3 @@ +CandidateBaseline.xml +runTests +tst_xmlpatternsxqts diff --git a/tests/auto/xmlpatternsxqts/Baseline.xml b/tests/auto/xmlpatternsxqts/Baseline.xml new file mode 100644 index 0000000..d9be95a --- /dev/null +++ b/tests/auto/xmlpatternsxqts/Baseline.xml @@ -0,0 +1,2 @@ + +

Patternist is an implementation written in C++ and with the Qt/KDE libraries. It is licensed under GNU LGPL and part of KDE, the K Desktop Environment.

XQuery
\ No newline at end of file diff --git a/tests/auto/xmlpatternsxqts/TODO b/tests/auto/xmlpatternsxqts/TODO new file mode 100644 index 0000000..d25a6a3 --- /dev/null +++ b/tests/auto/xmlpatternsxqts/TODO @@ -0,0 +1,241 @@ +Various issues/ideas +-------------------- + +Regressions due to erratas: + + K2-ComputeConAttr-42 + K2-ComputeConAttr-43 + K2-CopyNamespacesProlog-9 + combiningnodeseqexcepthc5 + +Public API: + - Have overloads for attribute() etc which take StringRefs? + - Test reusing the context and change bindings each time. Rebind the predefined namespace bindings fn, xs, xml, and use them again in a subsequent query. + - Check properties in the static & dynamic context, that they actually propagate through(and with changes). For instance, static base URI. + - Change StandardPrefixes/etc to be namespaces instead of classes. + - Test that prefixes doesn't affect name lookups. + - You need to decide on how `patternist' should treat non-wellformedness. + - Changefrom QList to QVector. Maybe add a toFooVector() to QAbstractForwardIterator, so we can use a custom vector class in the future. + +- Tons of tests are missing for serialization. Go through all the error codes, ERE0003 for instance. +- Trigger toList in DeduplicateIterator. + +- Rewrite/test descendant-or-sel::node-type() (etc) from a node which isn't the node type. This can be rewritten to descendant::node-type() +- Preceding/following axis selects always nothing from a root node. +- No tests for ordering empty sequence when the decl. is not global. Also several sort keys. +- Check PlainSharedPtr for thread safety. Switch to Qt's one. +- Add weird scheme for doc-available/doc(). ftp, ssh, unknown scheme. +- Forward/Reverse iterators on top level nodes with "siblings". +- Let UserFunctionCallsite return DisableTypingDeduction instead of doing hackery in ExpressionSequence. +- Add exceptions support explicitly to the pro files. +- Maybe we can merge ArgumenentReference and ExpressionVariableReference? +- ArgumenentReference does not implement evaluateToSequenceReceiver() +- Let VariableReference store the whole VariableDeclaration instead +- EvaluationCache.cpp:189: return m_operand->properties() & (DisableElimination | IsEvaluated | DisableTypingDeduction); should probably use + deepProperties(), no? Try to trigger it and fix it. +- It turns out VariableDeclaration::ExternalVariable was actually needed. Currently we use an ExpressionReference to an External reference which is a double layer. +- It seems that for each Literal, a new Literal is created in Expression::constantPropagate. +- Trigger bug: newMe should be returned, not Expression::Ptr(this) in AndExpression. +- Trigger all the paths in Expression::constantPropagate() for error reporting. +- Type inference in K2-Axes-2 doesn't work very well. ItemVerifiers are inserted. +- Write test of the public API that the static/dynamic context in one query compilation doesn't affect in another one. +- Maybe "$foo, $foo" can be handled with a content receiver that doubles events, somehow? +- If you use weird EOLs in namespace bindings in direct attrs, one get bugs, because attributeAsRaw() doesn't do EOL normalization. +- Aren't we doing too aggressive caching in UserFunctionCallsite::setSource()? +- 4763 +- We wrap the context item with an evaluation cache, because it's considered creative, probably. But is the cache really necessary? Huge slowdown.. +- If a type is declared as exactly one for an external variable, evaluateSequence() gets called anyway. A problem? +- Search for use of QString::isSpace(), write tests, and check if it really is intentioonal to check for the separartor group, as opposed the dead old ASCII whitespace characters. fn:normalize-space() and fn:normalize-unicode() are characters. +- Write test, xmlns.xml, for checking basic namespace handling. xmlns.xml contained: + + +- Pass SourceLocationReflection to Boolean::evaluateEBV() +- Factor out the C++ code in createReportContext.xsl into a template +- I'm afraid that setting/using the type of the context item is not thoroughly tested; LetClause. +- Preallocate like a maniac in AccelTree +- Write tests for 4621 +- In return tokenAndChangeState(t->token... is it really safe to deref t? Write tests.. +- Use all weird numeric literals chars in char refs and num literals to get rid of locale dependent parsing. +- 1. Grep sources for trimmed(), simplified(), isSpace(), as well as home written versions(typeswitches over chars) + 2. Find out what the spec says regarding weird Unicode whitespace. For instance, hair space, U+200A (8202 decimal), THIN SPACE. Non breaking space is another case. + 3. Write tests triggering all current cases + 4. Make the tests pass +- Write function decl that use all types(for parsing) +- trigger if(m_pos == m_length) + return END_OF_FILE; in ignoreComment() + +- Use actual qnames("p:a") in all branches of for/let +- Make Token's ctors explcit +- Trigger the bugs the tokenizer have by using QChar::cell(). +- Add http://forums.oracle.com/forums/thread.jspa?messageID=1570246& to test cases. +- Look at the TreeModelCompleter, and steal code to Patternist View. +- Consider/test extracting EBV from a sorted, possibly mixed sequence. +- Move FunctionCall to expr/ +- Can RequiresFocus and RequiresContextItem be merged? +- Move janitors/* to expr/ +- Check that ItemSequenceCache is tested with StackContextBase +- It is imperative to optimize x[last()] +- Apply fn:count() to CachingIterator. +- Test cache for booleans. +- Write test that use all XML 1.0 characters. +- Fixed: 4462 4460 +- Add test where AxisStep::evaluateSingleton() gets called with no initialized focus. +- Attribute normalization.. +- Node::namespaceBindings() doesn't discuss uniqueness. +- Move common.pri to src/.. +- Write tests for node test source in attribute foo. +- Isn't end-of-line handling applied to text nodes in direct ctors? Yupp, it does. The whole freakin' query: A.2.3 End-of-Line Handling. +- Write tests for cardinalities in let & for. +- Write test for invalud anyURI in xmlns attr that is extr. with namespace-uri(). +- is nameToElements in AccelTree used/needed? +- Overflow is not captured when going from abs(unsignedLong(largeNNN)) and between all the other aggregate functions. avg() as well.. +- Turn NamespaceResolver::Bindings into NamespaceBinding::Vector ffs. +- Property IsNodeConstructor isn't used, right? +- Write tests for things like function-available that depend on tricky namespace contexts. Especially the default element in the typeCheck stage(). +- Gather all functions that stores the namespace context, and ensure they get it right with element constructors, of all its kinds. +- Add tests for where the local name is xmlns, in attrs. +- Implement AxisStep::evaluateEBV() +- One can reduce the three type/*NameTest classes to one probably, by passing in two template parameters: a mask(prefix, ns, zero), and the type + of the comparator(prefix, ns, ln) to store. +- How are axis steps without tests handled? +- Convert the NamespaceResolver to use the NamePool +- Write tests for deep-equal() involving different trees. Spectacular things can happen there with the AccelTree... +- Ask Andreas on file:/, file://, file:/// +- Secure up on brain damage in DelegateQDomNode.cpp#430. +- Apply reverse() to all axes. +- Dump all qHash(QUrl) functions when we have switched to Qt 4.3. +- Rename retrieveFunctionSignature to retieveSignature() or just signature(). Same with functionSignatures(). +- Don't use toLexical() in Serializer. It triggers unnecessary heap allocations, +- Replace SequenceReceiver::processingInstruction(QName) with QName::LocalNameCode. +- Delete DoubledNodeTest +- Replace allocateQName(QString() with StandardNamespaces::empty +- TODO http://www.pms.ifi.lmu.de/forschung/xpath-eval.html +- Write tests that test whitespace normalization in URI/namespace declarations. +- Tests: use namespace-uri-for-prefix with prefix "xml" and supply a node( can const fold) +- Add tests to resolve-uri() for invalid xs:anyURI values +- Make sure that xml:base affects the static context. Or? +- We need a systematic way to convert QUrl to xs:string instances. Same goes for static inline String::Ptr fromValue(const QUrl &value) +- QUrl can't handle empty strings: + K-CondExpr-9 + K-LogicExpr-10 + K-LogicExpr-11 + K-LogicExpr-35 + K-LogicExpr-36 + K-NodeNamespaceURIFunc-3 + K-NotFunc-8 + K-SeqBooleanFunc-8 + K-SeqExprCast-1373 + K-WhereExpr-11 + +- It's very important that the auto tests for the public API tests different features: + - fn:trace() + - external variables + - node constructors + - that node building happens, as opposed to just node events + - warnings/errors + - file loading: fn:doc() + - fn:collection() + - serialization error + +- Should SeqReceiver::attribute() really be passed a QString? Shouldn't it be an Item::Ptr since + it may be typed? Or should we use overloads somehow? +- base-URI-8 has an interesting problem with evaluation mode..? No idea what it is. +- base-URI-24: we should be normalizing, not trimming whitespace. +- xs:anyURI("http://www.example.org/%20%20examples") should output the percentage signs. base-uri-25 +- base-URI-21, base-URI-15 because QUrl transform htpp://A to a. +- fn-nilled-2 regressed for unknown reason, probably related to paths. +- TODO How are we to handle empty string URIs? +- Write one test for each time URILiteral is used in the grammar, and pass in an invalid URI. XQST0046. +- Someone creates a StackContextBase at compile time, gr.. +- Follow up on the "Computed attributes: 'xmlns' with non-empty namespace" topic. +- Write tests for root() while using the context item. +- UserFunctionCallsite::staticType() is quite broken, and needs thinking, followed by writing test cases to triggers + its faults. +- Write tests for: +"certain characters MUST be output as character references, to ensure that +they survive the round trip through serialization and parsing. Specifically, +CR, NEL and LINE SEPARATOR characters in text nodes MUST be output +respectively as " ", "…", and "
", or their equivalents;". +- Write test for XQST0093 +- Write tests for where NameChar is used. +- Optimize (a = b) where a and b are of type xs:string of any length, by putting the values into QMaps? +- Perhaps add tests that ensure locale-specific integer parsing isn't used? Read QChar::isDigit() to find out. +- Add assert in DerivedInteger +- It looks like the type is incorrectly inferred for min/max(), see Aggregator.*. + * Add tests that trigger this + * http://sourceforge.net/tracker/index.php?func=detail&aid=1552670&group_id=29872&atid=397617 +- Regression in the function refactoring: The Function Signatures View only show + the constructor functions, the F&O stuff doesn't show up. The reason for this is that with the + recent refactoring the ability to retrieve all signatures was lost. A signature is first inserted + into m_signatures when a matching function call has been asked for. The regression in Patternist View is not + very important but if we want to do things like displaying signatures that "almost" match etc, we will need to + get back the "give me all signatures in a list"-feature. We need to regression test this: + Q_VERIFY(FunctionFactoryCollection::xpath20Factory().signatures().count(), N); +- Would it be an optimization to apply the cardinality verifier before the untyped atomic converter? +- Document in Mainpage.h to not use capturing paranteses, and review existing code. +- Find invalid use of ElementName in .ypp and write tests +- Rewrite SubsequenceFN::staticType/compress(). It's really weird. Take advantage + of the new Cardinality class. +- Get rid of AtomicValue::hasError() in favor of returning null.. +- ResourceLoader::announceDocument() should return an ItemType? +- ResourceLoader::announceUnparsedText() should return false/true? E.g, always be a string? Nope, bad idea.. +- rename xdtTypeMatches to isOfType() -- much cleaner. Finally found a good name for that + function. Stolen from XQJ. Or perhaps also isInstanceOf().. +- Optimize Decimal/AbstractFloat::stringValue() by using QByteArray and QByteArray::fromRawData(). +- TODO ComparisonPlatform: + * prepareComparison is pretty pointless. My idea is that it should do all the operator lookup. For + example, CastingPlatform::prepareCasting() actually do something and provide convenience. + +- Actually make ParentNodeAxis::create() do what it says(return singleton) +- Think about base URI for Node +- Fix doxygen @file warnings, pending: http://bugzilla.gnome.org/show_bug.cgi?id=345481 +- 'case 0:' in XQueryTokenizer.cpp will break +- TruthPredicate::map() is never called because of regression in the Iterator refactoring. + GenericPredicate's members are called instead. This is a performance regression. +- Perhaps provide suitable default implementation of expectedOperandTypes in *Container classes? +- Make And/OrExpression a template class. +- Reduce UserFunctionCallsite object size by storing arity&name as a FunctionSignature that + is replaced by the real one. +- Perhaps one of the error codes in QNameConstructor::expandQName can be used(the same in each case.) +- Move FunctionCall to expr/ +- The scanner has problem with Unicode characters. Have a look at the tests + in functions-assemblestring.xml. +- When converting to KDOM's WebCore names, also camel case the CommonSequenceTypes::* names. +- For namespace nodes implementation, see: http://lists.w3.org/Archives/Public/www-ql/2003OctDec/0001.html +- XPathExpression::evaluate() is supposed to return a + DOMObject, but currently returns an XPathResult. +- String/Float conversion: + - For return "Decimal::fromValue(this->toDecimal())->stringValue();" for AF.cpp: perhaps a static toString should be added to Decimal that both AbstractFloat and Decimal calls. It would avoid allocating Decimal when calling stringValue(). +- data/AnyURI, the implementation of xs:anyURI, is halfy complete, and needs attention. Error + handling with casting needs a look as well. +- Investigate nilled PSVI + + +KXQTS +-------------------- +* Rename TestSuite::testResult(); it's not exactly a getter +* Grr, rename identifiers and files from *BaseLine* into *Baseline*. +* Speed up --run-outofprocess by keeping patternistrunsuite running as long as possible. +* Make text fields in test case view, selectable. Same with AST view. + +- Code cleaning commands: + * Find cases where stuff looks like "const Foo& var" instead of "const Foo &var": + `grep -nHR "\& .*,"` * + * Convert modeline: + sed -i -e 's+// vim:ts=4:noet+// vim: et:ts=4:sw=4:sts=4+g' `find -name "*.cpp" -or -name "*.h"` + * Bump copyright year: + sed -i -e 's/2005/2006/g' `find -name "*.h" -or -name "*.cpp"` + + grep "if ([[:space:]]*[[:alnum:]]*[[:space:]]*=[[:space:]]*[[:alnum:]]" + * Find and remove whitespace after lines: + sed -i -e 's/[ \t]\+$//' `find -name "*.cpp" -or -name "*.h" -or -name "*.ypp" -or -name "*.pri" -or -name "*.pro"` + +- The new suite runner should: + - Be completely in process + - QTestLib based + - Baseline the final AST + - Baseline messages + - Be stream based + - Consider to what degree it should replace all the old code in sdk/lib. There's so much old, obsolete code. + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsxqts/summarizeBaseline.sh b/tests/auto/xmlpatternsxqts/summarizeBaseline.sh new file mode 100755 index 0000000..5ea0c52 --- /dev/null +++ b/tests/auto/xmlpatternsxqts/summarizeBaseline.sh @@ -0,0 +1,50 @@ +#!/bin/sh +############################################################################# +## +## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is the build configuration utility of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +if [ $# -ne 1 ]; then + echo "You need to pass in one argument: the file path to Baseline.xml which you want the summary for." + exit 1 +fi + +# We run dirname, so we can locate summarizeBaseline.xsl regardless of our +# working directory. +xmlpatterns `dirname $0`/summarizeBaseline.xsl $1 diff --git a/tests/auto/xmlpatternsxqts/summarizeBaseline.xsl b/tests/auto/xmlpatternsxqts/summarizeBaseline.xsl new file mode 100644 index 0000000..af74bd1 --- /dev/null +++ b/tests/auto/xmlpatternsxqts/summarizeBaseline.xsl @@ -0,0 +1,25 @@ + + + + + + + + Failures: + + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp new file mode 100644 index 0000000..62cc4bb --- /dev/null +++ b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp @@ -0,0 +1,178 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include +#include "TestSuite.h" +#include "TestSuiteResult.h" +#include "XMLWriter.h" +#include "ExitCode.h" +#include "Worker.h" +#include "private/qautoptr_p.h" +#include "tst_suitetest.h" + +using namespace QPatternistSDK; + +tst_SuiteTest::tst_SuiteTest(const SuiteType suiteType, + const bool alwaysRun) : m_existingBaseline(inputFile(QLatin1String("Baseline.xml"))) + , m_candidateBaseline(inputFile(QLatin1String("CandidateBaseline.xml"))) + , m_abortRun(!alwaysRun && !QFile::exists(QLatin1String("runTests"))) + , m_suiteType(suiteType) +{ +} + +/*! + Returns an absolute path to the XQTS catalog, or flags a failure using + QTestLib's mechanisms. + + Finding the location of the catalog is done with `p4 where` such that we don't have + to care about where it is checked out. + */ +void tst_SuiteTest::initTestCase() +{ + catalogPath(m_catalogPath); +} + +/*! + Just runs the test suite and writes the result to m_candidateBaseline. + */ +void tst_SuiteTest::runTestSuite() const +{ + if(m_abortRun) + QSKIP("The test suite is not available, no tests are run.", SkipAll); + + QString errMsg; + const QFileInfo fi(m_catalogPath); + const QUrl catalogPath(QUrl::fromLocalFile(fi.absoluteFilePath())); + + TestSuite::SuiteType suiteType; + switch (m_suiteType) { + case XQuerySuite: + suiteType = TestSuite::XQuerySuite; + break; + case XsltSuite: + suiteType = TestSuite::XsltSuite; + break; + case XsdSuite: + suiteType = TestSuite::XsdSuite; + break; + default: + break; + } + + TestSuite *const ts = TestSuite::openCatalog(catalogPath, errMsg, true, suiteType); + + QVERIFY2(ts, qPrintable(QString::fromLatin1("Failed to open the catalog, maybe it doesn't exist or is broken: %1").arg(errMsg))); + + /* Run the tests, and serialize the result(as according to XQTSResult.xsd) to standard out. */ + TestSuiteResult *const result = ts->runSuite(); + Q_ASSERT(result); + + QFile out(m_candidateBaseline); + QVERIFY(out.open(QIODevice::WriteOnly)); + + XMLWriter serializer(&out); + result->toXML(serializer); + + delete result; + delete ts; +} + +void tst_SuiteTest::checkTestSuiteResult() const +{ + if(m_abortRun) + QSKIP("This test takes too long time to run on the majority of platforms.", SkipAll); + + typedef QList QFileInfoList; + + const QFileInfo baseline(m_existingBaseline); + const QFileInfo result(m_candidateBaseline); + QFileInfoList list; + list.append(baseline); + list.append(result); + + const QFileInfoList::const_iterator end(list.constEnd()); + + QEventLoop eventLoop; + const QPatternist::AutoPtr worker(new Worker(eventLoop, m_existingBaseline, result)); + + /* Passed to ResultThreader so it knows what kind of file it is handling. */ + ResultThreader::Type type = ResultThreader::Baseline; + + for(QFileInfoList::const_iterator it(list.constBegin()); it != end; ++it) + { + QFileInfo i(*it); + i.makeAbsolute(); + + QVERIFY2(i.exists(), qPrintable(QString::fromLatin1("File %1 does not exist.") + .arg(i.fileName()))); + + QFile *const file = new QFile(i.absoluteFilePath(), worker.data()); + + QVERIFY2(file->open(QIODevice::ReadOnly), qPrintable(QString::fromLatin1("Could not open file %1 for reading.") + .arg(i.fileName()))); + + ResultThreader *handler = new ResultThreader(eventLoop, file, type, worker.data()); + + QObject::connect(handler, SIGNAL(finished()), worker.data(), SLOT(threadFinished())); + + handler->start(); /* Start the thread. It now parses the file + and emits threadFinished() when done. */ + type = ResultThreader::Result; + } + + const int exitCode = eventLoop.exec(); + + QCOMPARE(exitCode, 0); +} + +bool tst_SuiteTest::dontRun() const +{ + return m_abortRun; +} +#endif + + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsxqts/tst_suitetest.h b/tests/auto/xmlpatternsxqts/tst_suitetest.h new file mode 100644 index 0000000..4adefe2 --- /dev/null +++ b/tests/auto/xmlpatternsxqts/tst_suitetest.h @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef Q_tst_SuiteTest +#define Q_tst_SuiteTest + +#include +#include "../qxmlquery/TestFundament.h" + +/*! + \class tst_SuiteTest + \internal + \since 4.5 + \brief Base class for tst_XmlPatternsXQTS, tst_XmlPatternsXSLTS and tst_XmlPatternsXSDTS. + */ +class tst_SuiteTest : public QObject + , private TestFundament +{ + Q_OBJECT + +public: + enum SuiteType + { + XQuerySuite, + XsltSuite, + XsdSuite + }; + +protected: + /** + * @p isXSLT is @c true if the catalog opened is an + * XSL-T test suite. + * + * @p alwaysRun is @c true if the test should always be run, + * regardless of if the file runTests exists. + */ + tst_SuiteTest(SuiteType type, + const bool alwaysRun = false); + + /** + * The reason why we pass in a mutable reference and have void as return + * value instead of simply returning the string, is that we in some + * implementations use QTestLib's macros such as QVERIFY, which contains + * return statements. Yay for QTestLib. + */ + virtual void catalogPath(QString &write) const = 0; + + bool dontRun() const; + +private Q_SLOTS: + void initTestCase(); + void runTestSuite() const; + void checkTestSuiteResult() const; + +private: + /** + * An absolute path to the catalog. + */ + QString m_catalogPath; + const QString m_existingBaseline; + const QString m_candidateBaseline; + const bool m_abortRun; + const SuiteType m_suiteType; +}; + +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsxqts/tst_xmlpatternsxqts.cpp b/tests/auto/xmlpatternsxqts/tst_xmlpatternsxqts.cpp new file mode 100644 index 0000000..0702f86 --- /dev/null +++ b/tests/auto/xmlpatternsxqts/tst_xmlpatternsxqts.cpp @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include "tst_suitetest.h" + +/*! + \class tst_XmlPatternsXQTS + \internal + \since 4.4 + \brief Tests the actual engine by running W3C's conformance test suite. + */ +class tst_XmlPatternsXQTS : public tst_SuiteTest +{ + Q_OBJECT +public: + tst_XmlPatternsXQTS(); +public: + virtual void catalogPath(QString &write) const; +}; + +tst_XmlPatternsXQTS::tst_XmlPatternsXQTS() : tst_SuiteTest(tst_SuiteTest::XQuerySuite) +{ +} + +void tst_XmlPatternsXQTS::catalogPath(QString &write) const +{ + if(dontRun()) + QSKIP("This test takes too long time to run on the majority of platforms.", SkipAll); + + QProcess p4; + + QStringList arguments; + arguments << QLatin1String("where") + << QLatin1String("//depot/autotests/4.4/tests/auto/xmlpatternsxqts/XQTS/XQTSCatalog.xml"); + p4.start(QLatin1String("p4"), arguments); + QVERIFY(p4.waitForFinished()); + QCOMPARE(p4.exitCode(), 0); + QCOMPARE(p4.exitStatus(), QProcess::NormalExit); + + /* `p4 where' prints for instance: + * + * //depot/qt/4.4/tests/auto/xmlpatternsxqts/... //fenglich-englich/qt-4.4/tests/auto/xmlpatternsxqts/... /home/fenglich/dev/autotests/4.4/tests/auto/xmlpatternsxqts/XQTS/XQTSCatalog.xml + * + * so we want the last string. + */ + write = QString::fromLocal8Bit(p4.readAllStandardOutput()).split(QLatin1Char(' ')).last().trimmed(); + + if(write.isEmpty() || !QFile::exists(write)) + { + QEXPECT_FAIL("", "//depot/autotests/4.4/tests/auto/xmlpatternsxqts/XQTS/ must be part of the perforce client spec, " + "checked out at an arbitrary location, for this test to run. The test suite will now be skipped.", Abort); + QVERIFY(false); + } +} + +QTEST_MAIN(tst_XmlPatternsXQTS) + +#include "tst_xmlpatternsxqts.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro new file mode 100644 index 0000000..e81888a --- /dev/null +++ b/tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro @@ -0,0 +1,21 @@ +load(qttest_p4) +SOURCES += tst_xmlpatternsxqts.cpp ../qxmlquery/TestFundament.cpp tst_suitetest.cpp + +include(../xmlpatterns.pri) + +contains(QT_CONFIG,xmlpatterns) { + HEADERS += tst_suitetest.h + LIBS += -l$$XMLPATTERNS_SDK +} + +# syncqt doesn't copy headers in tools/ so let's manually ensure +# it works with shadow builds and source builds. +INCLUDEPATH += $$(QTDIR)/include/QtXmlPatterns/private \ + $$(QTSRCDIR)/include/QtXmlPatterns/private \ + $$(QTSRCDIR)/tools/xmlpatterns \ + $$(QTDIR)/tools/xmlpatterns \ + ../xmlpatternssdk/ + +CONFIG += testlib +QT += xml +TARGET = tst_xmlpatternsxqts diff --git a/tests/auto/xmlpatternsxslts/.gitignore b/tests/auto/xmlpatternsxslts/.gitignore new file mode 100644 index 0000000..c0d061a --- /dev/null +++ b/tests/auto/xmlpatternsxslts/.gitignore @@ -0,0 +1,4 @@ +CandidateBaseline.xml +runTests +tst_xmlpatternsxslts +runTests diff --git a/tests/auto/xmlpatternsxslts/Baseline.xml b/tests/auto/xmlpatternsxslts/Baseline.xml new file mode 100644 index 0000000..d058765 --- /dev/null +++ b/tests/auto/xmlpatternsxslts/Baseline.xml @@ -0,0 +1,2 @@ + +

Patternist is an implementation written in C++ and with the Qt/KDE libraries. It is licensed under GNU LGPL and part of KDE, the K Desktop Environment.

XQuery
\ No newline at end of file diff --git a/tests/auto/xmlpatternsxslts/XSLTS/.gitignore b/tests/auto/xmlpatternsxslts/XSLTS/.gitignore new file mode 100644 index 0000000..5871431 --- /dev/null +++ b/tests/auto/xmlpatternsxslts/XSLTS/.gitignore @@ -0,0 +1,8 @@ +ExpectedTestResults/ +TestInputs/ +TestSuiteStagingArea/ +XSLTS_1_1_0.zip +cat/ +catalog.xml +catalog.xsd +catalogResolved.xml diff --git a/tests/auto/xmlpatternsxslts/XSLTS/updateSuite.sh b/tests/auto/xmlpatternsxslts/XSLTS/updateSuite.sh new file mode 100755 index 0000000..4e39751 --- /dev/null +++ b/tests/auto/xmlpatternsxslts/XSLTS/updateSuite.sh @@ -0,0 +1,60 @@ +#!/bin/sh +############################################################################# +## +## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is the build configuration utility of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +# This script updates the suite from W3C's CVS server. +# +# NOTE: the files checked out CANNOT be added to Qt's +# repository at the moment, due to legal complications. However, +# when the test suite is publically released, it is possible as +# according to W3C's usual license agreements. + +echo "*** This script typically doesn't need to be run, and it needs to be updated anyway." +exit 1 + +# This is W3C's internal CVS server, not the public dev.w3.org. +export CVSROOT="fenglich@cvs.w3.org:path is currently unknown" + +echo "*** Enter 'anonymous' as password. ***" +cvs login + +mv catalog.xml catalogUnresolved.xml +xmllint --noent --output catalog.xml catalogUnresolved.xml diff --git a/tests/auto/xmlpatternsxslts/tst_xmlpatternsxslts.cpp b/tests/auto/xmlpatternsxslts/tst_xmlpatternsxslts.cpp new file mode 100644 index 0000000..4b94689 --- /dev/null +++ b/tests/auto/xmlpatternsxslts/tst_xmlpatternsxslts.cpp @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#ifdef QTEST_XMLPATTERNS + +#include "tst_suitetest.h" + +/*! + \class tst_XmlPatternsXSLTS + \internal + \since 4.5 + \brief Test QtXmlPatterns against W3C's XSL-T 2.0 test suite, XSLTS. + */ +class tst_XmlPatternsXSLTS : public tst_SuiteTest +{ + Q_OBJECT +public: + tst_XmlPatternsXSLTS(); +protected: + virtual void catalogPath(QString &write) const; +}; + +tst_XmlPatternsXSLTS::tst_XmlPatternsXSLTS() : tst_SuiteTest(tst_SuiteTest::XsltSuite) +{ +} + +void tst_XmlPatternsXSLTS::catalogPath(QString &write) const +{ + write = QLatin1String("XSLTS/catalogResolved.xml"); +} + +QTEST_MAIN(tst_XmlPatternsXSLTS) + +#include "tst_xmlpatternsxslts.moc" +#else +QTEST_NOOP_MAIN +#endif + +// vim: et:ts=4:sw=4:sts=4 diff --git a/tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro b/tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro new file mode 100644 index 0000000..44c4754 --- /dev/null +++ b/tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro @@ -0,0 +1,26 @@ +load(qttest_p4) +SOURCES += tst_xmlpatternsxslts.cpp \ + ../qxmlquery/TestFundament.cpp + +include (../xmlpatterns.pri) + +contains(QT_CONFIG,xmlpatterns) { +HEADERS += ../xmlpatternsxqts/tst_suitetest.h +SOURCES += ../xmlpatternsxqts/tst_suitetest.cpp +LIBS += -l$$XMLPATTERNS_SDK +} + +QT += xml +INCLUDEPATH += $$(QTSRCDIR)/tests/auto/xmlpatternssdk \ + $$(QTDIR)/include/QtXmlPatterns/private \ + $$(QTSRCDIR)/tests/auto/xmlpatternsxqts \ + ../xmlpatternsxqts \ + ../xmlpatternssdk + +wince*: { + testdata.files = XSLTS Baseline.xml + testdata.path = . + DEPLOYMENT += testdata +} + +requires(contains(QT_CONFIG,private_tests)) diff --git a/tests/global/.gitignore b/tests/global/.gitignore new file mode 100644 index 0000000..1e49c60 --- /dev/null +++ b/tests/global/.gitignore @@ -0,0 +1,2 @@ +Makefile +global.pro diff --git a/tests/tests.pro b/tests/tests.pro new file mode 100644 index 0000000..85e4f3a --- /dev/null +++ b/tests/tests.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS += auto -- cgit v1.2.1