From 060cc3c47062a35e8127413ece57573d1aca067f Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 17 Oct 2014 15:55:53 +0200 Subject: Doc: fix issues to display examples in Qt Creator - Add \brief commands to example docs to show descriptions - Add an examples page with the \group command - Link to the examples page from the module index page - Edit the .qdocconf file - Edit the .gitignore file to allow pushing changes to examples - Add a generic thumbnail image for C++ Code Analyzer example Change-Id: I1a313ae26664ce9fc50ef8962f0facd57dea546b Reviewed-by: Martin Smith Reviewed-by: Jerome Pasion --- .../xquery/doc/src/globalVariables.qdoc | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'examples/xmlpatterns/xquery') diff --git a/examples/xmlpatterns/xquery/doc/src/globalVariables.qdoc b/examples/xmlpatterns/xquery/doc/src/globalVariables.qdoc index bc5011c..a11a972 100644 --- a/examples/xmlpatterns/xquery/doc/src/globalVariables.qdoc +++ b/examples/xmlpatterns/xquery/doc/src/globalVariables.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -26,10 +26,13 @@ ****************************************************************************/ /*! - \example xmlpatterns/xquery + \example xquery \title C++ Source Code Analyzer Example \ingroup xmlpattern_examples + \brief Using XQuery and the \c xmlpatterns command line utility to + query C++ source code. + This example uses XQuery and the \c xmlpatterns command line utility to query C++ source code. @@ -68,7 +71,7 @@ Consider the declarations in this hypothetical C++ application: - \snippet xmlpatterns/xquery/globalVariables/globals.cpp 0 + \snippet xquery/globalVariables/globals.cpp 0 \section3 The XML description of the C++ application @@ -76,7 +79,7 @@ \l{http://public.kitware.com/GCC_XML/HTML/Index.html} {GCC-XML} produces this XML description: - \quotefromfile xmlpatterns/xquery/globalVariables/globals.gccxml + \quotefromfile xquery/globalVariables/globals.gccxml \printuntil \section3 The XQuery for finding global variables @@ -85,7 +88,7 @@ description. Here is our XQuery source. We walk through it in \l{XQuery Code Walk-Through}. - \quotefromfile xmlpatterns/xquery/globalVariables/reportGlobals.xq + \quotefromfile xquery/globalVariables/reportGlobals.xq \printuntil \section3 Running the XQuery @@ -93,7 +96,7 @@ To run the XQuery using the \c xmlpatterns command line utility, enter the following command: - \code + \badcode xmlpatterns reportGlobals.xq -param fileToOpen=globals.gccxml -output globals.html \endcode @@ -128,7 +131,7 @@ \c{examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq} It begins with two variable declarations that begin the XQuery: - \quotefromfile xmlpatterns/xquery/globalVariables/reportGlobals.xq + \quotefromfile xquery/globalVariables/reportGlobals.xq \skipto declare variable \printto (: @@ -149,7 +152,7 @@ instructions for displaying the text, and then the \c{} element. - \quotefromfile xmlpatterns/xquery/globalVariables/reportGlobals.xq + \quotefromfile xquery/globalVariables/reportGlobals.xq \skipto } element. Compare it with the XQuery code above: - \quotefromfile xmlpatterns/xquery/globalVariables/globals.html + \quotefromfile xquery/globalVariables/globals.html \skipto \printuntil @@ -181,21 +184,21 @@ returns true if the variable has a complex type. The variable can be mutable or const. - \quotefromfile xmlpatterns/xquery/globalVariables/reportGlobals.xq + \quotefromfile xquery/globalVariables/reportGlobals.xq \skipto declare function local:isComplexType \printuntil }; \c{isPrimitive()} returns true if the variable has a primitive type. The variable must be mutable. - \quotefromfile xmlpatterns/xquery/globalVariables/reportGlobals.xq + \quotefromfile xquery/globalVariables/reportGlobals.xq \skipto declare function local:isPrimitive \printuntil }; \c{location()} returns a text constructed from the variable's file and line number attributes. - \quotefromfile xmlpatterns/xquery/globalVariables/reportGlobals.xq + \quotefromfile xquery/globalVariables/reportGlobals.xq \skipto declare function local:location \printuntil }; -- cgit v1.2.1