KTextEditor
katematch.cpp
27KTextEditor::Range KateMatch::replace(const QString &replacement, bool blockMode, int replacementCounter)
30 // skip place-holder stuff if we have no \ at all inside the replacement, the buildReplacement is expensive
32 (m_options.testFlag(KTextEditor::Regex) || m_options.testFlag(KTextEditor::EscapeSequences)) && replacement.contains(QLatin1Char('\\'));
34 const QString finalReplacement = usePlaceholders ? buildReplacement(replacement, blockMode, replacementCounter) : replacement;
40 m_afterReplaceRange.reset(m_document->newMovingRange(range(), KTextEditor::MovingRange::ExpandLeft | KTextEditor::MovingRange::ExpandRight));
67QString KateMatch::buildReplacement(const QString &replacement, bool blockMode, int replacementCounter) const
Backend of KTextEditor::Document related public KTextEditor interfaces.
Definition katedocument.h:68
@ ExpandRight
Expand to encapsulate new characters to the right of the range.
Definition movingrange.h:144
@ ExpandLeft
Expand to encapsulate new characters to the left of the range.
Definition movingrange.h:142
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
static constexpr Range invalid() noexcept
Returns an invalid range.
Definition include/ktexteditor/range.h:121
static QString buildReplacement(const QString &text, const QStringList &capturedTexts, int replacementCounter)
Returns a modified version of text where.
Definition kateregexpsearch.cpp:497
QFlags< SearchOption > SearchOptions
Stores a combination of SearchOption values.
Definition document.h:65
void reserve(qsizetype size)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:11:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:11:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.