summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2014-08-23 00:42:47 +0200
committerSamuel Gaist <samuel.gaist@edeltech.ch>2014-09-15 09:35:51 +0200
commitd3a5321e57b39e8342f861298a8c1daa730f473c (patch)
tree47ba0316e02a02443c82c399762d4bb31e0b98be /src
parent4066a6a893dcaa1258e4801fe9e8d2d7624e37f7 (diff)
QTextDocument: doc and function parameter name cleanup
Change-Id: Idecdf66da0d00cbede6ca5b742d10cf536f366d2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qtextdocument.cpp30
-rw-r--r--src/gui/text/qtextdocument.h6
2 files changed, 17 insertions, 19 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 438fa75492..2b65888c7c 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1278,8 +1278,6 @@ QTextCursor QTextDocument::find(const QString &subString, int from, FindFlags op
}
/*!
- \fn QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cursor, FindFlags options) const
-
Finds the next occurrence of the string, \a subString, in the document.
The search starts at the position of the given \a cursor, and proceeds
forwards through the document unless specified otherwise in the search
@@ -1294,14 +1292,14 @@ QTextCursor QTextDocument::find(const QString &subString, int from, FindFlags op
By default the search is case-sensitive, and can match text anywhere in the
document.
*/
-QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &from, FindFlags options) const
+QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cursor, FindFlags options) const
{
int pos = 0;
- if (!from.isNull()) {
+ if (!cursor.isNull()) {
if (options & QTextDocument::FindBackward)
- pos = from.selectionStart();
+ pos = cursor.selectionStart();
else
- pos = from.selectionEnd();
+ pos = cursor.selectionEnd();
}
QRegExp expr(subString);
expr.setPatternSyntax(QRegExp::FixedString);
@@ -1421,14 +1419,14 @@ QTextCursor QTextDocument::find(const QRegExp & expr, int from, FindFlags option
By default the search is case-sensitive, and can match text anywhere in the
document.
*/
-QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &from, FindFlags options) const
+QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, FindFlags options) const
{
int pos = 0;
- if (!from.isNull()) {
+ if (!cursor.isNull()) {
if (options & QTextDocument::FindBackward)
- pos = from.selectionStart();
+ pos = cursor.selectionStart();
else
- pos = from.selectionEnd();
+ pos = cursor.selectionEnd();
}
return find(expr, pos, options);
}
@@ -1533,27 +1531,27 @@ QTextCursor QTextDocument::find(const QRegularExpression &expr, int from, FindFl
\since 5.5
Finds the next occurrence, matching the regular expression, \a expr, in the document.
- The search starts at the position of the given \a from cursor, and proceeds
+ The search starts at the position of the given \a cursor, and proceeds
forwards through the document unless specified otherwise in the search
options. The \a options control the type of search performed.
Returns a cursor with the match selected if a match was found; otherwise
returns a null cursor.
- If the given \a from cursor has a selection, the search begins after the
+ If the given \a cursor has a selection, the search begins after the
selection; otherwise it begins at the cursor's position.
By default the search is case-sensitive, and can match text anywhere in the
document.
*/
-QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCursor &from, FindFlags options) const
+QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCursor &cursor, FindFlags options) const
{
int pos = 0;
- if (!from.isNull()) {
+ if (!cursor.isNull()) {
if (options & QTextDocument::FindBackward)
- pos = from.selectionStart();
+ pos = cursor.selectionStart();
else
- pos = from.selectionEnd();
+ pos = cursor.selectionEnd();
}
return find(expr, pos, options);
}
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h
index 3f4b8b565b..34a180f198 100644
--- a/src/gui/text/qtextdocument.h
+++ b/src/gui/text/qtextdocument.h
@@ -168,13 +168,13 @@ public:
Q_DECLARE_FLAGS(FindFlags, FindFlag)
QTextCursor find(const QString &subString, int from = 0, FindFlags options = 0) const;
- QTextCursor find(const QString &subString, const QTextCursor &from, FindFlags options = 0) const;
+ QTextCursor find(const QString &subString, const QTextCursor &cursor, FindFlags options = 0) const;
QTextCursor find(const QRegExp &expr, int from = 0, FindFlags options = 0) const;
- QTextCursor find(const QRegExp &expr, const QTextCursor &from, FindFlags options = 0) const;
+ QTextCursor find(const QRegExp &expr, const QTextCursor &cursor, FindFlags options = 0) const;
#ifndef QT_NO_REGULAREXPRESSION
QTextCursor find(const QRegularExpression &expr, int from = 0, FindFlags options = 0) const;
- QTextCursor find(const QRegularExpression &expr, const QTextCursor &from, FindFlags options = 0) const;
+ QTextCursor find(const QRegularExpression &expr, const QTextCursor &cursor, FindFlags options = 0) const;
#endif
QTextFrame *frameAt(int pos) const;