summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/logger/src/AbstractStringAppender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/logger/src/AbstractStringAppender.cpp')
-rw-r--r--rbutil/rbutilqt/logger/src/AbstractStringAppender.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/logger/src/AbstractStringAppender.cpp b/rbutil/rbutilqt/logger/src/AbstractStringAppender.cpp
index ce64aaeb43..ea5883f744 100644
--- a/rbutil/rbutilqt/logger/src/AbstractStringAppender.cpp
+++ b/rbutil/rbutilqt/logger/src/AbstractStringAppender.cpp
@@ -20,7 +20,7 @@
#include <QReadLocker>
#include <QWriteLocker>
#include <QDateTime>
-#include <QRegExp>
+#include <QRegularExpression>
#include <QCoreApplication>
#include <QThread>
@@ -155,12 +155,13 @@ QByteArray AbstractStringAppender::qCleanupFuncinfo(const char* name)
}
bool hasLambda = false;
- QRegExp lambdaRegex("::<lambda\\(.*\\)>");
- int lambdaIndex = lambdaRegex.indexIn(QString::fromLatin1(info));
+ QRegularExpression lambdaRegex("::<lambda\\(.*?\\)>");
+ QRegularExpressionMatch match = lambdaRegex.match(QString::fromLatin1(info));
+ int lambdaIndex = match.capturedStart();
if (lambdaIndex != -1)
{
hasLambda = true;
- info.remove(lambdaIndex, lambdaRegex.matchedLength());
+ info.remove(lambdaIndex, match.capturedLength());
}
// operator names with '(', ')', '<', '>' in it
@@ -405,7 +406,7 @@ QString AbstractStringAppender::formattedString(const QDateTime& timeStamp, Logg
// Filename without a path
else if (command == QLatin1String("file"))
- chunk = QString(QLatin1String(file)).section(QRegExp("[/\\\\]"), -1);
+ chunk = QString(QLatin1String(file)).section(QRegularExpression("[/\\\\]"), -1);
// Source line number
else if (command == QLatin1String("line"))