Merge "Consistently check for nullptr in QGraphicsTextItem::inputMethodQuery"
This commit is contained in:
commit
8f2f70a8ff
@ -10311,6 +10311,7 @@ QVariant QGraphicsTextItem::inputMethodQuery(Qt::InputMethodQuery query) const
|
||||
v = int(inputMethodHints());
|
||||
else if (dd->control)
|
||||
v = dd->control->inputMethodQuery(query, QVariant());
|
||||
if (dd->control) {
|
||||
if (v.userType() == QMetaType::QRectF)
|
||||
v = v.toRectF().translated(-dd->controlOffset());
|
||||
else if (v.userType() == QMetaType::QPointF)
|
||||
@ -10319,6 +10320,7 @@ QVariant QGraphicsTextItem::inputMethodQuery(Qt::InputMethodQuery query) const
|
||||
v = v.toRect().translated(-dd->controlOffset().toPoint());
|
||||
else if (v.userType() == QMetaType::QPoint)
|
||||
v = v.toPoint() - dd->controlOffset().toPoint();
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user