| 306 | } |
| 307 | |
| 308 | void JSReplSearchBox::highlight(const QTextCursor &cursor) |
| 309 | { |
| 310 | QList<QTextEdit::ExtraSelection> extraSelections; |
| 311 | |
| 312 | QTextEdit::ExtraSelection selection; |
| 313 | QColor lineColor = QColor(Qt::yellow).lighter(160); |
| 314 | |
| 315 | selection.format.setBackground(lineColor); |
| 316 | selection.format.setProperty(QTextFormat::FullWidthSelection, true); |
| 317 | selection.cursor = cursor; |
| 318 | selection.cursor.clearSelection(); |
| 319 | extraSelections.append(selection); |
| 320 | |
| 321 | textEdit->setExtraSelections(extraSelections); |
| 322 | } |
no test coverage detected