File: 0010-Use-QRegularExpression-instead-of-the-deprecated-QRe.patch

package info (click to toggle)
qtpim-opensource-src 5.0~git20201102.f9a8f0fc%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,540 kB
  • sloc: cpp: 82,710; xml: 91; makefile: 86; javascript: 67
file content (37 lines) | stat: -rw-r--r-- 1,370 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 1cd23dd346eeb918e9d2f1a003171fb47c459718 Mon Sep 17 00:00:00 2001
From: Chris Adams <chris.adams@qinetic.com.au>
Date: Thu, 1 Oct 2020 16:05:18 +1000
Subject: [PATCH 10/32] Use QRegularExpression instead of the deprecated
 QRegExp

Change-Id: Ic1d40b3e57038ecdc0ad14abc47120c6bfaa15ce
Reviewed-by: Christopher Adams <chris.adams@jolla.com>
Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
---
 src/versit/qversitreader_p.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/versit/qversitreader_p.cpp b/src/versit/qversitreader_p.cpp
index b8300e70..76f8aaca 100644
--- a/src/versit/qversitreader_p.cpp
+++ b/src/versit/qversitreader_p.cpp
@@ -39,6 +39,7 @@
 
 #include "qversitreader_p.h"
 
+#include <QtCore/qregularexpression.h>
 #include <QtCore/qbuffer.h>
 #include <QtCore/qtextcodec.h>
 #include <QtCore/qvariant.h>
@@ -1261,7 +1262,7 @@ void QVersitReaderPrivate::removeBackSlashEscaping(QString* text)
                     \: with :
                     \\ with \
          */
-        text->replace(QRegExp(QStringLiteral("\\\\([;,:\\\\])")), QStringLiteral("\\1"));
+        text->replace(QRegularExpression(QStringLiteral("\\\\([;,:\\\\])")), QStringLiteral("\\1"));
         // replaces \n with a CRLF
         text->replace(QStringLiteral("\\n"), QStringLiteral("\r\n"), Qt::CaseInsensitive);
     }
-- 
2.30.2