SOURCES: 0225-invalidate-tabbar-geometry-on-refresh.patch (NEW), 0118-qtcop...
arekm
arekm at pld-linux.org
Sat Nov 8 22:24:05 CET 2008
Author: arekm Date: Sat Nov 8 21:24:05 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- qtcopy patches
---- Files affected:
SOURCES:
0225-invalidate-tabbar-geometry-on-refresh.patch (NONE -> 1.1) (NEW), 0118-qtcopy-define.diff (NONE -> 1.1) (NEW), 0167-fix-group-reading.diff (NONE -> 1.1) (NEW), 0180-window-role.diff (NONE -> 1.1) (NEW), 0195-compositing-properties.diff (NONE -> 1.1) (NEW), 0203-qtexthtmlparser-link-color.diff (NONE -> 1.1) (NEW), 0209-prevent-qt-mixing.diff (NONE -> 1.1) (NEW), 0216-allow-isystem-for-headers.diff (NONE -> 1.1) (NEW), 0224-fast-qpixmap-fill.diff (NONE -> 1.1) (NEW), 0226-qtreeview-column_resize_when_needed.diff (NONE -> 1.1) (NEW), 0231-mac-plugins.diff (NONE -> 1.1) (NEW), 0234-fix-mysql-threaded.diff (NONE -> 1.1) (NEW), 0238-fix-qt-qttabbar-size.diff (NONE -> 1.1) (NEW), 0242-qclipboard-off-by-one.diff (NONE -> 1.1) (NEW), 0245-fix-randr-changes-detecting.diff (NONE -> 1.1) (NEW), 0248-fix-qwidget-scroll-slowness.diff (NONE -> 1.1) (NEW), 0249-webkit-stale-frame-pointer.diff (NONE -> 1.1) (NEW), 0250-out_of_source_build.diff (NONE -> 1.1) (NEW), 025
1-configure_nomake.diff (NONE -> 1.1) (NEW), 0253-qmake_correct_path_separators.diff (NONE -> 1.1) (NEW), 0254-fix-qgraphicsproxywidget-deletion-crash.diff (NONE -> 1.1) (NEW), 0255-qtreeview-selection-columns-hidden.diff (NONE -> 1.1) (NEW), 0256-fix-recursive-backingstore-sync-crash.diff (NONE -> 1.1) (NEW), 0257-qurl-validate-speedup.diff (NONE -> 1.1) (NEW), 0258-windowsxpstyle-qbrush.diff (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/0225-invalidate-tabbar-geometry-on-refresh.patch
diff -u /dev/null SOURCES/0225-invalidate-tabbar-geometry-on-refresh.patch:1.1
--- /dev/null Sat Nov 8 22:24:05 2008
+++ SOURCES/0225-invalidate-tabbar-geometry-on-refresh.patch Sat Nov 8 22:23:50 2008
@@ -0,0 +1,35 @@
+qt-bugs@ issue : 208185
+Trolltech task ID : 208349
+bugs.kde.org number : 159014
+applied: no
+author: Robert Knight <robertknight at gmail.com>
+
+When tabs are inserted or removed in a QTabBar, QTabBarPrivate::refresh()
+is called to update the layout. If the tabbar widget is hidden, this
+just sets a boolean variable (layoutDirty) and returns, so the parent widget's layout
+is not notified about the possible geometry change.
+
+Prior to Qt 4.4 this was not a problem because the geometry was recalculated
+in QTabBar::sizeHint() if the layoutDirty variable was set. In Qt 4.4 however the layout
+caches size hint information in QWidgetItemV2. Since the cache information is not invalidated,
+the layout may end up using out-of-date size hint information to compute the widget size.
+
+If the QTabBar is empty when QTabBar::sizeHint() is called, it will return a size with a height
+of 0, which will be kept in the cache and so the tab bar will never be shown.
+
+This patch fixes the problem by calling updateGeometry() whenever the tab bar's layout is refreshed.
+
+Index: src/gui/widgets/qtabbar.cpp
+===================================================================
+--- src/gui/widgets/qtabbar.cpp (revision 796858)
++++ src/gui/widgets/qtabbar.cpp (working copy)
+@@ -533,8 +533,8 @@
+ layoutTabs();
+ makeVisible(currentIndex);
+ q->update();
+- q->updateGeometry();
+ }
++ q->updateGeometry();
+ }
+
+ /*!
================================================================
Index: SOURCES/0118-qtcopy-define.diff
diff -u /dev/null SOURCES/0118-qtcopy-define.diff:1.1
--- /dev/null Sat Nov 8 22:24:06 2008
+++ SOURCES/0118-qtcopy-define.diff Sat Nov 8 22:23:51 2008
@@ -0,0 +1,24 @@
+qt-bugs@ issue : none
+Trolltech task ID : none
+applied: yes
+author: David Faure <faure at kde.org>
+
+Needed to distinguish qt-copy from released versions of qt, at least while
+we backport API additions to qt-copy.
+
+Index: src/corelib/global/qglobal.h
+===================================================================
+--- src/corelib/global/qglobal.h (revision 536662)
++++ src/corelib/global/qglobal.h (working copy)
+@@ -38,6 +38,11 @@
+ #include <QtCore/qconfig.h>
+ #endif
+
++/* QT_KDE_QT_COPY is set in qt-copy so that we know when we can use features backported to qt-copy
++ Keep in mind that it should also work with the right release of Qt, so use something like:
++ #if defined(QT_KDE_QT_COPY) || QT_VERSION >= 0x040200 */
++#define QT_KDE_QT_COPY
++
+ /*
+ The operating system, must be one of: (Q_OS_x)
+
================================================================
Index: SOURCES/0167-fix-group-reading.diff
diff -u /dev/null SOURCES/0167-fix-group-reading.diff:1.1
--- /dev/null Sat Nov 8 22:24:07 2008
+++ SOURCES/0167-fix-group-reading.diff Sat Nov 8 22:23:51 2008
@@ -0,0 +1,28 @@
+qt-bugs@ issue : none
+Trolltech task ID : none yet
+bugs.kde.org number : None
+applied: no
+author: Dirk Mueller <mueller at kde.org>
+
+in big user environments, getgrgid_r() needs more memory than sysconf() returns.
+Try a bit harder.
+
+--- src/corelib//io/qfsfileengine_unix.cpp
++++ src/corelib//io/qfsfileengine_unix.cpp
+@@ -835,9 +835,13 @@
+ size_max = sysconf(_SC_GETGR_R_SIZE_MAX);
+ if (size_max == -1)
+ size_max = 1024;
+- buf.resize(size_max);
+- struct group entry;
+- getgrgid_r(ownerId(own), &entry, buf.data(), buf.size(), &gr);
++ for (;size_max < 256000; size_max += size_max) {
++ buf.resize(size_max);
++ struct group entry;
++ if (!getgrgid_r(ownerId(own), &entry, buf.data(), buf.size(), &gr) || errno != ERANGE)
++ break;
++
++ }
+ #else
+ gr = getgrgid(ownerId(own));
+ #endif
================================================================
Index: SOURCES/0180-window-role.diff
diff -u /dev/null SOURCES/0180-window-role.diff:1.1
--- /dev/null Sat Nov 8 22:24:07 2008
+++ SOURCES/0180-window-role.diff Sat Nov 8 22:23:52 2008
@@ -0,0 +1,101 @@
+qt-bugs@ issue : 167704
+Trolltech task ID : 168283 (status: "fixed" for Qt 4.4.0, but effectively refused)
+bugs.kde.org number : none
+applied: no
+author: Lubos Lunak <l.lunak at kde.org>
+
+NOTE: It is suggested to apply patch #0209 as well when this patch is used.
+
+This patch uses object name as a fallback for window role if no window role
+is set explicitly using setWindowRole(). Since Qt3 always used the object
+name as the window role and most Qt3/KDE3 code is ported to call setObjectName(),
+this makes the window role set in many cases (which KWin uses for window identifying).
+
+
+--- src/corelib/kernel/qobject.cpp.sav 2008-02-22 09:03:40.000000000 +0100
++++ src/corelib/kernel/qobject.cpp 2008-02-23 16:15:51.000000000 +0100
+@@ -1016,9 +1016,18 @@ void QObject::setObjectName(const QStrin
+ {
+ Q_D(QObject);
+ d->objectName = name;
++#if defined(Q_WS_X11)
++ d->checkWindowRole();
++#endif
+ }
+
+
++#if defined(Q_WS_X11)
++void QObjectPrivate::checkWindowRole()
++{
++}
++#endif
++
+ #ifdef QT3_SUPPORT
+ /*! \internal
+ QObject::child is compat but needs to call itself recursively,
+--- src/corelib/kernel/qobject_p.h.sav 2008-02-22 09:23:44.000000000 +0100
++++ src/corelib/kernel/qobject_p.h 2008-02-23 16:16:46.000000000 +0100
+@@ -148,6 +148,9 @@ public:
+ mutable quint32 connectedSignals;
+
+ QString objectName;
++#if defined(Q_WS_X11)
++ virtual void checkWindowRole();
++#endif
+
+ // Note: you must hold the signalSlotLock() before accessing the lists below or calling the functions
+ struct Connection
+--- src/gui/kernel/qwidget_p.h.sav 2008-02-22 09:04:04.000000000 +0100
++++ src/gui/kernel/qwidget_p.h 2008-02-23 16:17:07.000000000 +0100
+@@ -324,6 +324,7 @@ public:
+
+ #if defined(Q_WS_X11)
+ void setWindowRole();
++ virtual void checkWindowRole();
+ void sendStartupMessage(const char *message) const;
+ void setNetWmWindowTypes();
+ #endif
+--- src/gui/kernel/qwidget_x11.cpp.sav 2008-02-23 15:28:47.000000000 +0100
++++ src/gui/kernel/qwidget_x11.cpp 2008-02-23 16:31:47.000000000 +0100
+@@ -710,13 +710,17 @@ void QWidgetPrivate::create_sys(WId wind
+
+
+ // declare the widget's window role
++ QByteArray windowRole;
+ if (QTLWExtra *topData = maybeTopData()) {
+- if (!topData->role.isEmpty()) {
+- QByteArray windowRole = topData->role.toUtf8();
+- XChangeProperty(dpy, id,
+- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
+- (unsigned char *)windowRole.constData(), windowRole.length());
+- }
++ if (!topData->role.isEmpty())
++ windowRole = topData->role.toUtf8();
++ }
++ if (windowRole.isEmpty()) // use object name as a fallback
++ windowRole = objectName.toUtf8();
++ if (!windowRole.isEmpty()) {
++ XChangeProperty(dpy, id,
++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
++ (unsigned char *)windowRole.constData(), windowRole.length());
+ }
+
+ // set client leader property
+@@ -2852,6 +2856,17 @@ void QWidgetPrivate::setWindowRole()
+ (unsigned char *)windowRole.constData(), windowRole.length());
+ }
+
++void QWidgetPrivate::checkWindowRole()
++{
++ Q_Q(QWidget);
++ if( !q->windowRole().isEmpty() || !q->internalWinId())
++ return;
++ QByteArray windowRole = objectName.toUtf8(); // use as a fallback
++ XChangeProperty(X11->display, q->internalWinId(),
++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
++ (unsigned char *)windowRole.constData(), windowRole.length());
++}
++
+ Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine)
+ QPaintEngine *QWidget::paintEngine() const
+ {
================================================================
Index: SOURCES/0195-compositing-properties.diff
diff -u /dev/null SOURCES/0195-compositing-properties.diff:1.1
--- /dev/null Sat Nov 8 22:24:08 2008
+++ SOURCES/0195-compositing-properties.diff Sat Nov 8 22:23:52 2008
@@ -0,0 +1,58 @@
+qt-bugs@ issue : none
+bugs.kde.org number : none
+applied: no
+author: Lubos Lunak <l.lunak at kde.org>
+
+This patch makes override-redirect windows (popup menu, dropdown menu,
+tooltip, combobox, etc.) also have more window properties like WM_CLASS,
+so they can be used when compositing.
+
+--- src/gui/kernel/qwidget_x11.cpp
++++ src/gui/kernel/qwidget_x11.cpp
+@@ -637,6 +637,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
+ Q_ASSERT(id);
+ XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder,
+ &wsa);
++ XClassHint class_hint;
++ QByteArray appName = qAppName().toLatin1();
++ class_hint.res_name = appName.data(); // application name
++ class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class
++ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint);
+ } else if (topLevel && !desktop) { // top-level widget
+ if (!X11->wm_client_leader)
+ create_wm_client_leader();
+@@ -685,13 +690,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
+ // set EWMH window types
+ setNetWmWindowTypes();
+
++ // when we create a toplevel widget, the frame strut should be dirty
++ data.fstrut_dirty = 1;
++
++ } else {
++ // non-toplevel widgets don't have a frame, so no need to
++ // update the strut
++ data.fstrut_dirty = 0;
++ }
++
++ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
+ // set _NET_WM_PID
+ long curr_pid = getpid();
+ XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace,
+ (unsigned char *) &curr_pid, 1);
+
+- // when we create a toplevel widget, the frame strut should be dirty
+- data.fstrut_dirty = 1;
+
+ // declare the widget's window role
+ if (QTLWExtra *topData = maybeTopData()) {
+@@ -707,10 +720,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
+ XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER),
+ XA_WINDOW, 32, PropModeReplace,
+ (unsigned char *)&X11->wm_client_leader, 1);
+- } else {
+- // non-toplevel widgets don't have a frame, so no need to
+- // update the strut
+- data.fstrut_dirty = 0;
+ }
+
+ if (initializeWindow && q->internalWinId()) {
================================================================
Index: SOURCES/0203-qtexthtmlparser-link-color.diff
diff -u /dev/null SOURCES/0203-qtexthtmlparser-link-color.diff:1.1
--- /dev/null Sat Nov 8 22:24:08 2008
+++ SOURCES/0203-qtexthtmlparser-link-color.diff Sat Nov 8 22:23:52 2008
@@ -0,0 +1,18 @@
+qt-bugs@ issue : N190509
+Trolltech task ID : 190904 (Status: closed; Version fix: 4.5.0)
+applied: no
+author: Rafael Fernández López <ereslibre at kde.org>
+
+Links are assigned a foreground color according to the system current color scheme.
+
+--- src/gui/text/qtexthtmlparser.cpp (revisión: 745183)
++++ src/gui/text/qtexthtmlparser.cpp (copia de trabajo)
+@@ -1031,7 +1031,7 @@ void QTextHtmlParserNode::initializeProp
+ && !attributes.at(i + 1).isEmpty()) {
+ hasHref = true;
+ charFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline);
+- charFormat.setForeground(Qt::blue);
++ charFormat.setForeground(QApplication::palette().link());
+ }
+ }
+
================================================================
Index: SOURCES/0209-prevent-qt-mixing.diff
diff -u /dev/null SOURCES/0209-prevent-qt-mixing.diff:1.1
--- /dev/null Sat Nov 8 22:24:08 2008
+++ SOURCES/0209-prevent-qt-mixing.diff Sat Nov 8 22:23:53 2008
@@ -0,0 +1,28 @@
+qt-bugs@ issue : none
+Trolltech task ID : none
+bugs.kde.org number : none
+applied: yes
+author: Lubos Lunak <l.lunak at kde.org>
+
+This patch changes QObjectPrivateVersion, thus preventing mixing
+parts of upstream Qt and qt-copy. In general it is a bad idea to mix
+e.g. libQtCore from one build and libQtGui from another one, and other
+qt-copy patches could make changes in Qt internal structures that could
+cause problems when mixed with upstream Qt.
+
+This patch does not make qt-copy binary incompatible with upstream Qt.
+It only further enforces using the same sources for the whole Qt build.
+
+--- src/corelib/kernel/qobject_p.h.sav 2008-01-29 19:37:26.000000000 +0100
++++ src/corelib/kernel/qobject_p.h 2008-01-30 14:08:15.000000000 +0100
+@@ -75,7 +75,9 @@ extern QSignalSpyCallbackSet Q_CORE_EXPO
+
+ inline QObjectData::~QObjectData() {}
+
+-enum { QObjectPrivateVersion = QT_VERSION };
++// add 0x1000000 to mark it as qt-copy version, with possible modifications
++// in some Q*Private class
++enum { QObjectPrivateVersion = QT_VERSION + 0x1000000 };
+
+ class Q_CORE_EXPORT QObjectPrivate : public QObjectData
+ {
================================================================
Index: SOURCES/0216-allow-isystem-for-headers.diff
diff -u /dev/null SOURCES/0216-allow-isystem-for-headers.diff:1.1
--- /dev/null Sat Nov 8 22:24:09 2008
+++ SOURCES/0216-allow-isystem-for-headers.diff Sat Nov 8 22:23:53 2008
@@ -0,0 +1,50 @@
+qt-bugs@ issue : 199610
+Trolltech task ID :
+bugs.kde.org number :
+applied: no
+author: Benjamin Reed <rangerrick at befunk.com>
+
+I don't have the exact output anymore (I've since patched Qt's configure) but
+essentially, since I have pcre.h in /opt/kde4-deps/include, it was
+conflicting with Qt's (modified) pcre.h in the WebKit bits, since
+-I /opt/kde4-deps/include ends up in CXXFLAGS in the generated makefiles, it
+comes *before* the specific locations in INCPATH on the compile line, and you
+end up with a conflict with the system-installed pcre.h.
+
+Presumably, if your pcre.h is in /usr/include as on most Linux systems, you
+wouldn't notice this issue since /usr/include's already in your include path
+and people likely don't pass -I /usr/include to configure. I suspect that on
+any platform with a regular, system-installed pcre.h (or clucene headers),
+adding -I /usr/include would exhibit this bug, just as a custom-installed
+pcre/clucene in another root would.
+
+This patch adds support for using -isystem to allow putting an include
+directory at the end of the compiler's header search path.
+
+
+Index: configure
+===================================================================
+--- configure (revision 777050)
++++ configure (working copy)
+@@ -811,6 +811,11 @@
+ VAL=`echo $1 | sed 's,-D,,'`
+ fi
+ ;;
++ -isystem)
++ VAR="add_isystempath"
++ shift
++ VAL="$1"
++ ;;
+ -I?*|-I)
+ VAR="add_ipath"
+ if [ "$1" = "-I" ]; then
+@@ -1666,6 +1671,9 @@
+ add_ipath)
+ I_FLAGS="$I_FLAGS -I\"${VAL}\""
+ ;;
++ add_isystempath)
++ I_FLAGS="$I_FLAGS -isystem \"${VAL}\""
++ ;;
+ add_lpath)
+ L_FLAGS="$L_FLAGS -L\"${VAL}\""
+ ;;
================================================================
Index: SOURCES/0224-fast-qpixmap-fill.diff
diff -u /dev/null SOURCES/0224-fast-qpixmap-fill.diff:1.1
--- /dev/null Sat Nov 8 22:24:09 2008
+++ SOURCES/0224-fast-qpixmap-fill.diff Sat Nov 8 22:23:54 2008
@@ -0,0 +1,48 @@
+qt-bugs@ issue : None
+Trolltech task ID : None
+bugs.kde.org number : None
+applied: no
+author: Fredrik Höglund <fredrik at kde.org>
+
+Since there's no way to specify that a QPixmap should have an alpha channel
+when it's created, it's quite common to call pixmap.fill(Qt::transparent)
+immediately after creating it, to force Qt to recreate it with an alpha
+channel. Unfortunately QPixmap::fill() does this by creating a QImage,
+filling it with the specified color, and then converting it to a QPixmap.
+
+This patch avoids the expensive image->pixmap conversion by simply discarding
+the old pixmap, creating a new one with the correct format, and doing the
+fill server side.
+
+Index: src/gui/image/qpixmap_x11.cpp
+===================================================================
+--- src/gui/image/qpixmap_x11.cpp (revision 798574)
++++ src/gui/image/qpixmap_x11.cpp (working copy)
+@@ -1107,7 +1107,26 @@
+ {
+ if (fillColor.alpha() != 255) {
+ #ifndef QT_NO_XRENDER
+- if (picture && d == 32) {
++ if (X11->use_xrender) {
++ if (!picture || d != 32) {
++ if (picture)
++ XRenderFreePicture(X11->display, picture);
++ if (mask_picture)
++ XRenderFreePicture(X11->display, mask_picture);
++ if (x11_mask)
++ XFreePixmap(X11->display, x11_mask);
++ if (hd)
++ XFreePixmap(X11->display, hd);
++ if (hd2)
++ XFreePixmap(X11->display, hd2);
++ XRenderPictFormat *format = XRenderFindStandardFormat(X11->display, PictStandardARGB32);
++ hd = XCreatePixmap(X11->display, RootWindow(X11->display, xinfo.screen()), width(), height(), 32);
++ picture = XRenderCreatePicture(X11->display, hd, format, 0, 0);
++ mask_picture = 0;
++ x11_mask = 0;
++ hd2 = 0;
++ d = 32;
++ }
+ ::Picture src = X11->getSolidFill(xinfo.screen(), fillColor);
+ XRenderComposite(X11->display, PictOpSrc, src, 0, picture,
+ 0, 0, width(), height(),
================================================================
Index: SOURCES/0226-qtreeview-column_resize_when_needed.diff
diff -u /dev/null SOURCES/0226-qtreeview-column_resize_when_needed.diff:1.1
--- /dev/null Sat Nov 8 22:24:10 2008
+++ SOURCES/0226-qtreeview-column_resize_when_needed.diff Sat Nov 8 22:23:54 2008
@@ -0,0 +1,110 @@
+qt-bugs@ issue : N209927
+Trolltech task ID : 210390
+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.
+
+Index: src/gui/itemviews/qtreeview.h
+===================================================================
+--- src/gui/itemviews/qtreeview.h (revisión: 803370)
++++ src/gui/itemviews/qtreeview.h (copia de trabajo)
+@@ -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
+Index: src/gui/itemviews/qtreeview.cpp
+===================================================================
+--- src/gui/itemviews/qtreeview.cpp (revisión: 803370)
++++ src/gui/itemviews/qtreeview.cpp (copia de trabajo)
+@@ -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);
+Index: src/gui/itemviews/qtreeview_p.h
+===================================================================
+--- src/gui/itemviews/qtreeview_p.h (revision 803534)
++++ src/gui/itemviews/qtreeview_p.h (working copy)
+@@ -101,6 +101,7 @@
+ QPixmap after;
+ };
+
++ void _q_forceColumnResizeToFitContents();
+ void expand(int item, bool emitSignal);
+ void collapse(int item, bool emitSignal);
+
================================================================
Index: SOURCES/0231-mac-plugins.diff
diff -u /dev/null SOURCES/0231-mac-plugins.diff:1.1
--- /dev/null Sat Nov 8 22:24:10 2008
+++ SOURCES/0231-mac-plugins.diff Sat Nov 8 22:23:54 2008
@@ -0,0 +1,61 @@
+qt-bugs@ issue : N214287
+Trolltech task ID : 214302
+bugs.kde.org number :
+applied: no
+author: Benjamin Reed <rangerrick at befunk.com>
+
+By default, Qt/Mac builds plugins as dynamic libraries, instead of
+bundles, which is incorrect for a runtime-loadable module. In
+addition, it calls them .dylib when they should be .bundle (or .so)
+by Mac convention (although this is just a cosmetic thing).
+
+In addition, KDE phonon cannot load Qt phonon backends because they
+are built as normal twolevel dynamic libraries, which means that
+they try to use symbols from the library they were linked against,
+even if a newer version of that library is already loaded into
+memory. For example:
+
+$QTDIR/plugins/phonon_backend/libphonon_qt7.dylib links to
+$QTDIR/lib/phonon.framework/Versions/4/phonon. Amarok links to
+$KDEDIR/lib/libphonon.4.dylib. At runtime, Amarok resolves it's
+phonon symbols to the $KDEDIR version, then dlopens libphonon_qt7
+from $QTDIR which resolves some of those same symbols from
+the $QTDIR version of phonon, since it explicitly references
+the version it was linked against, rather than the version it
+was loaded into.
+
+What you end up with is a dangling pointer.
+
+For details on this, see Apple's documentation:
+
+http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compiling/chapter_4_section_7.html
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list