rpms/kdebase/devel kdebase-4.2.0-dolphin-qt45.patch, NONE, 1.1 kdebase.spec, 1.357, 1.358

Than Ngo than at fedoraproject.org
Wed Feb 11 21:06:21 UTC 2009


Author: than

Update of /cvs/extras/rpms/kdebase/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9182

Modified Files:
	kdebase.spec 
Added Files:
	kdebase-4.2.0-dolphin-qt45.patch 
Log Message:
apply patch to make dolphin working well with qt4.5



kdebase-4.2.0-dolphin-qt45.patch:

--- NEW FILE kdebase-4.2.0-dolphin-qt45.patch ---
--- kdebase/apps/dolphin/src/dolphiniconsview.cpp	2009/01/06 17:13:38	906699
+++ kdebase/apps/dolphin/src/dolphiniconsview.cpp	2009/02/11 17:27:50	924814
@@ -402,12 +402,20 @@
     Q_ASSERT(additionalInfoCount >= 0);
     itemHeight += additionalInfoCount * m_font.pointSize() * 2;
 
-    // optimize the item size of the grid in a way to prevent large gaps on the
-    // right border (= row arrangement) or the bottom border (= column arrangement)
+    // Optimize the item size of the grid in a way to prevent large gaps on the
+    // right border (= row arrangement) or the bottom border (= column arrangement).
+    // There is no public API in QListView to find out the used width of the viewport
+    // for the layout. The following calculation of 'contentWidth'/'contentHeight'
+    // is based on QListViewPrivate::prepareItemsLayout() (Copyright (C) 2009 Nokia Corporation).
+    int frameAroundContents = 0;
+    if (style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents)) {
+        frameAroundContents = style()->pixelMetric(QStyle::PM_DefaultFrameWidth) * 2;
+    }
     const int spacing = settings->gridSpacing();
     if (settings->arrangement() == QListView::TopToBottom) {
-        const int contentWidth = viewport()->width() - 1 -
-                                 style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, horizontalScrollBar());
+        const int contentWidth = viewport()->width() - 1
+                                 - frameAroundContents
+                                 - style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, horizontalScrollBar());
         const int gridWidth = itemWidth + spacing * 2;
         const int horizItemCount = contentWidth / gridWidth;
         if (horizItemCount > 0) {
@@ -420,8 +428,9 @@
         m_decorationSize = QSize(itemWidth, size);
         setIconSize(QSize(itemWidth, size));
     } else {
-        const int contentHeight = viewport()->height() - 1 -
-                                  style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, verticalScrollBar());
+        const int contentHeight = viewport()->height() - 1
+                                  - frameAroundContents
+                                  - style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, verticalScrollBar());
         const int gridHeight = itemHeight + spacing;
         const int vertItemCount = contentHeight / gridHeight;
         if (vertItemCount > 0) {


Index: kdebase.spec
===================================================================
RCS file: /cvs/extras/rpms/kdebase/devel/kdebase.spec,v
retrieving revision 1.357
retrieving revision 1.358
diff -u -r1.357 -r1.358
--- kdebase.spec	28 Jan 2009 21:34:03 -0000	1.357
+++ kdebase.spec	11 Feb 2009 21:05:50 -0000	1.358
@@ -1,6 +1,6 @@
 Summary: K Desktop Environment 4 - Core Files
 Version: 4.2.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 %if 0%{?fedora} > 8
 Name: kdebase
@@ -32,6 +32,7 @@
 ## upstream patches
 # bugs.kde.org/162729
 Patch100: kdebase-4.2.0-konsole_kdeinit.patch
+Patch101: kdebase-4.2.0-dolphin-qt45.patch
 
 %ifnarch s390 s390x
 Requires: eject
@@ -128,6 +129,7 @@
 %patch1 -p1 -b .konsole-session
 
 %patch100 -p1 -b .konsole_kdeinit
+%patch101 -p1 -b .dolphin-qt45
 
 # fix incorrect assumption that we're building in a combined kdebase tree
 sed -i -e 's/EXISTS "${kdebase_SOURCE_DIR}"/0/g' apps/CMakeLists.txt
@@ -309,6 +311,9 @@
 
 
 %changelog
+* Wed Feb 11 2009 Than Ngo <than at redhat.com> - 4.2.0-3
+- apply patch to make dolphin working well with 4.5
+
 * Wed Jan 28 2009 Rex Dieter <rdieter at fedoraproject.org> - 4.2.0-2
 - KDEInit could not launch '/usr/bin/konsole' (kdebug#162729)
 




More information about the scm-commits mailing list