Commit 4cbff15f authored by Milian Wolff's avatar Milian Wolff
Browse files

Use QStringView instead of runtime allocation for trimmed()

parent e5c4500d
......@@ -125,7 +125,7 @@ void collectRanges(QTextFrame* frame, const QColor& fgcolor, const QColor& bgcol
if (it.currentBlock().isValid()) {
for (auto jt = it.currentBlock().begin(); jt != it.currentBlock().end(); ++jt) {
auto fragment = jt.fragment();
auto text = fragment.text().trimmed();
auto text = QStringView(fragment.text()).trimmed();
if (!text.isEmpty()) {
auto fmt = fragment.charFormat();
auto foreground = foregroundColor(fmt);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment