Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KPimTextEdit
Commits
e075d235
Commit
e075d235
authored
Mar 02, 2022
by
Laurent Montel
😁
Browse files
Rename variable
parent
b434f0e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/texteditor/commonwidget/findutils.cpp
View file @
e075d235
...
...
@@ -51,7 +51,7 @@ int FindUtils::replaceAll(QTextEdit *view, const QString &str, const QString &re
return
count
;
}
int
FindUtils
::
replaceAll
(
QPlainTextEdit
*
view
,
const
QString
&
str
,
const
QString
&
replace
Widget
,
QTextDocument
::
FindFlags
searchOptions
)
int
FindUtils
::
replaceAll
(
QPlainTextEdit
*
view
,
const
QString
&
str
,
const
QString
&
replace
Str
,
QTextDocument
::
FindFlags
searchOptions
)
{
auto
document
=
view
->
document
();
QTextCursor
c
(
document
);
...
...
@@ -63,7 +63,7 @@ int FindUtils::replaceAll(QPlainTextEdit *view, const QString &str, const QStrin
c
=
document
->
find
(
str
,
c
,
flags
);
if
(
!
c
.
isNull
())
{
// find() selects found text, and insertText() replaces selection
c
.
insertText
(
replace
Widget
);
c
.
insertText
(
replace
Str
);
count
++
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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