summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtextboundaryfinder.h
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-10-04 06:52:13 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-10 13:26:13 +0200
commitf0ee31dc93813808a59a0fe576da120de2caf074 (patch)
tree4894feb2cdf725f4bf31b7c04b91e213ed08e217 /src/corelib/tools/qtextboundaryfinder.h
parent008e5ba61a68846ad29c65a2fe10b8c19c74f6eb (diff)
QTextBoundaryFinder: Introduce BoundaryReason::MandatoryBreak flag
that will be returned by boundaryReasons() when the boundary finder is at the line end position (CR, LF, NewLine Function, End of Text, etc.). The MandatoryBreak flag, if set, means the text should be wrapped at a given position. Change-Id: I32d4f570935d2e015bfc5f18915396a15f009fde Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/tools/qtextboundaryfinder.h')
-rw-r--r--src/corelib/tools/qtextboundaryfinder.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/tools/qtextboundaryfinder.h b/src/corelib/tools/qtextboundaryfinder.h
index 57c2fda3ea..c752623844 100644
--- a/src/corelib/tools/qtextboundaryfinder.h
+++ b/src/corelib/tools/qtextboundaryfinder.h
@@ -69,9 +69,10 @@ public:
enum BoundaryReason {
NotAtBoundary = 0,
- StartWord = 1,
- EndWord = 2,
- SoftHyphen = 4
+ StartWord = 0x10,
+ EndWord = 0x20,
+ MandatoryBreak = 0x40,
+ SoftHyphen = 0x80
};
Q_DECLARE_FLAGS( BoundaryReasons, BoundaryReason )