Commit 65983d18 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QRegularExpression

parent 988c0d2f
......@@ -21,6 +21,7 @@
#include <KConfigGroup>
#include <KSharedConfig>
#include <QRegularExpression>
#include <QStringList>
using namespace TemplateParser;
......@@ -210,7 +211,7 @@ QString TemplateParser::Util::removeSpaceAtBegin(const QString &selection)
{
QString content = selection;
// Remove blank lines at the beginning:
const int firstNonWS = content.indexOf(QRegExp(QLatin1String("\\S")));
const int firstNonWS = content.indexOf(QRegularExpression(QLatin1String("\\S")));
const int lineStart = content.lastIndexOf(QLatin1Char('\n'), firstNonWS);
if (lineStart >= 0) {
content.remove(0, lineStart);
......
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