diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-06-02 20:04:28 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-06-02 22:16:06 +0200 |
commit | 02bee5f5d846f40f244c5acab044177576a6d869 (patch) | |
tree | 16fecc3885679b3b64a80d64efe2d1c42ad07e5a /vcl | |
parent | b226cd3c2ed3a551f1631cb118456f1f80e32b6c (diff) |
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/73349
Tested-by: Jenkins
Tested-by: Rene Engelhard <rene@debian.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qt5/Qt5Widget.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index d2a2d8140026..a6b3d29e69a8 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -629,7 +629,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const { sal_Int32 nCursorPos, nAnchor; if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr)) - return QVariant(nCursorPos); + return QVariant(static_cast<int>(nCursorPos)); [[fallthrough]]; } case Qt::ImCursorRectangle: @@ -643,7 +643,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const { sal_Int32 nCursorPos, nAnchor; if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr)) - return QVariant(nAnchor); + return QVariant(static_cast<int>(nAnchor)); [[fallthrough]]; } case Qt::ImCurrentSelection: |