Doc: Modularize QtConcurrent documentation.
authorCasper van Donderen <casper.vandonderen@nokia.com>
Mon, 7 May 2012 09:33:42 +0000 (11:33 +0200)
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>
Wed, 9 May 2012 06:36:06 +0000 (08:36 +0200)
This change moves the snippets and images to the modularized directories.

Change-Id: If52f69c0f8bb4d2df4ee46f5524a82047ec214de
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
15 files changed:
src/concurrent/doc/qtconcurrent.qdocconf [new file with mode: 0644]
src/concurrent/doc/snippets/code/src_concurrent_qfuture.cpp [moved from doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp with 100% similarity]
src/concurrent/doc/snippets/code/src_concurrent_qfuturesynchronizer.cpp [moved from doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp with 100% similarity]
src/concurrent/doc/snippets/code/src_concurrent_qfuturewatcher.cpp [moved from doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp with 100% similarity]
src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentexception.cpp [moved from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp with 100% similarity]
src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentfilter.cpp [moved from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp with 100% similarity]
src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp [moved from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp with 100% similarity]
src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentrun.cpp [moved from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp with 100% similarity]
src/concurrent/qfuture.cpp
src/concurrent/qfuturesynchronizer.cpp
src/concurrent/qfuturewatcher.cpp
src/concurrent/qtconcurrentexception.cpp
src/concurrent/qtconcurrentfilter.cpp
src/concurrent/qtconcurrentmap.cpp
src/concurrent/qtconcurrentrun.cpp

diff --git a/src/concurrent/doc/qtconcurrent.qdocconf b/src/concurrent/doc/qtconcurrent.qdocconf
new file mode 100644 (file)
index 0000000..d8d66a9
--- /dev/null
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project                 = QtConcurrent
+description             = Qt Concurrent Reference Documentation
+url                     = http://qt-project.org/doc/qt-5.0/qtconcurrent
+version                 = 5.0.0
+
+sourceencoding          = UTF-8
+outputencoding          = UTF-8
+naturallanguage         = en_US
+qhp.projects            = QtConcurrent
+
+qhp.QtConcurrent.file         = qtconcurrent.qhp
+qhp.QtConcurrent.namespace           = org.qt-project.qtconcurrent.500
+qhp.QtConcurrent.virtualFolder       = qdoc
+qhp.QtConcurrent.indexTitle          = Qt Concurrent Reference Documentation
+qhp.QtConcurrent.indexRoot           =
+
+qhp.QtConcurrent.filterAttributes    = qtconcurrent 5.0.0 qtrefdoc
+qhp.QtConcurrent.customFilters.Qt.name = QtConcurrent 5.0.0
+qhp.QtConcurrent.customFilters.Qt.filterAttributes = qtconcurrent 5.0.0
+qhp.QtConcurrent.subprojects         = classes overviews examples
+qhp.QtConcurrent.subprojects.classes.title = Classes
+qhp.QtConcurrent.subprojects.classes.indexTitle = Qt Concurrent's Classes
+qhp.QtConcurrent.subprojects.classes.selectors = class fake:headerfile
+qhp.QtConcurrent.subprojects.classes.sortPages = true
+qhp.QtConcurrent.subprojects.overviews.title = Overviews
+qhp.QtConcurrent.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtConcurrent.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtConcurrent.subprojects.examples.title = Qt Concurrent Examples
+qhp.QtConcurrent.subprojects.examples.indexTitle = Qt Concurrent Examples
+qhp.QtConcurrent.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author      = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher   = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions  = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions  = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir               = ../../../doc/qtconcurrent
+tagfile                 = ../../../doc/qtconcurrent/qtconcurrent.tags
+
+HTML.generatemacrefs    = "true"
+HTML.nobreadcrumbs      = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+    "  <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+    "</head>\n" \
+
+defines                 = Q_QDOC \
+                          QT_.*_SUPPORT \
+                          QT_.*_LIB \
+                          QT_COMPAT \
+                          QT_KEYPAD_NAVIGATION \
+                          QT_NO_EGL \
+                          Q_WS_.* \
+                          Q_OS_.* \
+                          Q_BYTE_ORDER \
+                          QT_DEPRECATED \
+                          QT_DEPRECATED_* \
+                          Q_NO_USING_KEYWORD \
+                          __cplusplus \
+                          Q_COMPILER_INITIALIZER_LISTS
+
+versionsym              = QT_VERSION_STR
+
+codeindent              = 1
+
+depends                 += qtcore
+
+headerdirs  += ..
+
+sourcedirs  += ..
+
+exampledirs += ../../../examples \
+               ../ \
+               snippets
+
+imagedirs   += images
index 9805454..f8151f3 100644 (file)
     QFuture::constBegin() or QFuture::constEnd() before you start iterating.
     Here's a typical loop that prints all the results available in a future:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp 0
+    \snippet code/src_concurrent_qfuture.cpp 0
 
     \sa QFutureIterator, QFuture
 */
     list (i.e. before the first result). Here's how to iterate over all the
     results sequentially:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp 1
+    \snippet code/src_concurrent_qfuture.cpp 1
 
     The next() function returns the next result (waiting for it to become
     available, if necessary) from the future and advances the iterator. Unlike
 
     Here's how to iterate over the elements in reverse order:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp 2
+    \snippet code/src_concurrent_qfuture.cpp 2
 
     If you want to find all occurrences of a particular value, use findNext()
     or findPrevious() in a loop.
index 34b00da..3bb81e0 100644 (file)
@@ -57,7 +57,7 @@
     an easy way to ensure that all futures have finished before returning from
     a function:
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp 0
+    \snippet code/src_concurrent_qfuturesynchronizer.cpp 0
     
     The behavior of waitForFinished() can be changed using the
     setCancelOnWait() function. Calling setCancelOnWait(true) will cause
index 9153fe5..eb5fb0e 100644 (file)
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
     Example: Starting a computation and getting a slot callback when it's
     finished:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp 0
+    \snippet code/src_concurrent_qfuturewatcher.cpp 0
 
     Be aware that not all asynchronous computations can be canceled or paused.
     For example, the future returned by QtConcurrent::run() cannot be
index 57eb604..a13ddb3 100644 (file)
@@ -56,12 +56,12 @@ QT_BEGIN_NAMESPACE
     boundaries, provided that the exception inherit from QtConcurrent::Exception
     and implement two helper functions:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 0
+    \snippet code/src_concurrent_qtconcurrentexception.cpp 0
 
     QtConcurrent::Exception subclasses must be thrown by value and
     caught by reference:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 1
+    \snippet code/src_concurrent_qtconcurrentexception.cpp 1
 
     If you throw an exception that is not a subclass of QtConcurrent::Exception,
     the Qt Concurrent functions will throw a QtConcurrent::UnhandledException
@@ -80,14 +80,14 @@ QT_BEGIN_NAMESPACE
     \fn QtConcurrent::Exception::raise() const 
     In your QtConcurrent::Exception subclass, reimplement raise() like this:
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 2
+    \snippet code/src_concurrent_qtconcurrentexception.cpp 2
 */
 
 /*!
     \fn QtConcurrent::Exception::clone() const
     In your QtConcurrent::Exception subclass, reimplement clone() like this:
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 3
+    \snippet code/src_concurrent_qtconcurrentexception.cpp 3
 */
 
 /*! 
index 76ce8ca..8a87af2 100644 (file)
@@ -60,7 +60,7 @@
     result instead of a QFuture. You use them in the same way as the
     asynchronous variants.
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 6
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 6
 
     Note that the result types above are not QFuture objects, but real result
     types (in this case, QStringList and QSet<QString>).
@@ -73,7 +73,7 @@
 
     The filter function must be of the form:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 0
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 0
 
     T must match the type stored in the sequence. The function returns true if
     the item should be kept, false if it should be discarded.
@@ -81,7 +81,7 @@
     This example shows how to keep strings that are all lower-case from a
     QStringList:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 1
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 1
 
     The results of the filter are made available through QFuture. See the
     QFuture and QFutureWatcher documentation for more information on how to
@@ -89,7 +89,7 @@
 
     If you want to modify a sequence in-place, use QtConcurrent::filter():
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 2
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 2
 
     Since the sequence is modified in place, QtConcurrent::filter() does not
     return any results via QFuture. However, you can still use QFuture and
 
     The reduce function must be of the form:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 3
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 3
 
     T is the type of the final result, U is the type of items being filtered.
     Note that the return value and return type of the reduce function are not
 
     Call QtConcurrent::filteredReduced() like this:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 4
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 4
 
     The reduce function will be called once for each result kept by the filter
     function, and should merge the \e{intermediate} into the \e{result}
     instead of a sequence. You use them in the same way as the sequence
     variants:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 5
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 5
 
 
     \section2 Using Member Functions
     QtConcurrent::filteredReduced() accept pointers to member functions.
     The member function class type must match the type stored in the sequence:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 7
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 7
 
     Note that when using QtConcurrent::filteredReduced(), you can mix the use of
     normal and member functions freely:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 8
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 8
 
     \section2 Using Function Objects
 
     add state to a function call. The result_type typedef must define the 
     result type of the function call operator:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 13
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 13
 
     \section2 Using Bound Function Arguments
 
 
     As an example, we use QString::contains():
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 9
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 9
 
     QString::contains() takes 2 arguments (including the "this" pointer) and
     can't be used with QtConcurrent::filtered() directly, because
     use QString::contains() with QtConcurrent::filtered() we have to provide a
     value for the \e regexp argument:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 10
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 10
 
     The return value from boost::bind() is a function object (functor) with
     the following signature:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 11
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 11
 
     This matches what QtConcurrent::filtered() expects, and the complete
     example becomes:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 12
+    \snippet code/src_concurrent_qtconcurrentfilter.cpp 12
 */
 
 /*!
index 1758cb9..c446064 100644 (file)
@@ -95,7 +95,7 @@
     the final result instead of a QFuture. You use them in the same
     way as the asynchronous variants.
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 7
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 7
 
     Note that the result types above are not QFuture objects, but real result
     types (in this case, QList<QImage> and QImage).
 
     The map function must be of the form:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 0
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 0
 
     T and U can be any type (and they can even be the same type), but T must
     match the type stored in the sequence. The function returns the modified
     This example shows how to apply a scale function to all the items
     in a sequence:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 1
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 1
 
     The results of the map are made available through QFuture.  See the
     QFuture and QFutureWatcher documentation for more information on how to
     If you want to modify a sequence in-place, use QtConcurrent::map(). The
     map function must then be of the form:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 2
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 2
 
     Note that the return value and return type of the map function are not
     used.
 
     Using QtConcurrent::map() is similar to using QtConcurrent::mapped():
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 3
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 3
 
     Since the sequence is modified in place, QtConcurrent::map() does not
     return any results via QFuture. However, you can still use QFuture and
 
     The reduce function must be of the form:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 4
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 4
 
     T is the type of the final result, U is the return type of the map
     function. Note that the return value and return type of the reduce
 
     Call QtConcurrent::mappedReduced() like this:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 5
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 5
 
     The reduce function will be called once for each result returned by the map
     function, and should merge the \e{intermediate} into the \e{result}
     instead of a sequence. You use them in the same way as the sequence
     variants:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 6
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 6
 
     \section2 Blocking Variants
 
     the final result instead of a QFuture. You use them in the same
     way as the asynchronous variants.
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 7
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 7
 
     Note that the result types above are not QFuture objects, but real result
     types (in this case, QList<QImage> and QImage).
     QtConcurrent::mappedReduced() accept pointers to member functions.
     The member function class type must match the type stored in the sequence:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 8
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 8
 
     Note that when using QtConcurrent::mappedReduced(), you can mix the use of
     normal and member functions freely:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 9
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 9
 
     \section2 Using Function Objects
 
     add state to a function call. The result_type typedef must define the 
     result type of the function call operator:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 14
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 14
 
     \section2 Using Bound Function Arguments
 
 
     As an example, we'll use QImage::scaledToWidth():
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 10
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 10
 
     scaledToWidth takes three arguments (including the "this" pointer) and
     can't be used with QtConcurrent::mapped() directly, because
     QImage::scaledToWidth() with QtConcurrent::mapped() we have to provide a
     value for the \e{width} and the \e{transformation mode}:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 11
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 11
 
     The return value from boost::bind() is a function object (functor) with
     the following signature:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 12
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 12
 
     This matches what QtConcurrent::mapped() expects, and the complete example
     becomes:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 13
+    \snippet code/src_concurrent_qtconcurrentmap.cpp 13
 */
 
 /*!
index 656ecf7..2cf46ac 100644 (file)
@@ -57,7 +57,7 @@
     
     To run a function in another thread, use QtConcurrent::run():
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 0
+    \snippet code/src_concurrent_qtconcurrentrun.cpp 0
     
     This will run \e aFunction in a separate thread obtained from the default
     QThreadPool. You can use the QFuture and QFutureWatcher classes to monitor
@@ -68,7 +68,7 @@
     Passing arguments to the function is done by adding them to the
     QtConcurrent::run() call immediately after the function name. For example:
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 1
+    \snippet code/src_concurrent_qtconcurrentrun.cpp 1
     
     A copy of each argument is made at the point where QtConcurrent::run() is
     called, and these values are passed to the thread when it begins executing
     
     Any return value from the function is available via QFuture:
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 2
+    \snippet code/src_concurrent_qtconcurrentrun.cpp 2
     
     As documented above, passing arguments is done like this:
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 3
+    \snippet code/src_concurrent_qtconcurrentrun.cpp 3
     
     Note that the QFuture::result() function blocks and waits for the result
     to become available. Use QFutureWatcher to get notification when the
     For example, calling QByteArray::split() (a const member function) in a
     separate thread is done like this:
     
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 4
+    \snippet code/src_concurrent_qtconcurrentrun.cpp 4
     
     Calling a non-const member function is done like this:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 5
+    \snippet code/src_concurrent_qtconcurrentrun.cpp 5
 
     \section2 Using Bound Function Arguments
 
 
     Calling a bound function is done like this:
 
-    \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 6
+    \snippet code/src_concurrent_qtconcurrentrun.cpp 6
 */
 
 /*!