Kaydet (Commit) e2fdcd2a authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski Kaydeden (comit) Michael Weghorn

Qt5 return expected QVariants int sizes

Grep'ing the Qt source code, most of the places call toInt()
on the QVariants returned from Qt::ImCursorPosition and
Qt::ImAnchorPosition (toUInt() is probably a bug). So actually
deliver these (and fix the 32bit build with the sal_Int32
ambiguity - there is no "signed long" QVariant constructor).

Change-Id: Id6b8fbabb8156692592bdef48437db140c6b7cca
Reviewed-on: https://gerrit.libreoffice.org/73356Tested-by: 's avatarRene Engelhard <rene@debian.org>
Reviewed-by: 's avatarMichael Weghorn <m.weghorn@posteo.de>
üst ffaafc6c
...@@ -629,7 +629,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const ...@@ -629,7 +629,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const
{ {
sal_Int32 nCursorPos, nAnchor; sal_Int32 nCursorPos, nAnchor;
if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr)) if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr))
return QVariant(nCursorPos); return QVariant(static_cast<int>(nCursorPos));
[[fallthrough]]; [[fallthrough]];
} }
case Qt::ImCursorRectangle: case Qt::ImCursorRectangle:
...@@ -643,7 +643,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const ...@@ -643,7 +643,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const
{ {
sal_Int32 nCursorPos, nAnchor; sal_Int32 nCursorPos, nAnchor;
if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr)) if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr))
return QVariant(nAnchor); return QVariant(static_cast<int>(nAnchor));
[[fallthrough]]; [[fallthrough]];
} }
case Qt::ImCurrentSelection: case Qt::ImCurrentSelection:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment