From b4148738ad812d5591f78d1c94908fa4bb6b54ed Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 22 Oct 2008 12:33:10 +0000 Subject: [PATCH] Fix wrong signal/slot connection --- src/ObjBrowser/OB_Browser.cxx | 2 -- src/Qtx/QtxTreeView.cxx | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 63ea37b3f..de8ba7667 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -162,8 +162,6 @@ OB_Browser::OB_Browser( QWidget* parent, QAbstractItemModel* model ) connect( myView, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); - connect( myView, SIGNAL( doubleClicked( QListViewItem* ) ), - this, SLOT( onDoubleClicked( QListViewItem* ) ) ); } diff --git a/src/Qtx/QtxTreeView.cxx b/src/Qtx/QtxTreeView.cxx index ea2e520d2..001aaf17d 100644 --- a/src/Qtx/QtxTreeView.cxx +++ b/src/Qtx/QtxTreeView.cxx @@ -377,11 +377,12 @@ void QtxTreeView::emitSortingEnabled( bool enabled ) void QtxTreeView::setModel( QAbstractItemModel* m ) { if( model() ) - disconnect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), + disconnect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) ); QTreeView::setModel( m ); - connect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), - this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) ); + if ( model() ) + connect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), + this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) ); } void QtxTreeView::onAppropriate( Qt::Orientation orient, int first, int last ) -- 2.39.2