From 7e8cfaf25c99946970f99da632a30a41a1a98308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 12 May 2016 16:46:25 +0100 Subject: [PATCH] Convert QRegExp->QRegularExpression in Partition class. --- src/core/partition.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/partition.cpp b/src/core/partition.cpp index 8dbd58e..bb88ec5 100644 --- a/src/core/partition.cpp +++ b/src/core/partition.cpp @@ -353,9 +353,10 @@ void Partition::deleteFileSystem() void Partition::setPartitionPath(const QString& s) { m_PartitionPath = s; - QRegExp rxPartitionNumber(QStringLiteral("([0-9]+$)")); - if (rxPartitionNumber.indexIn(partitionPath()) > -1) { - setNumber(rxPartitionNumber.cap().toInt()); + QRegularExpression re(QStringLiteral("(\\d+$)")); + QRegularExpressionMatch rePartitionNumber = re.match(partitionPath()); + if (rePartitionNumber.hasMatch()) { + setNumber(rePartitionNumber.captured().toInt()); return; } setNumber(-1);