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
parent
0e168f2c4e
commit
e08f764fa7
|
|
@ -141,12 +141,12 @@ QFuture<QImage> collage = QtConcurrent::filteredReduced(images, &QImage::isGrays
|
|||
|
||||
|
||||
//! [9]
|
||||
bool QString::contains(const QRegExp ®exp) const;
|
||||
bool QString::contains(const QRegularExpression ®exp) 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]
|
||||
|
|
|
|||
Loading…
Reference in New Issue