Fix some random deprecation warning

if QT_DEPRECATED_SINCE(6, 0)
    QT_DEPRECATED_VERSION_X_6_0("Use position().toPoint()")
    inline QPoint pos() const { return position().toPoint(); }
    ...

Change-Id: If885b26c8e5f4d68ca1c5c7e4ffc495b0701b210
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2024-06-05 17:27:14 +02:00
parent a05b0a7829
commit f64232f77b
11 changed files with 22 additions and 23 deletions

View File

@@ -9232,7 +9232,7 @@ void TextEditorWidget::dragLeaveEvent(QDragLeaveEvent *)
void TextEditorWidget::dragMoveEvent(QDragMoveEvent *e)
{
const QRect rect = cursorRect(d->m_dndCursor);
d->m_dndCursor = cursorForPosition(e->pos());
d->m_dndCursor = cursorForPosition(e->position().toPoint());
if (!rect.isNull())
viewport()->update(rect);
viewport()->update(cursorRect(d->m_dndCursor));
@@ -9250,7 +9250,7 @@ void TextEditorWidget::dropEvent(QDropEvent *e)
// Update multi text cursor before inserting data
MultiTextCursor cursor = multiTextCursor();
cursor.beginEditBlock();
const QTextCursor eventCursor = cursorForPosition(e->pos());
const QTextCursor eventCursor = cursorForPosition(e->position().toPoint());
if (e->dropAction() == Qt::MoveAction && e->source() == viewport())
cursor.removeSelectedText();
cursor.setCursors({eventCursor});