From a71ce35626e7acddccc3b1c3aa0d703377ff901d Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Mon, 9 Jul 2018 08:28:02 +0200 Subject: Doc: Fix typo and grammar issues Fixed typo in code snippet (s/string/strings/). Capitalized start of sentence in comments and added missing dots. Task-number: QTBUG-69331 Change-Id: I397d4f2082c859c014f776ff8e169b6a6cbe4e79 Reviewed-by: Nico Vertriest --- .../snippets/code/src_concurrent_qtconcurrentmap.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/concurrent') diff --git a/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp index 8424dbe97d..fc574302d2 100644 --- a/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp +++ b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp @@ -104,7 +104,7 @@ QList images = ...; QFuture thumbnails = QtConcurrent::mapped(images.constBegin(), images.constEnd(), scaled); -// map in-place only works on non-const iterators +// Map in-place only works on non-const iterators. QFuture future = QtConcurrent::map(images.begin(), images.end(), scale); QFuture collage = QtConcurrent::mappedReduced(images.constBegin(), images.constEnd(), scaled, addToCollage); @@ -114,7 +114,7 @@ QFuture collage = QtConcurrent::mappedReduced(images.constBegin(), image //! [7] QList images = ...; -// each call blocks until the entire operation is finished +// Each call blocks until the entire operation is finished. QList future = QtConcurrent::blockingMapped(images, scaled); QtConcurrent::blockingMap(images, scale); @@ -124,29 +124,29 @@ QImage collage = QtConcurrent::blockingMappedReduced(images, scaled, addToCollag //! [8] -// squeeze all strings in a QStringList +// Squeeze all strings in a QStringList. QStringList strings = ...; QFuture squeezedStrings = QtConcurrent::map(strings, &QString::squeeze); -// swap the rgb values of all pixels on a list of images +// Swap the rgb values of all pixels on a list of images. QList images = ...; QFuture bgrImages = QtConcurrent::mapped(images, &QImage::rgbSwapped); -// create a set of the lengths of all strings in a list +// Create a set of the lengths of all strings in a list. QStringList strings = ...; -QFuture > wordLengths = QtConcurrent::mappedReduced(string, &QString::length, &QSet::insert); +QFuture > wordLengths = QtConcurrent::mappedReduced(strings, &QString::length, &QSet::insert); //! [8] //! [9] -// can mix normal functions and member functions with QtConcurrent::mappedReduced() +// Can mix normal functions and member functions with QtConcurrent::mappedReduced(). -// compute the average length of a list of strings +// Compute the average length of a list of strings. extern void computeAverage(int &average, int length); QStringList strings = ...; QFuture averageWordLength = QtConcurrent::mappedReduced(strings, &QString::length, computeAverage); -// create a set of the color distribution of all images in a list +// Create a set of the color distribution of all images in a list. extern int colorDistribution(const QImage &string); QList images = ...; QFuture > totalColorDistribution = QtConcurrent::mappedReduced(images, colorDistribution, QSet::insert); -- cgit v1.2.3