Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SDK
libkomparediff2
Commits
31d0536e
Commit
31d0536e
authored
Oct 30, 2022
by
Volker Krause
Browse files
Remove unused unified hunk body regular expressions
parent
67894519
Pipeline
#258856
passed with stage
in 39 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/parserbase.cpp
View file @
31d0536e
...
...
@@ -93,10 +93,6 @@ ParserBase::ParserBase(const KompareModelList* list, const QStringList& diff) :
m_unifiedDiffHeader1
.
setPattern
(
QRegularExpression
::
anchoredPattern
(
QStringLiteral
(
"--- ([^
\\
t]+)(?:
\\
t([^
\\
t]+)(?:
\\
t?)(.*))?
\\
n"
)));
m_unifiedDiffHeader2
.
setPattern
(
QRegularExpression
::
anchoredPattern
(
QStringLiteral
(
"
\\
+
\\
+
\\
+ ([^
\\
t]+)(?:
\\
t([^
\\
t]+)(?:
\\
t?)(.*))?
\\
n"
)));
m_unifiedHunkHeader
.
setPattern
(
QRegularExpression
::
anchoredPattern
(
QStringLiteral
(
"@@ -([0-9]+)(|,([0-9]+))
\\
+([0-9]+)(|,([0-9]+)) @@(?: ?)(.*)
\\
n"
)));
m_unifiedHunkBodyAdded
.
setPattern
(
QStringLiteral
(
"
\\
+(.*)"
));
m_unifiedHunkBodyRemoved
.
setPattern
(
QStringLiteral
(
"-(.*)"
));
m_unifiedHunkBodyContext
.
setPattern
(
QStringLiteral
(
" (.*)"
));
m_unifiedHunkBodyLine
.
setPattern
(
QStringLiteral
(
"([-+ ])(.*)"
));
}
ParserBase
::~
ParserBase
()
...
...
src/parserbase.h
View file @
31d0536e
...
...
@@ -9,7 +9,6 @@ SPDX-License-Identifier: GPL-2.0-or-later
#define DIFF2_PARSERBASE_H
#include
<QRegularExpression>
#include
<QRegExp>
#include
<QStringList>
#include
"kompare.h"
...
...
@@ -113,11 +112,6 @@ protected:
QRegularExpression
m_unifiedHunkHeader
;
QRegularExpressionMatch
m_unifiedHunkHeaderMatch
;
QRegExp
m_unifiedHunkBodyAdded
;
QRegExp
m_unifiedHunkBodyRemoved
;
QRegExp
m_unifiedHunkBodyContext
;
QRegExp
m_unifiedHunkBodyLine
;
// Added for convenience
protected:
const
QStringList
&
m_diffLines
;
DiffModel
*
m_currentModel
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment