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
Utilities
Kate
Commits
8fbd950b
Commit
8fbd950b
authored
Dec 30, 2020
by
Waqar Ahmed
Committed by
Christoph Cullmann
Dec 30, 2020
Browse files
Dont do multiple concatenations when one is simpler
parent
44fe4210
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/search/plugin_search.cpp
View file @
8fbd950b
...
...
@@ -978,8 +978,7 @@ void KatePluginSearchView::matchFound(const QString &url, const QString &fName,
// (line:col)[space][space] ...Line text pre [highlighted match] Line text post....
QString
displayText
=
QStringLiteral
(
"(<b>%1:%2</b>) "
).
arg
(
startLine
+
1
).
arg
(
startColumn
+
1
);
QString
matchHighlighted
=
QStringLiteral
(
"<span style=
\"
background-color:%1; color:%2;
\"
>%3</span>"
).
arg
(
m_searchBackgroundColor
).
arg
(
m_foregroundColor
).
arg
(
match
);
pre
.
append
(
matchHighlighted
+
post
);
displayText
.
append
(
pre
);
displayText
=
displayText
+
pre
+
matchHighlighted
+
post
;
TreeWidgetItem
*
item
=
new
TreeWidgetItem
(
static_cast
<
TreeWidgetItem
*>
(
nullptr
),
QStringList
{
displayText
});
...
...
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