Doc: update QtConcurrent snippets to use QRegularExpression

Update the QtConcurrent code snippets to use the new QRegularExpression
class in place of the deprecated QRegExp.

Change-Id: I1366f902fc46bbeccc4013dd8adcf5fbfda13aed
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
bb10
Samuel Gaist 2017-01-24 11:10:39 +01:00
parent 0e168f2c4e
commit e08f764fa7
1 changed files with 3 additions and 3 deletions

View File

@ -141,12 +141,12 @@ QFuture<QImage> collage = QtConcurrent::filteredReduced(images, &QImage::isGrays
//! [9]
bool QString::contains(const QRegExp &regexp) const;
bool QString::contains(const QRegularExpression &regexp) const;
//! [9]
//! [10]
std::bind(&QString::contains, QRegExp("^\\S+$")); // matches strings without whitespace
std::bind(&QString::contains, QRegularExpression("^\\S+$")); // matches strings without whitespace
//! [10]
@ -157,7 +157,7 @@ bool contains(const QString &string)
//! [12]
QStringList strings = ...;
std::bind(static_cast<bool(QString::*)(const QRegExp&)>( &QString::contains ), QRegExp("..." ));
std::bind(static_cast<bool(QString::*)(const QRegularExpression&)>( &QString::contains ), QRegularExpression("..."));
//! [12]
//! [13]