Browse Source

Use explicit cursor index type for Qt 5 and Qt 6

master
evgeny 2 days ago
parent
commit
38c4c0772b
  1. 2
      tools/chatgui/src/messagedelegate.cpp

2
tools/chatgui/src/messagedelegate.cpp

@ -1378,7 +1378,7 @@ void MessageDelegate::paint(QPainter *painter, const QStyleOptionViewItem &optio
layoutInviteText(layout, L.textRect.width());
QVector<QTextLayout::FormatRange> selections;
if (singleTextSel && cv) {
auto cursorAt = [&](const QPoint& point) {
auto cursorAt = [&](const QPoint& point) -> int {
for (int i = 0; i < layout.lineCount(); ++i) {
const auto line = layout.lineAt(i);
if (point.y() < line.y() + line.height()) return line.xToCursor(point.x());

Loading…
Cancel
Save