Hello community,

here is the log from the commit of package qt3 for openSUSE:Factory checked in 
at 2015-09-24 06:12:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt3 (Old)
 and      /work/SRC/openSUSE:Factory/.qt3.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qt3"

Changes:
--------
qt3-extensions.changes: same change
--- /work/SRC/openSUSE:Factory/qt3/qt3.changes  2015-07-20 15:13:37.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.qt3.new/qt3.changes     2015-09-24 
06:12:46.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Sep 14 02:03:53 UTC 2015 - an...@opensuse.org
+
+- Further fix to iconview widget. Patch from Trinity
+  qt3-trinity-fix-iconview-widget2.patch
+
+-------------------------------------------------------------------

New:
----
  qt3-trinity-fix-iconview-widget2.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
qt3-extensions.spec: same change
++++++ qt3.spec ++++++
--- /var/tmp/diff_new_pack.yRGNdP/_old  2015-09-24 06:12:48.000000000 +0200
+++ /var/tmp/diff_new_pack.yRGNdP/_new  2015-09-24 06:12:48.000000000 +0200
@@ -130,6 +130,7 @@
 Patch190:       qt-x11-free-3.3.8b-CVE-2015-0295.patch
 Patch191:       qt-x11-free-3.3.8b-CVE-2015-1860.patch
 Patch192:       qt3-trinity-fix-iconview-widget.patch
+Patch193:       qt3-trinity-fix-iconview-widget2.patch
 
 # TQt integration
 Patch200:       qt-3.3.8c.diff
@@ -232,6 +233,7 @@
 %patch190 -p1
 %patch191 -p1
 %patch192 -p1
+%patch193 -p1
 
 # copy qt kde integration files
 cp %SOURCE100 %SOURCE101 src/kernel/




++++++ qt3-trinity-fix-iconview-widget2.patch ++++++
>From d27f4e2fc304208a404c64279a4e32b1a94b05a9 Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calg...@yahoo.it>
Date: Mon, 07 Sep 2015 14:58:02 +0000
Subject: Fixed (again) search algorithm for iconview widget. This resolves 
(again) bug 420.

Signed-off-by: Michele Calgaro <michele.calg...@yahoo.it>
---
diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp
index 790302a..e2a00bb 100644
--- a/src/iconview/qiconview.cpp
+++ b/src/iconview/qiconview.cpp
@@ -5313,23 +5313,21 @@ void QIconView::keyPressEvent( QKeyEvent *e )
 
 /*
   Finds the closest item in the direction \a dir starting from the specified 
\a fromItem.
-  If the arrangement is LeftToRight (icon view mode): use center as item 
reference
-  If the arrangement is TopToBottom (multicolumn view mode): use left top 
corner as item reference
+  If the arrangement is LeftToRight (icon view mode): use (center, top) as 
item reference
+  If the arrangement is TopToBottom (multicolumn view mode): use (left, top) 
as item reference
+  This is to allow for smooth scrolling when using the keyboard arrow keys.
 */
 QIconViewItem* QIconView::findItem(Direction dir, const QIconViewItem 
*fromItem) const
 {
     QIconViewItem *closestItem=NULL;
     int distPri=0, distSec=0;
     int itemDistancePri=0, itemDistanceSec=0;
-    
-    QPoint pos;
+
+    QPoint pos=fromItem->rect().topLeft();
     if (d->arrangement == LeftToRight) {
-      pos=fromItem->rect().center();
-    }
-    else {
-      pos=fromItem->rect().topLeft();
+        pos.setX(fromItem->rect().center().x());
     }
-    
+
     QRect searchRect;
     switch (dir) {
         case DirDown:
@@ -5359,16 +5357,16 @@ QIconViewItem* QIconView::findItem(Direction dir, const 
QIconViewItem *fromItem)
                     // DirDown/DirUp   : primary distance X, secondary 
distance Y
                     // DirLeft/DirRight: primary distance Y, secondary 
distance X
                     if (d->arrangement == LeftToRight) {
-                        // Left to right arrangement (icon view mode): use 
center as item reference
+                        // Left to right arrangement (icon view mode): use 
(center, top) as item reference
                         switch (dir) {
                             case DirDown:
                                 if (ir.center().x() > pos.x()) {
                                     distPri = ir.center().x()-pos.x();
-                                    distSec = ir.center().y();
+                                    distSec = ir.top();
                                     }
-                                else if (ir.center().x() == pos.x() && 
ir.center().y() > pos.y()) {
+                                else if (ir.center().x() == pos.x() && 
ir.top() > pos.y()) {
                                     distPri = 0;
-                                    distSec = ir.center().y()-pos.y();
+                                    distSec = ir.top()-pos.y();
                                     }
                                 else {
                                     itemOK = false;
@@ -5378,11 +5376,11 @@ QIconViewItem* QIconView::findItem(Direction dir, const 
QIconViewItem *fromItem)
                             case DirUp:
                                 if (ir.center().x() < pos.x()) {
                                     distPri = pos.x()-ir.center().x();
-                                    distSec = contentsHeight()-ir.center().y();
+                                    distSec = contentsHeight()-ir.top();
                                     }
-                                else if (ir.center().x() == pos.x() && 
ir.center().y() < pos.y()) {
+                                else if (ir.center().x() == pos.x() && 
ir.top() < pos.y()) {
                                     distPri = 0;
-                                    distSec = pos.y()-ir.center().y();
+                                    distSec = pos.y()-ir.top();
                                     }
                                 else {
                                     itemOK = false;
@@ -5390,11 +5388,11 @@ QIconViewItem* QIconView::findItem(Direction dir, const 
QIconViewItem *fromItem)
                                 break;
                             
                             case DirRight:
-                                if (ir.center().y() > pos.y()) {
-                                    distPri = ir.center().y()-pos.y();
+                                if (ir.top() > pos.y()) {
+                                    distPri = ir.top()-pos.y();
                                     distSec = ir.center().x();
                                     }
-                                else if (ir.center().y() == pos.y() && 
ir.center().x() > pos.x()) {
+                                else if (ir.top() == pos.y() && 
ir.center().x() > pos.x()) {
                                     distPri = 0;
                                     distSec = ir.center().x()-pos.x();
                                     }
@@ -5404,11 +5402,11 @@ QIconViewItem* QIconView::findItem(Direction dir, const 
QIconViewItem *fromItem)
                                 break;
                             
                             case DirLeft:
-                                if (ir.center().y() < pos.y()) {
-                                    distPri = pos.y()-ir.center().y();
+                                if (ir.top() < pos.y()) {
+                                    distPri = pos.y()-ir.top();
                                     distSec = contentsWidth()-ir.center().x();
                                     }
-                                else if (ir.center().y() == pos.y() && 
ir.center().x() < pos.x()) {
+                                else if (ir.top() == pos.y() && 
ir.center().x() < pos.x()) {
                                     distPri = 0;
                                     distSec = pos.x()-ir.center().x();
                                     }
@@ -5422,8 +5420,8 @@ QIconViewItem* QIconView::findItem(Direction dir, const 
QIconViewItem *fromItem)
                                 break;
                         }      
                     }
-                    else {            
-                        // Top to bottom arrangement (multicolumn view mode): 
use left top corner as item reference
+                    else {
+                        // Top to bottom arrangement (multicolumn view mode): 
use (left, top) as item reference
                         switch (dir) {
                             case DirDown:
                                 if (ir.left() > pos.x()) {
--
cgit v0.9.0.2-52-g1de3

Reply via email to