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
KTextEditor::MovingRange * newMovingRange(KTextEditor::Range range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors=KTextEditor::MovingRange::DoNotExpand, KTextEditor::MovingRange::EmptyBehavior emptyBehavior=KTextEditor::MovingRange::AllowEmpty) override
Create a new moving range for this document.
Definition katedocument.cpp:5851
QString text(KTextEditor::Range range, bool blockwise=false) const override
Get the document content within the given range.
Definition katedocument.cpp:442
@ ExpandRight
Expand to encapsulate new characters to the right of the range.
Definition movingrange.h:146
@ ExpandLeft
Expand to encapsulate new characters to the left of the range.
Definition movingrange.h:144
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr bool isEmpty() const noexcept
Returns true if this range contains no characters, ie.
Definition include/ktexteditor/range.h:301
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
bool testFlag(Enum flag) const const
bool isEmpty() const const
void reserve(qsizetype size)
qsizetype size() const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.