Hello community,

here is the log from the commit of package kio for openSUSE:Factory checked in 
at 2018-01-16 09:41:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kio (Old)
 and      /work/SRC/openSUSE:Factory/.kio.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kio"

Tue Jan 16 09:41:08 2018 rev:58 rq:563770 version:5.41.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kio/kio.changes  2018-01-09 14:42:44.673197328 
+0100
+++ /work/SRC/openSUSE:Factory/.kio.new/kio.changes     2018-01-16 
09:41:09.585089672 +0100
@@ -1,0 +2,6 @@
+Fri Jan 12 07:48:05 UTC 2018 - [email protected]
+
+- Add patch to fix layout of icons in the file dialog (kde#352776):
+  * 0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch

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

Other differences:
------------------
++++++ kio.spec ++++++
--- /var/tmp/diff_new_pack.I2XM5o/_old  2018-01-16 09:41:10.637040432 +0100
+++ /var/tmp/diff_new_pack.I2XM5o/_new  2018-01-16 09:41:10.641040245 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package kio
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,14 +18,26 @@
 
 %bcond_without lang
 %define _tar_path 5.41
-# Full KF5 version (e.g. 5.33.0)
-%{!?_kf5_version: %global _kf5_version %{version}}
-# Last major and minor KF5 version (e.g. 5.33)
-%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 Name:           kio
 Version:        5.41.0
 Release:        0
 %define kf5_version %{version}
+# Full KF5 version (e.g. 5.33.0)
+%{!?_kf5_version: %global _kf5_version %{version}}
+# Last major and minor KF5 version (e.g. 5.33)
+%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
+Summary:        Network transparent access to files and data
+License:        LGPL-2.1+
+Group:          System/GUI/KDE
+Url:            http://www.kde.org
+Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
+Source1:        baselibs.conf
+# PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to 
see into kde4 documentation, needed especially for khelpcenter5
+Patch0:         kio_help-fallback-to-kde4-docs.patch
+# PATCH-FIX-UPSTREAM
+Patch1:         fix-handling-of-KCookieAdvice_AcceptForSession.patch
+# PATCH-FIX-UPSTREAM
+Patch2:         0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch
 BuildRequires:  cmake >= 3.0
 BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
@@ -71,17 +83,6 @@
 Recommends:     kio-extras5
 # KIO/FileDialog uses klauncher directly, but we can't add Requires, as that 
would introduce dep cycle
 Recommends:     kinit
-Summary:        Network transparent access to files and data
-License:        LGPL-2.1+
-Group:          System/GUI/KDE
-Url:            http://www.kde.org
-Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
-Source1:        baselibs.conf
-# PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to 
see into kde4 documentation, needed especially for khelpcenter5
-Patch0:         kio_help-fallback-to-kde4-docs.patch
-# PATCH-FIX-UPSTREAM
-Patch1:         fix-handling-of-KCookieAdvice_AcceptForSession.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 This framework implements almost all the file management functions you
@@ -128,6 +129,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
   %cmake_kf5 -d build
@@ -155,7 +157,6 @@
 %endif
 
 %files core
-%doc COPYING* README*
 %{_kf5_libdir}/libKF5KIOCore.so.*
 %{_kf5_configdir}/accept-languages.codes
 %{_kf5_libdir}/libKF5KIONTLM.so.*
@@ -190,7 +191,6 @@
 %{_kf5_sharedir}/dbus-1/services/org.kde.kioexecd.service
 
 %files
-%defattr(-,root,root)
 %doc COPYING* README*
 %{_kf5_libdir}/libKF5KIOGui.so.*
 %{_kf5_libdir}/libKF5KIOWidgets.so.*
@@ -230,7 +230,6 @@
 %doc %lang(en) %{_kf5_htmldir}/en/*/
 
 %files devel
-%defattr(-,root,root)
 %{_kf5_bindir}/protocoltojson
 %{_kf5_libdir}/libKF5KIOCore.so
 %{_kf5_libdir}/libKF5KIOGui.so

++++++ 0001-Fix-KFilePreviewGenerator-LayoutBlocker.patch ++++++
>From fe2ce8fd25ceeb65e5889084e068de93c783ef62 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <[email protected]>
Date: Thu, 11 Jan 2018 22:07:45 +0100
Subject: [PATCH] Fix KFilePreviewGenerator::LayoutBlocker

Summary:
QAbstractItemViews does layout in a timer event handler, to avoid unnecessary
layout calculations. Changes which cause a relayout only start the timer.
LayoutBlocker has the restriction that it only works if the event loop is not
entered during its lifetime. Without an event loop there's no expensive
relayout anyway, making the LayoutBlocker pointless in such cases.
LayoutBlocker works by changing the uniformItemSizes property of the QListView
to true and in the destructor back to the original value again. Those changes
do not trigger a relayout in QListView, so if the QListView did a layout with
uniformItemSizes set to true, it stays that way.
Fix it by triggering a relayout in ~LayoutBlocker.

This got exposed by a change in Qt, which results in QListView doing a relayout
while the LayoutBlocker is active.

BUG: 352776

Test Plan: kfilewidgettest_gui has proper item sizes now.

Reviewers: #frameworks, dfaure

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D9830
---
 src/filewidgets/kfilepreviewgenerator.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/filewidgets/kfilepreviewgenerator.cpp 
b/src/filewidgets/kfilepreviewgenerator.cpp
index 7965ab84..15b8ab84 100644
--- a/src/filewidgets/kfilepreviewgenerator.cpp
+++ b/src/filewidgets/kfilepreviewgenerator.cpp
@@ -70,10 +70,7 @@
  *
  * QListView does not invoke QItemDelegate::sizeHint() when the
  * uniformItemSize property has been set to true, so this property is
- * set before exchanging a block of icons. It is important to reset
- * it again before the event loop is entered, otherwise QListView
- * would not get the correct size hints after dispatching the layoutChanged()
- * signal.
+ * set before exchanging a block of icons.
  */
 class KFilePreviewGenerator::LayoutBlocker
 {
@@ -92,6 +89,11 @@ public:
     {
         if (m_view != nullptr) {
             m_view->setUniformItemSizes(m_uniformSizes);
+            /* The QListView did the layout with uniform item
+             * sizes, so trigger a relayout with the expected sizes. */
+            if (!m_uniformSizes) {
+                m_view->setGridSize(m_view->gridSize());
+            }
         }
     }
 
-- 
2.15.1


Reply via email to