Changeset 846 for trunk/src/corelib/tools/qtextboundaryfinder.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/corelib/tools/qtextboundaryfinder.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 101 101 } 102 102 103 /*! \class QTextBoundaryFinder 103 /*! 104 \class QTextBoundaryFinder 104 105 105 106 \brief The QTextBoundaryFinder class provides a way of finding Unicode text boundaries in a string. … … 131 132 might happen and sentence boundaries will show the beginning and 132 133 end of whole sentences. 134 135 136 137 138 133 139 */ 134 140 … … 239 245 240 246 \warning QTextBoundaryFinder does not create a copy of \a chars. It is the 241 application programmer's respons ability to ensure the array is allocated for247 application programmer's responsbility to ensure the array is allocated for 242 248 as long as the QTextBoundaryFinder object stays alive. The same applies to 243 249 \a buffer. … … 332 338 Moves the QTextBoundaryFinder to the next boundary position and returns that position. 333 339 334 Returns -1 i sthere is no next boundary.340 Returns -1 i there is no next boundary. 335 341 */ 336 342 int QTextBoundaryFinder::toNextBoundary() … … 363 369 break; 364 370 case Line: 365 while (pos < length && d->attributes[pos].lineBreakType < HB_Break) 371 Q_ASSERT(pos); 372 while (pos < length && d->attributes[pos-1].lineBreakType < HB_Break) 366 373 ++pos; 367 374 break; … … 374 381 Moves the QTextBoundaryFinder to the previous boundary position and returns that position. 375 382 376 Returns -1 i sthere is no previous boundary.383 Returns -1 i there is no previous boundary. 377 384 */ 378 385 int QTextBoundaryFinder::toPreviousBoundary() … … 405 412 break; 406 413 case Line: 407 while (pos > 0 && d->attributes[pos ].lineBreakType < HB_Break)414 while (pos > 0 && d->attributes[pos].lineBreakType < HB_Break) 408 415 --pos; 409 416 break; … … 430 437 return d->attributes[pos].wordBoundary; 431 438 case Line: 432 return d->attributes[pos].lineBreakType >= HB_Break;439 return ; 433 440 case Sentence: 434 441 return d->attributes[pos].sentenceBoundary;
Note:
See TracChangeset
for help on using the changeset viewer.