forked from qt-creator/qt-creator
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:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user