Commit 548ec261 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QRegularExpression

parent 0a8ec44f
Pipeline #121420 passed with stage
in 4 minutes and 25 seconds
......@@ -21,7 +21,7 @@
#include <KCharsets>
#include <QCoreApplication>
#include <QRegExp>
#include <QRegularExpression>
#include <cctype>
#include <cstdlib>
......@@ -456,7 +456,7 @@ void addQuotes_impl(StringType &str, bool forceQuotes)
bool needsQuotes = false;
for (int i = 0; i < str.length(); i++) {
const CharType cur = str.at(i);
if (QString(ToString(str)).contains(QRegExp(QStringLiteral("\"|\\\\|=|\\]|\\[|:|;|,|\\.|,|@|<|>|\\)|\\(")))) {
if (QString(ToString(str)).contains(QRegularExpression(QStringLiteral("\"|\\\\|=|\\]|\\[|:|;|,|\\.|,|@|<|>|\\)|\\(")))) {
needsQuotes = true;
}
if (cur == CharConverterType('\\') || cur == CharConverterType('\"')) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment