QTBF: Remove StartOfItem/EndOfItem enum values
Since the behavior of boundaryReasons() method has been changed a lot, remove the StartWord/EndWord enum values to force the affected code be revised; StartOfItem/EndOfItem must be used instead. Change-Id: I3d1d97d2dbe9680d290646d8c3adb5558ca26bd7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
f9d122159e
commit
ea82707e96
5
dist/changes-5.0.0
vendored
5
dist/changes-5.0.0
vendored
@ -478,8 +478,9 @@ QtCore
|
|||||||
- SoftHyphen enum value has been added to specify a line break opportunity
|
- SoftHyphen enum value has been added to specify a line break opportunity
|
||||||
at a soft hyphen (SHY) character.
|
at a soft hyphen (SHY) character.
|
||||||
- MandatoryBreak enum value has been added to specify a mandatory (aka "hard") line breaks.
|
- MandatoryBreak enum value has been added to specify a mandatory (aka "hard") line breaks.
|
||||||
- StartWord/EndWord enum values has been logically replaced with StartOfItem/EndOfItem ones
|
- Source-incompatible change: Since the behavior of boundaryReasons() method
|
||||||
to mention they are not about the word boundaries only.
|
has been changed a lot, StartWord/EndWord enum values were intentionally replaced
|
||||||
|
with StartOfItem/EndOfItem ones to force the affected code be revised.
|
||||||
|
|
||||||
* Softkeys API was removed. The following functions and enums were removed:
|
* Softkeys API was removed. The following functions and enums were removed:
|
||||||
- QAction::setSoftKeyRole()
|
- QAction::setSoftKeyRole()
|
||||||
|
@ -172,13 +172,6 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int
|
|||||||
(can occur for a Line boundary type only).
|
(can occur for a Line boundary type only).
|
||||||
\value SoftHyphen The boundary finder is at the soft hyphen
|
\value SoftHyphen The boundary finder is at the soft hyphen
|
||||||
(can occur for a Line boundary type only).
|
(can occur for a Line boundary type only).
|
||||||
|
|
||||||
\value StartWord Deprecated since 5.0. Use StartOfItem instead.
|
|
||||||
The boundary finder is at the start of a word.
|
|
||||||
(can occur for a Word boundary type only).
|
|
||||||
\value EndWord Deprecated since 5.0. Use EndOfItem instead.
|
|
||||||
The boundary finder is at the end of a word.
|
|
||||||
(can occur for a Word boundary type only).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -496,9 +489,9 @@ QTextBoundaryFinder::BoundaryReasons QTextBoundaryFinder::boundaryReasons() cons
|
|||||||
if (attr.wordBreak) {
|
if (attr.wordBreak) {
|
||||||
reasons |= BreakOpportunity;
|
reasons |= BreakOpportunity;
|
||||||
if (attr.wordStart)
|
if (attr.wordStart)
|
||||||
reasons |= StartOfItem | StartWord;
|
reasons |= StartOfItem;
|
||||||
if (attr.wordEnd)
|
if (attr.wordEnd)
|
||||||
reasons |= EndOfItem | EndWord;
|
reasons |= EndOfItem;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Sentence:
|
case Sentence:
|
||||||
|
@ -73,10 +73,7 @@ public:
|
|||||||
StartOfItem = 0x20,
|
StartOfItem = 0x20,
|
||||||
EndOfItem = 0x40,
|
EndOfItem = 0x40,
|
||||||
MandatoryBreak = 0x80,
|
MandatoryBreak = 0x80,
|
||||||
SoftHyphen = 0x100,
|
SoftHyphen = 0x100
|
||||||
// ### Qt6: remove
|
|
||||||
StartWord = 0x1000,
|
|
||||||
EndWord = 0x2000
|
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS( BoundaryReasons, BoundaryReason )
|
Q_DECLARE_FLAGS( BoundaryReasons, BoundaryReason )
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user