[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - 2 commits - vcl/qt5

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 4 22:05:22 UTC 2019


 vcl/qt5/Qt5Data.cxx  |   13 ++++++-------
 vcl/qt5/Qt5Frame.cxx |    4 ++--
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 7963a389dea1ff1a0c3a1910ae05ecc562597b13
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Mon Apr 1 09:41:39 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Apr 5 00:05:08 2019 +0200

    tdf#120865: preserve cursor shape on repositioning the cursor
    
    i.e. don't recreate cursor with new (default) arrow shape in
    SalFrame::SetPointerPos, but simply move the existing one
    
    Change-Id: I3406ceff25a53de6f2afa318114370c318e6a500
    Reviewed-on: https://gerrit.libreoffice.org/70049
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 330df37c7e2af0564bcd2de1f171bed4befcc074)
    Reviewed-on: https://gerrit.libreoffice.org/70238
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 3172b769f550..b1ad0f93d561 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -682,9 +682,9 @@ void Qt5Frame::CaptureMouse(bool bMouse)
 
 void Qt5Frame::SetPointerPos(long nX, long nY)
 {
-    QCursor aCursor = m_pQWidget->cursor();
+    // some cursor already exists (and it has m_ePointerStyle shape)
+    // so here we just reposition it
     QCursor::setPos(m_pQWidget->mapToGlobal(QPoint(nX, nY)));
-    m_pQWidget->setCursor(aCursor);
 }
 
 void Qt5Frame::Flush()
commit 0ff90fd5cb698ef78fc15e3073eaaacd599beae7
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Wed Mar 27 09:32:47 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Apr 5 00:04:53 2019 +0200

    tdf#124026: map window resizing-related cursors to their Qt equivalents
    
    there is no direct Qt equivalent of X11 xc_[top|bottom|left|right]_side
    cursors, but those come at least close
    
    Change-Id: Ifd442c46c08c71b1e1b9ddac42628b38eefee47f
    Reviewed-on: https://gerrit.libreoffice.org/69797
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 167812fe0d77b993427e7dca112f319a92942a3c)
    Reviewed-on: https://gerrit.libreoffice.org/70245
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx
index 1830dab0e523..597a0a4d0a77 100644
--- a/vcl/qt5/Qt5Data.cxx
+++ b/vcl/qt5/Qt5Data.cxx
@@ -204,12 +204,10 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle)
             MAP_BUILTIN(PointerStyle::NESize, Qt::SizeBDiagCursor);
             MAP_BUILTIN(PointerStyle::SWSize, Qt::SizeBDiagCursor);
             MAP_BUILTIN(PointerStyle::SESize, Qt::SizeFDiagCursor);
-#if 0
-            MAP_BUILTIN( PointerStyle::WindowNSize, GDK_TOP_SIDE );
-            MAP_BUILTIN( PointerStyle::WindowSSize, GDK_BOTTOM_SIDE );
-            MAP_BUILTIN( PointerStyle::WindowWSize, GDK_LEFT_SIDE );
-            MAP_BUILTIN( PointerStyle::WindowESize, GDK_RIGHT_SIDE );
-#endif
+            MAP_BUILTIN(PointerStyle::WindowNSize, Qt::SizeVerCursor);
+            MAP_BUILTIN(PointerStyle::WindowSSize, Qt::SizeVerCursor);
+            MAP_BUILTIN(PointerStyle::WindowWSize, Qt::SizeHorCursor);
+            MAP_BUILTIN(PointerStyle::WindowESize, Qt::SizeHorCursor);
             MAP_BUILTIN(PointerStyle::WindowNWSize, Qt::SizeFDiagCursor);
             MAP_BUILTIN(PointerStyle::WindowNESize, Qt::SizeBDiagCursor);
             MAP_BUILTIN(PointerStyle::WindowSWSize, Qt::SizeBDiagCursor);
@@ -299,7 +297,8 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle)
         if (!pCursor)
         {
             pCursor = new QCursor(Qt::ArrowCursor);
-            SAL_WARN("vcl.qt5", "pointer " << static_cast<int>(ePointerStyle) << "not implemented");
+            SAL_WARN("vcl.qt5",
+                     "pointer " << static_cast<int>(ePointerStyle) << " not implemented");
         }
 
         m_aCursors[ePointerStyle].reset(pCursor);


More information about the Libreoffice-commits mailing list