summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fabo@debian.org>2008-05-03 09:40:13 +0000
committerFathi Boudra <fabo@debian.org>2008-05-03 09:40:13 +0000
commit9efecd3dee4623d7d1585d95b9bbe98d040b5e9f (patch)
treec03f2e17af629e0ba3ddd1f670a36de561dd6f27
parent8667911ed97cc6d81e44a74c6b2fd8a7e577e733 (diff)
downloadqt4-x11-9efecd3dee4623d7d1585d95b9bbe98d040b5e9f.tar.gz
* 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.
-rw-r--r--debian/changelog14
-rw-r--r--debian/patches/0216-allow-isystem-for-headers.diff2
-rw-r--r--debian/patches/0226-qtreeview-column_resize_when_needed.diff94
-rw-r--r--debian/patches/12_fix_qmake_pkgconfig.diff2
-rw-r--r--debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff4
-rw-r--r--debian/patches/15_fix_qmake_makefile_generation.diff2
-rw-r--r--debian/patches/90_gcc43.diff2
-rw-r--r--debian/patches/series1
8 files changed, 108 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog
index bba4780..0572204 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,16 +15,24 @@ qt4-x11 (4.4.0-1) UNRELEASED; urgency=low
* 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@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@lists.debian.org> Sat, 03 May 2008 11:26:50 +0200
qt4-x11 (4.4.0~rc1-5) unstable; urgency=high
diff --git a/debian/patches/0216-allow-isystem-for-headers.diff b/debian/patches/0216-allow-isystem-for-headers.diff
index 127cb61..b6b2dbc 100644
--- a/debian/patches/0216-allow-isystem-for-headers.diff
+++ b/debian/patches/0216-allow-isystem-for-headers.diff
@@ -36,7 +36,7 @@ directory at the end of the compiler's header search path.
-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}\""
;;
diff --git a/debian/patches/0226-qtreeview-column_resize_when_needed.diff b/debian/patches/0226-qtreeview-column_resize_when_needed.diff
new file mode 100644
index 0000000..4f8c116
--- /dev/null
+++ b/debian/patches/0226-qtreeview-column_resize_when_needed.diff
@@ -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@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);
diff --git a/debian/patches/12_fix_qmake_pkgconfig.diff b/debian/patches/12_fix_qmake_pkgconfig.diff
index 3e93a0f..33fffbb 100644
--- a/debian/patches/12_fix_qmake_pkgconfig.diff
+++ b/debian/patches/12_fix_qmake_pkgconfig.diff
@@ -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 @@
diff --git a/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff b/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff
index d68cc24..47fee7e 100644
--- a/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff
+++ b/debian/patches/14_add_libraries_to_gui_build_where_actually_needed.diff
@@ -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/kernel/kernel.pri
}
-Index: b/src/gui/painting/painting.pri
-===================================================================
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -63,6 +63,8 @@
diff --git a/debian/patches/15_fix_qmake_makefile_generation.diff b/debian/patches/15_fix_qmake_makefile_generation.diff
index 1cd3e10..94307e4 100644
--- a/debian/patches/15_fix_qmake_makefile_generation.diff
+++ b/debian/patches/15_fix_qmake_makefile_generation.diff
@@ -1,5 +1,3 @@
-Index: b/qmake/generators/makefile.cpp
-===================================================================
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2334,7 +2334,7 @@
diff --git a/debian/patches/90_gcc43.diff b/debian/patches/90_gcc43.diff
index 21facf7..71dbc14 100644
--- a/debian/patches/90_gcc43.diff
+++ b/debian/patches/90_gcc43.diff
@@ -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*)
diff --git a/debian/patches/series b/debian/patches/series
index f580f8a..f3ee02f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -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