diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2015-04-14 15:34:08 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-04-15 11:07:44 +0000 |
commit | ba5af03a5a505d4ef19ccea1c0170e50abf3db8c (patch) | |
tree | 0fdee2d3af719f25cd344ab29be6c4ea87e80a5d /src/gui/text/qtextengine.cpp | |
parent | c586f958b30c32176487133e76d5cf65b15d6166 (diff) |
[QTextCursor] Better use of the cached whiteSpace attribute
In compare to QTextEngine::atSpace(), this also handles the less-common
"white spaces" and the exceptional control codes.
Change-Id: I52878932926b7f9fe36c9dd01007963b9691fbf0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 10a61d3c84..67a19804a3 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2549,21 +2549,6 @@ bool QTextEngine::atWordSeparator(int position) const return false; } -bool QTextEngine::atSpace(int position) const -{ - const QChar c = layoutData->string.at(position); - switch (c.unicode()) { - case QChar::Tabulation: - case QChar::Space: - case QChar::Nbsp: - case QChar::LineSeparator: - return true; - default: - break; - } - return false; -} - void QTextEngine::setPreeditArea(int position, const QString &preeditText) { if (preeditText.isEmpty()) { |