mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 17:43:59 -05:00
Replaced deprecated QRegExp by QRegularExpression
This commit is contained in:
parent
f0286740f4
commit
13b294838b
8 changed files with 26 additions and 18 deletions
|
|
@ -18,6 +18,8 @@
|
|||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include "RsSyntaxHighlighter.h"
|
||||
|
||||
RsSyntaxHighlighter::RsSyntaxHighlighter(QTextEdit *parent)
|
||||
|
|
@ -65,7 +67,7 @@ void RsSyntaxHighlighter::highlightBlock(const QString &text)
|
|||
{
|
||||
if (text == "") return;
|
||||
|
||||
QRegExp endl("[\\r\\n\\x2028]"); //Usually 0x2028 character is used for newline, no idea why
|
||||
QRegularExpression endl("[\\r\\n\\x2028]"); //Usually 0x2028 character is used for newline, no idea why
|
||||
int index = 0;
|
||||
QStringList lines = text.split(endl);
|
||||
foreach (const QString &cLine, lines) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue