rev 10449 - in trunk/packages/qt4-x11/debian: . patches

Fathi Boudra fabo at alioth.debian.org
Sat May 3 09:40:14 UTC 2008


Author: fabo
Date: 2008-05-03 09:40:13 +0000 (Sat, 03 May 2008)
New Revision: 10449

Added:
   trunk/packages/qt4-x11/debian/patches/0226-qtreeview-column_resize_when_needed.diff
Modified:
   trunk/packages/qt4-x11/debian/changelog
   trunk/packages/qt4-x11/debian/patches/0216-allow-isystem-for-headers.diff
   trunk/packages/qt4-x11/debian/patches/12_fix_qmake_pkgconfig.diff
   trunk/packages/qt4-x11/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff
   trunk/packages/qt4-x11/debian/patches/15_fix_qmake_makefile_generation.diff
   trunk/packages/qt4-x11/debian/patches/90_gcc43.diff
   trunk/packages/qt4-x11/debian/patches/series
Log:
* Add qt-copy patch:
  * 0226-qtreeview-column_resize_when_needed
    This patch assures that if no header is shown, or if we only have one
    column (so no other columns become shrinked), the contents will be
    visible.


Modified: trunk/packages/qt4-x11/debian/changelog
===================================================================
--- trunk/packages/qt4-x11/debian/changelog	2008-05-02 19:44:50 UTC (rev 10448)
+++ trunk/packages/qt4-x11/debian/changelog	2008-05-03 09:40:13 UTC (rev 10449)
@@ -15,17 +15,25 @@
   * Make libqt4-gui a transitional package (Closes: #478694) depending on
     libqtgui4, libqt4-opengl (Closes: #478264), libqt4-sql, libqt4-designer,
     libqt4-assistant.
-  * Use ${binary:Version} instead of ${source:Version} in dependences of
+  * Use ${binary:Version} instead of ${source:Version} in dependencies of
     libqt4-core and libqt4-gui transitional packages.
   * Require just libqtcore4 to install libqt4-dbg instead of libqt4-gui.
   * Resync patches:
     - 05_append_qt4_target.diff - fix offsets.
-    - 11_qdbus_to_dbus_fix.diff - remove, fixed upstream.
+    - 11_qdbus_to_dbus_fix.diff - remove, merged upstream.
     - Revert to "runtime" configuration for xcursor, xinerama, xfixes and drop
       16_always_init_qt_x11data_ptrx.diff patch. Fixed upstream.
 
- -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 02 May 2008 19:30:48 +0300
+  +++ Changes by Fathi Boudra:
 
+  * Add qt-copy patch:
+    * 0226-qtreeview-column_resize_when_needed
+      This patch assures that if no header is shown, or if we only have one
+      column (so no other columns become shrinked), the contents will be
+      visible.
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sat, 03 May 2008 11:26:50 +0200
+
 qt4-x11 (4.4.0~rc1-5) unstable; urgency=high
 
   +++ Changes by Fathi Boudra:

Modified: trunk/packages/qt4-x11/debian/patches/0216-allow-isystem-for-headers.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0216-allow-isystem-for-headers.diff	2008-05-02 19:44:50 UTC (rev 10448)
+++ trunk/packages/qt4-x11/debian/patches/0216-allow-isystem-for-headers.diff	2008-05-03 09:40:13 UTC (rev 10449)
@@ -36,7 +36,7 @@
      -I?*|-I)
          VAR="add_ipath"
          if [ "$1" = "-I" ]; then
-@@ -1724,6 +1729,9 @@
+@@ -1725,6 +1730,9 @@
      add_ipath)
          I_FLAGS="$I_FLAGS -I\"${VAL}\""
          ;;

Added: trunk/packages/qt4-x11/debian/patches/0226-qtreeview-column_resize_when_needed.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0226-qtreeview-column_resize_when_needed.diff	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0226-qtreeview-column_resize_when_needed.diff	2008-05-03 09:40:13 UTC (rev 10449)
@@ -0,0 +1,94 @@
+qt-bugs@ issue : None
+Trolltech task ID : None
+bugs.kde.org number : None
+applied: no
+author: Rafael Fernández López <ereslibre at kde.org>
+
+If we have no header, or not visible header on a QTreeView, we can end up with
+an unusable widget if we expand lots of child widgets of the kind
+
+a
+ b
+  c
+   d
+    ...
+
+This patch assures that if no header is shown, or if we only have one column (so
+no other columns become shrinked), the contents will be visible.
+
+--- a/src/gui/itemviews/qtreeview.h
++++ b/src/gui/itemviews/qtreeview.h
+@@ -229,6 +229,7 @@
+     Q_PRIVATE_SLOT(d_func(), void _q_columnsAboutToBeRemoved(const QModelIndex &, int, int))
+     Q_PRIVATE_SLOT(d_func(), void _q_columnsRemoved(const QModelIndex &, int, int))
+     Q_PRIVATE_SLOT(d_func(), void _q_modelAboutToBeReset())
++    Q_PRIVATE_SLOT(d_func(), void _q_forceColumnResizeToFitContents())
+ };
+ 
+ #endif // QT_NO_TREEVIEW
+--- a/src/gui/itemviews/qtreeview.cpp
++++ b/src/gui/itemviews/qtreeview.cpp
+@@ -246,6 +246,19 @@
+ 
+     connect(d->model, SIGNAL(modelAboutToBeReset()), SLOT(_q_modelAboutToBeReset()));
+ 
++    // we connect these signals from the model to a slot that will call
++    // resizeColumnToContents. This is important because if we call it only on
++    // expand() method, when we expand a node, the filling of the model can be
++    // delayed. So, we call it again after the model has finished its job.
++    connect(d->model, SIGNAL(layoutChanged()),
++               this, SLOT(_q_forceColumnResizeToFitContents()));
++    connect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
++               this, SLOT(_q_forceColumnResizeToFitContents()));
++    connect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
++               this, SLOT(_q_forceColumnResizeToFitContents()));
++
++
++
+     if (d->sortingEnabled)
+         sortByColumn(header()->sortIndicatorSection());
+ }
+@@ -2787,6 +2800,8 @@
+     }
+     if (model->canFetchMore(index))
+         model->fetchMore(index);
++
++    _q_forceColumnResizeToFitContents();
+ }
+ 
+ void QTreeViewPrivate::collapse(int item, bool emitSignal)
+@@ -2826,6 +2841,8 @@
+         else
+             emit q->collapsed(modelIndex);
+     }
++
++    _q_forceColumnResizeToFitContents();
+ }
+ 
+ void QTreeViewPrivate::prepareAnimatedOperation(int item, AnimatedOperation::Type type)
+@@ -2937,6 +2954,25 @@
+     viewItems.clear();
+ }
+ 
++void QTreeViewPrivate::_q_forceColumnResizeToFitContents()
++{
++    Q_Q(QTreeView);
++
++    /**
++      * if:
++      *
++      * a) The tree view has no header (user cannot resize the column) OR
++      * b) The tree view has a header, but hidden (user cannot resize the column) OR
++      * c) The tree view has a visible header, but with _only_ one (or zero) column (that
++      *    means: no other information will be affected).
++      *
++      * We can expand the column to make the contents properly visible.
++      */
++    if (!header || !header->isVisible() || ((header->count() - header->hiddenSectionCount()) <= 1)) {
++        q->resizeColumnToContents(q->currentIndex().column());
++    }
++}
++
+ void QTreeViewPrivate::_q_columnsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
+ {
+     Q_UNUSED(parent);

Modified: trunk/packages/qt4-x11/debian/patches/12_fix_qmake_pkgconfig.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/12_fix_qmake_pkgconfig.diff	2008-05-02 19:44:50 UTC (rev 10448)
+++ trunk/packages/qt4-x11/debian/patches/12_fix_qmake_pkgconfig.diff	2008-05-03 09:40:13 UTC (rev 10449)
@@ -1,5 +1,3 @@
-Index: b/qmake/generators/unix/unixmake2.cpp
-===================================================================
 --- a/qmake/generators/unix/unixmake2.cpp
 +++ b/qmake/generators/unix/unixmake2.cpp
 @@ -1440,6 +1440,8 @@

Modified: trunk/packages/qt4-x11/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff	2008-05-02 19:44:50 UTC (rev 10448)
+++ trunk/packages/qt4-x11/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff	2008-05-03 09:40:13 UTC (rev 10449)
@@ -1,5 +1,3 @@
-Index: b/src/gui/kernel/kernel.pri
-===================================================================
 --- a/src/gui/kernel/kernel.pri
 +++ b/src/gui/kernel/kernel.pri
 @@ -112,6 +112,7 @@
@@ -18,8 +16,6 @@
  	}
  
  
-Index: b/src/gui/painting/painting.pri
-===================================================================
 --- a/src/gui/painting/painting.pri
 +++ b/src/gui/painting/painting.pri
 @@ -63,6 +63,8 @@

Modified: trunk/packages/qt4-x11/debian/patches/15_fix_qmake_makefile_generation.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/15_fix_qmake_makefile_generation.diff	2008-05-02 19:44:50 UTC (rev 10448)
+++ trunk/packages/qt4-x11/debian/patches/15_fix_qmake_makefile_generation.diff	2008-05-03 09:40:13 UTC (rev 10449)
@@ -1,5 +1,3 @@
-Index: b/qmake/generators/makefile.cpp
-===================================================================
 --- a/qmake/generators/makefile.cpp
 +++ b/qmake/generators/makefile.cpp
 @@ -2334,7 +2334,7 @@

Modified: trunk/packages/qt4-x11/debian/patches/90_gcc43.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/90_gcc43.diff	2008-05-02 19:44:50 UTC (rev 10448)
+++ trunk/packages/qt4-x11/debian/patches/90_gcc43.diff	2008-05-03 09:40:13 UTC (rev 10449)
@@ -11,7 +11,7 @@
      for (int i = 0; i < count; ++i) {
 @@ -622,7 +622,7 @@
  }
-
+ 
  template<>
 -static char* fillList<float>(char *buffer, const QList<QVariant> &list, float*)
 +char* fillList<float>(char *buffer, const QList<QVariant> &list, float*)

Modified: trunk/packages/qt4-x11/debian/patches/series
===================================================================
--- trunk/packages/qt4-x11/debian/patches/series	2008-05-02 19:44:50 UTC (rev 10448)
+++ trunk/packages/qt4-x11/debian/patches/series	2008-05-03 09:40:13 UTC (rev 10449)
@@ -11,6 +11,7 @@
 0223-fix-qpixmap-hasalpha.diff
 0224-fast-qpixmap-fill.diff
 0225-invalidate-tabbar-geometry-on-refresh.diff
+0226-qtreeview-column_resize_when_needed.diff
 
 # debian patches
 01_qmake_for_debian.diff




More information about the pkg-kde-commits mailing list