Changeset 846 for trunk/src/gui/widgets/qplaintextedit.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/gui/widgets/qplaintextedit.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]) … … 912 912 913 913 if (moveCursor) { 914 914 915 // move using movePosition to keep the cursor's x 915 916 lastY += verticalOffset(); … … 944 945 if (!centerOnScroll && q->isVisible()) { 945 946 QTextBlock block = doc->lastBlock(); 946 const int visible = static_cast<int>(viewport->rect().height() - margin - 1);947 inty = 0;947 const ; 948 y = 0; 948 949 int visibleFromBottom = 0; 949 950 … … 953 954 continue; 954 955 } 955 y += int(documentLayout->blockBoundingRect(block).height());956 y += ); 956 957 957 958 QTextLayout *layout = block.layout(); … … 962 963 QTextLine line = layout->lineAt(lineNumber); 963 964 const QRectF lr = line.naturalTextRect(); 964 if ( int(lr.top()) >= y - visible)965 if () >= y - visible) 965 966 break; 966 967 ++lineNumber; … … 1320 1321 } 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1322 1343 1323 1344 /*! … … 1456 1477 } 1457 1478 #endif 1479 1458 1480 else if (e->type() == QEvent::Gesture) { 1459 1481 QGestureEvent *ge = static_cast<QGestureEvent *>(e); … … 1479 1501 return true; 1480 1502 } 1503 1481 1504 return QAbstractScrollArea::event(e); 1482 1505 } … … 2394 2417 2395 2418 The default value depends on whether the QPlainTextEdit is read-only 2396 or editable , and whether it is a QTextBrowser or not.2419 or editable. 2397 2420 */ 2398 2421
Note:
See TracChangeset
for help on using the changeset viewer.