[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/kopete/contactlist
From:       Roman Jarosz <kedgedev () gmail ! com>
Date:       2009-04-02 22:39:39
Message-ID: 1238711979.379792.12257.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 948407 by rjarosz:

Work around Qt bug by making sure executeDelayedItemsLayout is called in
viewportEvent, the bug caused crashes in QTreeView's with a QSortFilterProxyModel



 M  +10 -0     kopetecontactlistview.cpp  
 M  +1 -0      kopetecontactlistview.h  


--- trunk/KDE/kdenetwork/kopete/kopete/contactlist/kopetecontactlistview.cpp #948406:948407
@@ -708,6 +708,16 @@
 	return QTreeView::eventFilter( object, event );
 }
 
+bool KopeteContactListView::viewportEvent( QEvent *event )
+{
+	// FIXME: Fix for crash, easily reproducible by assigning shortcut to show offline users action
+	// and holding down that action and moving mouse over contact list.
+	// Is this a Qt bug or are we using invalidate() in ContactListProxyModel wrongly?
+	// The same crash was in KTorrent bug 172198.
+	executeDelayedItemsLayout();
+	return QTreeView::viewportEvent( event );
+}
+
 void KopeteContactListView::rowsInserted( const QModelIndex &parent, int start, int end )
 {
 	QTreeView::rowsInserted( parent, start, end );
--- trunk/KDE/kdenetwork/kopete/kopete/contactlist/kopetecontactlistview.h #948406:948407
@@ -97,6 +97,7 @@
 	virtual void dragMoveEvent( QDragMoveEvent *event );
 	virtual void timerEvent( QTimerEvent *event );
 	virtual bool eventFilter( QObject *object, QEvent *event );
+	virtual bool viewportEvent( QEvent *event );
 
 protected slots:
 	virtual void rowsInserted( const QModelIndex &parent, int start, int end );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic