|
1 | | -// SPDX-FileCopyrightText: 2011-2023 UnionTech Software Technology Co., Ltd. |
| 1 | +// SPDX-FileCopyrightText: 2011-2026 UnionTech Software Technology Co., Ltd. |
2 | 2 | // |
3 | 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | 4 |
|
@@ -193,23 +193,23 @@ class TextEdit : public DPlainTextEdit |
193 | 193 | void setFontSize(qreal fontSize); |
194 | 194 | void updateFont(); |
195 | 195 |
|
196 | | - void replaceAll(const QString &replaceText, const QString &withText, Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
197 | | - void replaceNext(const QString &replaceText, const QString &withText, Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
198 | | - void replaceRest(const QString &replaceText, const QString &withText, Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
199 | | - void beforeReplace(const QString &strReplaceText, Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
| 196 | + void replaceAll(const QString &replaceText, const QString &withText, Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
| 197 | + void replaceNext(const QString &replaceText, const QString &withText, Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
| 198 | + void replaceRest(const QString &replaceText, const QString &withText, Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
| 199 | + void beforeReplace(const QString &strReplaceText, Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
200 | 200 |
|
201 | 201 | bool findKeywordForward(const QString &keyword); |
202 | 202 |
|
203 | 203 | void removeKeywords(); |
204 | | - bool highlightKeyword(const QString &keyword, int position, Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
205 | | - bool highlightKeywordInView(const QString &keyword, Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
| 204 | + bool highlightKeyword(const QString &keyword, int position, Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
| 205 | + bool highlightKeywordInView(const QString &keyword, Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
206 | 206 | void clearFindMatchSelections(); |
207 | 207 | void setFindHighlightSelection(const QTextCursor &cursor); |
208 | 208 | void updateCursorKeywordSelection(QString keyword, bool findNext); |
209 | 209 | void updateHighlightLineSelection(); |
210 | 210 | bool updateKeywordSelections(QString keyword, QTextCharFormat charFormat, QList<QTextEdit::ExtraSelection> &listSelection); |
211 | 211 | bool updateKeywordSelectionsInView(QString keyword, QTextCharFormat charFormat, QList<QTextEdit::ExtraSelection> *listSelection, |
212 | | - Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
| 212 | + Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
213 | 213 | bool searchKeywordSeletion(QString keyword, QTextCursor cursor, bool findNext); |
214 | 214 | void renderAllSelections(); |
215 | 215 |
|
@@ -553,7 +553,7 @@ public slots: |
553 | 553 |
|
554 | 554 | void moveText(int from, int to, const QString& text, bool copy = false); |
555 | 555 | QTextCursor findCursor(const QString &substr, const QString &text, int from, bool backward = false, int cursorPos = 0, |
556 | | - Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive); |
| 556 | + Qt::CaseSensitivity caseFlag = Qt::CaseSensitive); |
557 | 557 | void onPressedLineNumber(const QPoint& point); |
558 | 558 | QString selectedText(bool checkCRLF = false); |
559 | 559 | void onEndlineFormatChanged(BottomBar::EndlineFormat from,BottomBar::EndlineFormat to); |
@@ -608,7 +608,7 @@ public slots: |
608 | 608 | // 计算颜色标记替换信息列表 |
609 | 609 | void calcMarkReplaceList(QList<TextEdit::MarkReplaceInfo> &replaceList, const QString &oldText, |
610 | 610 | const QString &replaceText, const QString &withText, int offset = 0, |
611 | | - Qt::CaseSensitivity caseFlag = Qt::CaseInsensitive) const; |
| 611 | + Qt::CaseSensitivity caseFlag = Qt::CaseSensitive) const; |
612 | 612 | // 查找行号line起始的折叠区域 |
613 | 613 | bool findFoldBlock(int line, QTextBlock &beginBlock, QTextBlock &endBlock, QTextBlock &curBlock); |
614 | 614 |
|
@@ -868,6 +868,6 @@ private slots: |
868 | 868 | bool m_isPreeditBefore = false; // 上一个输入法时间是否是 preedit |
869 | 869 | int m_preeditLengthBefore = 0; |
870 | 870 |
|
871 | | - Qt::CaseSensitivity defaultCaseSensitive = Qt::CaseInsensitive; // 查找匹配时默认不区分 |
| 871 | + Qt::CaseSensitivity defaultCaseSensitive = Qt::CaseSensitive; // 查找匹配时默认区分大小写 |
872 | 872 | }; |
873 | 873 | #endif |
0 commit comments