Changeset 70589 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.cpp
- Timestamp:
- Jan 15, 2018 1:00:21 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.cpp
r70581 r70589 190 190 #endif 191 191 setFont(font); 192 setWordWrapMode(QTextOption::NoWrap); 192 193 setWordWrapMode(QTextOption::NoWrap); 193 194 setReadOnly(true); … … 389 390 int UIVMLogViewerTextEdit::lineNumberForPos(const QPoint &position) 390 391 { 392 QTextCursor cursor = cursorForPosition(position); 393 QTextBlock block = cursor.block(); 394 return block.blockNumber() + 1; 395 } 396 397 QPair<int, QString> UIVMLogViewerTextEdit::bookmarkForPos(const QPoint &position) 398 { 391 399 QTextBlock block = cursorForPosition(position).block(); 392 return block.firstLineNumber() + 1; 393 } 394 395 QPair<int, QString> UIVMLogViewerTextEdit::bookmarkForPos(const QPoint &position) 396 { 397 QTextBlock block = cursorForPosition(position).block(); 398 return QPair<int, QString>(block.firstLineNumber() + 1, block.text()); 400 return QPair<int, QString>(lineNumberForPos(position), block.text()); 399 401 } 400 402 … … 437 439 return; 438 440 m_bWrapLines = bWrapLines; 441 if(m_bWrapLines) 442 { 443 setLineWrapMode(QPlainTextEdit::WidgetWidth); 444 setWordWrapMode(QTextOption::WordWrap); 445 } 446 else 447 { 448 setWordWrapMode(QTextOption::NoWrap); 449 setWordWrapMode(QTextOption::NoWrap); 450 } 451 439 452 update(); 440 453 }
Note:
See TracChangeset
for help on using the changeset viewer.